@crowdedkingdoms/crowdyjs 18.10.0 → 18.11.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 (63) hide show
  1. package/MIGRATION.md +43 -0
  2. package/README.md +79 -30
  3. package/dist/crowdy-client.d.ts +11 -3
  4. package/dist/crowdy-client.d.ts.map +1 -1
  5. package/dist/crowdy-client.js +25 -4
  6. package/dist/default-origin.d.ts +6 -6
  7. package/dist/default-origin.d.ts.map +1 -1
  8. package/dist/default-origin.js +6 -6
  9. package/dist/domains/exec.d.ts +6 -0
  10. package/dist/domains/exec.d.ts.map +1 -1
  11. package/dist/domains/exec.js +28 -2
  12. package/dist/generated/graphql-schema.d.ts +1 -1
  13. package/dist/generated/graphql-schema.d.ts.map +1 -1
  14. package/dist/index.d.ts +3 -3
  15. package/dist/index.d.ts.map +1 -1
  16. package/dist/index.js +5 -3
  17. package/dist/kit/index.d.ts +13 -2
  18. package/dist/kit/index.d.ts.map +1 -1
  19. package/dist/kit/index.js +13 -2
  20. package/dist/kit/kit.d.ts +83 -7
  21. package/dist/kit/kit.d.ts.map +1 -1
  22. package/dist/kit/kit.js +82 -4
  23. package/dist/kit/mirror.d.ts +111 -0
  24. package/dist/kit/mirror.d.ts.map +1 -0
  25. package/dist/kit/mirror.js +295 -0
  26. package/dist/kit/modules/matchmaking.d.ts +107 -0
  27. package/dist/kit/modules/matchmaking.d.ts.map +1 -0
  28. package/dist/kit/modules/matchmaking.js +109 -0
  29. package/dist/kit/modules/npcs.d.ts +80 -0
  30. package/dist/kit/modules/npcs.d.ts.map +1 -0
  31. package/dist/kit/modules/npcs.js +102 -0
  32. package/dist/kit/modules/presence.d.ts +81 -0
  33. package/dist/kit/modules/presence.d.ts.map +1 -0
  34. package/dist/kit/modules/presence.js +99 -0
  35. package/dist/kit/modules/sessions.d.ts +91 -0
  36. package/dist/kit/modules/sessions.d.ts.map +1 -0
  37. package/dist/kit/modules/sessions.js +84 -0
  38. package/dist/kit/modules/world.d.ts +69 -0
  39. package/dist/kit/modules/world.d.ts.map +1 -0
  40. package/dist/kit/modules/world.js +35 -0
  41. package/dist/kit/protocol.d.ts +128 -0
  42. package/dist/kit/protocol.d.ts.map +1 -0
  43. package/dist/kit/protocol.js +171 -0
  44. package/dist/kit/realtime.d.ts +72 -0
  45. package/dist/kit/realtime.d.ts.map +1 -0
  46. package/dist/kit/realtime.js +108 -0
  47. package/dist/kit/runtime.d.ts +90 -0
  48. package/dist/kit/runtime.d.ts.map +1 -0
  49. package/dist/kit/runtime.js +194 -0
  50. package/dist/kit/store.d.ts +20 -0
  51. package/dist/kit/store.d.ts.map +1 -0
  52. package/dist/kit/store.js +25 -0
  53. package/dist/kit/topology.d.ts +69 -0
  54. package/dist/kit/topology.d.ts.map +1 -0
  55. package/dist/kit/topology.js +156 -0
  56. package/dist/kit/wire.d.ts +45 -5
  57. package/dist/kit/wire.d.ts.map +1 -1
  58. package/dist/kit/wire.js +51 -5
  59. package/dist/live-coding/assets/browser-authoring-index.json +1 -1
  60. package/dist/live-coding/assets/manifest.json +1 -1
  61. package/dist/live-coding/browser-authoring-index.generated.d.ts.map +1 -1
  62. package/dist/live-coding/browser-authoring-index.generated.js +1935 -45
  63. package/package.json +1 -1
@@ -4,7 +4,7 @@ export const GENERATED_BROWSER_AUTHORING_INDEX = {
4
4
  "rustVersion": "1.97.1",
5
5
  "sdkVersion": "0.1.0",
6
6
  "abiVersion": 0,
7
- "contentHash": "c219690850999e82f66ce369a7aa13a65b48e3fcd6bfa786f0c05011650ed020",
7
+ "contentHash": "70df75c058b2550cfcb558ba28307b38689af8db7985f95fd83d38d42516f78b",
8
8
  "crates": [
9
9
  {
10
10
  "name": "alloc",
@@ -13,8 +13,8 @@ export const GENERATED_BROWSER_AUTHORING_INDEX = {
13
13
  },
14
14
  {
15
15
  "name": "ckx-sdk",
16
- "version": "0.7.0",
17
- "sourceHash": "b4583d898c102c2ff1ea677470cc41b1c72dc49dd5f14c1e9c17d13da1bb0733"
16
+ "version": "0.10.0",
17
+ "sourceHash": "df1f3eabc835576f266a28d879419c4f7d0e871c063f2238097ebfa81b05796c"
18
18
  },
19
19
  {
20
20
  "name": "core",
@@ -24,7 +24,7 @@ export const GENERATED_BROWSER_AUTHORING_INDEX = {
24
24
  {
25
25
  "name": "crowdy-client-sdk",
26
26
  "version": "0.1.0",
27
- "sourceHash": "2d21f7c4f1fee650437edbce435b3c50609be4ee49c646916be504ac2be8f6e9"
27
+ "sourceHash": "f176bc8c68bcb60dda2104b2270ca2b41ec33c299b03c9eec1c4cd1d1a479098"
28
28
  }
29
29
  ],
30
30
  "symbols": [
@@ -182,6 +182,13 @@ export const GENERATED_BROWSER_AUTHORING_INDEX = {
182
182
  "signature": "pub struct Ctx { pub app: u64, pub instance: u64, pub epoch: u64, /// The deployed code version. pub version: u64, pub kind: Kind, pub node_type: String, pub key: String, }",
183
183
  "docs": "This instance's identity and its way out: calls, messages, publishing and the node API."
184
184
  },
185
+ {
186
+ "module": "ckx_sdk",
187
+ "name": "Ctx::access",
188
+ "kind": "method",
189
+ "signature": "pub fn access(&self) -> node::Access<'_>",
190
+ "docs": "Players' access to this app: read, grant, revoke, suspend (scopes `access.read`, `access.write`)."
191
+ },
185
192
  {
186
193
  "module": "ckx_sdk",
187
194
  "name": "Ctx::app",
@@ -250,7 +257,7 @@ export const GENERATED_BROWSER_AUTHORING_INDEX = {
250
257
  "name": "Ctx::grids",
251
258
  "kind": "method",
252
259
  "signature": "pub fn grids(&self) -> node::Grids<'_>",
253
- "docs": "This app's grids and their permissions (scope `grids.read`)."
260
+ "docs": "This app's grids and their permissions (scopes `grids.read`, `grids.write`)."
254
261
  },
255
262
  {
256
263
  "module": "ckx_sdk",
@@ -285,7 +292,7 @@ export const GENERATED_BROWSER_AUTHORING_INDEX = {
285
292
  "name": "Ctx::node",
286
293
  "kind": "method",
287
294
  "signature": "pub fn node(&self, op: &str, payload: &[u8]) -> Result<Vec<u8>, CallError>",
288
- "docs": "A raw node API request: `op` and a JSON body, answered with JSON. The typed operations behind [`Ctx::world`], [`Ctx::grids`], [`Ctx::players`] and [`Ctx::permissions`] use it."
295
+ "docs": "A raw node API request: `op` and a JSON body, answered with JSON. The typed operations behind [`Ctx::world`], [`Ctx::grids`], [`Ctx::players`], [`Ctx::permissions`] and [`Ctx::access`] use it."
289
296
  },
290
297
  {
291
298
  "module": "ckx_sdk",
@@ -770,6 +777,13 @@ export const GENERATED_BROWSER_AUTHORING_INDEX = {
770
777
  "signature": "Unknown(u8)",
771
778
  "docs": ""
772
779
  },
780
+ {
781
+ "module": "ckx_sdk",
782
+ "name": "Status::as_u8",
783
+ "kind": "method",
784
+ "signature": "pub fn as_u8(self) -> u8",
785
+ "docs": "The wire status code: [`Status::from_u8`] reversed."
786
+ },
773
787
  {
774
788
  "module": "ckx_sdk",
775
789
  "name": "Status::from_u8",
@@ -910,6 +924,20 @@ export const GENERATED_BROWSER_AUTHORING_INDEX = {
910
924
  "signature": "macro_rules! export_spoke { ($t:ty) => { $crate::__export_node!($crate::rt::SpokeNode<$t>); }; }",
911
925
  "docs": "Exports a [`Spoke`] type as this module's node."
912
926
  },
927
+ {
928
+ "module": "ckx_sdk",
929
+ "name": "kit",
930
+ "kind": "module",
931
+ "signature": "pub mod kit;",
932
+ "docs": ""
933
+ },
934
+ {
935
+ "module": "ckx_sdk",
936
+ "name": "limits",
937
+ "kind": "module",
938
+ "signature": "pub mod limits;",
939
+ "docs": ""
940
+ },
913
941
  {
914
942
  "module": "ckx_sdk",
915
943
  "name": "model",
@@ -1026,7 +1054,7 @@ export const GENERATED_BROWSER_AUTHORING_INDEX = {
1026
1054
  "module": "ckx_sdk::emit",
1027
1055
  "name": "Spatial",
1028
1056
  "kind": "enum",
1029
- "signature": "pub enum Spatial<'a> { /// An actor's state: a server-driven actor appears and moves like a player's. Actor { state: &'a [u8] }, /// A voxel edit at `(x, y, z)` within the chunk, folded into the live mesh. The durable /// write is `ctx.world().set_voxels`, which already shows it; this is for effects. Voxel { x: i16, y: i16, z: i16, voxel_type: u16, state: &'a [u8] }, /// A server event (`event_type`, then `state`), as games route server events. Event { event_type: u16, state: &'a [u8] }, /// An app-defined payload. Generic { payload: &'a [u8] }, /// A message to the one actor named as the event's actor. ActorMessage { payload: &'a [u8] }, }",
1057
+ "signature": "pub enum Spatial<'a> { /// An actor's state: a server-driven actor appears and moves like a player's. Actor { state: &'a [u8] }, /// A voxel edit at `(x, y, z)` within the chunk, folded into the live mesh. The durable /// write is `ctx.world().set_voxels`, which already shows it; this is for effects. Voxel { x: i16, y: i16, z: i16, voxel_type: i16, state: &'a [u8] }, /// A server event (`event_type`, then `state`), as games route server events. Event { event_type: u16, state: &'a [u8] }, /// An app-defined payload. Generic { payload: &'a [u8] }, /// A message to the one actor named as the event's actor. ActorMessage { payload: &'a [u8] }, }",
1030
1058
  "docs": "What a spatial event is to the players who receive it."
1031
1059
  },
1032
1060
  {
@@ -1037,39 +1065,1530 @@ export const GENERATED_BROWSER_AUTHORING_INDEX = {
1037
1065
  "docs": "An actor's state: a server-driven actor appears and moves like a player's."
1038
1066
  },
1039
1067
  {
1040
- "module": "ckx_sdk::emit",
1041
- "name": "Spatial::ActorMessage",
1042
- "kind": "variant",
1043
- "signature": "ActorMessage { payload: &'a [u8] }",
1044
- "docs": "A message to the one actor named as the event's actor."
1068
+ "module": "ckx_sdk::emit",
1069
+ "name": "Spatial::ActorMessage",
1070
+ "kind": "variant",
1071
+ "signature": "ActorMessage { payload: &'a [u8] }",
1072
+ "docs": "A message to the one actor named as the event's actor."
1073
+ },
1074
+ {
1075
+ "module": "ckx_sdk::emit",
1076
+ "name": "Spatial::Event",
1077
+ "kind": "variant",
1078
+ "signature": "Event { event_type: u16, state: &'a [u8] }",
1079
+ "docs": "A server event (`event_type`, then `state`), as games route server events."
1080
+ },
1081
+ {
1082
+ "module": "ckx_sdk::emit",
1083
+ "name": "Spatial::Generic",
1084
+ "kind": "variant",
1085
+ "signature": "Generic { payload: &'a [u8] }",
1086
+ "docs": "An app-defined payload."
1087
+ },
1088
+ {
1089
+ "module": "ckx_sdk::emit",
1090
+ "name": "Spatial::Voxel",
1091
+ "kind": "variant",
1092
+ "signature": "Voxel { x: i16, y: i16, z: i16, voxel_type: i16, state: &'a [u8] }",
1093
+ "docs": "A voxel edit at `(x, y, z)` within the chunk, folded into the live mesh. The durable write is `ctx.world().set_voxels`, which already shows it; this is for effects."
1094
+ },
1095
+ {
1096
+ "module": "ckx_sdk::emit",
1097
+ "name": "actor_id",
1098
+ "kind": "function",
1099
+ "signature": "pub fn actor_id(uuid: &str) -> [u8; 32]",
1100
+ "docs": "A 32-byte actor id, as the realtime tier addresses actors. Players' actors use their 32-character uuid; a server-driven actor (an NPC, a mob) can use any 32 bytes."
1101
+ },
1102
+ {
1103
+ "module": "ckx_sdk::kit",
1104
+ "name": "ACTION_ID_MAX",
1105
+ "kind": "const",
1106
+ "signature": "pub const ACTION_ID_MAX: usize = 64;",
1107
+ "docs": "The longest `action_id` a call may carry, in bytes."
1108
+ },
1109
+ {
1110
+ "module": "ckx_sdk::kit",
1111
+ "name": "Changed",
1112
+ "kind": "struct",
1113
+ "signature": "pub struct Changed { /// The players who should read again. pub who: Vec<u64>, /// What changed for them, as the hub's endpoints name it. pub what: String, }",
1114
+ "docs": "The body of a `changed` message."
1115
+ },
1116
+ {
1117
+ "module": "ckx_sdk::kit",
1118
+ "name": "Changed::what",
1119
+ "kind": "field",
1120
+ "signature": "pub what: String",
1121
+ "docs": "What changed for them, as the hub's endpoints name it."
1122
+ },
1123
+ {
1124
+ "module": "ckx_sdk::kit",
1125
+ "name": "Changed::who",
1126
+ "kind": "field",
1127
+ "signature": "pub who: Vec<u64>",
1128
+ "docs": "The players who should read again."
1129
+ },
1130
+ {
1131
+ "module": "ckx_sdk::kit",
1132
+ "name": "Containers",
1133
+ "kind": "struct",
1134
+ "signature": "pub struct Containers { pub containers: Vec<Published>, }",
1135
+ "docs": "The body of a collection's snapshot: every member as a `delta` would show it."
1136
+ },
1137
+ {
1138
+ "module": "ckx_sdk::kit",
1139
+ "name": "Containers::containers",
1140
+ "kind": "field",
1141
+ "signature": "pub containers: Vec<Published>",
1142
+ "docs": ""
1143
+ },
1144
+ {
1145
+ "module": "ckx_sdk::kit",
1146
+ "name": "Header",
1147
+ "kind": "struct",
1148
+ "signature": "pub struct Header { pub v: u8, pub epoch: u64, pub seq: u64, pub kind: MessageKind, }",
1149
+ "docs": "The reserved fields of every kit message."
1150
+ },
1151
+ {
1152
+ "module": "ckx_sdk::kit",
1153
+ "name": "Header::epoch",
1154
+ "kind": "field",
1155
+ "signature": "pub epoch: u64",
1156
+ "docs": ""
1157
+ },
1158
+ {
1159
+ "module": "ckx_sdk::kit",
1160
+ "name": "Header::kind",
1161
+ "kind": "field",
1162
+ "signature": "pub kind: MessageKind",
1163
+ "docs": ""
1164
+ },
1165
+ {
1166
+ "module": "ckx_sdk::kit",
1167
+ "name": "Header::seq",
1168
+ "kind": "field",
1169
+ "signature": "pub seq: u64",
1170
+ "docs": ""
1171
+ },
1172
+ {
1173
+ "module": "ckx_sdk::kit",
1174
+ "name": "Header::v",
1175
+ "kind": "field",
1176
+ "signature": "pub v: u8",
1177
+ "docs": ""
1178
+ },
1179
+ {
1180
+ "module": "ckx_sdk::kit",
1181
+ "name": "Message",
1182
+ "kind": "struct",
1183
+ "signature": "pub struct Message<T> { #[serde(flatten)] pub header: Header, #[serde(flatten)] pub body: T, }",
1184
+ "docs": "A kit message as it is read back: its header, and the body's own fields beside it."
1185
+ },
1186
+ {
1187
+ "module": "ckx_sdk::kit",
1188
+ "name": "Message::body",
1189
+ "kind": "field",
1190
+ "signature": "pub body: T",
1191
+ "docs": ""
1192
+ },
1193
+ {
1194
+ "module": "ckx_sdk::kit",
1195
+ "name": "Message::header",
1196
+ "kind": "field",
1197
+ "signature": "pub header: Header",
1198
+ "docs": ""
1199
+ },
1200
+ {
1201
+ "module": "ckx_sdk::kit",
1202
+ "name": "MessageKind",
1203
+ "kind": "enum",
1204
+ "signature": "pub enum MessageKind { Snapshot, Delta, Changed, Event, }",
1205
+ "docs": "What a [`Message`] is."
1206
+ },
1207
+ {
1208
+ "module": "ckx_sdk::kit",
1209
+ "name": "MessageKind::Changed",
1210
+ "kind": "variant",
1211
+ "signature": "Changed",
1212
+ "docs": ""
1213
+ },
1214
+ {
1215
+ "module": "ckx_sdk::kit",
1216
+ "name": "MessageKind::Delta",
1217
+ "kind": "variant",
1218
+ "signature": "Delta",
1219
+ "docs": ""
1220
+ },
1221
+ {
1222
+ "module": "ckx_sdk::kit",
1223
+ "name": "MessageKind::Event",
1224
+ "kind": "variant",
1225
+ "signature": "Event",
1226
+ "docs": ""
1227
+ },
1228
+ {
1229
+ "module": "ckx_sdk::kit",
1230
+ "name": "MessageKind::Snapshot",
1231
+ "kind": "variant",
1232
+ "signature": "Snapshot",
1233
+ "docs": ""
1234
+ },
1235
+ {
1236
+ "module": "ckx_sdk::kit",
1237
+ "name": "PROTOCOL",
1238
+ "kind": "const",
1239
+ "signature": "pub const PROTOCOL: u8 = 1;",
1240
+ "docs": "The protocol version kit messages carry in `v`."
1241
+ },
1242
+ {
1243
+ "module": "ckx_sdk::kit",
1244
+ "name": "Publisher",
1245
+ "kind": "struct",
1246
+ "signature": "pub struct Publisher { #[serde(default)] seqs: BTreeMap<String, u64>, }",
1247
+ "docs": "A hub's topics and how far each has got. Keep it in the hub's state, so `seq` carries on after a snapshot; a client that sees another `epoch` asks for a snapshot again anyway."
1248
+ },
1249
+ {
1250
+ "module": "ckx_sdk::kit",
1251
+ "name": "Publisher::changed",
1252
+ "kind": "method",
1253
+ "signature": "pub fn changed(&mut self, ctx: &Ctx, topic: &str, who: &[u64], what: &str) -> Result<()>",
1254
+ "docs": "Tells `who` that `what` changed for them; nothing private goes on the topic. Does nothing when `who` is empty."
1255
+ },
1256
+ {
1257
+ "module": "ckx_sdk::kit",
1258
+ "name": "Publisher::delta",
1259
+ "kind": "method",
1260
+ "signature": "pub fn delta<T: Serialize + ?Sized>(&mut self, ctx: &Ctx, topic: &str, body: &T) -> Result<()>",
1261
+ "docs": "Publishes one change to the topic's collection."
1262
+ },
1263
+ {
1264
+ "module": "ckx_sdk::kit",
1265
+ "name": "Publisher::event",
1266
+ "kind": "method",
1267
+ "signature": "pub fn event<T: Serialize + ?Sized>(&mut self, ctx: &Ctx, topic: &str, body: &T) -> Result<()>",
1268
+ "docs": "Publishes something that happened."
1269
+ },
1270
+ {
1271
+ "module": "ckx_sdk::kit",
1272
+ "name": "Publisher::model_changes",
1273
+ "kind": "method",
1274
+ "signature": "pub fn model_changes(&mut self, ctx: &Ctx, model: &mut Model, schema: &Schema, topic: &str) -> Result<usize>",
1275
+ "docs": "Publishes the model's public changes since the last call ([`Model::public_changes`]) as deltas on `topic`, one container each, and returns how many went out. Owner and hidden properties are never published."
1276
+ },
1277
+ {
1278
+ "module": "ckx_sdk::kit",
1279
+ "name": "Publisher::model_snapshot_reply",
1280
+ "kind": "method",
1281
+ "signature": "pub fn model_snapshot_reply(&self, ctx: &Ctx, model: &Model, schema: &Schema, topic: &str) -> Result<Vec<u8>>",
1282
+ "docs": "The reply to [`SNAPSHOT_METHOD`] for a topic [`Publisher::model_changes`] feeds: every container's public view, as [`Containers`]."
1283
+ },
1284
+ {
1285
+ "module": "ckx_sdk::kit",
1286
+ "name": "Publisher::new",
1287
+ "kind": "method",
1288
+ "signature": "pub fn new() -> Self",
1289
+ "docs": ""
1290
+ },
1291
+ {
1292
+ "module": "ckx_sdk::kit",
1293
+ "name": "Publisher::publish",
1294
+ "kind": "method",
1295
+ "signature": "pub fn publish<T: Serialize + ?Sized>(&mut self, ctx: &Ctx, topic: &str, kind: MessageKind, body: &T) -> Result<()>",
1296
+ "docs": "Publishes one message on `topic`."
1297
+ },
1298
+ {
1299
+ "module": "ckx_sdk::kit",
1300
+ "name": "Publisher::seq",
1301
+ "kind": "method",
1302
+ "signature": "pub fn seq(&self, topic: &str) -> u64",
1303
+ "docs": "The topic's last `seq`; 0 before its first message."
1304
+ },
1305
+ {
1306
+ "module": "ckx_sdk::kit",
1307
+ "name": "Publisher::snapshot",
1308
+ "kind": "method",
1309
+ "signature": "pub fn snapshot<T: Serialize + ?Sized>(&mut self, ctx: &Ctx, topic: &str, body: &T) -> Result<()>",
1310
+ "docs": "Publishes the topic's whole state."
1311
+ },
1312
+ {
1313
+ "module": "ckx_sdk::kit",
1314
+ "name": "Publisher::snapshot_reply",
1315
+ "kind": "method",
1316
+ "signature": "pub fn snapshot_reply<T: Serialize + ?Sized>(&self, ctx: &Ctx, topic: &str, body: &T) -> Result<Vec<u8>>",
1317
+ "docs": "The reply to [`SNAPSHOT_METHOD`] for `topic`: its state now, at its last `seq`."
1318
+ },
1319
+ {
1320
+ "module": "ckx_sdk::kit",
1321
+ "name": "RECEIPTS_MAX",
1322
+ "kind": "const",
1323
+ "signature": "pub const RECEIPTS_MAX: usize = 256;",
1324
+ "docs": "Receipts a hub keeps at most; the oldest go first."
1325
+ },
1326
+ {
1327
+ "module": "ckx_sdk::kit",
1328
+ "name": "RECEIPT_REPLY_MAX",
1329
+ "kind": "const",
1330
+ "signature": "pub const RECEIPT_REPLY_MAX: usize = 1024;",
1331
+ "docs": "The largest reply a receipt keeps. A call sent again whose first reply was larger is refused with [`codes::ALREADY_DONE`]: it ran, and the hub's state has its result."
1332
+ },
1333
+ {
1334
+ "module": "ckx_sdk::kit",
1335
+ "name": "RECEIPT_TTL_MS",
1336
+ "kind": "const",
1337
+ "signature": "pub const RECEIPT_TTL_MS: u64 = 10 * 60 * 1000;",
1338
+ "docs": "How long a receipt is kept."
1339
+ },
1340
+ {
1341
+ "module": "ckx_sdk::kit",
1342
+ "name": "Receipts",
1343
+ "kind": "struct",
1344
+ "signature": "pub struct Receipts { #[serde(default)] kept: VecDeque<Receipt>, }",
1345
+ "docs": "What each caller's recent actions were answered, by `action_id`. Keep it in the hub's state: an action sent again after the hub restarted from its last snapshot is answered from it, if that snapshot came after the action."
1346
+ },
1347
+ {
1348
+ "module": "ckx_sdk::kit",
1349
+ "name": "Receipts::action_id",
1350
+ "kind": "method",
1351
+ "signature": "pub fn action_id(payload: &[u8]) -> Result<Option<String>>",
1352
+ "docs": "The `action_id` a call's arguments carry: a map's `action_id` string. `None` when the arguments are not a map or carry none; refused when it is empty or too long."
1353
+ },
1354
+ {
1355
+ "module": "ckx_sdk::kit",
1356
+ "name": "Receipts::is_empty",
1357
+ "kind": "method",
1358
+ "signature": "pub fn is_empty(&self) -> bool",
1359
+ "docs": ""
1360
+ },
1361
+ {
1362
+ "module": "ckx_sdk::kit",
1363
+ "name": "Receipts::len",
1364
+ "kind": "method",
1365
+ "signature": "pub fn len(&self) -> usize",
1366
+ "docs": "How many receipts are kept."
1367
+ },
1368
+ {
1369
+ "module": "ckx_sdk::kit",
1370
+ "name": "Receipts::new",
1371
+ "kind": "method",
1372
+ "signature": "pub fn new() -> Self",
1373
+ "docs": ""
1374
+ },
1375
+ {
1376
+ "module": "ckx_sdk::kit",
1377
+ "name": "Receipts::record",
1378
+ "kind": "method",
1379
+ "signature": "pub fn record(&mut self, caller: Caller, action_id: Option<&str>, result: &Result<Vec<u8>>, now: u64)",
1380
+ "docs": "Keeps what `caller` got for `action_id`; nothing without an action id."
1381
+ },
1382
+ {
1383
+ "module": "ckx_sdk::kit",
1384
+ "name": "Receipts::replay",
1385
+ "kind": "method",
1386
+ "signature": "pub fn replay(&self, caller: Caller, action_id: Option<&str>, now: u64) -> Option<Result<Vec<u8>>>",
1387
+ "docs": "The answer `caller` got for `action_id`, if it is kept."
1388
+ },
1389
+ {
1390
+ "module": "ckx_sdk::kit",
1391
+ "name": "Receipts::run",
1392
+ "kind": "method",
1393
+ "signature": "pub fn run<H>( hub: &mut H, receipts: fn(&mut H) -> &mut Receipts, call: &Call<'_>, now: u64, act: impl FnOnce(&mut H) -> Result<Vec<u8>>, ) -> Result<Vec<u8>>",
1394
+ "docs": "Runs `act` on `hub` once per (caller, `action_id`): a call sent again gets the first answer. `receipts` finds the hub's receipts; a call without an action id just runs."
1395
+ },
1396
+ {
1397
+ "module": "ckx_sdk::kit",
1398
+ "name": "Rng",
1399
+ "kind": "reexport",
1400
+ "signature": "pub use rng::Rng;",
1401
+ "docs": ""
1402
+ },
1403
+ {
1404
+ "module": "ckx_sdk::kit",
1405
+ "name": "SNAPSHOT_METHOD",
1406
+ "kind": "const",
1407
+ "signature": "pub const SNAPSHOT_METHOD: &str = \"snapshot\";",
1408
+ "docs": "The method every kit hub answers with a topic's snapshot."
1409
+ },
1410
+ {
1411
+ "module": "ckx_sdk::kit",
1412
+ "name": "args",
1413
+ "kind": "function",
1414
+ "signature": "pub fn args<T: DeserializeOwned>(call: &Call<'_>) -> Result<T>",
1415
+ "docs": "A call's arguments, refused with [`codes::BAD_REQUEST`] when they do not decode."
1416
+ },
1417
+ {
1418
+ "module": "ckx_sdk::kit",
1419
+ "name": "codes",
1420
+ "kind": "module",
1421
+ "signature": "pub mod codes",
1422
+ "docs": "The refusal codes kit hubs share. A hub may add its own: lowercase letters, digits and `_`."
1423
+ },
1424
+ {
1425
+ "module": "ckx_sdk::kit",
1426
+ "name": "error",
1427
+ "kind": "function",
1428
+ "signature": "pub fn error(code: &str, text: impl std::fmt::Display) -> Error",
1429
+ "docs": "A refusal with a code: its message is `kit:<code>: <text>`."
1430
+ },
1431
+ {
1432
+ "module": "ckx_sdk::kit",
1433
+ "name": "error_code",
1434
+ "kind": "function",
1435
+ "signature": "pub fn error_code(message: &str) -> Option<(&str, &str)>",
1436
+ "docs": "The code and text of a refusal [`error`] made, or `None` for any other message."
1437
+ },
1438
+ {
1439
+ "module": "ckx_sdk::kit",
1440
+ "name": "message",
1441
+ "kind": "function",
1442
+ "signature": "pub fn message<T: Serialize + ?Sized>(ctx: &Ctx, kind: MessageKind, seq: u64, body: &T) -> Result<Vec<u8>>",
1443
+ "docs": "Encodes one kit message from this instance. `body` must serialize as a struct or a map."
1444
+ },
1445
+ {
1446
+ "module": "ckx_sdk::kit",
1447
+ "name": "public_containers",
1448
+ "kind": "function",
1449
+ "signature": "pub fn public_containers(model: &Model, schema: &Schema) -> Result<Containers>",
1450
+ "docs": "Every container's public view, as a collection snapshot carries it."
1451
+ },
1452
+ {
1453
+ "module": "ckx_sdk::kit",
1454
+ "name": "rng",
1455
+ "kind": "module",
1456
+ "signature": "pub mod rng;",
1457
+ "docs": ""
1458
+ },
1459
+ {
1460
+ "module": "ckx_sdk::kit",
1461
+ "name": "shard",
1462
+ "kind": "module",
1463
+ "signature": "pub mod shard;",
1464
+ "docs": ""
1465
+ },
1466
+ {
1467
+ "module": "ckx_sdk::kit",
1468
+ "name": "snapshot_topic",
1469
+ "kind": "function",
1470
+ "signature": "pub fn snapshot_topic(call: &Call<'_>, default: &str) -> String",
1471
+ "docs": "The `topic` a [`SNAPSHOT_METHOD`] call names, or `default` when it names none."
1472
+ },
1473
+ {
1474
+ "module": "ckx_sdk::kit",
1475
+ "name": "wire",
1476
+ "kind": "module",
1477
+ "signature": "pub mod wire;",
1478
+ "docs": ""
1479
+ },
1480
+ {
1481
+ "module": "ckx_sdk::kit::codes",
1482
+ "name": "ALREADY_DONE",
1483
+ "kind": "const",
1484
+ "signature": "pub const ALREADY_DONE: &str = \"already_done\";",
1485
+ "docs": "The action already ran; its reply was too large to keep ([`super::RECEIPT_REPLY_MAX`])."
1486
+ },
1487
+ {
1488
+ "module": "ckx_sdk::kit::codes",
1489
+ "name": "BAD_REQUEST",
1490
+ "kind": "const",
1491
+ "signature": "pub const BAD_REQUEST: &str = \"bad_request\";",
1492
+ "docs": ""
1493
+ },
1494
+ {
1495
+ "module": "ckx_sdk::kit::codes",
1496
+ "name": "CONFLICT",
1497
+ "kind": "const",
1498
+ "signature": "pub const CONFLICT: &str = \"conflict\";",
1499
+ "docs": "The state does not allow it now."
1500
+ },
1501
+ {
1502
+ "module": "ckx_sdk::kit::codes",
1503
+ "name": "COOLDOWN",
1504
+ "kind": "const",
1505
+ "signature": "pub const COOLDOWN: &str = \"cooldown\";",
1506
+ "docs": "Too soon after the last time."
1507
+ },
1508
+ {
1509
+ "module": "ckx_sdk::kit::codes",
1510
+ "name": "EMPTY",
1511
+ "kind": "const",
1512
+ "signature": "pub const EMPTY: &str = \"empty\";",
1513
+ "docs": ""
1514
+ },
1515
+ {
1516
+ "module": "ckx_sdk::kit::codes",
1517
+ "name": "EXPIRED",
1518
+ "kind": "const",
1519
+ "signature": "pub const EXPIRED: &str = \"expired\";",
1520
+ "docs": ""
1521
+ },
1522
+ {
1523
+ "module": "ckx_sdk::kit::codes",
1524
+ "name": "FINISHED",
1525
+ "kind": "const",
1526
+ "signature": "pub const FINISHED: &str = \"finished\";",
1527
+ "docs": ""
1528
+ },
1529
+ {
1530
+ "module": "ckx_sdk::kit::codes",
1531
+ "name": "FORBIDDEN",
1532
+ "kind": "const",
1533
+ "signature": "pub const FORBIDDEN: &str = \"forbidden\";",
1534
+ "docs": "The caller may not do this."
1535
+ },
1536
+ {
1537
+ "module": "ckx_sdk::kit::codes",
1538
+ "name": "FULL",
1539
+ "kind": "const",
1540
+ "signature": "pub const FULL: &str = \"full\";",
1541
+ "docs": ""
1542
+ },
1543
+ {
1544
+ "module": "ckx_sdk::kit::codes",
1545
+ "name": "INSUFFICIENT",
1546
+ "kind": "const",
1547
+ "signature": "pub const INSUFFICIENT: &str = \"insufficient\";",
1548
+ "docs": "Not enough of something the caller spends."
1549
+ },
1550
+ {
1551
+ "module": "ckx_sdk::kit::codes",
1552
+ "name": "LIMIT",
1553
+ "kind": "const",
1554
+ "signature": "pub const LIMIT: &str = \"limit\";",
1555
+ "docs": "A bound the hub keeps (how many, how large)."
1556
+ },
1557
+ {
1558
+ "module": "ckx_sdk::kit::codes",
1559
+ "name": "NOT_FOUND",
1560
+ "kind": "const",
1561
+ "signature": "pub const NOT_FOUND: &str = \"not_found\";",
1562
+ "docs": ""
1563
+ },
1564
+ {
1565
+ "module": "ckx_sdk::kit::codes",
1566
+ "name": "NOT_MEMBER",
1567
+ "kind": "const",
1568
+ "signature": "pub const NOT_MEMBER: &str = \"not_member\";",
1569
+ "docs": "The caller has not joined."
1570
+ },
1571
+ {
1572
+ "module": "ckx_sdk::kit::codes",
1573
+ "name": "NOT_READY",
1574
+ "kind": "const",
1575
+ "signature": "pub const NOT_READY: &str = \"not_ready\";",
1576
+ "docs": ""
1577
+ },
1578
+ {
1579
+ "module": "ckx_sdk::kit::codes",
1580
+ "name": "NOT_YOUR_TURN",
1581
+ "kind": "const",
1582
+ "signature": "pub const NOT_YOUR_TURN: &str = \"not_your_turn\";",
1583
+ "docs": ""
1584
+ },
1585
+ {
1586
+ "module": "ckx_sdk::kit::codes",
1587
+ "name": "OUT_OF_REACH",
1588
+ "kind": "const",
1589
+ "signature": "pub const OUT_OF_REACH: &str = \"out_of_reach\";",
1590
+ "docs": ""
1591
+ },
1592
+ {
1593
+ "module": "ckx_sdk::kit::codes",
1594
+ "name": "RESERVED",
1595
+ "kind": "const",
1596
+ "signature": "pub const RESERVED: &str = \"reserved\";",
1597
+ "docs": ""
1598
+ },
1599
+ {
1600
+ "module": "ckx_sdk::kit::codes",
1601
+ "name": "STARTED",
1602
+ "kind": "const",
1603
+ "signature": "pub const STARTED: &str = \"started\";",
1604
+ "docs": ""
1605
+ },
1606
+ {
1607
+ "module": "ckx_sdk::kit::rng",
1608
+ "name": "Rng",
1609
+ "kind": "struct",
1610
+ "signature": "pub struct Rng { state: u64, }",
1611
+ "docs": ""
1612
+ },
1613
+ {
1614
+ "module": "ckx_sdk::kit::rng",
1615
+ "name": "Rng::below",
1616
+ "kind": "method",
1617
+ "signature": "pub fn below(&mut self, n: u64) -> u64",
1618
+ "docs": "Uniform in `[0, n)`; 0 when `n` is 0."
1619
+ },
1620
+ {
1621
+ "module": "ckx_sdk::kit::rng",
1622
+ "name": "Rng::chance",
1623
+ "kind": "method",
1624
+ "signature": "pub fn chance(&mut self, p: f64) -> bool",
1625
+ "docs": "True with probability `p` (clamped to `[0, 1]`)."
1626
+ },
1627
+ {
1628
+ "module": "ckx_sdk::kit::rng",
1629
+ "name": "Rng::default",
1630
+ "kind": "method",
1631
+ "signature": "fn default() -> Self",
1632
+ "docs": ""
1633
+ },
1634
+ {
1635
+ "module": "ckx_sdk::kit::rng",
1636
+ "name": "Rng::f64",
1637
+ "kind": "method",
1638
+ "signature": "pub fn f64(&mut self) -> f64",
1639
+ "docs": "Uniform in `[0, 1)`."
1640
+ },
1641
+ {
1642
+ "module": "ckx_sdk::kit::rng",
1643
+ "name": "Rng::next_u64",
1644
+ "kind": "method",
1645
+ "signature": "pub fn next_u64(&mut self) -> u64",
1646
+ "docs": ""
1647
+ },
1648
+ {
1649
+ "module": "ckx_sdk::kit::rng",
1650
+ "name": "Rng::pick",
1651
+ "kind": "method",
1652
+ "signature": "pub fn pick<'a, T>(&mut self, items: &'a [T]) -> Option<&'a T>",
1653
+ "docs": ""
1654
+ },
1655
+ {
1656
+ "module": "ckx_sdk::kit::rng",
1657
+ "name": "Rng::range",
1658
+ "kind": "method",
1659
+ "signature": "pub fn range(&mut self, lo: i64, hi: i64) -> i64",
1660
+ "docs": "Uniform in `[lo, hi]`, both included; `lo` when `hi` is not above it."
1661
+ },
1662
+ {
1663
+ "module": "ckx_sdk::kit::rng",
1664
+ "name": "Rng::seed_from",
1665
+ "kind": "method",
1666
+ "signature": "pub fn seed_from(text: &str) -> u64",
1667
+ "docs": "A seed from text: a key, a name."
1668
+ },
1669
+ {
1670
+ "module": "ckx_sdk::kit::rng",
1671
+ "name": "Rng::seeded",
1672
+ "kind": "method",
1673
+ "signature": "pub fn seeded(seed: u64) -> Self",
1674
+ "docs": "A generator seeded with `seed`; 0 counts as 1, which xorshift needs."
1675
+ },
1676
+ {
1677
+ "module": "ckx_sdk::kit::rng",
1678
+ "name": "Rng::shuffle",
1679
+ "kind": "method",
1680
+ "signature": "pub fn shuffle<T>(&mut self, items: &mut [T])",
1681
+ "docs": "Shuffles in place (Fisher-Yates)."
1682
+ },
1683
+ {
1684
+ "module": "ckx_sdk::kit::rng",
1685
+ "name": "Rng::weighted",
1686
+ "kind": "method",
1687
+ "signature": "pub fn weighted(&mut self, weights: &[u64]) -> Option<usize>",
1688
+ "docs": "The index of one weight, chosen in proportion to the weights; `None` when they sum to nothing."
1689
+ },
1690
+ {
1691
+ "module": "ckx_sdk::kit::shard",
1692
+ "name": "around",
1693
+ "kind": "function",
1694
+ "signature": "pub fn around(x: i64, z: i64, size: i64, radius: i64) -> Vec<String>",
1695
+ "docs": "The keys of the shards within `radius` shards of the one holding `(x, z)`, its own first, then row by row."
1696
+ },
1697
+ {
1698
+ "module": "ckx_sdk::kit::shard",
1699
+ "name": "centre",
1700
+ "kind": "function",
1701
+ "signature": "pub fn centre(x: i64, z: i64, size: i64) -> (i64, i64)",
1702
+ "docs": "The shard's centre chunk for chunk `(x, z)`. `size` is at least 1."
1703
+ },
1704
+ {
1705
+ "module": "ckx_sdk::kit::shard",
1706
+ "name": "key",
1707
+ "kind": "function",
1708
+ "signature": "pub fn key(x: i64, z: i64, size: i64) -> String",
1709
+ "docs": "The key of the shard that holds chunk `(x, z)`."
1710
+ },
1711
+ {
1712
+ "module": "ckx_sdk::kit::shard",
1713
+ "name": "parse",
1714
+ "kind": "function",
1715
+ "signature": "pub fn parse(key: &str) -> Option<(i64, i64)>",
1716
+ "docs": "The centre chunk a key names, or `None` when it is not `\"<x>,<z>\"`."
1717
+ },
1718
+ {
1719
+ "module": "ckx_sdk::kit::wire",
1720
+ "name": "ABILITY",
1721
+ "kind": "const",
1722
+ "signature": "pub const ABILITY: u16 = 94;",
1723
+ "docs": "An ability was cast, or landed."
1724
+ },
1725
+ {
1726
+ "module": "ckx_sdk::kit::wire",
1727
+ "name": "APP_EVENTS",
1728
+ "kind": "const",
1729
+ "signature": "pub const APP_EVENTS: u16 = 1000;",
1730
+ "docs": "The first number an app's own events may use."
1731
+ },
1732
+ {
1733
+ "module": "ckx_sdk::kit::wire",
1734
+ "name": "AbilityUse",
1735
+ "kind": "struct",
1736
+ "signature": "pub struct AbilityUse { /// `cast` or `impact`. pub kind: String, pub ability_id: String, pub caster_id: String, pub victim_id: Option<String>, pub damage: i64, }",
1737
+ "docs": ""
1738
+ },
1739
+ {
1740
+ "module": "ckx_sdk::kit::wire",
1741
+ "name": "AbilityUse::ability_id",
1742
+ "kind": "field",
1743
+ "signature": "pub ability_id: String",
1744
+ "docs": ""
1745
+ },
1746
+ {
1747
+ "module": "ckx_sdk::kit::wire",
1748
+ "name": "AbilityUse::caster_id",
1749
+ "kind": "field",
1750
+ "signature": "pub caster_id: String",
1751
+ "docs": ""
1752
+ },
1753
+ {
1754
+ "module": "ckx_sdk::kit::wire",
1755
+ "name": "AbilityUse::damage",
1756
+ "kind": "field",
1757
+ "signature": "pub damage: i64",
1758
+ "docs": ""
1759
+ },
1760
+ {
1761
+ "module": "ckx_sdk::kit::wire",
1762
+ "name": "AbilityUse::kind",
1763
+ "kind": "field",
1764
+ "signature": "pub kind: String",
1765
+ "docs": "`cast` or `impact`."
1766
+ },
1767
+ {
1768
+ "module": "ckx_sdk::kit::wire",
1769
+ "name": "AbilityUse::victim_id",
1770
+ "kind": "field",
1771
+ "signature": "pub victim_id: Option<String>",
1772
+ "docs": ""
1773
+ },
1774
+ {
1775
+ "module": "ckx_sdk::kit::wire",
1776
+ "name": "ActorState",
1777
+ "kind": "struct",
1778
+ "signature": "pub struct ActorState { /// What it is: `mob`, `npc`, `pet`, `ball`, `ghost`, a game's own word. pub kind: String, /// Its id within the hub that shows it. pub id: u64, /// Where it is, in chunks. pub x: f64, #[serde(default)] pub y: f64, pub z: f64, /// Its health, when it has any. pub hp: Option<i64>, #[serde(default, skip_serializing_if = \"Option::is_none\")] pub max_hp: Option<i64>, /// What it is doing: `idle`, `chase`, `follow`, ... #[serde(default, skip_serializing_if = \"Option::is_none\")] pub mode: Option<String>, /// The player it belongs to (a pet, a summon). #[serde(default, skip_serializing_if = \"Option::is_none\")] pub owner: Option<u64>, /// Facing, in radians. #[serde(default, skip_serializing_if = \"Option::is_none\")] pub yaw: Option<f64>, #[serde(default, skip_serializing_if = \"Option::is_none\")] pub name: Option<String>, }",
1779
+ "docs": "A server-driven actor as players near it see it."
1780
+ },
1781
+ {
1782
+ "module": "ckx_sdk::kit::wire",
1783
+ "name": "ActorState::chunk",
1784
+ "kind": "method",
1785
+ "signature": "pub fn chunk(&self) -> ChunkPos",
1786
+ "docs": "The chunk it stands in."
1787
+ },
1788
+ {
1789
+ "module": "ckx_sdk::kit::wire",
1790
+ "name": "ActorState::hp",
1791
+ "kind": "field",
1792
+ "signature": "pub hp: Option<i64>",
1793
+ "docs": "Its health, when it has any."
1794
+ },
1795
+ {
1796
+ "module": "ckx_sdk::kit::wire",
1797
+ "name": "ActorState::id",
1798
+ "kind": "field",
1799
+ "signature": "pub id: u64",
1800
+ "docs": "Its id within the hub that shows it."
1801
+ },
1802
+ {
1803
+ "module": "ckx_sdk::kit::wire",
1804
+ "name": "ActorState::kind",
1805
+ "kind": "field",
1806
+ "signature": "pub kind: String",
1807
+ "docs": "What it is: `mob`, `npc`, `pet`, `ball`, `ghost`, a game's own word."
1808
+ },
1809
+ {
1810
+ "module": "ckx_sdk::kit::wire",
1811
+ "name": "ActorState::max_hp",
1812
+ "kind": "field",
1813
+ "signature": "pub max_hp: Option<i64>",
1814
+ "docs": ""
1815
+ },
1816
+ {
1817
+ "module": "ckx_sdk::kit::wire",
1818
+ "name": "ActorState::mode",
1819
+ "kind": "field",
1820
+ "signature": "pub mode: Option<String>",
1821
+ "docs": "What it is doing: `idle`, `chase`, `follow`, ..."
1822
+ },
1823
+ {
1824
+ "module": "ckx_sdk::kit::wire",
1825
+ "name": "ActorState::name",
1826
+ "kind": "field",
1827
+ "signature": "pub name: Option<String>",
1828
+ "docs": ""
1829
+ },
1830
+ {
1831
+ "module": "ckx_sdk::kit::wire",
1832
+ "name": "ActorState::new",
1833
+ "kind": "method",
1834
+ "signature": "pub fn new(kind: &str, id: u64, x: f64, z: f64) -> Self",
1835
+ "docs": ""
1836
+ },
1837
+ {
1838
+ "module": "ckx_sdk::kit::wire",
1839
+ "name": "ActorState::owner",
1840
+ "kind": "field",
1841
+ "signature": "pub owner: Option<u64>",
1842
+ "docs": "The player it belongs to (a pet, a summon)."
1843
+ },
1844
+ {
1845
+ "module": "ckx_sdk::kit::wire",
1846
+ "name": "ActorState::x",
1847
+ "kind": "field",
1848
+ "signature": "pub x: f64",
1849
+ "docs": "Where it is, in chunks."
1850
+ },
1851
+ {
1852
+ "module": "ckx_sdk::kit::wire",
1853
+ "name": "ActorState::y",
1854
+ "kind": "field",
1855
+ "signature": "pub y: f64",
1856
+ "docs": ""
1857
+ },
1858
+ {
1859
+ "module": "ckx_sdk::kit::wire",
1860
+ "name": "ActorState::yaw",
1861
+ "kind": "field",
1862
+ "signature": "pub yaw: Option<f64>",
1863
+ "docs": "Facing, in radians."
1864
+ },
1865
+ {
1866
+ "module": "ckx_sdk::kit::wire",
1867
+ "name": "ActorState::z",
1868
+ "kind": "field",
1869
+ "signature": "pub z: f64",
1870
+ "docs": ""
1871
+ },
1872
+ {
1873
+ "module": "ckx_sdk::kit::wire",
1874
+ "name": "CONTACT_DAMAGE",
1875
+ "kind": "const",
1876
+ "signature": "pub const CONTACT_DAMAGE: u16 = 77;",
1877
+ "docs": "A mob or a trap hit a player."
1878
+ },
1879
+ {
1880
+ "module": "ckx_sdk::kit::wire",
1881
+ "name": "CONTROL_POINT",
1882
+ "kind": "const",
1883
+ "signature": "pub const CONTROL_POINT: u16 = 96;",
1884
+ "docs": "A control point changed hands, or its capture moved."
1885
+ },
1886
+ {
1887
+ "module": "ckx_sdk::kit::wire",
1888
+ "name": "ContactDamage",
1889
+ "kind": "struct",
1890
+ "signature": "pub struct ContactDamage { pub target_uuid: String, pub damage: i64, pub mob_id: String, pub mob_name: String, }",
1891
+ "docs": ""
1892
+ },
1893
+ {
1894
+ "module": "ckx_sdk::kit::wire",
1895
+ "name": "ContactDamage::damage",
1896
+ "kind": "field",
1897
+ "signature": "pub damage: i64",
1898
+ "docs": ""
1899
+ },
1900
+ {
1901
+ "module": "ckx_sdk::kit::wire",
1902
+ "name": "ContactDamage::mob_id",
1903
+ "kind": "field",
1904
+ "signature": "pub mob_id: String",
1905
+ "docs": ""
1906
+ },
1907
+ {
1908
+ "module": "ckx_sdk::kit::wire",
1909
+ "name": "ContactDamage::mob_name",
1910
+ "kind": "field",
1911
+ "signature": "pub mob_name: String",
1912
+ "docs": ""
1913
+ },
1914
+ {
1915
+ "module": "ckx_sdk::kit::wire",
1916
+ "name": "ContactDamage::target_uuid",
1917
+ "kind": "field",
1918
+ "signature": "pub target_uuid: String",
1919
+ "docs": ""
1920
+ },
1921
+ {
1922
+ "module": "ckx_sdk::kit::wire",
1923
+ "name": "ControlPointChange",
1924
+ "kind": "struct",
1925
+ "signature": "pub struct ControlPointChange { pub point_id: String, pub owner: String, pub previous_owner: String, /// Capture progress toward the attacker, 0 to 1. pub progress: f64, }",
1926
+ "docs": ""
1927
+ },
1928
+ {
1929
+ "module": "ckx_sdk::kit::wire",
1930
+ "name": "ControlPointChange::owner",
1931
+ "kind": "field",
1932
+ "signature": "pub owner: String",
1933
+ "docs": ""
1934
+ },
1935
+ {
1936
+ "module": "ckx_sdk::kit::wire",
1937
+ "name": "ControlPointChange::point_id",
1938
+ "kind": "field",
1939
+ "signature": "pub point_id: String",
1940
+ "docs": ""
1941
+ },
1942
+ {
1943
+ "module": "ckx_sdk::kit::wire",
1944
+ "name": "ControlPointChange::previous_owner",
1945
+ "kind": "field",
1946
+ "signature": "pub previous_owner: String",
1947
+ "docs": ""
1948
+ },
1949
+ {
1950
+ "module": "ckx_sdk::kit::wire",
1951
+ "name": "ControlPointChange::progress",
1952
+ "kind": "field",
1953
+ "signature": "pub progress: f64",
1954
+ "docs": "Capture progress toward the attacker, 0 to 1."
1955
+ },
1956
+ {
1957
+ "module": "ckx_sdk::kit::wire",
1958
+ "name": "EMOTE",
1959
+ "kind": "const",
1960
+ "signature": "pub const EMOTE: u16 = 101;",
1961
+ "docs": "An emote: a client event players send each other (the kit clients' convention); a hub may send one too, for a server-driven actor."
1962
+ },
1963
+ {
1964
+ "module": "ckx_sdk::kit::wire",
1965
+ "name": "ENCOUNTER",
1966
+ "kind": "const",
1967
+ "signature": "pub const ENCOUNTER: u16 = 99;",
1968
+ "docs": "A wave began or ended, or a boss changed phase."
1969
+ },
1970
+ {
1971
+ "module": "ckx_sdk::kit::wire",
1972
+ "name": "Emote",
1973
+ "kind": "struct",
1974
+ "signature": "pub struct Emote { /// The emote's name, as the game knows it: `wave`, `cheer`, ... pub emote: String, /// The actor it is aimed at, if any. pub target_uuid: Option<String>, }",
1975
+ "docs": ""
1976
+ },
1977
+ {
1978
+ "module": "ckx_sdk::kit::wire",
1979
+ "name": "Emote::emote",
1980
+ "kind": "field",
1981
+ "signature": "pub emote: String",
1982
+ "docs": "The emote's name, as the game knows it: `wave`, `cheer`, ..."
1983
+ },
1984
+ {
1985
+ "module": "ckx_sdk::kit::wire",
1986
+ "name": "Emote::target_uuid",
1987
+ "kind": "field",
1988
+ "signature": "pub target_uuid: Option<String>",
1989
+ "docs": "The actor it is aimed at, if any."
1990
+ },
1991
+ {
1992
+ "module": "ckx_sdk::kit::wire",
1993
+ "name": "EncounterChange",
1994
+ "kind": "struct",
1995
+ "signature": "pub struct EncounterChange { /// `wave_started`, `wave_cleared`, `boss_phase` or `finished`. pub kind: String, pub encounter_id: String, pub wave: u32, pub phase: u32, }",
1996
+ "docs": ""
1997
+ },
1998
+ {
1999
+ "module": "ckx_sdk::kit::wire",
2000
+ "name": "EncounterChange::encounter_id",
2001
+ "kind": "field",
2002
+ "signature": "pub encounter_id: String",
2003
+ "docs": ""
2004
+ },
2005
+ {
2006
+ "module": "ckx_sdk::kit::wire",
2007
+ "name": "EncounterChange::kind",
2008
+ "kind": "field",
2009
+ "signature": "pub kind: String",
2010
+ "docs": "`wave_started`, `wave_cleared`, `boss_phase` or `finished`."
2011
+ },
2012
+ {
2013
+ "module": "ckx_sdk::kit::wire",
2014
+ "name": "EncounterChange::phase",
2015
+ "kind": "field",
2016
+ "signature": "pub phase: u32",
2017
+ "docs": ""
2018
+ },
2019
+ {
2020
+ "module": "ckx_sdk::kit::wire",
2021
+ "name": "EncounterChange::wave",
2022
+ "kind": "field",
2023
+ "signature": "pub wave: u32",
2024
+ "docs": ""
2025
+ },
2026
+ {
2027
+ "module": "ckx_sdk::kit::wire",
2028
+ "name": "MOVEMENT_VIOLATION",
2029
+ "kind": "const",
2030
+ "signature": "pub const MOVEMENT_VIOLATION: u16 = 95;",
2031
+ "docs": "A movement the warden flagged."
2032
+ },
2033
+ {
2034
+ "module": "ckx_sdk::kit::wire",
2035
+ "name": "MovementViolation",
2036
+ "kind": "struct",
2037
+ "signature": "pub struct MovementViolation { /// `speed`, `teleport` or `bounds`. pub kind: String, pub user_id: String, pub detail: String, }",
2038
+ "docs": ""
2039
+ },
2040
+ {
2041
+ "module": "ckx_sdk::kit::wire",
2042
+ "name": "MovementViolation::detail",
2043
+ "kind": "field",
2044
+ "signature": "pub detail: String",
2045
+ "docs": ""
2046
+ },
2047
+ {
2048
+ "module": "ckx_sdk::kit::wire",
2049
+ "name": "MovementViolation::kind",
2050
+ "kind": "field",
2051
+ "signature": "pub kind: String",
2052
+ "docs": "`speed`, `teleport` or `bounds`."
2053
+ },
2054
+ {
2055
+ "module": "ckx_sdk::kit::wire",
2056
+ "name": "MovementViolation::user_id",
2057
+ "kind": "field",
2058
+ "signature": "pub user_id: String",
2059
+ "docs": ""
2060
+ },
2061
+ {
2062
+ "module": "ckx_sdk::kit::wire",
2063
+ "name": "POSSESSION",
2064
+ "kind": "const",
2065
+ "signature": "pub const POSSESSION: u16 = 100;",
2066
+ "docs": "The contested object (a ball) changed hands, or a goal was scored."
2067
+ },
2068
+ {
2069
+ "module": "ckx_sdk::kit::wire",
2070
+ "name": "PROPOSAL",
2071
+ "kind": "const",
2072
+ "signature": "pub const PROPOSAL: u16 = 93;",
2073
+ "docs": "A match was proposed to the players in it."
2074
+ },
2075
+ {
2076
+ "module": "ckx_sdk::kit::wire",
2077
+ "name": "PossessionChange",
2078
+ "kind": "struct",
2079
+ "signature": "pub struct PossessionChange { /// `claimed`, `passed`, `loose` or `goal`. pub kind: String, pub holder_id: Option<String>, pub team: Option<String>, }",
2080
+ "docs": ""
2081
+ },
2082
+ {
2083
+ "module": "ckx_sdk::kit::wire",
2084
+ "name": "PossessionChange::holder_id",
2085
+ "kind": "field",
2086
+ "signature": "pub holder_id: Option<String>",
2087
+ "docs": ""
2088
+ },
2089
+ {
2090
+ "module": "ckx_sdk::kit::wire",
2091
+ "name": "PossessionChange::kind",
2092
+ "kind": "field",
2093
+ "signature": "pub kind: String",
2094
+ "docs": "`claimed`, `passed`, `loose` or `goal`."
2095
+ },
2096
+ {
2097
+ "module": "ckx_sdk::kit::wire",
2098
+ "name": "PossessionChange::team",
2099
+ "kind": "field",
2100
+ "signature": "pub team: Option<String>",
2101
+ "docs": ""
2102
+ },
2103
+ {
2104
+ "module": "ckx_sdk::kit::wire",
2105
+ "name": "ProposalMade",
2106
+ "kind": "struct",
2107
+ "signature": "pub struct ProposalMade { pub proposal_id: String, pub mode: String, pub players: Vec<String>, }",
2108
+ "docs": ""
2109
+ },
2110
+ {
2111
+ "module": "ckx_sdk::kit::wire",
2112
+ "name": "ProposalMade::mode",
2113
+ "kind": "field",
2114
+ "signature": "pub mode: String",
2115
+ "docs": ""
2116
+ },
2117
+ {
2118
+ "module": "ckx_sdk::kit::wire",
2119
+ "name": "ProposalMade::players",
2120
+ "kind": "field",
2121
+ "signature": "pub players: Vec<String>",
2122
+ "docs": ""
2123
+ },
2124
+ {
2125
+ "module": "ckx_sdk::kit::wire",
2126
+ "name": "ProposalMade::proposal_id",
2127
+ "kind": "field",
2128
+ "signature": "pub proposal_id: String",
2129
+ "docs": ""
2130
+ },
2131
+ {
2132
+ "module": "ckx_sdk::kit::wire",
2133
+ "name": "RACE_TIMING",
2134
+ "kind": "const",
2135
+ "signature": "pub const RACE_TIMING: u16 = 97;",
2136
+ "docs": "A racer started, passed a checkpoint, finished a lap or the race."
2137
+ },
2138
+ {
2139
+ "module": "ckx_sdk::kit::wire",
2140
+ "name": "RaceTiming",
2141
+ "kind": "struct",
2142
+ "signature": "pub struct RaceTiming { /// `started`, `checkpoint`, `lap` or `finished`. pub kind: String, pub course_id: String, pub user_id: String, pub checkpoint: u32, pub lap: u32, pub elapsed_ms: u64, }",
2143
+ "docs": ""
2144
+ },
2145
+ {
2146
+ "module": "ckx_sdk::kit::wire",
2147
+ "name": "RaceTiming::checkpoint",
2148
+ "kind": "field",
2149
+ "signature": "pub checkpoint: u32",
2150
+ "docs": ""
2151
+ },
2152
+ {
2153
+ "module": "ckx_sdk::kit::wire",
2154
+ "name": "RaceTiming::course_id",
2155
+ "kind": "field",
2156
+ "signature": "pub course_id: String",
2157
+ "docs": ""
2158
+ },
2159
+ {
2160
+ "module": "ckx_sdk::kit::wire",
2161
+ "name": "RaceTiming::elapsed_ms",
2162
+ "kind": "field",
2163
+ "signature": "pub elapsed_ms: u64",
2164
+ "docs": ""
2165
+ },
2166
+ {
2167
+ "module": "ckx_sdk::kit::wire",
2168
+ "name": "RaceTiming::kind",
2169
+ "kind": "field",
2170
+ "signature": "pub kind: String",
2171
+ "docs": "`started`, `checkpoint`, `lap` or `finished`."
2172
+ },
2173
+ {
2174
+ "module": "ckx_sdk::kit::wire",
2175
+ "name": "RaceTiming::lap",
2176
+ "kind": "field",
2177
+ "signature": "pub lap: u32",
2178
+ "docs": ""
2179
+ },
2180
+ {
2181
+ "module": "ckx_sdk::kit::wire",
2182
+ "name": "RaceTiming::user_id",
2183
+ "kind": "field",
2184
+ "signature": "pub user_id: String",
2185
+ "docs": ""
2186
+ },
2187
+ {
2188
+ "module": "ckx_sdk::kit::wire",
2189
+ "name": "SCORE",
2190
+ "kind": "const",
2191
+ "signature": "pub const SCORE: u16 = 92;",
2192
+ "docs": "Scores or a result."
2193
+ },
2194
+ {
2195
+ "module": "ckx_sdk::kit::wire",
2196
+ "name": "ScoreUpdate",
2197
+ "kind": "struct",
2198
+ "signature": "pub struct ScoreUpdate { pub standings: Vec<Standing>, pub winner_id: Option<String>, }",
2199
+ "docs": ""
2200
+ },
2201
+ {
2202
+ "module": "ckx_sdk::kit::wire",
2203
+ "name": "ScoreUpdate::standings",
2204
+ "kind": "field",
2205
+ "signature": "pub standings: Vec<Standing>",
2206
+ "docs": ""
2207
+ },
2208
+ {
2209
+ "module": "ckx_sdk::kit::wire",
2210
+ "name": "ScoreUpdate::winner_id",
2211
+ "kind": "field",
2212
+ "signature": "pub winner_id: Option<String>",
2213
+ "docs": ""
2214
+ },
2215
+ {
2216
+ "module": "ckx_sdk::kit::wire",
2217
+ "name": "Standing",
2218
+ "kind": "struct",
2219
+ "signature": "pub struct Standing { pub actor_id: String, pub score: i64, pub rank: u32, }",
2220
+ "docs": ""
2221
+ },
2222
+ {
2223
+ "module": "ckx_sdk::kit::wire",
2224
+ "name": "Standing::actor_id",
2225
+ "kind": "field",
2226
+ "signature": "pub actor_id: String",
2227
+ "docs": ""
2228
+ },
2229
+ {
2230
+ "module": "ckx_sdk::kit::wire",
2231
+ "name": "Standing::rank",
2232
+ "kind": "field",
2233
+ "signature": "pub rank: u32",
2234
+ "docs": ""
2235
+ },
2236
+ {
2237
+ "module": "ckx_sdk::kit::wire",
2238
+ "name": "Standing::score",
2239
+ "kind": "field",
2240
+ "signature": "pub score: i64",
2241
+ "docs": ""
2242
+ },
2243
+ {
2244
+ "module": "ckx_sdk::kit::wire",
2245
+ "name": "TURN",
2246
+ "kind": "const",
2247
+ "signature": "pub const TURN: u16 = 91;",
2248
+ "docs": "A turn passed to the next player."
2249
+ },
2250
+ {
2251
+ "module": "ckx_sdk::kit::wire",
2252
+ "name": "TurnChange",
2253
+ "kind": "struct",
2254
+ "signature": "pub struct TurnChange { /// Whose turn it is now: a player id, or a unit's id. pub actor_id: String, pub round: u32, pub turn_in_round: u32, }",
2255
+ "docs": ""
2256
+ },
2257
+ {
2258
+ "module": "ckx_sdk::kit::wire",
2259
+ "name": "TurnChange::actor_id",
2260
+ "kind": "field",
2261
+ "signature": "pub actor_id: String",
2262
+ "docs": "Whose turn it is now: a player id, or a unit's id."
2263
+ },
2264
+ {
2265
+ "module": "ckx_sdk::kit::wire",
2266
+ "name": "TurnChange::round",
2267
+ "kind": "field",
2268
+ "signature": "pub round: u32",
2269
+ "docs": ""
2270
+ },
2271
+ {
2272
+ "module": "ckx_sdk::kit::wire",
2273
+ "name": "TurnChange::turn_in_round",
2274
+ "kind": "field",
2275
+ "signature": "pub turn_in_round: u32",
2276
+ "docs": ""
2277
+ },
2278
+ {
2279
+ "module": "ckx_sdk::kit::wire",
2280
+ "name": "WEATHER",
2281
+ "kind": "const",
2282
+ "signature": "pub const WEATHER: u16 = 90;",
2283
+ "docs": "The weather or the time of day turned."
2284
+ },
2285
+ {
2286
+ "module": "ckx_sdk::kit::wire",
2287
+ "name": "WeatherChange",
2288
+ "kind": "struct",
2289
+ "signature": "pub struct WeatherChange { pub weather: String, pub since_ms: u64, pub until_ms: u64, pub night: bool, pub time_of_day: f64, }",
2290
+ "docs": ""
2291
+ },
2292
+ {
2293
+ "module": "ckx_sdk::kit::wire",
2294
+ "name": "WeatherChange::night",
2295
+ "kind": "field",
2296
+ "signature": "pub night: bool",
2297
+ "docs": ""
2298
+ },
2299
+ {
2300
+ "module": "ckx_sdk::kit::wire",
2301
+ "name": "WeatherChange::since_ms",
2302
+ "kind": "field",
2303
+ "signature": "pub since_ms: u64",
2304
+ "docs": ""
2305
+ },
2306
+ {
2307
+ "module": "ckx_sdk::kit::wire",
2308
+ "name": "WeatherChange::time_of_day",
2309
+ "kind": "field",
2310
+ "signature": "pub time_of_day: f64",
2311
+ "docs": ""
2312
+ },
2313
+ {
2314
+ "module": "ckx_sdk::kit::wire",
2315
+ "name": "WeatherChange::until_ms",
2316
+ "kind": "field",
2317
+ "signature": "pub until_ms: u64",
2318
+ "docs": ""
2319
+ },
2320
+ {
2321
+ "module": "ckx_sdk::kit::wire",
2322
+ "name": "WeatherChange::weather",
2323
+ "kind": "field",
2324
+ "signature": "pub weather: String",
2325
+ "docs": ""
2326
+ },
2327
+ {
2328
+ "module": "ckx_sdk::kit::wire",
2329
+ "name": "ZONE_CHANGE",
2330
+ "kind": "const",
2331
+ "signature": "pub const ZONE_CHANGE: u16 = 98;",
2332
+ "docs": "A play zone moved or shrank."
2333
+ },
2334
+ {
2335
+ "module": "ckx_sdk::kit::wire",
2336
+ "name": "ZoneChange",
2337
+ "kind": "struct",
2338
+ "signature": "pub struct ZoneChange { /// `hold`, `shrink` or `closed`. pub kind: String, pub phase: Option<u32>, pub radius_now: f64, pub center_x: f64, pub center_z: f64, }",
2339
+ "docs": ""
2340
+ },
2341
+ {
2342
+ "module": "ckx_sdk::kit::wire",
2343
+ "name": "ZoneChange::center_x",
2344
+ "kind": "field",
2345
+ "signature": "pub center_x: f64",
2346
+ "docs": ""
2347
+ },
2348
+ {
2349
+ "module": "ckx_sdk::kit::wire",
2350
+ "name": "ZoneChange::center_z",
2351
+ "kind": "field",
2352
+ "signature": "pub center_z: f64",
2353
+ "docs": ""
2354
+ },
2355
+ {
2356
+ "module": "ckx_sdk::kit::wire",
2357
+ "name": "ZoneChange::kind",
2358
+ "kind": "field",
2359
+ "signature": "pub kind: String",
2360
+ "docs": "`hold`, `shrink` or `closed`."
2361
+ },
2362
+ {
2363
+ "module": "ckx_sdk::kit::wire",
2364
+ "name": "ZoneChange::phase",
2365
+ "kind": "field",
2366
+ "signature": "pub phase: Option<u32>",
2367
+ "docs": ""
2368
+ },
2369
+ {
2370
+ "module": "ckx_sdk::kit::wire",
2371
+ "name": "ZoneChange::radius_now",
2372
+ "kind": "field",
2373
+ "signature": "pub radius_now: f64",
2374
+ "docs": ""
2375
+ },
2376
+ {
2377
+ "module": "ckx_sdk::kit::wire",
2378
+ "name": "emit_actor_state",
2379
+ "kind": "function",
2380
+ "signature": "pub fn emit_actor_state(ctx: &Ctx, actor: &[u8; 32], distance: u8, state: &ActorState) -> Result<()>",
2381
+ "docs": "Shows a server-driven actor to the players within `distance` chunks of where it stands."
2382
+ },
2383
+ {
2384
+ "module": "ckx_sdk::kit::wire",
2385
+ "name": "emit_event",
2386
+ "kind": "function",
2387
+ "signature": "pub fn emit_event<T: Serialize + ?Sized>(ctx: &Ctx, at: ChunkPos, distance: u8, actor: &[u8; 32], event_type: u16, body: &T) -> Result<()>",
2388
+ "docs": "Sends a server event to the players within `distance` chunks of `at` (at most [`MAX_DISTANCE`]). `actor` is the event's actor: the one it is about, or the hub's own."
2389
+ },
2390
+ {
2391
+ "module": "ckx_sdk::kit::wire",
2392
+ "name": "event_bytes",
2393
+ "kind": "function",
2394
+ "signature": "pub fn event_bytes<T: Serialize + ?Sized>(event_type: u16, body: &T) -> Result<Vec<u8>>",
2395
+ "docs": "A server event's payload: its type, then its body as JSON."
2396
+ },
2397
+ {
2398
+ "module": "ckx_sdk::limits",
2399
+ "name": "ARTIFACT_MAX_BYTES",
2400
+ "kind": "const",
2401
+ "signature": "pub const ARTIFACT_MAX_BYTES: usize = 16 << 20;",
2402
+ "docs": "The largest module an app's node type may deploy."
2403
+ },
2404
+ {
2405
+ "module": "ckx_sdk::limits",
2406
+ "name": "LOGS_PER_CALL",
2407
+ "kind": "const",
2408
+ "signature": "pub const LOGS_PER_CALL: u32 = 32;",
2409
+ "docs": "Log lines one call may write (the rest are dropped), and the bytes of a line that are kept."
2410
+ },
2411
+ {
2412
+ "module": "ckx_sdk::limits",
2413
+ "name": "MAX_EMIT_BYTES",
2414
+ "kind": "const",
2415
+ "signature": "pub const MAX_EMIT_BYTES: usize = 70 + crate::emit::MAX_PAYLOAD;",
2416
+ "docs": "The largest realtime inject a node may emit: a spatial event's header and its payload."
2417
+ },
2418
+ {
2419
+ "module": "ckx_sdk::limits",
2420
+ "name": "MAX_LOG_BYTES",
2421
+ "kind": "const",
2422
+ "signature": "pub const MAX_LOG_BYTES: usize = 4 << 10;",
2423
+ "docs": ""
2424
+ },
2425
+ {
2426
+ "module": "ckx_sdk::limits",
2427
+ "name": "MAX_PAYLOAD",
2428
+ "kind": "const",
2429
+ "signature": "pub const MAX_PAYLOAD: usize = 4 << 20;",
2430
+ "docs": "The largest payload a node may send in one message, and the largest reply it may return. A larger reply is answered `Internal`."
2431
+ },
2432
+ {
2433
+ "module": "ckx_sdk::limits",
2434
+ "name": "MAX_SNAPSHOT_BYTES",
2435
+ "kind": "const",
2436
+ "signature": "pub const MAX_SNAPSHOT_BYTES: usize = 8 << 20;",
2437
+ "docs": "The largest snapshot a hub may persist. A larger one fails to save, and the last one stands."
2438
+ },
2439
+ {
2440
+ "module": "ckx_sdk::limits",
2441
+ "name": "OUT_BYTES_PER_CALL",
2442
+ "kind": "const",
2443
+ "signature": "pub const OUT_BYTES_PER_CALL: u64 = 32 << 20;",
2444
+ "docs": ""
2445
+ },
2446
+ {
2447
+ "module": "ckx_sdk::limits",
2448
+ "name": "OUT_MSGS_PER_CALL",
2449
+ "kind": "const",
2450
+ "signature": "pub const OUT_MSGS_PER_CALL: u32 = 16_384;",
2451
+ "docs": "What one call into a node may send on, in all: messages (calls, sends, publishes, emits, node API requests, subscriptions) and bytes of their payloads. Past either, calls and node API requests answer `Busy` and publishes are dropped."
2452
+ },
2453
+ {
2454
+ "module": "ckx_sdk::limits",
2455
+ "name": "crate::node::{MAX_CHUNK_STATE, MAX_VOXEL_STATE, MAX_VOXEL_WRITES}",
2456
+ "kind": "reexport",
2457
+ "signature": "pub use crate::node::{MAX_CHUNK_STATE, MAX_VOXEL_STATE, MAX_VOXEL_WRITES};",
2458
+ "docs": ""
2459
+ },
2460
+ {
2461
+ "module": "ckx_sdk::limits",
2462
+ "name": "crate::rt::{MAX_TIMERS, MAX_WATCHES, MIN_TIMER_MS}",
2463
+ "kind": "reexport",
2464
+ "signature": "pub use crate::rt::{MAX_TIMERS, MAX_WATCHES, MIN_TIMER_MS};",
2465
+ "docs": ""
2466
+ },
2467
+ {
2468
+ "module": "ckx_sdk::limits",
2469
+ "name": "manifest",
2470
+ "kind": "module",
2471
+ "signature": "pub mod manifest",
2472
+ "docs": "What a manifest may ask for a node type, and what it gets when it asks for nothing."
2473
+ },
2474
+ {
2475
+ "module": "ckx_sdk::limits",
2476
+ "name": "mods",
2477
+ "kind": "module",
2478
+ "signature": "pub mod mods",
2479
+ "docs": "What the platform gives every mod, in place of a manifest's limits."
2480
+ },
2481
+ {
2482
+ "module": "ckx_sdk::limits::manifest",
2483
+ "name": "DEADLINE_DEFAULT_MS",
2484
+ "kind": "const",
2485
+ "signature": "pub const DEADLINE_DEFAULT_MS: u32 = 2_000;",
2486
+ "docs": ""
2487
+ },
2488
+ {
2489
+ "module": "ckx_sdk::limits::manifest",
2490
+ "name": "DEADLINE_MAX_MS",
2491
+ "kind": "const",
2492
+ "signature": "pub const DEADLINE_MAX_MS: u32 = 10_000;",
2493
+ "docs": ""
2494
+ },
2495
+ {
2496
+ "module": "ckx_sdk::limits::manifest",
2497
+ "name": "FUEL_DEFAULT",
2498
+ "kind": "const",
2499
+ "signature": "pub const FUEL_DEFAULT: u64 = 50_000_000;",
2500
+ "docs": ""
2501
+ },
2502
+ {
2503
+ "module": "ckx_sdk::limits::manifest",
2504
+ "name": "FUEL_MAX",
2505
+ "kind": "const",
2506
+ "signature": "pub const FUEL_MAX: u64 = 1_000_000_000;",
2507
+ "docs": ""
2508
+ },
2509
+ {
2510
+ "module": "ckx_sdk::limits::manifest",
2511
+ "name": "MEMORY_DEFAULT_MB",
2512
+ "kind": "const",
2513
+ "signature": "pub const MEMORY_DEFAULT_MB: u32 = 64;",
2514
+ "docs": ""
2515
+ },
2516
+ {
2517
+ "module": "ckx_sdk::limits::manifest",
2518
+ "name": "MEMORY_MAX_MB",
2519
+ "kind": "const",
2520
+ "signature": "pub const MEMORY_MAX_MB: u32 = 512;",
2521
+ "docs": ""
2522
+ },
2523
+ {
2524
+ "module": "ckx_sdk::limits::mods",
2525
+ "name": "ARTIFACT_MAX_BYTES",
2526
+ "kind": "const",
2527
+ "signature": "pub const ARTIFACT_MAX_BYTES: usize = 4 << 20;",
2528
+ "docs": ""
2529
+ },
2530
+ {
2531
+ "module": "ckx_sdk::limits::mods",
2532
+ "name": "DEADLINE_MS",
2533
+ "kind": "const",
2534
+ "signature": "pub const DEADLINE_MS: u32 = 2_000;",
2535
+ "docs": ""
2536
+ },
2537
+ {
2538
+ "module": "ckx_sdk::limits::mods",
2539
+ "name": "FUEL_PER_CALL",
2540
+ "kind": "const",
2541
+ "signature": "pub const FUEL_PER_CALL: u64 = 20_000_000;",
2542
+ "docs": ""
2543
+ },
2544
+ {
2545
+ "module": "ckx_sdk::limits::mods",
2546
+ "name": "MEMORY_MB",
2547
+ "kind": "const",
2548
+ "signature": "pub const MEMORY_MB: u32 = 32;",
2549
+ "docs": ""
2550
+ },
2551
+ {
2552
+ "module": "ckx_sdk::limits::mods",
2553
+ "name": "PER_GRID_MAX",
2554
+ "kind": "const",
2555
+ "signature": "pub const PER_GRID_MAX: usize = 8;",
2556
+ "docs": "Mods one grid may run, and one owner may hold."
1045
2557
  },
1046
2558
  {
1047
- "module": "ckx_sdk::emit",
1048
- "name": "Spatial::Event",
1049
- "kind": "variant",
1050
- "signature": "Event { event_type: u16, state: &'a [u8] }",
1051
- "docs": "A server event (`event_type`, then `state`), as games route server events."
2559
+ "module": "ckx_sdk::limits::mods",
2560
+ "name": "PER_OWNER_MAX",
2561
+ "kind": "const",
2562
+ "signature": "pub const PER_OWNER_MAX: usize = 64;",
2563
+ "docs": ""
1052
2564
  },
1053
2565
  {
1054
- "module": "ckx_sdk::emit",
1055
- "name": "Spatial::Generic",
1056
- "kind": "variant",
1057
- "signature": "Generic { payload: &'a [u8] }",
1058
- "docs": "An app-defined payload."
2566
+ "module": "ckx_sdk::limits::mods",
2567
+ "name": "RATE_PER_SEC",
2568
+ "kind": "const",
2569
+ "signature": "pub const RATE_PER_SEC: u32 = 20;",
2570
+ "docs": "Handler calls per second, per mod instance."
1059
2571
  },
1060
2572
  {
1061
- "module": "ckx_sdk::emit",
1062
- "name": "Spatial::Voxel",
1063
- "kind": "variant",
1064
- "signature": "Voxel { x: i16, y: i16, z: i16, voxel_type: u16, state: &'a [u8] }",
1065
- "docs": "A voxel edit at `(x, y, z)` within the chunk, folded into the live mesh. The durable write is `ctx.world().set_voxels`, which already shows it; this is for effects."
2573
+ "module": "ckx_sdk::limits::mods",
2574
+ "name": "SCOPES",
2575
+ "kind": "const",
2576
+ "signature": "pub const SCOPES: [&str; 3] = [\"grids.read\", \"world.read\", \"world.write\"];",
2577
+ "docs": "The node API scopes every mod holds, each confined to its grid."
1066
2578
  },
1067
2579
  {
1068
- "module": "ckx_sdk::emit",
1069
- "name": "actor_id",
1070
- "kind": "function",
1071
- "signature": "pub fn actor_id(uuid: &str) -> [u8; 32]",
1072
- "docs": "A 32-byte actor id, as the realtime tier addresses actors. Players' actors use their 32-character uuid; a server-driven actor (an NPC, a mob) can use any 32 bytes."
2580
+ "module": "ckx_sdk::limits::mods",
2581
+ "name": "TYPE_PREFIX",
2582
+ "kind": "const",
2583
+ "signature": "pub const TYPE_PREFIX: &str = \"mod:\";",
2584
+ "docs": "A mod is the hub `(\"mod:<name>\", \"<grid id>\")`."
2585
+ },
2586
+ {
2587
+ "module": "ckx_sdk::limits::mods",
2588
+ "name": "WORLD_BATCH_MAX",
2589
+ "kind": "const",
2590
+ "signature": "pub const WORLD_BATCH_MAX: usize = 512;",
2591
+ "docs": "World events in one `$world` call, at most."
1073
2592
  },
1074
2593
  {
1075
2594
  "module": "ckx_sdk::model",
@@ -1253,6 +2772,13 @@ export const GENERATED_BROWSER_AUTHORING_INDEX = {
1253
2772
  "signature": "pub fn get_str(&self, schema: &Schema, id: u64, key: &str) -> Result<String>",
1254
2773
  "docs": ""
1255
2774
  },
2775
+ {
2776
+ "module": "ckx_sdk::model",
2777
+ "name": "Model::ids",
2778
+ "kind": "method",
2779
+ "signature": "pub fn ids(&self) -> impl Iterator<Item = u64> + '_",
2780
+ "docs": "Every container's id, oldest first."
2781
+ },
1256
2782
  {
1257
2783
  "module": "ckx_sdk::model",
1258
2784
  "name": "Model::link",
@@ -1512,6 +3038,48 @@ export const GENERATED_BROWSER_AUTHORING_INDEX = {
1512
3038
  "signature": "Public",
1513
3039
  "docs": ""
1514
3040
  },
3041
+ {
3042
+ "module": "ckx_sdk::node",
3043
+ "name": "Access",
3044
+ "kind": "struct",
3045
+ "signature": "pub struct Access<'a>(pub(crate) &'a Ctx);",
3046
+ "docs": "Players' access to this app: [`Ctx::access`]."
3047
+ },
3048
+ {
3049
+ "module": "ckx_sdk::node",
3050
+ "name": "Access::get",
3051
+ "kind": "method",
3052
+ "signature": "pub fn get(&self, player: u64) -> Result<Option<PlayerAccess>, CallError>",
3053
+ "docs": "The player's access to the app, or `None` when they never had any. Scope `access.read`."
3054
+ },
3055
+ {
3056
+ "module": "ckx_sdk::node",
3057
+ "name": "Access::grant",
3058
+ "kind": "method",
3059
+ "signature": "pub fn grant(&self, player: u64, tier: Option<u64>) -> Result<PlayerAccess, CallError>",
3060
+ "docs": "Gives the player access to the app, in access tier `tier` when one is named. Scope `access.write`."
3061
+ },
3062
+ {
3063
+ "module": "ckx_sdk::node",
3064
+ "name": "Access::revoke",
3065
+ "kind": "method",
3066
+ "signature": "pub fn revoke(&self, player: u64) -> Result<(), CallError>",
3067
+ "docs": "Takes the player's access away. Scope `access.write`."
3068
+ },
3069
+ {
3070
+ "module": "ckx_sdk::node",
3071
+ "name": "Access::suspend",
3072
+ "kind": "method",
3073
+ "signature": "pub fn suspend(&self, player: u64, seconds: u32) -> Result<String, CallError>",
3074
+ "docs": "Suspends the player's access for `seconds`. Returns until when (RFC 3339). Scope `access.write`."
3075
+ },
3076
+ {
3077
+ "module": "ckx_sdk::node",
3078
+ "name": "Access::unsuspend",
3079
+ "kind": "method",
3080
+ "signature": "pub fn unsuspend(&self, player: u64) -> Result<(), CallError>",
3081
+ "docs": "Ends the player's suspension. Scope `access.write`."
3082
+ },
1515
3083
  {
1516
3084
  "module": "ckx_sdk::node",
1517
3085
  "name": "Actor",
@@ -1628,7 +3196,7 @@ export const GENERATED_BROWSER_AUTHORING_INDEX = {
1628
3196
  "module": "ckx_sdk::node",
1629
3197
  "name": "Grid",
1630
3198
  "kind": "struct",
1631
- "signature": "pub struct Grid { pub id: u64, pub low: ChunkPos, pub high: ChunkPos, }",
3199
+ "signature": "pub struct Grid { pub id: u64, pub low: ChunkPos, pub high: ChunkPos, /// Who holds it, where the platform records an owner. pub owner: Option<GridOwner>, /// Permission keys every player holds on it, granted or not. pub open_permissions: Vec<String>, }",
1632
3200
  "docs": "A grid: a box of chunks with its own permissions."
1633
3201
  },
1634
3202
  {
@@ -1638,6 +3206,13 @@ export const GENERATED_BROWSER_AUTHORING_INDEX = {
1638
3206
  "signature": "pub fn contains(&self, at: ChunkPos) -> bool",
1639
3207
  "docs": ""
1640
3208
  },
3209
+ {
3210
+ "module": "ckx_sdk::node",
3211
+ "name": "Grid::from",
3212
+ "kind": "method",
3213
+ "signature": "fn from(g: WireGrid) -> Self",
3214
+ "docs": ""
3215
+ },
1641
3216
  {
1642
3217
  "module": "ckx_sdk::node",
1643
3218
  "name": "Grid::high",
@@ -1659,6 +3234,41 @@ export const GENERATED_BROWSER_AUTHORING_INDEX = {
1659
3234
  "signature": "pub low: ChunkPos",
1660
3235
  "docs": ""
1661
3236
  },
3237
+ {
3238
+ "module": "ckx_sdk::node",
3239
+ "name": "Grid::open_permissions",
3240
+ "kind": "field",
3241
+ "signature": "pub open_permissions: Vec<String>",
3242
+ "docs": "Permission keys every player holds on it, granted or not."
3243
+ },
3244
+ {
3245
+ "module": "ckx_sdk::node",
3246
+ "name": "Grid::owner",
3247
+ "kind": "field",
3248
+ "signature": "pub owner: Option<GridOwner>",
3249
+ "docs": "Who holds it, where the platform records an owner."
3250
+ },
3251
+ {
3252
+ "module": "ckx_sdk::node",
3253
+ "name": "GridOwner",
3254
+ "kind": "struct",
3255
+ "signature": "pub struct GridOwner { pub kind: String, #[serde(rename = \"ref\")] pub ref_: String, }",
3256
+ "docs": "A grid's owner: what kind of party it is, and which."
3257
+ },
3258
+ {
3259
+ "module": "ckx_sdk::node",
3260
+ "name": "GridOwner::kind",
3261
+ "kind": "field",
3262
+ "signature": "pub kind: String",
3263
+ "docs": ""
3264
+ },
3265
+ {
3266
+ "module": "ckx_sdk::node",
3267
+ "name": "GridOwner::ref_",
3268
+ "kind": "field",
3269
+ "signature": "pub ref_: String",
3270
+ "docs": ""
3271
+ },
1662
3272
  {
1663
3273
  "module": "ckx_sdk::node",
1664
3274
  "name": "GridPick",
@@ -1687,12 +3297,33 @@ export const GENERATED_BROWSER_AUTHORING_INDEX = {
1687
3297
  "signature": "Smallest",
1688
3298
  "docs": ""
1689
3299
  },
3300
+ {
3301
+ "module": "ckx_sdk::node",
3302
+ "name": "GridSettings",
3303
+ "kind": "struct",
3304
+ "signature": "pub struct GridSettings { /// Players may write voxels outside every grid. pub wilderness_writes_open: bool, }",
3305
+ "docs": "The app's grid rules, from [`Grids::settings`]."
3306
+ },
3307
+ {
3308
+ "module": "ckx_sdk::node",
3309
+ "name": "GridSettings::wilderness_writes_open",
3310
+ "kind": "field",
3311
+ "signature": "pub wilderness_writes_open: bool",
3312
+ "docs": "Players may write voxels outside every grid."
3313
+ },
1690
3314
  {
1691
3315
  "module": "ckx_sdk::node",
1692
3316
  "name": "Grids",
1693
3317
  "kind": "struct",
1694
3318
  "signature": "pub struct Grids<'a>(pub(crate) &'a Ctx);",
1695
- "docs": "Grid lookups: [`Ctx::grids`]."
3319
+ "docs": "Grids and their permissions: [`Ctx::grids`]."
3320
+ },
3321
+ {
3322
+ "module": "ckx_sdk::node",
3323
+ "name": "Grids::assign_group",
3324
+ "kind": "method",
3325
+ "signature": "pub fn assign_group(&self, grid: u64, group: u64, permissions: &[&str]) -> Result<(), CallError>",
3326
+ "docs": "Gives the members of one of the app's groups `permissions` on `grid`. Scope `grids.write`."
1696
3327
  },
1697
3328
  {
1698
3329
  "module": "ckx_sdk::node",
@@ -1708,6 +3339,20 @@ export const GENERATED_BROWSER_AUTHORING_INDEX = {
1708
3339
  "signature": "pub fn check_permission(&self, grid: u64, player: u64, permission: &str) -> Result<bool, CallError>",
1709
3340
  "docs": "Whether `player` holds `permission` on `grid` (granted directly or through a group, and not expired). Scope `grids.read`."
1710
3341
  },
3342
+ {
3343
+ "module": "ckx_sdk::node",
3344
+ "name": "Grids::create",
3345
+ "kind": "method",
3346
+ "signature": "pub fn create(&self, low: ChunkPos, high: ChunkPos) -> Result<Grid, CallError>",
3347
+ "docs": "A new grid of the app from chunk `low` to chunk `high`, both included. Scope `grids.write`."
3348
+ },
3349
+ {
3350
+ "module": "ckx_sdk::node",
3351
+ "name": "Grids::delete",
3352
+ "kind": "method",
3353
+ "signature": "pub fn delete(&self, grid: u64) -> Result<(), CallError>",
3354
+ "docs": "Removes one of the app's grids. Scope `grids.write`."
3355
+ },
1711
3356
  {
1712
3357
  "module": "ckx_sdk::node",
1713
3358
  "name": "Grids::get",
@@ -1715,6 +3360,34 @@ export const GENERATED_BROWSER_AUTHORING_INDEX = {
1715
3360
  "signature": "pub fn get(&self, grid: u64) -> Result<Option<Grid>, CallError>",
1716
3361
  "docs": "One of this app's grids. Scope `grids.read`."
1717
3362
  },
3363
+ {
3364
+ "module": "ckx_sdk::node",
3365
+ "name": "Grids::set_open_permissions",
3366
+ "kind": "method",
3367
+ "signature": "pub fn set_open_permissions(&self, grid: u64, permissions: &[&str]) -> Result<(), CallError>",
3368
+ "docs": "Replaces the permission keys every player holds on `grid` ([`Grid::open_permissions`]). Scope `grids.write`."
3369
+ },
3370
+ {
3371
+ "module": "ckx_sdk::node",
3372
+ "name": "Grids::settings",
3373
+ "kind": "method",
3374
+ "signature": "pub fn settings(&self) -> Result<GridSettings, CallError>",
3375
+ "docs": "The app's grid rules. Scope `grids.read`."
3376
+ },
3377
+ {
3378
+ "module": "ckx_sdk::node",
3379
+ "name": "Grids::unassign_group",
3380
+ "kind": "method",
3381
+ "signature": "pub fn unassign_group(&self, grid: u64, group: u64) -> Result<(), CallError>",
3382
+ "docs": "Takes back what [`Grids::assign_group`] gave the group on `grid`. Scope `grids.write`."
3383
+ },
3384
+ {
3385
+ "module": "ckx_sdk::node",
3386
+ "name": "MAX_CHUNK_STATE",
3387
+ "kind": "const",
3388
+ "signature": "pub const MAX_CHUNK_STATE: usize = 65_536;",
3389
+ "docs": "A chunk's state bytes ([`World::set_chunk_state`])."
3390
+ },
1718
3391
  {
1719
3392
  "module": "ckx_sdk::node",
1720
3393
  "name": "MAX_VOXEL_STATE",
@@ -1754,15 +3427,15 @@ export const GENERATED_BROWSER_AUTHORING_INDEX = {
1754
3427
  "module": "ckx_sdk::node",
1755
3428
  "name": "Player",
1756
3429
  "kind": "struct",
1757
- "signature": "pub struct Player { #[serde(deserialize_with = \"de_u64\")] pub player: u64, pub gamertag: String, pub disambiguation: String, }",
3430
+ "signature": "pub struct Player { #[serde(deserialize_with = \"de_u64\")] pub player: u64, pub gamertag: String, /// What tells players with the same gamertag apart; most players have none. #[serde(default)] pub disambiguation: Option<String>, }",
1758
3431
  "docs": "A player's public identity."
1759
3432
  },
1760
3433
  {
1761
3434
  "module": "ckx_sdk::node",
1762
3435
  "name": "Player::disambiguation",
1763
3436
  "kind": "field",
1764
- "signature": "pub disambiguation: String",
1765
- "docs": ""
3437
+ "signature": "pub disambiguation: Option<String>",
3438
+ "docs": "What tells players with the same gamertag apart; most players have none."
1766
3439
  },
1767
3440
  {
1768
3441
  "module": "ckx_sdk::node",
@@ -1778,6 +3451,41 @@ export const GENERATED_BROWSER_AUTHORING_INDEX = {
1778
3451
  "signature": "pub player: u64",
1779
3452
  "docs": ""
1780
3453
  },
3454
+ {
3455
+ "module": "ckx_sdk::node",
3456
+ "name": "PlayerAccess",
3457
+ "kind": "struct",
3458
+ "signature": "pub struct PlayerAccess { /// `active`, `revoked`, or another state the platform names. pub status: String, /// The access tier, if any. #[serde(default, rename = \"tierId\", deserialize_with = \"de_opt_u64\")] pub tier: Option<u64>, /// When it ends (RFC 3339), if it does. #[serde(default)] pub expires_at: Option<String>, /// Until when the player is suspended (RFC 3339), while they are. #[serde(default)] pub suspended_until: Option<String>, }",
3459
+ "docs": "A player's access to the app, from [`Access::get`] and [`Access::grant`]."
3460
+ },
3461
+ {
3462
+ "module": "ckx_sdk::node",
3463
+ "name": "PlayerAccess::expires_at",
3464
+ "kind": "field",
3465
+ "signature": "pub expires_at: Option<String>",
3466
+ "docs": "When it ends (RFC 3339), if it does."
3467
+ },
3468
+ {
3469
+ "module": "ckx_sdk::node",
3470
+ "name": "PlayerAccess::status",
3471
+ "kind": "field",
3472
+ "signature": "pub status: String",
3473
+ "docs": "`active`, `revoked`, or another state the platform names."
3474
+ },
3475
+ {
3476
+ "module": "ckx_sdk::node",
3477
+ "name": "PlayerAccess::suspended_until",
3478
+ "kind": "field",
3479
+ "signature": "pub suspended_until: Option<String>",
3480
+ "docs": "Until when the player is suspended (RFC 3339), while they are."
3481
+ },
3482
+ {
3483
+ "module": "ckx_sdk::node",
3484
+ "name": "PlayerAccess::tier",
3485
+ "kind": "field",
3486
+ "signature": "pub tier: Option<u64>",
3487
+ "docs": "The access tier, if any."
3488
+ },
1781
3489
  {
1782
3490
  "module": "ckx_sdk::node",
1783
3491
  "name": "Players",
@@ -1831,8 +3539,22 @@ export const GENERATED_BROWSER_AUTHORING_INDEX = {
1831
3539
  "module": "ckx_sdk::node",
1832
3540
  "name": "Voxel",
1833
3541
  "kind": "struct",
1834
- "signature": "pub struct Voxel { pub x: i16, pub y: i16, pub z: i16, pub voxel_type: u16, pub state: Option<Vec<u8>>, }",
1835
- "docs": "A voxel written into a chunk (the edits on top of its dense grid)."
3542
+ "signature": "pub struct Voxel { pub x: i16, pub y: i16, pub z: i16, /// What a type means is up to the app. pub voxel_type: i16, pub state: Option<Vec<u8>>, /// Who wrote it: a user id in decimal, `\"0\"` when the app's own code did. `None` from a /// platform that does not say. pub created_by: Option<String>, /// When it was written (RFC 3339). pub updated_at: Option<String>, }",
3543
+ "docs": "A voxel written into a chunk (the edits on top of its dense grid), with who wrote it and when."
3544
+ },
3545
+ {
3546
+ "module": "ckx_sdk::node",
3547
+ "name": "Voxel::created_by",
3548
+ "kind": "field",
3549
+ "signature": "pub created_by: Option<String>",
3550
+ "docs": "Who wrote it: a user id in decimal, `\"0\"` when the app's own code did. `None` from a platform that does not say."
3551
+ },
3552
+ {
3553
+ "module": "ckx_sdk::node",
3554
+ "name": "Voxel::from",
3555
+ "kind": "method",
3556
+ "signature": "fn from(v: WireVoxel) -> Self",
3557
+ "docs": ""
1836
3558
  },
1837
3559
  {
1838
3560
  "module": "ckx_sdk::node",
@@ -1841,12 +3563,19 @@ export const GENERATED_BROWSER_AUTHORING_INDEX = {
1841
3563
  "signature": "pub state: Option<Vec<u8>>",
1842
3564
  "docs": ""
1843
3565
  },
3566
+ {
3567
+ "module": "ckx_sdk::node",
3568
+ "name": "Voxel::updated_at",
3569
+ "kind": "field",
3570
+ "signature": "pub updated_at: Option<String>",
3571
+ "docs": "When it was written (RFC 3339)."
3572
+ },
1844
3573
  {
1845
3574
  "module": "ckx_sdk::node",
1846
3575
  "name": "Voxel::voxel_type",
1847
3576
  "kind": "field",
1848
- "signature": "pub voxel_type: u16",
1849
- "docs": ""
3577
+ "signature": "pub voxel_type: i16",
3578
+ "docs": "What a type means is up to the app."
1850
3579
  },
1851
3580
  {
1852
3581
  "module": "ckx_sdk::node",
@@ -1873,7 +3602,7 @@ export const GENERATED_BROWSER_AUTHORING_INDEX = {
1873
3602
  "module": "ckx_sdk::node",
1874
3603
  "name": "VoxelWrite",
1875
3604
  "kind": "struct",
1876
- "signature": "pub struct VoxelWrite { pub chunk: ChunkPos, pub voxel: (i16, i16, i16), pub voxel_type: u16, pub state: Option<Vec<u8>>, }",
3605
+ "signature": "pub struct VoxelWrite { pub chunk: ChunkPos, /// `(x, y, z)` within the chunk. Positions are the app's to define; an app on the 16×16×16 /// dense grid keeps to 0 to 15 on each axis. pub voxel: (i16, i16, i16), /// What a type means is up to the app. pub voxel_type: i16, pub state: Option<Vec<u8>>, }",
1877
3606
  "docs": "One voxel to write: `voxel` is its position within `chunk`."
1878
3607
  },
1879
3608
  {
@@ -1895,14 +3624,14 @@ export const GENERATED_BROWSER_AUTHORING_INDEX = {
1895
3624
  "name": "VoxelWrite::voxel",
1896
3625
  "kind": "field",
1897
3626
  "signature": "pub voxel: (i16, i16, i16)",
1898
- "docs": ""
3627
+ "docs": "`(x, y, z)` within the chunk. Positions are the app's to define; an app on the 16×16×16 dense grid keeps to 0 to 15 on each axis."
1899
3628
  },
1900
3629
  {
1901
3630
  "module": "ckx_sdk::node",
1902
3631
  "name": "VoxelWrite::voxel_type",
1903
3632
  "kind": "field",
1904
- "signature": "pub voxel_type: u16",
1905
- "docs": ""
3633
+ "signature": "pub voxel_type: i16",
3634
+ "docs": "What a type means is up to the app."
1906
3635
  },
1907
3636
  {
1908
3637
  "module": "ckx_sdk::node",
@@ -1932,6 +3661,13 @@ export const GENERATED_BROWSER_AUTHORING_INDEX = {
1932
3661
  "signature": "pub fn chunk(&self, at: ChunkPos) -> Result<Option<Chunk>, CallError>",
1933
3662
  "docs": "The chunk at `at`, or `None` when the app never stored it. Scope `world.read`."
1934
3663
  },
3664
+ {
3665
+ "module": "ckx_sdk::node",
3666
+ "name": "World::set_chunk_state",
3667
+ "kind": "method",
3668
+ "signature": "pub fn set_chunk_state(&self, chunk: ChunkPos, state: Option<&[u8]>) -> Result<(), CallError>",
3669
+ "docs": "Replaces the chunk's own state blob, the one [`Chunk::chunk_state`] reads (at most [`MAX_CHUNK_STATE`] bytes; `None` clears it). Scope `world.write`."
3670
+ },
1935
3671
  {
1936
3672
  "module": "ckx_sdk::node",
1937
3673
  "name": "World::set_voxels",
@@ -2240,6 +3976,27 @@ export const GENERATED_BROWSER_AUTHORING_INDEX = {
2240
3976
  "signature": "pub fn state_set(bytes: &[u8]) -> bool",
2241
3977
  "docs": "Replaces the state blob."
2242
3978
  },
3979
+ {
3980
+ "module": "crowdy_client_sdk::api",
3981
+ "name": "actor_despawn",
3982
+ "kind": "function",
3983
+ "signature": "pub fn actor_despawn(actor_id: &str) -> Result<Value, HostError>",
3984
+ "docs": "Removes a mod-owned actor of this session."
3985
+ },
3986
+ {
3987
+ "module": "crowdy_client_sdk::api",
3988
+ "name": "actor_pose",
3989
+ "kind": "function",
3990
+ "signature": "pub fn actor_pose(actor_id: &str, pose: Value) -> Result<Value, HostError>",
3991
+ "docs": "Moves a mod-owned actor of this session. A position outside the grid is refused."
3992
+ },
3993
+ {
3994
+ "module": "crowdy_client_sdk::api",
3995
+ "name": "actor_spawn",
3996
+ "kind": "function",
3997
+ "signature": "pub fn actor_spawn(actor: Value) -> Result<Value, HostError>",
3998
+ "docs": "Places a mod-owned actor inside the grid. A live player's id is refused."
3999
+ },
2243
4000
  {
2244
4001
  "module": "crowdy_client_sdk::api",
2245
4002
  "name": "actors_list",
@@ -2254,6 +4011,13 @@ export const GENERATED_BROWSER_AUTHORING_INDEX = {
2254
4011
  "signature": "pub fn actors_list_radius( x: i64, y: i64, z: i64, radius_xz: u8, radius_y: u8, ) -> Result<Value, HostError>",
2255
4012
  "docs": "The actors in a box of chunks around (x, y, z): `radius_xz` at most 3 and `radius_y` at most 1, clipped to the grid."
2256
4013
  },
4014
+ {
4015
+ "module": "crowdy_client_sdk::api",
4016
+ "name": "avatar_appearance",
4017
+ "kind": "function",
4018
+ "signature": "pub fn avatar_appearance(appearance: Value) -> Result<Value, HostError>",
4019
+ "docs": "The visiting player's avatar tint."
4020
+ },
2257
4021
  {
2258
4022
  "module": "crowdy_client_sdk::api",
2259
4023
  "name": "avatar_state_get",
@@ -2261,6 +4025,13 @@ export const GENERATED_BROWSER_AUTHORING_INDEX = {
2261
4025
  "signature": "pub fn avatar_state_get(avatar_id: &str) -> Result<Value, HostError>",
2262
4026
  "docs": "An avatar's app state, for an avatar whose actor is inside the grid."
2263
4027
  },
4028
+ {
4029
+ "module": "crowdy_client_sdk::api",
4030
+ "name": "avatar_state_set",
4031
+ "kind": "function",
4032
+ "signature": "pub fn avatar_state_set(avatar_id: &str, state_base64: &str) -> Result<Value, HostError>",
4033
+ "docs": "The visiting player's own avatar state blob."
4034
+ },
2264
4035
  {
2265
4036
  "module": "crowdy_client_sdk::api",
2266
4037
  "name": "chunk_get",
@@ -2268,6 +4039,13 @@ export const GENERATED_BROWSER_AUTHORING_INDEX = {
2268
4039
  "signature": "pub fn chunk_get(x: i64, y: i64, z: i64) -> Result<Value, HostError>",
2269
4040
  "docs": "One chunk inside the grid: `{ voxelsBase64 }`."
2270
4041
  },
4042
+ {
4043
+ "module": "crowdy_client_sdk::api",
4044
+ "name": "clock",
4045
+ "kind": "function",
4046
+ "signature": "pub fn clock() -> Result<Value, HostError>",
4047
+ "docs": "The page's wall clock, milliseconds."
4048
+ },
2271
4049
  {
2272
4050
  "module": "crowdy_client_sdk::api",
2273
4051
  "name": "emit_channel",
@@ -2296,6 +4074,13 @@ export const GENERATED_BROWSER_AUTHORING_INDEX = {
2296
4074
  "signature": "pub fn emit_spatial( kind: &str, chunk: (i64, i64, i64), uuid_hex: &str, payload_base64: &str, distance: u8, decay: u8, ) -> Result<Value, HostError>",
2297
4075
  "docs": "Sends a spatial message from a chunk inside the grid, as the visiting player's client. `kind` is `actor`, `client_event`, `server_event` or `text`; `uuid_hex` is 64 hex characters; `distance` is at most 8."
2298
4076
  },
4077
+ {
4078
+ "module": "crowdy_client_sdk::api",
4079
+ "name": "events_poll",
4080
+ "kind": "function",
4081
+ "signature": "pub fn events_poll() -> Result<Value, HostError>",
4082
+ "docs": "ClientEvents the visiting player's session has received since the last poll."
4083
+ },
2299
4084
  {
2300
4085
  "module": "crowdy_client_sdk::api",
2301
4086
  "name": "grid_info",
@@ -2317,6 +4102,27 @@ export const GENERATED_BROWSER_AUTHORING_INDEX = {
2317
4102
  "signature": "pub fn hud_set(payload: Value) -> Result<Value, HostError>",
2318
4103
  "docs": "Hands `payload` to the game's HUD channel. The mod never touches the DOM; a game that offers no HUD answers `{ delivered: false }`."
2319
4104
  },
4105
+ {
4106
+ "module": "crowdy_client_sdk::api",
4107
+ "name": "input_axes",
4108
+ "kind": "function",
4109
+ "signature": "pub fn input_axes() -> Result<Value, HostError>",
4110
+ "docs": "The visiting player's movement axes, drained by the page: `{ x, y }`."
4111
+ },
4112
+ {
4113
+ "module": "crowdy_client_sdk::api",
4114
+ "name": "input_key",
4115
+ "kind": "function",
4116
+ "signature": "pub fn input_key(code: &str) -> Result<Value, HostError>",
4117
+ "docs": "Whether the visiting player is holding `code` (a `KeyboardEvent.code`)."
4118
+ },
4119
+ {
4120
+ "module": "crowdy_client_sdk::api",
4121
+ "name": "input_look",
4122
+ "kind": "function",
4123
+ "signature": "pub fn input_look() -> Result<Value, HostError>",
4124
+ "docs": "Pointer-look delta since the last poll: `{ dx, dy }`."
4125
+ },
2320
4126
  {
2321
4127
  "module": "crowdy_client_sdk::api",
2322
4128
  "name": "overlay_draw",
@@ -2331,6 +4137,76 @@ export const GENERATED_BROWSER_AUTHORING_INDEX = {
2331
4137
  "signature": "pub fn pointer_clicks() -> Result<Value, HostError>",
2332
4138
  "docs": "Drains the mouse clicks queued since the last call: `{ nowMs, buttons, holdingMs, clicks }`. `buttons` is `MouseEvent.buttons` (1 = left held); `holdingMs` maps a button index to how long it has been held (`\"0\"` = left); each click is `{ t: \"down\"|\"up\", button, atMs, heldMs?, nx, ny }` in canvas coordinates from -1 to 1 (+ny up). Call it every tick."
2333
4139
  },
4140
+ {
4141
+ "module": "crowdy_client_sdk::api",
4142
+ "name": "pose_get",
4143
+ "kind": "function",
4144
+ "signature": "pub fn pose_get() -> Result<Value, HostError>",
4145
+ "docs": "The visiting player's body. The page answers from the mod's hold, or the walker."
4146
+ },
4147
+ {
4148
+ "module": "crowdy_client_sdk::api",
4149
+ "name": "pose_release",
4150
+ "kind": "function",
4151
+ "signature": "pub fn pose_release() -> Result<Value, HostError>",
4152
+ "docs": "Hands the visiting player's body back to the walker."
4153
+ },
4154
+ {
4155
+ "module": "crowdy_client_sdk::api",
4156
+ "name": "pose_set",
4157
+ "kind": "function",
4158
+ "signature": "pub fn pose_set(pose: Value) -> Result<Value, HostError>",
4159
+ "docs": "Moves the visiting player's body. A position outside the grid is refused."
4160
+ },
4161
+ {
4162
+ "module": "crowdy_client_sdk::api",
4163
+ "name": "scene_catalog",
4164
+ "kind": "function",
4165
+ "signature": "pub fn scene_catalog(catalog: Value) -> Result<Value, HostError>",
4166
+ "docs": "The mod's scene templates, kept in the page."
4167
+ },
4168
+ {
4169
+ "module": "crowdy_client_sdk::api",
4170
+ "name": "scene_instances",
4171
+ "kind": "function",
4172
+ "signature": "pub fn scene_instances(instances: Value) -> Result<Value, HostError>",
4173
+ "docs": "Template instances drawn in the page, inside the grid."
4174
+ },
4175
+ {
4176
+ "module": "crowdy_client_sdk::api",
4177
+ "name": "send_actor_message",
4178
+ "kind": "function",
4179
+ "signature": "pub fn send_actor_message(actor_id: &str, payload: Value) -> Result<Value, HostError>",
4180
+ "docs": "A message from this session to one actor inside the grid."
4181
+ },
4182
+ {
4183
+ "module": "crowdy_client_sdk::api",
4184
+ "name": "send_channel_message",
4185
+ "kind": "function",
4186
+ "signature": "pub fn send_channel_message(channel_id: &str, payload: Value) -> Result<Value, HostError>",
4187
+ "docs": "A channel message as the visiting player, on a channel they may send on."
4188
+ },
4189
+ {
4190
+ "module": "crowdy_client_sdk::api",
4191
+ "name": "send_client_event",
4192
+ "kind": "function",
4193
+ "signature": "pub fn send_client_event(chunk: (i64, i64, i64), payload: Value) -> Result<Value, HostError>",
4194
+ "docs": "A ClientEvent from the visiting player's chunk, inside the grid."
4195
+ },
4196
+ {
4197
+ "module": "crowdy_client_sdk::api",
4198
+ "name": "send_text",
4199
+ "kind": "function",
4200
+ "signature": "pub fn send_text(chunk: (i64, i64, i64), text: &str) -> Result<Value, HostError>",
4201
+ "docs": "A spatial text packet from the visiting player's chunk."
4202
+ },
4203
+ {
4204
+ "module": "crowdy_client_sdk::api",
4205
+ "name": "teleport_request",
4206
+ "kind": "function",
4207
+ "signature": "pub fn teleport_request(destination: Value) -> Result<Value, HostError>",
4208
+ "docs": "Asks the page to move the visiting player to a destination inside the grid."
4209
+ },
2334
4210
  {
2335
4211
  "module": "crowdy_client_sdk::api",
2336
4212
  "name": "user_state_get",
@@ -2345,6 +4221,20 @@ export const GENERATED_BROWSER_AUTHORING_INDEX = {
2345
4221
  "signature": "pub fn user_state_set(user_id: &str, state_base64: &str) -> Result<Value, HostError>",
2346
4222
  "docs": "Replaces the visiting player's app state; `state_base64` is the new bytes."
2347
4223
  },
4224
+ {
4225
+ "module": "crowdy_client_sdk::api",
4226
+ "name": "video_set",
4227
+ "kind": "function",
4228
+ "signature": "pub fn video_set(enabled: bool) -> Result<Value, HostError>",
4229
+ "docs": "Starts or stops the visiting player's camera. The page still asks the browser."
4230
+ },
4231
+ {
4232
+ "module": "crowdy_client_sdk::api",
4233
+ "name": "voice_set",
4234
+ "kind": "function",
4235
+ "signature": "pub fn voice_set(enabled: bool) -> Result<Value, HostError>",
4236
+ "docs": "Starts or stops the visiting player's microphone. The page still asks the browser."
4237
+ },
2348
4238
  {
2349
4239
  "module": "crowdy_client_sdk::api",
2350
4240
  "name": "voxel_set",