interplane.Get Omega
Read in your language

interplane-mv

INTERPLANE: open interoperability protocol between AI models and agent runtimes. Models express intent. Runtimes retain authority.

Brought by drakestapleton

branch main Branches Tags History

interplane-mv / spec / schemas / selection.schema.json

85 lines · 5502 bytes Raw Blame History
1{
2 "$schema": "https://json-schema.org/draft/2020-12/schema",
3 "$id": "https://interplane.dev/schemas/0.1/selection.schema.json",
4 "title": "INTERPLANE Selection receipt (CrossAxis Select)",
5 "description": "Which subset of a runtime's catalog was exposed to a model for one turn, and why. Deterministic for a given catalog, request domains and selector version. Selection never grants authority: an excluded capability is simply not rendered; an included one still crosses Crossveil.",
6 "type": "object",
7 "required": ["kind", "runtime", "catalog_digest", "selector", "requested_domains", "selected", "excluded"],
8 "properties": {
9 "kind": {"const": "selection"},
10 "runtime": {"type": "string", "minLength": 1},
11 "catalog_digest": {"$ref": "common.schema.json#/$defs/Digest"},
12 "selector": {
13 "type": "object",
14 "required": ["name", "version"],
15 "properties": {"name": {"type": "string"}, "version": {"type": "string"}, "max_capabilities": {"type": ["integer", "null"], "minimum": 1}, "expansion": {"$ref": "#/$defs/ExpansionBounds"}},
16 "additionalProperties": true
17 },
18 "requested_domains": {"type": "array", "items": {"type": "string"}},
19 "always_include": {"type": "array", "items": {"type": "string"}, "description": "Capabilities the runtime pinned regardless of domain."},
20 "selected": {"type": "array", "items": {"type": "object", "required": ["name", "rule_id"], "properties": {"name": {"type": "string"}, "rule_id": {"type": "string"}, "domains": {"type": "array", "items": {"type": "string"}}}, "additionalProperties": true}},
21 "excluded": {"type": "array", "items": {"type": "object", "required": ["name", "reason"], "properties": {"name": {"type": "string"}, "reason": {"type": "string", "enum": ["domain_mismatch", "max_capabilities", "runtime_disabled", "no_domains"]}}, "additionalProperties": true}},
22 "measure": {
23 "type": "object",
24 "description": "Before/after size of the rendered tool surface, measured on the same renderer.",
25 "properties": {
26 "full_count": {"type": "integer", "minimum": 0},
27 "selected_count": {"type": "integer", "minimum": 0},
28 "full_rendered_bytes": {"type": "integer", "minimum": 0},
29 "selected_rendered_bytes": {"type": "integer", "minimum": 0},
30 "full_tokens": {"type": ["integer", "null"], "minimum": 0},
31 "selected_tokens": {"type": ["integer", "null"], "minimum": 0},
32 "tokenizer": {"type": ["string", "null"]},
33 "rendered_bytes": {"$ref": "#/$defs/FullSelected", "description": "Canonical-JSON bytes of the rendered tools array, exactly as sent."},
34 "tokens": {"$ref": "#/$defs/TokenMeasure"}
35 },
36 "additionalProperties": true
37 },
38 "expansions": {"type": "array", "description": "One entry per expansion attempt, in order (CROSSAXIS.md, Bounded expansion).", "items": {"$ref": "#/$defs/Expansion"}},
39 "parent_digest": {"$ref": "common.schema.json#/$defs/Digest", "description": "selection_digest of the selection this one was expanded from."},
40 "selection_digest": {"$ref": "common.schema.json#/$defs/Digest", "description": "JCS digest of this selection with selection_digest and measure removed. Present on expanded selections."},
41 "extensions": {"type": "object", "additionalProperties": true}
42 },
43 "$defs": {
44 "FullSelected": {
45 "type": "object",
46 "required": ["full", "selected"],
47 "properties": {"full": {"type": "integer", "minimum": 0}, "selected": {"type": "integer", "minimum": 0}},
48 "additionalProperties": false
49 },
50 "TokenMeasure": {
51 "type": "object",
52 "description": "Every number in the block is in `unit`; units are never mixed in one block.",
53 "required": ["unit", "source", "base_context", "tool_schema", "first_turn_prompt"],
54 "properties": {
55 "unit": {"enum": ["bytes", "tokens_model_reported", "tokens_endpoint_tokenizer", "tokens_estimated"]},
56 "source": {"type": "string", "minLength": 1, "description": "Free text: how the numbers were obtained."},
57 "base_context": {"type": "integer", "minimum": 0},
58 "tool_schema": {"$ref": "#/$defs/FullSelected"},
59 "first_turn_prompt": {"$ref": "#/$defs/FullSelected"},
60 "all_rounds_prompt": {"$ref": "#/$defs/FullSelected"},
61 "completion": {"$ref": "#/$defs/FullSelected"}
62 },
63 "additionalProperties": false
64 },
65 "ExpansionBounds": {
66 "type": "object",
67 "required": ["max_expansions", "max_added_per_expansion"],
68 "properties": {"max_expansions": {"type": "integer", "minimum": 0}, "max_added_per_expansion": {"type": "integer", "minimum": 0}},
69 "additionalProperties": false
70 },
71 "Expansion": {
72 "type": "object",
73 "required": ["round", "reason", "evidence_digest", "added", "refused"],
74 "properties": {
75 "round": {"type": "integer", "minimum": 1},
76 "reason": {"enum": ["requested_excluded", "discovery_hit"]},
77 "evidence_digest": {"$ref": "common.schema.json#/$defs/Digest"},
78 "added": {"type": "array", "items": {"type": "string"}},
79 "refused": {"type": "array", "items": {"type": "object", "required": ["name", "reason"], "properties": {"name": {"type": "string"}, "reason": {"enum": ["not_in_catalog", "already_selected", "runtime_disabled", "max_expansions", "max_added_per_expansion", "max_capabilities"]}}, "additionalProperties": false}}
80 },
81 "additionalProperties": false
82 }
83 },
84 "additionalProperties": true
85}