@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,19 @@
1
+ [
2
+ "spellkave_status",
3
+ "spellkave_events",
4
+ "spellkave_suggest_next_action",
5
+ "spellkave_entity",
6
+ "spellkave_entity_container",
7
+ "spellkave_observer_knowledge",
8
+ "spellkave_observer_place_knowledge",
9
+ "spellkave_observer_trace_knowledge",
10
+ "spellkave_entity_body",
11
+ "spellkave_actor_principals",
12
+ "spellkave_session_open",
13
+ "spellkave_session_close",
14
+ "spellkave_session_move",
15
+ "spellkave_release_claim",
16
+ "spellkave_wake_up",
17
+ "spellkave_take_npc_control",
18
+ "spellkave_return_npc_control"
19
+ ]
@@ -0,0 +1,25 @@
1
+ [
2
+ "spellkave_orient",
3
+ "spellkave_self_summary",
4
+ "spellkave_self_states",
5
+ "spellkave_scene",
6
+ "spellkave_scene_detail",
7
+ "spellkave_map",
8
+ "spellkave_move",
9
+ "spellkave_inventory",
10
+ "spellkave_item_detail",
11
+ "spellkave_traces",
12
+ "spellkave_trace_detail",
13
+ "spellkave_session_status",
14
+ "spellkave_reaction_options",
15
+ "spellkave_intervention_windows",
16
+ "spellkave_react_option",
17
+ "spellkave_end_turn",
18
+ "spellkave_manipulation_context",
19
+ "spellkave_manipulate",
20
+ "spellkave_communicate",
21
+ "spellkave_sense_context",
22
+ "spellkave_sense",
23
+ "spellkave_offer_control",
24
+ "spellkave_withdraw_control"
25
+ ]
@@ -0,0 +1,35 @@
1
+ {
2
+ "name": "spellkave_acting_context",
3
+ "label": "Spellkave Acting Context",
4
+ "description": "List or explicitly select your current character or caller-owned presence binding for this session. Selection is revalidated on every call; revoked and foreign bindings refuse. Select one of the listed binding ids when a privileged act is ambiguous. This does not grant roles or transfer NPC consent.",
5
+ "parameters": {
6
+ "type": "object",
7
+ "properties": {
8
+ "binding_id": {
9
+ "type": "string",
10
+ "description": "Select a currently caller-owned presence binding. Omit to list your contexts."
11
+ },
12
+ "character": {
13
+ "type": "boolean",
14
+ "description": "Select your primary character. Mutually exclusive with binding_id."
15
+ }
16
+ },
17
+ "additionalProperties": false
18
+ },
19
+ "executionMode": "sequential",
20
+ "roles": [],
21
+ "admission": {
22
+ "anyOf": [
23
+ {
24
+ "kind": "prefix",
25
+ "prefix": "frontier."
26
+ },
27
+ {
28
+ "kind": "presence"
29
+ }
30
+ ],
31
+ "ports": [
32
+ "actingContext"
33
+ ]
34
+ }
35
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "name": "spellkave_actor_principals",
3
+ "label": "Spellkave Actor Principals",
4
+ "description": "Read all actor-to-body bindings: who is currently inhabiting each body. Returns actor_id, name, and current_body (entity id) for every registered actor. Use to observe intermediate state during possession handoffs (e.g. verify the steward moved into the hero body).",
5
+ "parameters": {
6
+ "type": "object",
7
+ "properties": {}
8
+ },
9
+ "executionMode": "parallel",
10
+ "roles": [
11
+ "DM"
12
+ ],
13
+ "admission": {
14
+ "anyOf": [
15
+ {
16
+ "kind": "publisher"
17
+ }
18
+ ],
19
+ "ports": [
20
+ "publisherRead"
21
+ ]
22
+ }
23
+ }
@@ -0,0 +1,82 @@
1
+ {
2
+ "name": "spellkave_annotate_place",
3
+ "label": "Annotate Place",
4
+ "description": "Attach inert metadata (terrain.hint / custom) to a place_graph, place_node, or place_edge, and/or stamp demo H3 origin cells on a graph. Does not create playable niches yet — tags are the authoring vocabulary for later niche wiring (E prep).",
5
+ "parameters": {
6
+ "type": "object",
7
+ "required": [
8
+ "target_kind",
9
+ "target_ref"
10
+ ],
11
+ "properties": {
12
+ "bundle": {
13
+ "type": "string"
14
+ },
15
+ "target_kind": {
16
+ "anyOf": [
17
+ {
18
+ "type": "string",
19
+ "const": "place_graph"
20
+ },
21
+ {
22
+ "type": "string",
23
+ "const": "place_node"
24
+ },
25
+ {
26
+ "type": "string",
27
+ "const": "place_edge"
28
+ }
29
+ ],
30
+ "description": "What the annotation attaches to."
31
+ },
32
+ "target_ref": {
33
+ "type": "string",
34
+ "description": "place_graph_id / node_id / edge_key."
35
+ },
36
+ "terrain": {
37
+ "type": "array",
38
+ "items": {
39
+ "type": "string"
40
+ },
41
+ "description": "Tags e.g. [\"road\",\"difficult\",\"hazard_slime\"] → namespace terrain.hint"
42
+ },
43
+ "payload": {
44
+ "type": "object",
45
+ "patternProperties": {
46
+ "^.*$": {}
47
+ }
48
+ },
49
+ "namespace": {
50
+ "type": "string",
51
+ "description": "Override namespace (default terrain.hint when terrain set, else \"place.note\")."
52
+ },
53
+ "h3_origin_res10": {
54
+ "type": "number",
55
+ "description": "When target_kind=place_graph, stamp origin_cell_res10 (and anchor node cell_res10 if anchor known). Must be within Number.MAX_SAFE_INTEGER. Real H3 encoding later."
56
+ }
57
+ }
58
+ },
59
+ "executionMode": "sequential",
60
+ "promptSnippet": "Stamp terrain tags or H3 origin on place rows",
61
+ "promptGuidelines": [
62
+ "terrain tags are metadata only until a niche/affordance reads them.",
63
+ "h3_origin_res10 is a safe-int demo stamp — not a full H3 library encode."
64
+ ],
65
+ "roles": [
66
+ "AUTHOR"
67
+ ],
68
+ "admission": {
69
+ "anyOf": [
70
+ {
71
+ "kind": "all",
72
+ "capabilities": [
73
+ "frontier.apply_manifest"
74
+ ]
75
+ },
76
+ {
77
+ "kind": "publisher"
78
+ }
79
+ ],
80
+ "ports": []
81
+ }
82
+ }
@@ -0,0 +1,66 @@
1
+ {
2
+ "name": "spellkave_apply_manifest_delta",
3
+ "label": "Apply Manifest Delta",
4
+ "description": "Commit/flush authored rows to the ACTIVE connection-level target (#1968 'connection-level target' decision): default (no params) reads the workspace scratch and flushes it — the transaction end after write verbs (author_place/spawn/define_*). Optional `toml` is an escape hatch for an external delta string. `live` dispatches through r_apply_manifest_delta (upsert semantics, ADR-0085); `local` renders/merges into the target folder's manifest.toml. Falls back to the legacy `context.applyDelta` live port when no `target` is wired (back-compat). Requires EITHER to be wired — throws if neither is (offline authoring with no target has no flush destination). A live apply waits for a subscribed outcome: a new digest seal (ok) or a manifest_apply_outcome row (MF-APPLY code). A mid-segment commit error rolls the world back but may publish no failure row; the waiter then hits the scheduler watchdog, not a short poll.",
5
+ "parameters": {
6
+ "type": "object",
7
+ "properties": {
8
+ "toml": {
9
+ "type": "string",
10
+ "description": "Optional escape hatch: a full manifest-delta TOML string to flush. Omit to commit the active workspace scratch (workspace.readToml) — the normal transaction end after write verbs. Pass only when applying an external/ad-hoc delta that is not the scratch pad."
11
+ }
12
+ }
13
+ },
14
+ "executionMode": "sequential",
15
+ "promptSnippet": "Commit the workspace scratch (or an optional toml escape hatch) to the active live/local authoring target",
16
+ "promptGuidelines": [
17
+ "After write verbs have built the scratch you want live, call spellkave_apply_manifest_delta with NO args to commit that scratch — do not re-read or paste the TOML.",
18
+ "spellkave_apply_manifest_delta: pass `toml` only for an external/ad-hoc delta that is not the workspace scratch.",
19
+ "spellkave_apply_manifest_delta: requires an active connection-level target or legacy applyDelta port.",
20
+ "spellkave_apply_manifest_delta: live apply blocks until a digest seal or a failure outcome is pushed; ok means sealed, not merely enqueued.",
21
+ "spellkave_apply_manifest_delta: a mid-write drain crash rolls the world back (one transaction) but may not push a failure row — a long watchdog then means no outcome, not still applying."
22
+ ],
23
+ "roles": [
24
+ "AUTHOR"
25
+ ],
26
+ "admission": {
27
+ "anyOf": [
28
+ {
29
+ "kind": "all",
30
+ "capabilities": [
31
+ "frontier.apply_manifest"
32
+ ]
33
+ },
34
+ {
35
+ "kind": "publisher"
36
+ },
37
+ {
38
+ "kind": "prefix",
39
+ "prefix": "frontier.bind."
40
+ },
41
+ {
42
+ "kind": "role-capabilities"
43
+ },
44
+ {
45
+ "kind": "all",
46
+ "capabilities": [
47
+ "frontier.escalate"
48
+ ]
49
+ }
50
+ ],
51
+ "ports": [
52
+ "applyDelta"
53
+ ],
54
+ "inputModes": [
55
+ "inline TOML",
56
+ "workspace"
57
+ ],
58
+ "limitations": [
59
+ "Scoped prospective-write preflight; binding-only D-6 lane remains separate."
60
+ ],
61
+ "argumentGates": [
62
+ "Binding-only payloads retain D-6 server admission; mixed writes require readable prospective state.",
63
+ "Role widening still checks all-contained capabilities or frontier.escalate on the server; unsupported comparison kinds refuse."
64
+ ]
65
+ }
66
+ }
@@ -0,0 +1,131 @@
1
+ {
2
+ "name": "spellkave_applyset_apply",
3
+ "label": "Apply Applyset",
4
+ "description": "Apply an applyset root to the world like kubectl apply: compute the same difference as spellkave_applyset_diff, send only the create and configure rows (and, with prune, retractions for rows the files no longer name) in one r_apply_bundle call with the changed part lists and the memory generation it read, and wait for the seal. Refuses before sending when a changed row cannot be updated by a delta or the validator rejects the built root plus retractions. A concurrent apply (stale generation), another root path owning the name (without force) or a world without apply authority is refused by the world. Scoped ordinary writes need a fresh complete comparable observation and a known baseline, or complete authorized Bundle absence for a new row. Force overrides known conflicts only; it cannot supply missing read coverage. Scoped entity-prune and whole-world export require publisher closure. Binding-only deltas retain their separate authority lane; mixed unchecked rows refuse. Comparison remains optimistic against later world changes. Requires a live connection.",
5
+ "parameters": {
6
+ "type": "object",
7
+ "properties": {
8
+ "dir": {
9
+ "type": "string",
10
+ "description": "The applyset root: a directory holding manifest.toml, or the root manifest file itself. Its includes are read too; only the root's own rows are compared and sent."
11
+ },
12
+ "source": {
13
+ "type": "object",
14
+ "required": [
15
+ "root_path",
16
+ "root_toml",
17
+ "fragments"
18
+ ],
19
+ "properties": {
20
+ "root_path": {
21
+ "type": "string",
22
+ "description": "Stable logical relative root name recorded in applyset provenance; never a server file path."
23
+ },
24
+ "root_toml": {
25
+ "type": "string"
26
+ },
27
+ "fragments": {
28
+ "type": "array",
29
+ "items": {
30
+ "type": "object",
31
+ "required": [
32
+ "path",
33
+ "toml"
34
+ ],
35
+ "properties": {
36
+ "path": {
37
+ "type": "string"
38
+ },
39
+ "toml": {
40
+ "type": "string"
41
+ }
42
+ },
43
+ "additionalProperties": false
44
+ }
45
+ }
46
+ },
47
+ "additionalProperties": false
48
+ },
49
+ "dep": {
50
+ "type": "array",
51
+ "items": {
52
+ "type": "string"
53
+ },
54
+ "description": "Repeatable dependency root manifests (or their directories), loaded for validation only and never sent."
55
+ },
56
+ "prune": {
57
+ "type": "boolean",
58
+ "description": "Also retract rows the applyset applied before and the files no longer name. Retracting an entity covers its authored containment, state, resource bound, equipment (the wearer side), actor, position, identity, and capability rows (those kinds cannot be removed alone); tag rows stay. Pruning an equipped item together with its slot row while the wearer stays is refused. A containment row the files replace with another containment for the same contained entity needs no retraction. Retracting an entity on which the world holds rows beyond what the files put there, or any entity prune when those rows cannot be read, is refused unless --force. Off by default."
59
+ },
60
+ "dry_run": {
61
+ "type": "boolean",
62
+ "description": "Compute and report the difference; send nothing (same as diff)."
63
+ },
64
+ "force": {
65
+ "type": "boolean",
66
+ "description": "Let the files win over observed world changes, let this root take over an applyset name recorded under another root path, and retract an entity with world-added rows or unreadable prune contents. The answer reports the meanings used as a force_used list containing world_changed, root_takeover, and/or world_added_rows."
67
+ }
68
+ }
69
+ },
70
+ "executionMode": "sequential",
71
+ "promptSnippet": "Apply only the difference between an applyset root and the world",
72
+ "promptGuidelines": [
73
+ "spellkave_applyset_apply: pass dir= the applyset root; it sends only changed rows and waits for the seal.",
74
+ "spellkave_applyset_apply: rows the files dropped stay on the world unless prune=true; run spellkave_applyset_diff first to see them.",
75
+ "spellkave_applyset_apply: a stale-generation refusal (MF-APPLY-030) means another apply landed first: diff again, then apply."
76
+ ],
77
+ "cli": {
78
+ "positionals": [
79
+ "dir"
80
+ ],
81
+ "examples": [
82
+ {
83
+ "command": "sk apply -k ./rules/manifest.toml",
84
+ "description": "send the changed rows of the SRD root to the current context's world"
85
+ }
86
+ ]
87
+ },
88
+ "roles": [
89
+ "AUTHOR"
90
+ ],
91
+ "admission": {
92
+ "anyOf": [
93
+ {
94
+ "kind": "all",
95
+ "capabilities": [
96
+ "frontier.apply_manifest"
97
+ ]
98
+ },
99
+ {
100
+ "kind": "publisher"
101
+ },
102
+ {
103
+ "kind": "prefix",
104
+ "prefix": "frontier.bind."
105
+ },
106
+ {
107
+ "kind": "role-capabilities"
108
+ },
109
+ {
110
+ "kind": "all",
111
+ "capabilities": [
112
+ "frontier.escalate"
113
+ ]
114
+ }
115
+ ],
116
+ "ports": [
117
+ "applyset"
118
+ ],
119
+ "inputModes": [
120
+ "source",
121
+ "local dir"
122
+ ],
123
+ "limitations": [
124
+ "Scoped prospective writes require complete comparison; entity prune requires publisher closure."
125
+ ],
126
+ "argumentGates": [
127
+ "Binding-only payloads retain D-6 server admission; mixed writes require readable prospective state.",
128
+ "Role widening still checks all-contained capabilities or frontier.escalate on the server; unsupported comparison kinds refuse."
129
+ ]
130
+ }
131
+ }
@@ -0,0 +1,122 @@
1
+ {
2
+ "name": "spellkave_applyset_diff",
3
+ "label": "Diff Applyset",
4
+ "description": "Compare an applyset root (its manifest.toml and includes) with what the world remembers applying from it (the applyset memory, ADR-0145), like kubectl diff. Every row is create (not applied yet), configure (applied with other content), move (same content, other file), prune (applied before, in no file now) or unchanged. Rows the world holds but this applyset never applied are left alone. Publisher export or complete caller-scoped instance projections supply live comparison. Rows whose live value differs from the files carry a drift warning (information only); incomplete, masked, unsupported or unavailable observations are explicit. With prune=true, previews world-added rows on each entity candidate; unreadable contents are refused explicitly, and entity-content inspection requires publisher closure. Sends nothing. Requires a live connection.",
5
+ "parameters": {
6
+ "type": "object",
7
+ "properties": {
8
+ "dir": {
9
+ "type": "string",
10
+ "description": "The applyset root: a directory holding manifest.toml, or the root manifest file itself. Its includes are read too; only the root's own rows are compared and sent."
11
+ },
12
+ "source": {
13
+ "type": "object",
14
+ "required": [
15
+ "root_path",
16
+ "root_toml",
17
+ "fragments"
18
+ ],
19
+ "properties": {
20
+ "root_path": {
21
+ "type": "string",
22
+ "description": "Stable logical relative root name recorded in applyset provenance; never a server file path."
23
+ },
24
+ "root_toml": {
25
+ "type": "string"
26
+ },
27
+ "fragments": {
28
+ "type": "array",
29
+ "items": {
30
+ "type": "object",
31
+ "required": [
32
+ "path",
33
+ "toml"
34
+ ],
35
+ "properties": {
36
+ "path": {
37
+ "type": "string"
38
+ },
39
+ "toml": {
40
+ "type": "string"
41
+ }
42
+ },
43
+ "additionalProperties": false
44
+ }
45
+ }
46
+ },
47
+ "additionalProperties": false
48
+ },
49
+ "dep": {
50
+ "type": "array",
51
+ "items": {
52
+ "type": "string"
53
+ },
54
+ "description": "Repeatable dependency root manifests (or their directories), loaded for validation only and never sent."
55
+ },
56
+ "prune": {
57
+ "type": "boolean",
58
+ "description": "Preview an apply with pruning: inspect world-added rows on each removed entity, without writing. Requires publisher closure to inspect entity contents; an unreadable candidate is reported as a refusal. Off by default."
59
+ }
60
+ }
61
+ },
62
+ "executionMode": "sequential",
63
+ "promptSnippet": "Show what sk apply would change: files vs the world's applyset memory",
64
+ "promptGuidelines": [
65
+ "spellkave_applyset_diff: pass dir= the applyset root (the directory with manifest.toml); it needs a live connection.",
66
+ "spellkave_applyset_diff: differences are information, not failure; a drift warning never changes what spellkave_applyset_apply sends."
67
+ ],
68
+ "cli": {
69
+ "positionals": [
70
+ "dir"
71
+ ],
72
+ "examples": [
73
+ {
74
+ "command": "sk diff -k ./rules/manifest.toml",
75
+ "description": "show what sk apply would send to the current context's world"
76
+ }
77
+ ]
78
+ },
79
+ "roles": [
80
+ "AUTHOR"
81
+ ],
82
+ "admission": {
83
+ "anyOf": [
84
+ {
85
+ "kind": "all",
86
+ "capabilities": [
87
+ "frontier.apply_manifest"
88
+ ]
89
+ },
90
+ {
91
+ "kind": "publisher"
92
+ },
93
+ {
94
+ "kind": "prefix",
95
+ "prefix": "frontier.bind."
96
+ },
97
+ {
98
+ "kind": "role-capabilities"
99
+ },
100
+ {
101
+ "kind": "all",
102
+ "capabilities": [
103
+ "frontier.escalate"
104
+ ]
105
+ }
106
+ ],
107
+ "ports": [
108
+ "applyset"
109
+ ],
110
+ "inputModes": [
111
+ "source",
112
+ "local dir"
113
+ ],
114
+ "limitations": [
115
+ "Scoped prospective writes require complete comparison; entity prune requires publisher closure."
116
+ ],
117
+ "argumentGates": [
118
+ "Binding-only payloads retain D-6 server admission; mixed writes require readable prospective state.",
119
+ "Role widening still checks all-contained capabilities or frontier.escalate on the server; unsupported comparison kinds refuse."
120
+ ]
121
+ }
122
+ }
@@ -0,0 +1,114 @@
1
+ {
2
+ "name": "spellkave_attach_map_layer",
3
+ "label": "Attach Map Layer",
4
+ "description": "Author a [[map_layers]] backdrop pointer for a place_graph (Phandelver parity). Does NOT vendor the image — asset_path resolves at map_graph time via CCC3_MAPS_ROOT or FVTT_DATA_ROOT. Optionally stamps provenance metadata on the graph. When the file is present, image_width/height are filled from PNG IHDR if unset.",
5
+ "parameters": {
6
+ "type": "object",
7
+ "required": [
8
+ "place_graph_id",
9
+ "asset_path"
10
+ ],
11
+ "properties": {
12
+ "bundle": {
13
+ "type": "string"
14
+ },
15
+ "place_graph_id": {
16
+ "type": "string",
17
+ "description": "place_graph this backdrop belongs to."
18
+ },
19
+ "asset_path": {
20
+ "type": "string",
21
+ "description": "Relative path under asset root, e.g. \"maps/306 Fortified Hamlet.jpg\" for ccc3-maps."
22
+ },
23
+ "asset_module": {
24
+ "type": "string",
25
+ "description": "Asset root module id (default \"ccc3-maps\"). Also resolves FVTT_DATA_ROOT/<module>."
26
+ },
27
+ "display_name": {
28
+ "type": "string"
29
+ },
30
+ "map_layer_id": {
31
+ "type": "string",
32
+ "description": "Defaults to <place_graph_id>/backdrop."
33
+ },
34
+ "posture": {
35
+ "type": "string",
36
+ "description": "License posture stamp (default \"cc-by-4.0\" for ccc3)."
37
+ },
38
+ "source_kind": {
39
+ "type": "string",
40
+ "description": "Default \"elven-tower-ccc\"."
41
+ },
42
+ "grid_size_px": {
43
+ "type": "number"
44
+ },
45
+ "grid_distance_m": {
46
+ "type": "number"
47
+ },
48
+ "image_width_px": {
49
+ "type": "number"
50
+ },
51
+ "image_height_px": {
52
+ "type": "number"
53
+ },
54
+ "local_width_cells": {
55
+ "type": "number"
56
+ },
57
+ "local_height_cells": {
58
+ "type": "number"
59
+ },
60
+ "image_origin_x": {
61
+ "type": "number"
62
+ },
63
+ "image_origin_y": {
64
+ "type": "number"
65
+ },
66
+ "rotation_deg": {
67
+ "type": "number"
68
+ },
69
+ "state": {
70
+ "type": "string",
71
+ "description": "aligned | provisional | unmatched | template (default \"template\")."
72
+ },
73
+ "provenance": {
74
+ "type": "boolean"
75
+ },
76
+ "map_id": {
77
+ "type": "string",
78
+ "description": "Catalog map id for provenance payload."
79
+ },
80
+ "license_url": {
81
+ "type": "string"
82
+ },
83
+ "source_url": {
84
+ "type": "string"
85
+ }
86
+ }
87
+ },
88
+ "executionMode": "sequential",
89
+ "promptSnippet": "Attach an out-of-repo map image layer to a place_graph",
90
+ "promptGuidelines": [
91
+ "Use after author_place. asset_module ccc3-maps + asset_path maps/<file>.",
92
+ "Images never go in git; map_graph overlays them when CCC3_MAPS_ROOT resolves.",
93
+ "just map-font-check is unrelated — this is bitmap backdrops, not terminal fonts."
94
+ ],
95
+ "roles": [
96
+ "AUTHOR"
97
+ ],
98
+ "admission": {
99
+ "anyOf": [
100
+ {
101
+ "kind": "all",
102
+ "capabilities": [
103
+ "frontier.apply_manifest"
104
+ ]
105
+ },
106
+ {
107
+ "kind": "publisher"
108
+ }
109
+ ],
110
+ "ports": [
111
+ "node"
112
+ ]
113
+ }
114
+ }