@spellkave/sdk 0.0.0-bootstrap → 0.0.0-stage

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 (144) hide show
  1. package/README.md +2 -155
  2. package/package.json +4 -63
  3. package/LICENSE +0 -89
  4. package/src/binding_rows.ts +0 -186
  5. package/src/connection.ts +0 -964
  6. package/src/core/actor.ts +0 -62
  7. package/src/core/actor_control.ts +0 -193
  8. package/src/core/actor_control_query_methods.ts +0 -101
  9. package/src/core/actor_control_reaction_methods.ts +0 -79
  10. package/src/core/actor_control_sense_methods.ts +0 -81
  11. package/src/core/actor_control_source.ts +0 -57
  12. package/src/core/actor_session_methods.ts +0 -226
  13. package/src/core/binding_drift.ts +0 -301
  14. package/src/core/credential.ts +0 -259
  15. package/src/core/driver_control.ts +0 -54
  16. package/src/core/effective_environment_state.ts +0 -71
  17. package/src/core/factored_manipulation_attempt.ts +0 -158
  18. package/src/core/ids.ts +0 -60
  19. package/src/core/interaction/canonical.ts +0 -15
  20. package/src/core/interaction/fingerprint.ts +0 -118
  21. package/src/core/interaction/index.ts +0 -31
  22. package/src/core/interaction/intent.ts +0 -284
  23. package/src/core/interaction/outcome.ts +0 -67
  24. package/src/core/interaction/rejection_ledger.ts +0 -108
  25. package/src/core/kernel_contract.generated.ts +0 -10
  26. package/src/core/log.ts +0 -23
  27. package/src/core/movement.ts +0 -111
  28. package/src/core/node-io.ts +0 -208
  29. package/src/core/paths.ts +0 -220
  30. package/src/core/profile.ts +0 -270
  31. package/src/core/profiles.ts +0 -9
  32. package/src/core/provenance_buffer.ts +0 -102
  33. package/src/core/readers/_helpers.ts +0 -273
  34. package/src/core/readers/action_description.ts +0 -17
  35. package/src/core/readers/action_economy_events.ts +0 -149
  36. package/src/core/readers/actor_body_swaps.ts +0 -62
  37. package/src/core/readers/actor_snapshot.ts +0 -197
  38. package/src/core/readers/actor_states.ts +0 -163
  39. package/src/core/readers/actors_and_bodies.ts +0 -179
  40. package/src/core/readers/affordance_cue.ts +0 -59
  41. package/src/core/readers/affordance_defaults.ts +0 -158
  42. package/src/core/readers/affordance_group_membership.ts +0 -67
  43. package/src/core/readers/affordance_input.ts +0 -129
  44. package/src/core/readers/affordance_reference.ts +0 -41
  45. package/src/core/readers/apply_consequences.ts +0 -54
  46. package/src/core/readers/audience_trace_presentation.ts +0 -62
  47. package/src/core/readers/bounded_collection.ts +0 -29
  48. package/src/core/readers/bundle_definitions.ts +0 -74
  49. package/src/core/readers/bundle_entities.ts +0 -62
  50. package/src/core/readers/co_location.ts +0 -71
  51. package/src/core/readers/combat_session.ts +0 -124
  52. package/src/core/readers/combat_session_active.ts +0 -44
  53. package/src/core/readers/combat_session_feedback.ts +0 -37
  54. package/src/core/readers/combat_session_grid.ts +0 -117
  55. package/src/core/readers/combat_session_roster.ts +0 -98
  56. package/src/core/readers/combat_session_types.ts +0 -51
  57. package/src/core/readers/condition_deltas.ts +0 -53
  58. package/src/core/readers/container_contents.ts +0 -92
  59. package/src/core/readers/dialogue_guide.ts +0 -99
  60. package/src/core/readers/dialogue_prompt_presentation.ts +0 -90
  61. package/src/core/readers/driver_control.ts +0 -64
  62. package/src/core/readers/entity_art.ts +0 -219
  63. package/src/core/readers/entity_containment.ts +0 -119
  64. package/src/core/readers/equipment.ts +0 -99
  65. package/src/core/readers/intervention_windows.ts +0 -136
  66. package/src/core/readers/inventory_query.ts +0 -145
  67. package/src/core/readers/item_detail.ts +0 -198
  68. package/src/core/readers/location_snapshot.ts +0 -216
  69. package/src/core/readers/manifest_apply_provenance.ts +0 -32
  70. package/src/core/readers/manifest_export.ts +0 -81
  71. package/src/core/readers/manipulation_context.ts +0 -475
  72. package/src/core/readers/map_layers.ts +0 -49
  73. package/src/core/readers/metadata_rows.ts +0 -56
  74. package/src/core/readers/object_state.ts +0 -124
  75. package/src/core/readers/observer_knowledge.ts +0 -41
  76. package/src/core/readers/observer_place_knowledge.ts +0 -37
  77. package/src/core/readers/observer_trace_knowledge.ts +0 -45
  78. package/src/core/readers/outcome_template.ts +0 -41
  79. package/src/core/readers/place_topology.ts +0 -109
  80. package/src/core/readers/reaction_options.ts +0 -156
  81. package/src/core/readers/resource_deltas.ts +0 -47
  82. package/src/core/readers/scene.ts +0 -275
  83. package/src/core/readers/seats.ts +0 -33
  84. package/src/core/readers/self.ts +0 -245
  85. package/src/core/readers/self_capabilities.ts +0 -159
  86. package/src/core/readers/self_economy.ts +0 -101
  87. package/src/core/readers/self_economy_budget.ts +0 -93
  88. package/src/core/readers/self_evaluations.ts +0 -128
  89. package/src/core/readers/self_identity.ts +0 -104
  90. package/src/core/readers/sense_context.ts +0 -112
  91. package/src/core/readers/session.ts +0 -207
  92. package/src/core/readers/session_detail.ts +0 -211
  93. package/src/core/readers/session_status.ts +0 -68
  94. package/src/core/readers/spatial_environment_state.ts +0 -74
  95. package/src/core/readers/spatial_niche_attachments.ts +0 -28
  96. package/src/core/readers/substrate_definitions.ts +0 -27
  97. package/src/core/readers/suggest_next_action.ts +0 -72
  98. package/src/core/readers/surface_membership.ts +0 -78
  99. package/src/core/readers/tag_reads.ts +0 -54
  100. package/src/core/readers/trace_query.ts +0 -120
  101. package/src/core/readers/trace_response.ts +0 -80
  102. package/src/core/readers/traces.ts +0 -124
  103. package/src/core/readers/travel_session.ts +0 -88
  104. package/src/core/readers/turn_state.ts +0 -34
  105. package/src/core/readers/world_events.ts +0 -43
  106. package/src/core/readers/world_status.ts +0 -63
  107. package/src/core/reducers/manipulation_args.ts +0 -239
  108. package/src/core/reducers/manipulation_receipt.ts +0 -66
  109. package/src/core/reducers/r_actor_wake_up.ts +0 -32
  110. package/src/core/reducers/r_inscribe_trace.ts +0 -109
  111. package/src/core/reducers/r_manipulate.ts +0 -163
  112. package/src/core/reducers/r_move.ts +0 -155
  113. package/src/core/reducers/r_react.ts +0 -143
  114. package/src/core/reducers/r_release_claim.ts +0 -81
  115. package/src/core/reducers/r_sense.ts +0 -84
  116. package/src/core/reducers/r_session_close.ts +0 -130
  117. package/src/core/reducers/r_session_move.ts +0 -116
  118. package/src/core/reducers/r_session_open.ts +0 -91
  119. package/src/core/reducers/session_lookup.ts +0 -64
  120. package/src/core/reducers/tick.ts +0 -65
  121. package/src/core/reducers/trace_lookup.ts +0 -29
  122. package/src/core/reducers/transport.ts +0 -84
  123. package/src/core/resolve.ts +0 -228
  124. package/src/core/shape_telemetry.ts +0 -146
  125. package/src/core/snapshot_rows.ts +0 -109
  126. package/src/core/tick_cadence.ts +0 -61
  127. package/src/core/types.ts +0 -501
  128. package/src/core/watch_provenance.ts +0 -113
  129. package/src/core/world-contract/classify.ts +0 -38
  130. package/src/core/world-contract/index.ts +0 -12
  131. package/src/core/world-contract/normalise.ts +0 -574
  132. package/src/core/world-contract/runtime.ts +0 -144
  133. package/src/core/world-contract/served.ts +0 -173
  134. package/src/core/world-contract/strict-reducers.ts +0 -14
  135. package/src/core/world-contract/typetext.ts +0 -94
  136. package/src/core/world_time.ts +0 -22
  137. package/src/index.ts +0 -262
  138. package/src/manifest-apply.ts +0 -497
  139. package/src/provenance.ts +0 -568
  140. package/src/reader-manifest.ts +0 -338
  141. package/src/readers.ts +0 -392
  142. package/src/replay.ts +0 -515
  143. package/src/watch-buffer.ts +0 -438
  144. package/src/world-events/builder.ts +0 -1042
package/src/index.ts DELETED
@@ -1,262 +0,0 @@
1
- // Host-neutral Spellkave TypeScript SDK.
2
- //
3
- // Built on `spacetimedb` (official client SDK) + `@spellkave/bindings`
4
- // (generated protocol surface). Read-first by design: connection, snapshot,
5
- // and read-model helpers; no pi.dev / React / Vite / Playwright dependency.
6
- //
7
- // 3.2 extracted the host-neutral helpers from `.pi/extensions/spellkave/src`
8
- // (profile, credential, paths, resolve, actor, movement readers, plus the
9
- // connection lifecycle + snapshot adapter). Pi-only glue (widget, tool,
10
- // extension main entry) stayed in the pi adapter. 3.3 will add explicit
11
- // read-first APIs for world status, recent events, actor/location
12
- // snapshots, and suggested-next-action read models on top of this base.
13
-
14
- export type {
15
- EvaluationProvenanceRow,
16
- PendingStochasticResolutionRow,
17
- SpatialEnvironmentStateRow,
18
- } from "./binding_rows";
19
- export {
20
- buildSubscribeSet,
21
- CACHE_APPLIED_MARKER,
22
- CONNECTION_BASELINE,
23
- type ConnectArgs,
24
- captureSnapshotFrame,
25
- connect,
26
- defaultReaderManifest,
27
- FILTERED_SUBSCRIPTION_TABLES,
28
- findUndeclaredBaselineTables,
29
- getRegisteredReaderTables,
30
- installRefreshHooks,
31
- OPTIONAL_SATELLITE_TABLES,
32
- OWNER_SUBSCRIPTION_TABLES,
33
- READER_SCOPED_TABLES,
34
- type ReaderManifest,
35
- type RequiredTables,
36
- registerReaderManifest,
37
- type SnapshotCaptureFrame,
38
- type SnapshotDb,
39
- type SnapshotFixtureTables,
40
- type SpellkaveSession,
41
- STRICT_TABLES,
42
- SUBSCRIBED_TABLES,
43
- snapshot,
44
- snapshotDb,
45
- snapshotDbFromCaptureFrame,
46
- snapshotDbFromFixture,
47
- snapshotFromDb,
48
- subscribeSetForSurface,
49
- type TableName,
50
- } from "./connection";
51
- export * from "./core/actor";
52
- export * from "./core/actor_control";
53
- export type {
54
- RActorWakeUpFn,
55
- RAdvanceTurnFn,
56
- RManipulateFn,
57
- RMoveFn,
58
- RReactFn,
59
- RReleaseClaimFn,
60
- RSenseFn,
61
- RSessionCloseFn,
62
- RSessionMoveFn,
63
- RSessionOpenFn,
64
- } from "./core/actor_control_source";
65
- export * from "./core/binding_drift";
66
- export * from "./core/credential";
67
- export type { DriverToken } from "./core/driver_control";
68
- export { freezeDriverReducers } from "./core/driver_control";
69
- export type {
70
- FactoredManipulationAttempt,
71
- FactoredManipulationAttemptInput,
72
- FactoredManipulationAttemptResult,
73
- } from "./core/factored_manipulation_attempt";
74
- export { composeFactoredManipulationAttempt } from "./core/factored_manipulation_attempt";
75
- export type { ActorId, EntityId, EntityRef } from "./core/ids";
76
- export { asActorId, asEntityId, asEntityRef } from "./core/ids";
77
- export * from "./core/interaction/index";
78
- export * from "./core/movement";
79
- export * from "./core/paths";
80
- export * from "./core/profile";
81
- // Resolve an actor/entity key (or numeric ref) to its numeric entity id — the
82
- // key the relational tables (object_state, entity_tag) are keyed by. Used by
83
- // hosts that hold string actor ids but must read numeric-keyed state.
84
- export { descriptorValue, resolveEntityId, verbClassFromDescriptor } from "./core/readers/_helpers";
85
- export type { ActorBodySwapEventRow } from "./core/readers/actor_body_swaps";
86
- export { readActorBodySwapEvents } from "./core/readers/actor_body_swaps";
87
- export type { ActorConditionRow, ActorSnapshot } from "./core/readers/actor_snapshot";
88
- export { readActorConditions, readActorSnapshot } from "./core/readers/actor_snapshot";
89
- export type {
90
- ActorIdentityBindingRow,
91
- ActorPrincipalRow,
92
- EntityBodyRow,
93
- EntityObjectStateRow,
94
- } from "./core/readers/actors_and_bodies";
95
- export {
96
- readActorIdentityBindings,
97
- readActorPrincipals,
98
- readEntityBody,
99
- readObjectStatesForEntity,
100
- } from "./core/readers/actors_and_bodies";
101
- export type { EventApplyConsequenceEntry } from "./core/readers/apply_consequences";
102
- export { readEventApplyConsequences } from "./core/readers/apply_consequences";
103
- export type {
104
- BundleCapabilityDefinitionRow,
105
- BundleResourceDefinitionRow,
106
- } from "./core/readers/bundle_definitions";
107
- export {
108
- readCapabilityDefinition,
109
- readResourceDefinition,
110
- } from "./core/readers/bundle_definitions";
111
- export type { BundleEntityRow, BundleItemRow } from "./core/readers/bundle_entities";
112
- export { readEntity, readItem } from "./core/readers/bundle_entities";
113
- export type { ActorCoLocation } from "./core/readers/co_location";
114
- export { readActorCoLocation } from "./core/readers/co_location";
115
- export type {
116
- CombatFeedback,
117
- CombatGridCell,
118
- CombatMove,
119
- CombatRosterEntry,
120
- CombatSessionView,
121
- } from "./core/readers/combat_session";
122
- export { readCombatSessionView } from "./core/readers/combat_session";
123
- export type {
124
- ObservedContainerContents,
125
- ObservedContainerItem,
126
- } from "./core/readers/container_contents";
127
- export { readContainerContents } from "./core/readers/container_contents";
128
- export type {
129
- DialogueGuide,
130
- DialogueGuideAnswer,
131
- DialogueGuideEntry,
132
- } from "./core/readers/dialogue_guide";
133
- export { parseDialogueGuide } from "./core/readers/dialogue_guide";
134
- export {
135
- captureDriverToken,
136
- readControlContinuationRefusals,
137
- readControlContinuations,
138
- readControlTransitions,
139
- readDriverControl,
140
- readSteeringEvents,
141
- } from "./core/readers/driver_control";
142
- export type { EntityArt } from "./core/readers/entity_art";
143
- export type { EntityContainmentRow } from "./core/readers/entity_containment";
144
- export { readEntityContainer, readEntityContainment } from "./core/readers/entity_containment";
145
- export type { EquipmentSlotRow, EquipmentSnapshot } from "./core/readers/equipment";
146
- export { readEquipment } from "./core/readers/equipment";
147
- export type {
148
- EdgeAffordanceBinding,
149
- LocationOutgoingEdge,
150
- LocationSnapshot,
151
- } from "./core/readers/location_snapshot";
152
- export { readLocationSnapshot } from "./core/readers/location_snapshot";
153
- export {
154
- type ManifestApplyProvenanceRow,
155
- readManifestApplyProvenance,
156
- } from "./core/readers/manifest_apply_provenance";
157
- export type { ManifestExportRow } from "./core/readers/manifest_export";
158
- export {
159
- assertManifestExportAvailable,
160
- MANIFEST_EXPORT_VIEW,
161
- ManifestExportUnavailableError,
162
- manifestExportAvailable,
163
- readManifestExport,
164
- } from "./core/readers/manifest_export";
165
- export type {
166
- ManipulationActionDescriptor,
167
- ManipulationContext,
168
- ManipulationObservedTarget,
169
- ManipulationParticipantContext,
170
- ManipulationPrompt,
171
- } from "./core/readers/manipulation_context";
172
- export { readManipulationContext } from "./core/readers/manipulation_context";
173
- export { readMapLayers } from "./core/readers/map_layers";
174
- export type { MetadataAttachmentRow } from "./core/readers/metadata_rows";
175
- export { readMetadataAttachmentRows } from "./core/readers/metadata_rows";
176
- export type { AwaitObjectStateAppliedOpts, ObjectStateRef } from "./core/readers/object_state";
177
- export { awaitObjectStateApplied, readObjectStateInt } from "./core/readers/object_state";
178
- export type { ObserverKnowledgeEntry } from "./core/readers/observer_knowledge";
179
- export { readObserverKnowledge } from "./core/readers/observer_knowledge";
180
- export type { ObserverPlaceKnowledgeEntry } from "./core/readers/observer_place_knowledge";
181
- export { readObserverPlaceKnowledge } from "./core/readers/observer_place_knowledge";
182
- export type { ObserverTraceKnowledgeEntry } from "./core/readers/observer_trace_knowledge";
183
- export { readObserverTraceKnowledge } from "./core/readers/observer_trace_knowledge";
184
- export type { PlaceTopology } from "./core/readers/place_topology";
185
- export { readPlaceTopology } from "./core/readers/place_topology";
186
- export type { SeatRow } from "./core/readers/seats";
187
- export { readSeats } from "./core/readers/seats";
188
- export type { SenseQueryDescriptor } from "./core/readers/sense_context";
189
- export { readSenseContext } from "./core/readers/sense_context";
190
- export type { SessionSnapshot } from "./core/readers/session";
191
- export {
192
- readActiveSessionForActor,
193
- readSession,
194
- readSessionById,
195
- readSessionCurrentActor,
196
- readSessionParticipants,
197
- } from "./core/readers/session";
198
- export type { SpatialNodeStateRef } from "./core/readers/spatial_environment_state";
199
- export {
200
- readSpatialNodeStateBool,
201
- resolveEffectiveSpatialEnvironmentStates,
202
- } from "./core/readers/spatial_environment_state";
203
- export { readVisibleSpatialNicheAttachments } from "./core/readers/spatial_niche_attachments";
204
- export { readSubstrateDefinitions } from "./core/readers/substrate_definitions";
205
- export type { SuggestedNextAction } from "./core/readers/suggest_next_action";
206
- export { suggestNextAction } from "./core/readers/suggest_next_action";
207
- export {
208
- readActionTags,
209
- readEntityFaction,
210
- readEntityTags,
211
- } from "./core/readers/tag_reads";
212
- export type {
213
- CurrentTraceProjection,
214
- ReadCurrentTraceProjectionOptions,
215
- TraceQueryEntry,
216
- } from "./core/readers/trace_query";
217
- export { readCurrentTraceProjection } from "./core/readers/trace_query";
218
- export type { ReadTracesAtOpts, TraceRow } from "./core/readers/traces";
219
- export { readTracesAt } from "./core/readers/traces";
220
- export type { TravelSession } from "./core/readers/travel_session";
221
- export { travelSessionForActor } from "./core/readers/travel_session";
222
- export type { WorldEventRow } from "./core/readers/world_events";
223
- export { readRecentEvents } from "./core/readers/world_events";
224
- export type { WorldStatus } from "./core/readers/world_status";
225
- export { readWorldStatus } from "./core/readers/world_status";
226
- export {
227
- emptyManipulationArgs,
228
- MANIPULATION_ARGS_WIRE_KEYS,
229
- manipulationArgsFromJson,
230
- } from "./core/reducers/manipulation_args";
231
- export {
232
- advanceScene,
233
- advanceScenes,
234
- advanceTurns,
235
- pauseWorldTicks,
236
- setDebugRngSeed,
237
- } from "./core/reducers/tick";
238
- export { actorEntityId, targetRefFromString, targetRefToString } from "./core/reducers/transport";
239
- export * from "./core/resolve";
240
- export * from "./core/shape_telemetry";
241
- export * from "./core/snapshot_rows";
242
- export * from "./manifest-apply";
243
- export * from "./provenance";
244
- export type {
245
- WatchActor,
246
- WatchActorCondition,
247
- WatchActorState,
248
- WatchCursor,
249
- WatchEvent,
250
- WatchFrame,
251
- WatchItem,
252
- } from "./watch-buffer";
253
- export {
254
- hasOversightGrant,
255
- projectWatchFrame,
256
- readWatchOwnBodies,
257
- readWatchTick,
258
- WATCH_BUFFER_CAP,
259
- WATCH_BUFFER_REQUIRED_TABLES,
260
- WatchBuffer,
261
- watchOverlayAdmitted,
262
- } from "./watch-buffer";