@spellkave/tool-contracts 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (122) hide show
  1. package/LICENSE +89 -0
  2. package/package.json +48 -4
  3. package/src/admission.ts +62 -0
  4. package/src/authoring-schemas.ts +3491 -0
  5. package/src/authoring-tool-names.ts +46 -0
  6. package/src/contract-data.ts +37 -0
  7. package/src/contract-guard.ts +377 -0
  8. package/src/contracts-metadata.json +6940 -0
  9. package/src/docs-metadata.ts +42 -0
  10. package/src/exploration.ts +248 -0
  11. package/src/git-batch.ts +36 -0
  12. package/src/grant-schemas.ts +38 -0
  13. package/src/index.ts +10 -0
  14. package/src/metadata.ts +48 -0
  15. package/src/owner-instance-read.ts +123 -0
  16. package/src/personas.generated.json +47 -0
  17. package/src/personas.ts +19 -0
  18. package/src/roster.ts +13 -0
  19. package/src/scene-schemas.ts +29 -0
  20. package/src/schema-registry.ts +197 -0
  21. package/src/schemas.ts +786 -0
  22. package/src/snapshot-storage.ts +133 -0
  23. package/src/tool-contracts.breaking-acknowledged.json +392 -0
  24. package/src/tool-contracts.snapshot/index.json +104 -0
  25. package/src/tool-contracts.snapshot/rosters/AUTHOR.json +54 -0
  26. package/src/tool-contracts.snapshot/rosters/DM.json +19 -0
  27. package/src/tool-contracts.snapshot/rosters/PLAYER.json +25 -0
  28. package/src/tool-contracts.snapshot/tools/spellkave_acting_context.json +35 -0
  29. package/src/tool-contracts.snapshot/tools/spellkave_actor_principals.json +23 -0
  30. package/src/tool-contracts.snapshot/tools/spellkave_annotate_place.json +82 -0
  31. package/src/tool-contracts.snapshot/tools/spellkave_apply_manifest_delta.json +66 -0
  32. package/src/tool-contracts.snapshot/tools/spellkave_applyset_apply.json +131 -0
  33. package/src/tool-contracts.snapshot/tools/spellkave_applyset_diff.json +122 -0
  34. package/src/tool-contracts.snapshot/tools/spellkave_attach_map_layer.json +114 -0
  35. package/src/tool-contracts.snapshot/tools/spellkave_author_place.json +132 -0
  36. package/src/tool-contracts.snapshot/tools/spellkave_bind_actor.json +79 -0
  37. package/src/tool-contracts.snapshot/tools/spellkave_bind_edge_affordance.json +69 -0
  38. package/src/tool-contracts.snapshot/tools/spellkave_can_i.json +123 -0
  39. package/src/tool-contracts.snapshot/tools/spellkave_communicate.json +44 -0
  40. package/src/tool-contracts.snapshot/tools/spellkave_declare_inexpressible.json +33 -0
  41. package/src/tool-contracts.snapshot/tools/spellkave_define_action.json +133 -0
  42. package/src/tool-contracts.snapshot/tools/spellkave_define_action_verb.json +215 -0
  43. package/src/tool-contracts.snapshot/tools/spellkave_define_affordance.json +69 -0
  44. package/src/tool-contracts.snapshot/tools/spellkave_define_behavior.json +505 -0
  45. package/src/tool-contracts.snapshot/tools/spellkave_define_bundle.json +67 -0
  46. package/src/tool-contracts.snapshot/tools/spellkave_define_capability.json +64 -0
  47. package/src/tool-contracts.snapshot/tools/spellkave_define_condition.json +244 -0
  48. package/src/tool-contracts.snapshot/tools/spellkave_define_consequence.json +65 -0
  49. package/src/tool-contracts.snapshot/tools/spellkave_define_entity_type.json +199 -0
  50. package/src/tool-contracts.snapshot/tools/spellkave_define_niche.json +88 -0
  51. package/src/tool-contracts.snapshot/tools/spellkave_define_resource.json +93 -0
  52. package/src/tool-contracts.snapshot/tools/spellkave_define_roll_table.json +87 -0
  53. package/src/tool-contracts.snapshot/tools/spellkave_define_session.json +115 -0
  54. package/src/tool-contracts.snapshot/tools/spellkave_define_trace_kind.json +71 -0
  55. package/src/tool-contracts.snapshot/tools/spellkave_describe.json +73 -0
  56. package/src/tool-contracts.snapshot/tools/spellkave_diff.json +90 -0
  57. package/src/tool-contracts.snapshot/tools/spellkave_docs.json +104 -0
  58. package/src/tool-contracts.snapshot/tools/spellkave_end_turn.json +21 -0
  59. package/src/tool-contracts.snapshot/tools/spellkave_entity.json +32 -0
  60. package/src/tool-contracts.snapshot/tools/spellkave_entity_body.json +32 -0
  61. package/src/tool-contracts.snapshot/tools/spellkave_entity_container.json +32 -0
  62. package/src/tool-contracts.snapshot/tools/spellkave_equip_item.json +49 -0
  63. package/src/tool-contracts.snapshot/tools/spellkave_eval.json +87 -0
  64. package/src/tool-contracts.snapshot/tools/spellkave_events.json +30 -0
  65. package/src/tool-contracts.snapshot/tools/spellkave_explain.json +83 -0
  66. package/src/tool-contracts.snapshot/tools/spellkave_export.json +66 -0
  67. package/src/tool-contracts.snapshot/tools/spellkave_export_grants.json +50 -0
  68. package/src/tool-contracts.snapshot/tools/spellkave_get.json +87 -0
  69. package/src/tool-contracts.snapshot/tools/spellkave_grant_role.json +80 -0
  70. package/src/tool-contracts.snapshot/tools/spellkave_hand_over_role.json +89 -0
  71. package/src/tool-contracts.snapshot/tools/spellkave_intervention_windows.json +32 -0
  72. package/src/tool-contracts.snapshot/tools/spellkave_inventory.json +40 -0
  73. package/src/tool-contracts.snapshot/tools/spellkave_item_detail.json +37 -0
  74. package/src/tool-contracts.snapshot/tools/spellkave_link_places.json +84 -0
  75. package/src/tool-contracts.snapshot/tools/spellkave_list_grants.json +56 -0
  76. package/src/tool-contracts.snapshot/tools/spellkave_manipulate.json +84 -0
  77. package/src/tool-contracts.snapshot/tools/spellkave_manipulation_context.json +62 -0
  78. package/src/tool-contracts.snapshot/tools/spellkave_map.json +109 -0
  79. package/src/tool-contracts.snapshot/tools/spellkave_map_graph.json +143 -0
  80. package/src/tool-contracts.snapshot/tools/spellkave_move.json +75 -0
  81. package/src/tool-contracts.snapshot/tools/spellkave_note_doc_gap.json +43 -0
  82. package/src/tool-contracts.snapshot/tools/spellkave_observer_knowledge.json +32 -0
  83. package/src/tool-contracts.snapshot/tools/spellkave_observer_place_knowledge.json +32 -0
  84. package/src/tool-contracts.snapshot/tools/spellkave_observer_trace_knowledge.json +32 -0
  85. package/src/tool-contracts.snapshot/tools/spellkave_offer_control.json +30 -0
  86. package/src/tool-contracts.snapshot/tools/spellkave_orient.json +39 -0
  87. package/src/tool-contracts.snapshot/tools/spellkave_pace_time.json +59 -0
  88. package/src/tool-contracts.snapshot/tools/spellkave_place_actor.json +190 -0
  89. package/src/tool-contracts.snapshot/tools/spellkave_place_entity.json +190 -0
  90. package/src/tool-contracts.snapshot/tools/spellkave_prepare_hand_over.json +57 -0
  91. package/src/tool-contracts.snapshot/tools/spellkave_query.json +290 -0
  92. package/src/tool-contracts.snapshot/tools/spellkave_react_option.json +47 -0
  93. package/src/tool-contracts.snapshot/tools/spellkave_reaction_options.json +32 -0
  94. package/src/tool-contracts.snapshot/tools/spellkave_release_claim.json +32 -0
  95. package/src/tool-contracts.snapshot/tools/spellkave_remove_entity.json +39 -0
  96. package/src/tool-contracts.snapshot/tools/spellkave_render_scene.json +59 -0
  97. package/src/tool-contracts.snapshot/tools/spellkave_return_npc_control.json +59 -0
  98. package/src/tool-contracts.snapshot/tools/spellkave_revoke_role.json +55 -0
  99. package/src/tool-contracts.snapshot/tools/spellkave_scene.json +74 -0
  100. package/src/tool-contracts.snapshot/tools/spellkave_scene_detail.json +37 -0
  101. package/src/tool-contracts.snapshot/tools/spellkave_self_states.json +77 -0
  102. package/src/tool-contracts.snapshot/tools/spellkave_self_summary.json +21 -0
  103. package/src/tool-contracts.snapshot/tools/spellkave_sense.json +68 -0
  104. package/src/tool-contracts.snapshot/tools/spellkave_sense_context.json +28 -0
  105. package/src/tool-contracts.snapshot/tools/spellkave_session_close.json +71 -0
  106. package/src/tool-contracts.snapshot/tools/spellkave_session_move.json +38 -0
  107. package/src/tool-contracts.snapshot/tools/spellkave_session_open.json +36 -0
  108. package/src/tool-contracts.snapshot/tools/spellkave_session_status.json +41 -0
  109. package/src/tool-contracts.snapshot/tools/spellkave_set_metadata.json +205 -0
  110. package/src/tool-contracts.snapshot/tools/spellkave_set_movement_default.json +58 -0
  111. package/src/tool-contracts.snapshot/tools/spellkave_stage_scene.json +55 -0
  112. package/src/tool-contracts.snapshot/tools/spellkave_status.json +23 -0
  113. package/src/tool-contracts.snapshot/tools/spellkave_stow_item.json +55 -0
  114. package/src/tool-contracts.snapshot/tools/spellkave_suggest_next_action.json +32 -0
  115. package/src/tool-contracts.snapshot/tools/spellkave_tag_entity.json +61 -0
  116. package/src/tool-contracts.snapshot/tools/spellkave_take_npc_control.json +64 -0
  117. package/src/tool-contracts.snapshot/tools/spellkave_trace_detail.json +36 -0
  118. package/src/tool-contracts.snapshot/tools/spellkave_traces.json +55 -0
  119. package/src/tool-contracts.snapshot/tools/spellkave_wake_up.json +23 -0
  120. package/src/tool-contracts.snapshot/tools/spellkave_withdraw_control.json +30 -0
  121. package/src/tool-contracts.snapshot/tools/spellkave_write_rows.json +62 -0
  122. package/README.md +0 -3
@@ -0,0 +1,64 @@
1
+ {
2
+ "name": "spellkave_define_capability",
3
+ "label": "Define Capability (verb)",
4
+ "description": "Author ONE capability_definitions row (+ capability_definition_tag satellites) in a single call — the #1968 verb-UX round's named missing bare-vocabulary verb. Self-scaffolds the [[bundles]] header if `bundle` has none yet. capability_definitions is referenced from MANY affordance_templates/action_definitions rows (not satellite-owned by a single parent) — those stay on spellkave_write_rows/spellkave_define_behavior, whichever fits the calling context. #1968 workspace idempotency: re-authoring the SAME bundle+id REPLACES the row + its tag satellite wholesale (fewer tags on a re-run means the stale ones are gone, not left behind).",
5
+ "parameters": {
6
+ "type": "object",
7
+ "required": [
8
+ "id",
9
+ "actor_kind",
10
+ "description"
11
+ ],
12
+ "properties": {
13
+ "bundle": {
14
+ "type": "string",
15
+ "description": "bundle_id stamped on every generated row. Omit to fall back to `context.defaultBundle` (#1968 smart default)."
16
+ },
17
+ "id": {
18
+ "type": "string",
19
+ "description": "Local capability_id stem; the full id is '<bundle>/<id>' (e.g. bundle='core', id='walk' -> 'core/walk'). A handful of corpus capability ids are DELIBERATELY cross-namespace (e.g. 'frontier.apply_manifest' under bundle_id='core') — this verb always derives '<bundle>/<id>', so a cross-namespace id stays on spellkave_write_rows (mirrors spellkave_define_entity_type's own cross-namespace carve-out)."
20
+ },
21
+ "actor_kind": {
22
+ "type": "string",
23
+ "description": "capability_definitions.actor_kind — an open string (the corpus already uses more than one value, e.g. 'entity', 'operator'); no closed PoC enum."
24
+ },
25
+ "display_name": {
26
+ "type": "string",
27
+ "description": "capability_definitions.display_name. Omit to derive a title-cased `id` (#1968 smart default)."
28
+ },
29
+ "description": {
30
+ "type": "string",
31
+ "description": "capability_definitions.description — REQUIRED (unlike every OTHER verb's optional `description?`): CapabilityDefinitionRow kept its own PRE-EXISTING required description column through the #1968 description-column decision (no `#[serde(default)]` in the schema); omitting it would author an invalid row, not merely a less-documented one (same carve-out as spellkave_define_niche's own required `description`)."
32
+ },
33
+ "default_visibility": {
34
+ "type": "string",
35
+ "description": "capability_definitions.default_visibility — the ADR-0120 read-visibility default concrete grants inherit unless overridden. Omit to default 'Public' (#1968 smart default — matches the schema's own `default_public()` serde default)."
36
+ },
37
+ "tags": {
38
+ "type": "array",
39
+ "items": {
40
+ "type": "string"
41
+ },
42
+ "description": "One capability_definition_tag row per tag."
43
+ }
44
+ }
45
+ },
46
+ "executionMode": "sequential",
47
+ "roles": [
48
+ "AUTHOR"
49
+ ],
50
+ "admission": {
51
+ "anyOf": [
52
+ {
53
+ "kind": "all",
54
+ "capabilities": [
55
+ "frontier.apply_manifest"
56
+ ]
57
+ },
58
+ {
59
+ "kind": "publisher"
60
+ }
61
+ ],
62
+ "ports": []
63
+ }
64
+ }
@@ -0,0 +1,244 @@
1
+ {
2
+ "name": "spellkave_define_condition",
3
+ "label": "Define Condition (verb)",
4
+ "description": "Author ONE condition_definitions row (+ condition_definition_tag satellites) in a single call, optionally ALSO authoring the condition_remove_policy_definitions/stacking_discipline_definitions vocabulary rows it references (shared cross-condition vocabulary — upserted by their OWN id, never duplicated, mirroring the server's own upsert-in-place discipline for these two kinds, ADR-0085) and any modifier_templates (+ modifier_template_tag) it needs (also upserted by their own modifier_template_id). DSL-bearing fields (gate_predicate_source, hooks[]._source, remove_predicate_source, *_outcome_source, predicate_source, modifier_expression_source) are passed through as free text verbatim — single-parse discipline is the server's job. Self-scaffolds the [[bundles]] header if `bundle` has none yet. #1968 workspace idempotency: re-authoring the SAME bundle+id REPLACES the condition row + its tag satellites wholesale (fewer tags on a re-run means the stale ones are gone, not left behind).",
5
+ "parameters": {
6
+ "type": "object",
7
+ "required": [
8
+ "id"
9
+ ],
10
+ "properties": {
11
+ "bundle": {
12
+ "type": "string",
13
+ "description": "bundle_id stamped on every generated row. Omit to fall back to `context.defaultBundle` (#1968 smart default)."
14
+ },
15
+ "id": {
16
+ "type": "string",
17
+ "description": "Local condition_definition_id stem; full id '<bundle>/<id>'."
18
+ },
19
+ "display_name": {
20
+ "type": "string",
21
+ "description": "condition_definitions.display_name. Omit to derive a title-cased `id` (#1968 smart default)."
22
+ },
23
+ "description": {
24
+ "type": "string",
25
+ "description": "condition_definitions.description (#1968 first-class column)."
26
+ },
27
+ "tags": {
28
+ "type": "array",
29
+ "items": {
30
+ "type": "string"
31
+ },
32
+ "description": "One condition_definition_tag row per tag."
33
+ },
34
+ "gate_predicate_source": {
35
+ "type": "string",
36
+ "description": "DSL Bool expression gating condition-triggered modifier application (default '')."
37
+ },
38
+ "observable": {
39
+ "type": "boolean",
40
+ "description": "condition_definitions.observable (default true)."
41
+ },
42
+ "grants_capability_while_active": {
43
+ "type": "array",
44
+ "items": {
45
+ "type": "string"
46
+ },
47
+ "description": "Capability ids GRANTED to the bearer while this condition is active (default []). Enforced in capability_ids_for_actor; use this rather than a status when the thing granted is an ability to act, because affordance_template.capability_id is a structural gate a status cannot reproduce."
48
+ },
49
+ "suppresses_capability_while_active": {
50
+ "type": "array",
51
+ "items": {
52
+ "type": "string"
53
+ },
54
+ "description": "Capability ids SUPPRESSED on the bearer AS AN ACTOR while this condition is active (default []). Suppression beats a grant of the same id. Applies to the bearer's own attempts to act only — it never makes the bearer an illegal TARGET, so a spell like Speak with Dead stays authorable against a corpse that cannot itself speak."
55
+ },
56
+ "implies": {
57
+ "type": "array",
58
+ "items": {
59
+ "type": "string"
60
+ },
61
+ "description": "condition_definitions.implies — cascade edges (each id is ALSO applied when this condition is applied)."
62
+ },
63
+ "hooks": {
64
+ "type": "array",
65
+ "items": {
66
+ "type": "object",
67
+ "required": [
68
+ "event_kind"
69
+ ],
70
+ "properties": {
71
+ "event_kind": {
72
+ "type": "string",
73
+ "description": "condition_definitions.hooks[].event_kind, e.g. 'Layer2.ApplyConsequence'."
74
+ },
75
+ "detail_filter_source": {
76
+ "type": "string",
77
+ "description": "Inline-DSL Bool sub-expression gating which event instances this hook fires for. Passed through verbatim (single-parse discipline is the server's job, not this verb's)."
78
+ },
79
+ "expression_source": {
80
+ "type": "string",
81
+ "description": "Inline-DSL Int sub-expression evaluated when the hook fires. Passed through verbatim."
82
+ }
83
+ }
84
+ },
85
+ "description": "condition_definitions.hooks[]."
86
+ },
87
+ "remove_time_policy": {
88
+ "type": "string",
89
+ "description": "condition_definitions.remove_time_policy — REFERENCE an existing policy id (default 'core/remove_policy/independent_lifetime'). Pass `remove_policy` instead to ALSO author the row."
90
+ },
91
+ "remove_policy": {
92
+ "type": "object",
93
+ "required": [
94
+ "id",
95
+ "remove_predicate_source"
96
+ ],
97
+ "properties": {
98
+ "id": {
99
+ "type": "string",
100
+ "description": "The FULL condition_remove_policy_definitions policy_id (cross-bundle vocabulary — e.g. 'core/remove_policy/independent_lifetime'; NOT bundle-prefixed by this verb, unlike `id`)."
101
+ },
102
+ "display_name": {
103
+ "type": "string",
104
+ "description": "condition_remove_policy_definitions.display_name. Omit to derive a title-cased `id` (#1968 smart default)."
105
+ },
106
+ "remove_predicate_source": {
107
+ "type": "string",
108
+ "description": "DSL Bool expression; the removal path evaluates this instead of branching on the policy id."
109
+ }
110
+ }
111
+ },
112
+ "stacking_rule": {
113
+ "type": "string",
114
+ "description": "condition_definitions.stacking_rule — REFERENCE an existing discipline id (default 'core/stacking/single'). Pass `stacking` instead to ALSO author the row."
115
+ },
116
+ "stacking": {
117
+ "type": "object",
118
+ "required": [
119
+ "id",
120
+ "stack_count_outcome_source",
121
+ "expires_at_tick_outcome_source"
122
+ ],
123
+ "properties": {
124
+ "id": {
125
+ "type": "string",
126
+ "description": "The FULL stacking_discipline_definitions discipline_id (cross-bundle vocabulary — e.g. 'core/stacking/single'; NOT bundle-prefixed by this verb, unlike `id`)."
127
+ },
128
+ "display_name": {
129
+ "type": "string",
130
+ "description": "stacking_discipline_definitions.display_name. Omit to derive a title-cased `id` (#1968 smart default)."
131
+ },
132
+ "stack_count_outcome_source": {
133
+ "type": "string",
134
+ "description": "Int-valued DSL expression over the existing row state (facts: stack_count, expires_at_tick, world_tick)."
135
+ },
136
+ "expires_at_tick_outcome_source": {
137
+ "type": "string",
138
+ "description": "Int-valued DSL expression; -1 means 'leave the existing expiry unchanged'."
139
+ }
140
+ }
141
+ },
142
+ "modifier_template_id": {
143
+ "type": "string",
144
+ "description": "condition_definitions.modifier_template_id — REFERENCE an existing modifier (default ''). Omit when `modifiers` has EXACTLY one entry (auto-wired to it); REQUIRED when `modifiers` has more than one entry (which one is the FK, otherwise ambiguous)."
145
+ },
146
+ "modifiers": {
147
+ "type": "array",
148
+ "items": {
149
+ "type": "object",
150
+ "required": [
151
+ "id",
152
+ "applies_to",
153
+ "modifier_expression_source"
154
+ ],
155
+ "properties": {
156
+ "id": {
157
+ "type": "string",
158
+ "description": "Local modifier_templates id stem; full id '<bundle>/<id>'."
159
+ },
160
+ "display_name": {
161
+ "type": "string",
162
+ "description": "modifier_templates.display_name. Omit to derive a title-cased `id` (#1968 smart default)."
163
+ },
164
+ "applies_to": {
165
+ "type": "string",
166
+ "description": "modifier_templates.applies_to — the composition-axis vocabulary id (an authored modifier_target_definitions row, e.g. 'ResolutionCheck'; open string)."
167
+ },
168
+ "modifier_expression_source": {
169
+ "type": "string",
170
+ "description": "DSL expression producing the modifier's magnitude."
171
+ },
172
+ "predicate_source": {
173
+ "type": "string",
174
+ "description": "DSL Bool gate; '' (default) means always-active."
175
+ },
176
+ "priority": {
177
+ "type": "number",
178
+ "description": "modifier_templates.priority (default 0)."
179
+ },
180
+ "delta_kind": {
181
+ "anyOf": [
182
+ {
183
+ "type": "string",
184
+ "const": "Advantage"
185
+ },
186
+ {
187
+ "type": "string",
188
+ "const": "Disadvantage"
189
+ },
190
+ {
191
+ "type": "string",
192
+ "const": "Plus"
193
+ },
194
+ {
195
+ "type": "string",
196
+ "const": "Times"
197
+ },
198
+ {
199
+ "type": "string",
200
+ "const": "FlatSet"
201
+ },
202
+ {
203
+ "type": "string",
204
+ "const": "Replace"
205
+ }
206
+ ],
207
+ "description": "modifier_templates.delta_kind (default 'Plus') — the validator's OWN closed vocabulary (MF-VAL-243), not a PoC-narrower enum."
208
+ },
209
+ "replace_template_id": {
210
+ "type": "string",
211
+ "description": "Required (by the validator) when delta_kind='Replace' — the modifier_template id this one replaces."
212
+ },
213
+ "tags": {
214
+ "type": "array",
215
+ "items": {
216
+ "type": "string"
217
+ },
218
+ "description": "One modifier_template_tag row per tag, for THIS modifier."
219
+ }
220
+ }
221
+ },
222
+ "description": "modifier_templates rows (+ their modifier_template_tag satellites) authored in this call."
223
+ }
224
+ }
225
+ },
226
+ "executionMode": "sequential",
227
+ "roles": [
228
+ "AUTHOR"
229
+ ],
230
+ "admission": {
231
+ "anyOf": [
232
+ {
233
+ "kind": "all",
234
+ "capabilities": [
235
+ "frontier.apply_manifest"
236
+ ]
237
+ },
238
+ {
239
+ "kind": "publisher"
240
+ }
241
+ ],
242
+ "ports": []
243
+ }
244
+ }
@@ -0,0 +1,65 @@
1
+ {
2
+ "name": "spellkave_define_consequence",
3
+ "label": "Define Consequence (verb)",
4
+ "description": "Author ONE consequence_templates row (+ its consequence_frame_writes satellites, in authored order) in a single call, with NO actor grant (contrast spellkave_define_behavior, which always binds its generated consequence to a `grant_to` caster's action cluster). Self-scaffolds the [[bundles]] header if `bundle` has none yet. #1968 workspace idempotency: re-authoring the SAME bundle+id REPLACES the row + every consequence_frame_writes row wholesale (fewer frame_writes on a re-run means the stale ones are gone, not left behind).",
5
+ "parameters": {
6
+ "type": "object",
7
+ "required": [
8
+ "id"
9
+ ],
10
+ "properties": {
11
+ "bundle": {
12
+ "type": "string",
13
+ "description": "bundle_id stamped on the consequence_templates row. Omit to fall back to `context.defaultBundle` (#1968 smart default)."
14
+ },
15
+ "id": {
16
+ "type": "string",
17
+ "description": "Local consequence_template_id stem; the full id is '<bundle>/<id>' (e.g. bundle='core', id='pickup/success' -> 'core/pickup/success')."
18
+ },
19
+ "effect_ref": {
20
+ "type": "string",
21
+ "description": "consequence_templates.effect_refs_csv — an already-authored effect_definitions id this consequence invokes (e.g. a scheduled-zone/summon effect). The corpus never joins more than one id here despite the column's '_csv' name — a single ref, not a real CSV list. Omit for a consequence with no effect_definitions reference."
22
+ },
23
+ "description": {
24
+ "type": "string",
25
+ "description": "consequence_templates.description (#1968 first-class column)."
26
+ },
27
+ "frame_writes": {
28
+ "type": "array",
29
+ "items": {
30
+ "anyOf": [
31
+ {
32
+ "type": "object",
33
+ "patternProperties": {
34
+ "^.*$": {}
35
+ }
36
+ },
37
+ {
38
+ "type": "string",
39
+ "const": "BreakPlaceSeal"
40
+ }
41
+ ]
42
+ },
43
+ "description": "consequence_frame_writes rows, in AUTHORED order — each a raw FrameWriteOp body object or the unit string BreakPlaceSeal (e.g. {Inscribe: {...}}, {ModifyResource: {...}}, {PickupTargetItem: {...}}), mirroring spellkave_write_rows' own untyped row shape (the closed Rust FrameWriteOp enum is never modeled in TypeBox here). `ordinal` (0-based) is derived from array position — never hand-specified."
44
+ }
45
+ }
46
+ },
47
+ "executionMode": "sequential",
48
+ "roles": [
49
+ "AUTHOR"
50
+ ],
51
+ "admission": {
52
+ "anyOf": [
53
+ {
54
+ "kind": "all",
55
+ "capabilities": [
56
+ "frontier.apply_manifest"
57
+ ]
58
+ },
59
+ {
60
+ "kind": "publisher"
61
+ }
62
+ ],
63
+ "ports": []
64
+ }
65
+ }
@@ -0,0 +1,199 @@
1
+ {
2
+ "name": "spellkave_define_entity_type",
3
+ "label": "Define Entity Type (verb)",
4
+ "description": "Author ONE entity_definitions catalog blueprint (+ its entity_definition_tag/initial_state/initial_capability/initial_condition/initial_containment/initial_equipment satellites) in a single call — the #1968 53%-of-authored-rows cluster, folding what would otherwise be a per-tag/per-seed spellkave_write_rows call each. Self-scaffolds the [[bundles]] header if `bundle` has none yet. This authors the CATALOG blueprint only (placement tools instantiate entities that may reference it via entity_def). #1968 workspace idempotency: re-authoring the SAME bundle+id REPLACES the row + EVERY satellite wholesale (fewer tags/seeds on a re-run means the stale ones are gone, not left behind). initial_containment/initial_equipment are structural (each spawns a child instance), not a flat-value copy like the other three satellites — the equipment/containment graph is cycle-checked server-side (MF-VAL-314) at admission, not re-validated here.",
5
+ "parameters": {
6
+ "type": "object",
7
+ "required": [
8
+ "id"
9
+ ],
10
+ "properties": {
11
+ "bundle": {
12
+ "type": "string",
13
+ "description": "bundle_id stamped on every generated row. Omit to fall back to `context.defaultBundle` (#1968 smart default)."
14
+ },
15
+ "id": {
16
+ "type": "string",
17
+ "description": "Local entity_def_id stem; the full id is '<bundle>/<id>' (e.g. bundle='core', id='item/sword' -> 'core/item/sword'). May itself contain '/' for sub-namespacing (matches the corpus convention, e.g. 'npc/caravan', 'class/barbarian')."
18
+ },
19
+ "display_name": {
20
+ "type": "string",
21
+ "description": "entity_definitions.display_name. Omit to derive a title-cased `id` (#1968 smart default)."
22
+ },
23
+ "description": {
24
+ "type": "string",
25
+ "description": "entity_definitions.description (#1968 first-class column). PLAYER-REACHABLE: `readAuthorizedItemDetail` (@spellkave/sdk item_detail reader) falls back to this column whenever a placed instance has no per-instance `entity_description` row, so it must hold only what any observer may plausibly know on sight — never stat-block numbers, hidden mechanics, or spoilers. Stat-block/rules prose belongs in an `srd.text` `metadata_attachments` row instead, which keeps it out of description-reading tool responses — but that is not an access-control boundary today (audience enforcement doesn't exist yet, see metadata-attachments.md)."
26
+ },
27
+ "tags": {
28
+ "type": "array",
29
+ "items": {
30
+ "type": "string"
31
+ },
32
+ "description": "One entity_definition_tag row per tag."
33
+ },
34
+ "stackable": {
35
+ "type": "boolean",
36
+ "description": "entity_definitions.stackable — may authored instances use quantity>1 (default false)."
37
+ },
38
+ "lineage_id": {
39
+ "type": "string",
40
+ "description": "entity_definitions.lineage_id (default '')."
41
+ },
42
+ "affordance_seed_id": {
43
+ "type": "string",
44
+ "description": "entity_definitions.affordance_seed_id (default '')."
45
+ },
46
+ "on_consume_consequence_id": {
47
+ "type": "string",
48
+ "description": "entity_definitions.on_consume_consequence_id (default '')."
49
+ },
50
+ "on_destroy_consequence_id": {
51
+ "type": "string",
52
+ "description": "entity_definitions.on_destroy_consequence_id (default '')."
53
+ },
54
+ "grants_capability_while_equipped": {
55
+ "type": "string",
56
+ "description": "CSV capability ids granted to the bearer while it equips an entity of this definition (default '')."
57
+ },
58
+ "grants_capability_while_present_in_location": {
59
+ "type": "string",
60
+ "description": "CSV capability ids granted to entities at locations where an entity of this definition is present (default '')."
61
+ },
62
+ "slot_compatibility_predicate": {
63
+ "type": "string",
64
+ "description": "Closed three-form slot-compatibility grammar (not spellkave-dsl); '' or 'true' means any slot, 'false' means none, slot_id == <quoted id> means only that slot."
65
+ },
66
+ "initial_states": {
67
+ "type": "array",
68
+ "items": {
69
+ "type": "object",
70
+ "required": [
71
+ "state"
72
+ ],
73
+ "properties": {
74
+ "state": {
75
+ "type": "string",
76
+ "description": "object_state_definitions OR resource_definitions state_id (MF-VAL-253 accepts either catalog) seeded as an object_state row onto every placed instance of this entity_def. Visibility caveat: a resource-only id has no default_visibility authoring surface, so the seeded row falls back to Public — author a parallel object_state_definitions row when Local/Hidden visibility is wanted."
77
+ },
78
+ "value_bool": {
79
+ "type": "boolean",
80
+ "description": "Bool carrier (schema default true when neither value_int nor value_text is set). Carrier precedence at commit: value_int > value_text > value_bool."
81
+ },
82
+ "value_int": {
83
+ "type": "number",
84
+ "description": "Int carrier — highest commit precedence."
85
+ },
86
+ "value_text": {
87
+ "type": "string",
88
+ "description": "Text carrier — commit precedence between value_int and value_bool."
89
+ }
90
+ }
91
+ },
92
+ "description": "entity_definition_initial_state rows — seeded onto every placed instance at admission/spawn."
93
+ },
94
+ "initial_capabilities": {
95
+ "type": "array",
96
+ "items": {
97
+ "type": "object",
98
+ "required": [
99
+ "capability"
100
+ ],
101
+ "properties": {
102
+ "capability": {
103
+ "type": "string",
104
+ "description": "capability_definitions capability_id granted unconditionally to every placed instance of this entity_def (an entity_definition_initial_capability seed row)."
105
+ },
106
+ "extent_kind_ref": {
107
+ "type": "string",
108
+ "description": "Authored extent kind for this innate grant; preserve the same paired kind/ref contract as actor_capabilities. Omit both fields for an unscoped grant."
109
+ },
110
+ "extent_ref": {
111
+ "type": "string",
112
+ "description": "Extent reference paired with extent_kind_ref, copied to every spawned instance's innate capability grant."
113
+ }
114
+ }
115
+ },
116
+ "description": "entity_definition_initial_capability rows — innate capability grants."
117
+ },
118
+ "initial_conditions": {
119
+ "type": "array",
120
+ "items": {
121
+ "type": "object",
122
+ "required": [
123
+ "condition"
124
+ ],
125
+ "properties": {
126
+ "condition": {
127
+ "type": "string",
128
+ "description": "condition_definitions condition_definition_id seeded onto every placed instance of this entity_def."
129
+ },
130
+ "duration_ticks": {
131
+ "type": "number",
132
+ "description": "Ticks until auto-expiry; 0 or omitted = permanent (schema default 0)."
133
+ }
134
+ }
135
+ },
136
+ "description": "entity_definition_initial_condition rows — conditions born active on every placed instance."
137
+ },
138
+ "initial_containment": {
139
+ "type": "array",
140
+ "items": {
141
+ "type": "object",
142
+ "required": [
143
+ "contained_entity_def_id"
144
+ ],
145
+ "properties": {
146
+ "contained_entity_def_id": {
147
+ "type": "string",
148
+ "description": "entity_def_id of the child instance spawned and carried loose (entity_containment, slot_id = '') on every placed/spawned instance of this entity_def (an entity_definition_initial_containment seed row). Structural, not a flat-value copy: the child's OWN initial_* seeds apply to it first (recursion). The containment/equipment graph is cycle-checked server-side (MF-VAL-314) at admission."
149
+ },
150
+ "quantity": {
151
+ "type": "number",
152
+ "description": "Stack-vs-instance-count rule (ADR-0028 D-6): when the contained definition is stackable, ONE instance is spawned carrying this as its stack count; otherwise this many separate instances are spawned. Default 1."
153
+ }
154
+ }
155
+ },
156
+ "description": "entity_definition_initial_containment rows — each spawns a child instance carried loose (no equipment slot) on every placed/spawned instance. Structural, not a flat-value copy; MF-VAL-314 cycle-checked server-side at admission (not duplicated here)."
157
+ },
158
+ "initial_equipment": {
159
+ "type": "array",
160
+ "items": {
161
+ "type": "object",
162
+ "required": [
163
+ "equipped_entity_def_id",
164
+ "slot_id"
165
+ ],
166
+ "properties": {
167
+ "equipped_entity_def_id": {
168
+ "type": "string",
169
+ "description": "entity_def_id of the child instance spawned and equipped into `slot_id` on every placed/spawned instance of this entity_def (an entity_definition_initial_equipment seed row) — a child, one slot, implicit quantity 1. The containment/equipment graph is cycle-checked server-side (MF-VAL-314) at admission, and the equipped definition's slot_compatibility_predicate is checked at commit (MF-VAL-311/-312/-313)."
170
+ },
171
+ "slot_id": {
172
+ "type": "string",
173
+ "description": "equipment_slot_definitions slot_id the spawned child is equipped into."
174
+ }
175
+ }
176
+ },
177
+ "description": "entity_definition_initial_equipment rows — each spawns a child instance and equips it into the named slot on every placed/spawned instance. Structural, not a flat-value copy; MF-VAL-314 cycle-checked server-side at admission (not duplicated here)."
178
+ }
179
+ }
180
+ },
181
+ "executionMode": "sequential",
182
+ "roles": [
183
+ "AUTHOR"
184
+ ],
185
+ "admission": {
186
+ "anyOf": [
187
+ {
188
+ "kind": "all",
189
+ "capabilities": [
190
+ "frontier.apply_manifest"
191
+ ]
192
+ },
193
+ {
194
+ "kind": "publisher"
195
+ }
196
+ ],
197
+ "ports": []
198
+ }
199
+ }
@@ -0,0 +1,88 @@
1
+ {
2
+ "name": "spellkave_define_niche",
3
+ "label": "Define Niche (verb)",
4
+ "description": "Author ONE niche_definitions row (+ niche_definition_tag satellites, + spatial_niche_attachments binding it to place nodes/edges) in a single call. Self-scaffolds the [[bundles]] header if `bundle` has none yet. NOTE: an attachment referencing a BOOTSTRAP-seeded niche (one with no niche_definitions row of its own in any bundle, e.g. core's 'core/passable_portal') cannot be authored through THIS verb (it always emits a niche_definitions parent row) — use spellkave_write_rows for a standalone spatial_niche_attachments row in that case. #1968 workspace idempotency: re-authoring the SAME bundle+id REPLACES the row + EVERY satellite wholesale (fewer tags/attachments on a re-run means the stale ones are gone, not left behind).",
5
+ "parameters": {
6
+ "type": "object",
7
+ "required": [
8
+ "id",
9
+ "description"
10
+ ],
11
+ "properties": {
12
+ "bundle": {
13
+ "type": "string",
14
+ "description": "bundle_id stamped on every generated row. Omit to fall back to `context.defaultBundle` (#1968 smart default)."
15
+ },
16
+ "id": {
17
+ "type": "string",
18
+ "description": "Local niche_id stem; full id '<bundle>/<id>'."
19
+ },
20
+ "display_name": {
21
+ "type": "string",
22
+ "description": "niche_definitions.display_name. Omit to derive a title-cased `id` (#1968 smart default)."
23
+ },
24
+ "description": {
25
+ "type": "string",
26
+ "description": "niche_definitions.description — REQUIRED (unlike every OTHER verb's optional `description?`): NicheDefinitionRow kept its own PRE-EXISTING required description column through the #1968 description-column decision (no `#[serde(default)]` in the schema); omitting it would author an invalid row, not merely a less-documented one."
27
+ },
28
+ "tags": {
29
+ "type": "array",
30
+ "items": {
31
+ "type": "string"
32
+ },
33
+ "description": "One niche_definition_tag row per tag."
34
+ },
35
+ "predicate_source": {
36
+ "type": "string",
37
+ "description": "DSL Bool predicate (default '' = trivially-true, matches any candidate target)."
38
+ },
39
+ "attachments": {
40
+ "type": "array",
41
+ "items": {
42
+ "type": "object",
43
+ "properties": {
44
+ "node": {
45
+ "type": "string",
46
+ "description": "spatial_niche_attachments.place_node_id — an authored place_node id. EXACTLY ONE of `node`/`edge` must be set per attachment (the two authored attachment shapes the corpus actually uses)."
47
+ },
48
+ "edge": {
49
+ "type": "number",
50
+ "description": "spatial_niche_attachments.place_edge_id — a place_edge numeric id (0 is the SpacetimeDB 'every edge' wildcard convention, e.g. a global passable-portal gate). EXACTLY ONE of `node`/`edge`."
51
+ },
52
+ "visibility": {
53
+ "type": "string",
54
+ "description": "spatial_niche_attachments.visibility (default 'Public')."
55
+ },
56
+ "condition_bool": {
57
+ "type": "boolean",
58
+ "description": "spatial_niche_attachments.condition_bool (default true)."
59
+ },
60
+ "ecological_invariant": {
61
+ "type": "boolean",
62
+ "description": "spatial_niche_attachments.ecological_invariant (default false)."
63
+ }
64
+ }
65
+ },
66
+ "description": "spatial_niche_attachments rows binding this niche to place nodes/edges."
67
+ }
68
+ }
69
+ },
70
+ "executionMode": "sequential",
71
+ "roles": [
72
+ "AUTHOR"
73
+ ],
74
+ "admission": {
75
+ "anyOf": [
76
+ {
77
+ "kind": "all",
78
+ "capabilities": [
79
+ "frontier.apply_manifest"
80
+ ]
81
+ },
82
+ {
83
+ "kind": "publisher"
84
+ }
85
+ ],
86
+ "ports": []
87
+ }
88
+ }