awp-python 0.1.0a1__py3-none-any.whl

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 (71) hide show
  1. awp/__init__.py +64 -0
  2. awp/_spec/lifecycle.json +190 -0
  3. awp/_spec/schemas/action-cancel-result.schema.json +13 -0
  4. awp/_spec/schemas/action-ref.schema.json +11 -0
  5. awp/_spec/schemas/action-schema.schema.json +37 -0
  6. awp/_spec/schemas/action-status.schema.json +39 -0
  7. awp/_spec/schemas/action-submit-result.schema.json +16 -0
  8. awp/_spec/schemas/action-submit.schema.json +19 -0
  9. awp/_spec/schemas/agent-manifest.schema.json +27 -0
  10. awp/_spec/schemas/approval-requested.schema.json +25 -0
  11. awp/_spec/schemas/approval-respond.schema.json +31 -0
  12. awp/_spec/schemas/common.schema.json +150 -0
  13. awp/_spec/schemas/embodiment.schema.json +22 -0
  14. awp/_spec/schemas/empty-result.schema.json +8 -0
  15. awp/_spec/schemas/error.schema.json +25 -0
  16. awp/_spec/schemas/frame-inline.schema.json +20 -0
  17. awp/_spec/schemas/frame-tree.schema.json +26 -0
  18. awp/_spec/schemas/obs-report.schema.json +40 -0
  19. awp/_spec/schemas/observation-channel.schema.json +28 -0
  20. awp/_spec/schemas/ping-result.schema.json +13 -0
  21. awp/_spec/schemas/ping.schema.json +12 -0
  22. awp/_spec/schemas/profiles/gui-actions.schema.json +57 -0
  23. awp/_spec/schemas/reset-result.schema.json +11 -0
  24. awp/_spec/schemas/reset.schema.json +12 -0
  25. awp/_spec/schemas/restore.schema.json +11 -0
  26. awp/_spec/schemas/safety-policy.schema.json +81 -0
  27. awp/_spec/schemas/session-open.schema.json +41 -0
  28. awp/_spec/schemas/session-ready.schema.json +50 -0
  29. awp/_spec/schemas/session-resume.schema.json +12 -0
  30. awp/_spec/schemas/session-state.schema.json +14 -0
  31. awp/_spec/schemas/session-telemetry.schema.json +22 -0
  32. awp/_spec/schemas/session-transfer-result.schema.json +12 -0
  33. awp/_spec/schemas/session-transfer.schema.json +11 -0
  34. awp/_spec/schemas/snapshot-result.schema.json +11 -0
  35. awp/_spec/schemas/subscribe-result.schema.json +11 -0
  36. awp/_spec/schemas/subscribe.schema.json +11 -0
  37. awp/_spec/schemas/task-update.schema.json +11 -0
  38. awp/_spec/schemas/tick-result.schema.json +9 -0
  39. awp/_spec/schemas/tick.schema.json +12 -0
  40. awp/_spec/schemas/unsubscribe.schema.json +11 -0
  41. awp/_spec/schemas/world-event.schema.json +45 -0
  42. awp/_spec/schemas/world-manifest.schema.json +61 -0
  43. awp/aio.py +380 -0
  44. awp/client.py +781 -0
  45. awp/clock.py +61 -0
  46. awp/errors.py +112 -0
  47. awp/frames.py +174 -0
  48. awp/jsonrpc.py +84 -0
  49. awp/lifecycle.py +78 -0
  50. awp/py.typed +0 -0
  51. awp/schema.py +158 -0
  52. awp_python-0.1.0a1.dist-info/METADATA +127 -0
  53. awp_python-0.1.0a1.dist-info/RECORD +71 -0
  54. awp_python-0.1.0a1.dist-info/WHEEL +4 -0
  55. awp_python-0.1.0a1.dist-info/entry_points.txt +2 -0
  56. awp_python-0.1.0a1.dist-info/licenses/LICENSE +201 -0
  57. awp_sim/__init__.py +8 -0
  58. awp_sim/__main__.py +5 -0
  59. awp_sim/arm.py +163 -0
  60. awp_sim/audit.py +138 -0
  61. awp_sim/cli.py +238 -0
  62. awp_sim/config.py +225 -0
  63. awp_sim/demo.py +85 -0
  64. awp_sim/loopback.py +222 -0
  65. awp_sim/py.typed +0 -0
  66. awp_sim/recorder.py +72 -0
  67. awp_sim/replay.py +134 -0
  68. awp_sim/scenarios.py +427 -0
  69. awp_sim/server.py +333 -0
  70. awp_sim/session.py +153 -0
  71. awp_sim/world.py +1612 -0
@@ -0,0 +1,22 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://agentworldprotocol.com/schemas/v0.1/embodiment.schema.json",
4
+ "title": "Embodiment declaration",
5
+ "description": "An entry in world-manifest.embodiments (spec/session/embodiments).",
6
+ "type": "object",
7
+ "properties": {
8
+ "id": { "$ref": "common.schema.json#/$defs/identifier" },
9
+ "kind": { "type": "string", "minLength": 1, "description": "Free-form class: manipulator, mobile_base, avatar, cursor, camera_rig, ..." },
10
+ "shared_control": { "type": "boolean", "default": false, "description": "May be bound by several sessions at once; arbitration documented in arbitration (AWP-MA-003)." },
11
+ "arbitration": { "type": "string", "description": "Required when shared_control is true: priority, blend, or a vendor rule." },
12
+ "multi_bind_group": { "$ref": "common.schema.json#/$defs/identifier", "description": "Embodiments sharing a group may be bound together by one session; submissions then carry embodiment_id (AWP-EMB-005)." },
13
+ "action_types": { "type": "array", "items": { "$ref": "common.schema.json#/$defs/identifier" }, "uniqueItems": true },
14
+ "channels": { "type": "array", "items": { "$ref": "common.schema.json#/$defs/identifier" }, "uniqueItems": true },
15
+ "description": { "type": "string" }
16
+ },
17
+ "required": ["id", "kind", "action_types", "channels"],
18
+ "if": { "required": ["shared_control"], "properties": { "shared_control": { "const": true } } },
19
+ "then": { "required": ["arbitration"] },
20
+ "patternProperties": { "^x-[a-z0-9]+\\.": {} },
21
+ "additionalProperties": true
22
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://agentworldprotocol.com/schemas/v0.1/empty-result.schema.json",
4
+ "title": "Empty params or result",
5
+ "description": "Used by session.close, world.manifest, world.snapshot params, task.update result, and safety.approval.respond result.",
6
+ "type": "object",
7
+ "x-awp-closed": true
8
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://agentworldprotocol.com/schemas/v0.1/error.schema.json",
4
+ "title": "JSON-RPC error object with AWP data (AWP-ERR-001)",
5
+ "type": "object",
6
+ "properties": {
7
+ "code": { "type": "integer" },
8
+ "message": { "type": "string", "pattern": "^AWP_[A-Z_]+$|^[A-Z][a-z ]+$" },
9
+ "data": {
10
+ "type": "object",
11
+ "properties": {
12
+ "retryable": { "type": "boolean" },
13
+ "retry_after_ms": { "type": "integer", "minimum": 0 },
14
+ "detail": { "type": "string" }
15
+ },
16
+ "required": ["retryable"],
17
+ "additionalProperties": true
18
+ }
19
+ },
20
+ "required": ["code", "message"],
21
+ "if": { "properties": { "code": { "minimum": -32768, "maximum": -32000 } } },
22
+ "else": { "required": ["data"] },
23
+ "description": "AWP errors (codes 1000-4999) carry data.retryable; JSON-RPC reserved errors (-32768..-32000) MAY omit data (AWP-ERR-001).",
24
+ "x-awp-closed": true
25
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://agentworldprotocol.com/schemas/v0.1/frame-inline.schema.json",
4
+ "title": "obs.frame / cmd.frame params (inline binding, AWP-DAT-004)",
5
+ "description": "The frame header and extension fields as JSON, payload base64-encoded.",
6
+ "type": "object",
7
+ "properties": {
8
+ "channel_id": { "$ref": "common.schema.json#/$defs/channel_id" },
9
+ "seq": { "$ref": "common.schema.json#/$defs/seq" },
10
+ "ts_mono_ns": { "$ref": "common.schema.json#/$defs/ts_mono_ns" },
11
+ "flags": { "type": "integer", "minimum": 0, "maximum": 255, "description": "Bit 0 keyframe, bit 1 end-of-burst, bit 3 resync. Senders set bit 2 (extensions are explicit fields in JSON) and bits 4-7 to 0 and never set resync without keyframe (AWP-DAT-004/005/009); receivers ignore bits 4-7.", "x-awp-lint": { "enum": [0, 1, 2, 3, 9, 11] } },
12
+ "tick": { "$ref": "common.schema.json#/$defs/tick" },
13
+ "ts_sim_ns": { "$ref": "common.schema.json#/$defs/ts_sim_ns" },
14
+ "ts_send_ns": { "$ref": "common.schema.json#/$defs/ts_send_ns", "description": "Required on observation frames in streaming sessions (AWP-OBS-006)." },
15
+ "payload_b64": { "type": "string", "pattern": "^[A-Za-z0-9+/]*={0,2}$" }
16
+ },
17
+ "required": ["channel_id", "seq", "ts_mono_ns", "flags", "payload_b64"],
18
+ "patternProperties": { "^x-[a-z0-9]+\\.": {} },
19
+ "x-awp-closed": true
20
+ }
@@ -0,0 +1,26 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://agentworldprotocol.com/schemas/v0.1/frame-tree.schema.json",
4
+ "title": "Frame tree",
5
+ "description": "Named coordinate frames published in session.ready (AWP-UNI-003).",
6
+ "type": "object",
7
+ "properties": {
8
+ "frames": {
9
+ "type": "array",
10
+ "minItems": 1,
11
+ "items": {
12
+ "type": "object",
13
+ "properties": {
14
+ "id": { "$ref": "common.schema.json#/$defs/identifier" },
15
+ "parent": { "oneOf": [{ "$ref": "common.schema.json#/$defs/identifier" }, { "type": "null" }] },
16
+ "dynamic": { "type": "boolean", "default": false, "description": "Transform is published on awp.tf (AWP-UNI-004)." },
17
+ "transform": { "$ref": "common.schema.json#/$defs/transform" }
18
+ },
19
+ "required": ["id", "parent"],
20
+ "x-awp-closed": true
21
+ }
22
+ }
23
+ },
24
+ "required": ["frames"],
25
+ "x-awp-closed": true
26
+ }
@@ -0,0 +1,40 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://agentworldprotocol.com/schemas/v0.1/obs-report.schema.json",
4
+ "title": "obs.report params (receiver report, AWP-OBS-007)",
5
+ "description": "Agent-side delivery quality, staleness, and decision latency aggregated over the preceding window.",
6
+ "type": "object",
7
+ "properties": {
8
+ "window_ms": { "type": "integer", "minimum": 1, "description": "Measurement window the statistics cover." },
9
+ "sync": {
10
+ "type": "object",
11
+ "description": "Current clock-offset estimate (AWP-CLK-008).",
12
+ "properties": {
13
+ "offset_ns": { "$ref": "common.schema.json#/$defs/i53", "description": "session clock = agent clock + offset_ns." },
14
+ "rtt_ns": { "$ref": "common.schema.json#/$defs/u53", "description": "Round-trip time of the selected sample; the offset error is bounded by rtt_ns / 2." },
15
+ "samples": { "$ref": "common.schema.json#/$defs/u53", "description": "Exchanges completed so far in the session." }
16
+ },
17
+ "required": ["offset_ns", "rtt_ns"],
18
+ "x-awp-closed": true
19
+ },
20
+ "channels": {
21
+ "$ref": "common.schema.json#/$defs/per_channel",
22
+ "description": "Per observation channel that delivered frames in the window.",
23
+ "additionalProperties": {
24
+ "type": "object",
25
+ "properties": {
26
+ "frames": { "$ref": "common.schema.json#/$defs/u53", "description": "Frames received." },
27
+ "gaps": { "$ref": "common.schema.json#/$defs/u53", "description": "Frames missing, by seq." },
28
+ "jitter_ns": { "$ref": "common.schema.json#/$defs/u53", "description": "Mean of |(R_j − R_i) − (S_j − S_i)| over consecutive frames; R is the agent clock at receipt, S is ts_send_ns." },
29
+ "staleness_ns": { "$ref": "common.schema.json#/$defs/latency_stats", "description": "Staleness at receipt: (agent receipt + offset_ns) − ts_mono_ns." }
30
+ },
31
+ "required": ["frames", "gaps"],
32
+ "x-awp-closed": true
33
+ }
34
+ },
35
+ "decision_latency_ns": { "$ref": "common.schema.json#/$defs/latency_stats", "description": "Agent receipt of the basis frame → action.submit transmitted, over submissions in the window." }
36
+ },
37
+ "required": ["window_ms", "sync", "channels"],
38
+ "patternProperties": { "^x-[a-z0-9]+\\.": {} },
39
+ "x-awp-closed": true
40
+ }
@@ -0,0 +1,28 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://agentworldprotocol.com/schemas/v0.1/observation-channel.schema.json",
4
+ "title": "Channel declaration",
5
+ "description": "An entry in world-manifest.observation_channels or world-manifest.command_channels (AWP-DAT-002, AWP-CMD-001).",
6
+ "type": "object",
7
+ "properties": {
8
+ "id": { "$ref": "common.schema.json#/$defs/identifier", "description": "Unique per world. awp.* names are reserved (awp.tf)." },
9
+ "modality": {
10
+ "description": "From the modality registry or x-<vendor>.<name> (AWP-MOD-002).",
11
+ "anyOf": [
12
+ { "type": "string", "enum": ["image/jpeg", "image/raw", "audio/pcm", "text/event+json", "proprio/json", "servo/json", "pointcloud/xyz32", "tensor/raw"] },
13
+ { "$ref": "common.schema.json#/$defs/vendor_key" }
14
+ ]
15
+ },
16
+ "rate_hz": {
17
+ "description": "Nominal push rate; null for per-tick lockstep channels.",
18
+ "oneOf": [{ "type": "number", "exclusiveMinimum": 0 }, { "type": "null" }]
19
+ },
20
+ "loss_class": { "$ref": "common.schema.json#/$defs/loss_class" },
21
+ "keyframe_interval": { "type": "integer", "minimum": 1, "description": "Frames between keyframes when deltas are used (AWP-OBS-004)." },
22
+ "stale_after_ms": { "type": "integer", "minimum": 1, "description": "Age after which frames are stale; drives channel_degraded on reliable channels (AWP-SAF-009). Default 2 × period." },
23
+ "schema": { "type": "object", "description": "Modality-specific parameters (dimensions, sample rates, event schema)." }
24
+ },
25
+ "required": ["id", "modality", "rate_hz", "loss_class", "schema"],
26
+ "patternProperties": { "^x-[a-z0-9]+\\.": {} },
27
+ "additionalProperties": true
28
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://agentworldprotocol.com/schemas/v0.1/ping-result.schema.json",
4
+ "title": "ping result (pong, AWP-CLK-007)",
5
+ "type": "object",
6
+ "properties": {
7
+ "origin_ns": { "$ref": "common.schema.json#/$defs/u53", "description": "Echoed from the ping." },
8
+ "receive_ns": { "$ref": "common.schema.json#/$defs/u53", "description": "Responder's clock when the ping was received." },
9
+ "transmit_ns": { "$ref": "common.schema.json#/$defs/u53", "description": "Responder's clock when this result was transmitted." }
10
+ },
11
+ "required": ["origin_ns", "receive_ns", "transmit_ns"],
12
+ "x-awp-closed": true
13
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://agentworldprotocol.com/schemas/v0.1/ping.schema.json",
4
+ "title": "ping params (heartbeat and clock synchronization, AWP-CLK-007)",
5
+ "type": "object",
6
+ "properties": {
7
+ "origin_ns": { "$ref": "common.schema.json#/$defs/u53", "description": "Sender's clock at transmission: the session clock from the world, the agent clock from the agent." },
8
+ "last_status_seq": { "$ref": "common.schema.json#/$defs/status_seq", "description": "Agent pings in a session: highest status_seq the agent has processed, acknowledging delivery (AWP-CTL-010)." }
9
+ },
10
+ "required": ["origin_ns"],
11
+ "x-awp-closed": true
12
+ }
@@ -0,0 +1,57 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://agentworldprotocol.com/schemas/v0.1/profiles/gui-actions.schema.json",
4
+ "title": "GUI profile action params (AWP-GUI-002)",
5
+ "description": "Normative params_schema for the five required GUI action types. Coordinates are viewport-relative pixels; _px is the documented exception to AWP-UNI-001.",
6
+ "$defs": {
7
+ "point_px": {
8
+ "type": "object",
9
+ "properties": {
10
+ "x_px": { "type": "number", "minimum": 0 },
11
+ "y_px": { "type": "number", "minimum": 0 }
12
+ },
13
+ "required": ["x_px", "y_px"],
14
+ "x-awp-closed": true
15
+ },
16
+ "pointer_move": { "$ref": "#/$defs/point_px" },
17
+ "pointer_click": {
18
+ "type": "object",
19
+ "properties": {
20
+ "x_px": { "type": "number", "minimum": 0 },
21
+ "y_px": { "type": "number", "minimum": 0 },
22
+ "button": { "type": "string", "enum": ["left", "middle", "right"], "default": "left" },
23
+ "clicks": { "type": "integer", "minimum": 1, "maximum": 3, "default": 1 }
24
+ },
25
+ "required": ["x_px", "y_px"],
26
+ "x-awp-closed": true
27
+ },
28
+ "key_input": {
29
+ "type": "object",
30
+ "properties": {
31
+ "text": { "type": "string", "description": "Text to type; mutually exclusive with keys." },
32
+ "keys": { "type": "array", "items": { "type": "string" }, "minItems": 1, "description": "Key chord, e.g. [\"Control\", \"a\"]." }
33
+ },
34
+ "oneOf": [{ "required": ["text"] }, { "required": ["keys"] }],
35
+ "x-awp-closed": true
36
+ },
37
+ "scroll": {
38
+ "type": "object",
39
+ "properties": {
40
+ "x_px": { "type": "number", "minimum": 0 },
41
+ "y_px": { "type": "number", "minimum": 0 },
42
+ "dx_px": { "type": "number" },
43
+ "dy_px": { "type": "number" }
44
+ },
45
+ "required": ["dx_px", "dy_px"],
46
+ "x-awp-closed": true
47
+ },
48
+ "navigate": {
49
+ "type": "object",
50
+ "properties": {
51
+ "url": { "type": "string", "format": "uri" }
52
+ },
53
+ "required": ["url"],
54
+ "x-awp-closed": true
55
+ }
56
+ }
57
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://agentworldprotocol.com/schemas/v0.1/reset-result.schema.json",
4
+ "title": "world.restore / world.reset result (AWP-PRM-006)",
5
+ "type": "object",
6
+ "properties": {
7
+ "tick": {"$ref": "common.schema.json#/$defs/tick", "description": "Present in lockstep sessions."}
8
+ },
9
+ "required": [],
10
+ "x-awp-closed": true
11
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://agentworldprotocol.com/schemas/v0.1/reset.schema.json",
4
+ "title": "world.reset params (AWP-SIM-001, AWP-PRM-006)",
5
+ "type": "object",
6
+ "properties": {
7
+ "initial_state": {"$ref": "common.schema.json#/$defs/identifier", "description": "Default: the manifest's first initial_states entry."},
8
+ "seed": {"$ref": "common.schema.json#/$defs/u53", "description": "Requires capabilities.seed."}
9
+ },
10
+ "required": [],
11
+ "x-awp-closed": true
12
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://agentworldprotocol.com/schemas/v0.1/restore.schema.json",
4
+ "title": "world.restore params (AWP-REP-002, AWP-PRM-006)",
5
+ "type": "object",
6
+ "properties": {
7
+ "snapshot_token": {"type": "string", "minLength": 8}
8
+ },
9
+ "required": ["snapshot_token"],
10
+ "x-awp-closed": true
11
+ }
@@ -0,0 +1,81 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://agentworldprotocol.com/schemas/v0.1/safety-policy.schema.json",
4
+ "title": "Safety policy",
5
+ "description": "world-manifest.safety_policy (spec/safety/envelopes, approval, safe-state, audit-log).",
6
+ "type": "object",
7
+ "properties": {
8
+ "envelopes": {
9
+ "type": "array",
10
+ "items": { "$ref": "#/$defs/envelope" }
11
+ },
12
+ "safe_state": {
13
+ "type": "object",
14
+ "description": "Watchdog and safe-state behavior (AWP-SAF-003). Required when the world offers streaming.",
15
+ "properties": {
16
+ "behavior": {
17
+ "anyOf": [
18
+ { "type": "string", "enum": ["hold", "safe_stop", "park"] },
19
+ { "$ref": "common.schema.json#/$defs/vendor_key" }
20
+ ]
21
+ },
22
+ "watchdog_ms": { "type": "integer", "minimum": 1, "description": "Time since the last agent control message before safe state is entered. MUST be ≤ reconnect_window_ms." }
23
+ },
24
+ "required": ["behavior", "watchdog_ms"],
25
+ "x-awp-closed": true
26
+ },
27
+ "max_basis_age_ms": { "type": "integer", "minimum": 1, "description": "Maximum age of an intent's basis observation when execution begins (AWP-SAF-013). Required by the robotics profile (AWP-ROB-005)." },
28
+ "approval_timeout_ms": { "type": "integer", "minimum": 1, "default": 60000, "description": "AWP-APR-003." },
29
+ "approval_channel": { "type": "string", "description": "Where approval requests are routed (deployment-defined)." },
30
+ "audit": {
31
+ "type": "object",
32
+ "properties": {
33
+ "redact_paths": {
34
+ "type": "array",
35
+ "items": { "type": "string", "pattern": "^/" },
36
+ "description": "JSON pointers (relative to params or result) redacted in the audit log (AWP-AUD-006)."
37
+ }
38
+ },
39
+ "x-awp-closed": true
40
+ }
41
+ },
42
+ "required": ["envelopes"],
43
+ "patternProperties": { "^x-[a-z0-9]+\\.": {} },
44
+ "additionalProperties": true,
45
+ "$defs": {
46
+ "envelope": {
47
+ "type": "object",
48
+ "properties": {
49
+ "embodiment": { "$ref": "common.schema.json#/$defs/identifier" },
50
+ "spatial": {
51
+ "type": "object",
52
+ "properties": {
53
+ "frame": { "$ref": "common.schema.json#/$defs/identifier" },
54
+ "aabb_m": {
55
+ "type": "array",
56
+ "items": { "$ref": "common.schema.json#/$defs/vec3_m" },
57
+ "minItems": 2,
58
+ "maxItems": 2,
59
+ "description": "[min, max] corners."
60
+ }
61
+ },
62
+ "required": ["frame", "aabb_m"],
63
+ "x-awp-closed": true
64
+ },
65
+ "max_velocity_mps": { "type": "number", "exclusiveMinimum": 0 },
66
+ "max_force_n": { "type": "number", "exclusiveMinimum": 0, "description": "Declare only if the world can measure force (AWP-ROB-002)." },
67
+ "max_action_rate_hz": { "type": "number", "exclusiveMinimum": 0 },
68
+ "enforcement": {
69
+ "type": "string",
70
+ "enum": ["command_check", "measured", "both"],
71
+ "default": "command_check",
72
+ "description": "command_check: requested commands are clamped/rejected; measured: executed motion is monitored; both (AWP-ENV-005)."
73
+ },
74
+ "on_violation": { "type": "string", "enum": ["clamp", "reject"] }
75
+ },
76
+ "required": ["embodiment", "on_violation"],
77
+ "patternProperties": { "^x-[a-z0-9]+\\.": {} },
78
+ "additionalProperties": true
79
+ }
80
+ }
81
+ }
@@ -0,0 +1,41 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://agentworldprotocol.com/schemas/v0.1/session-open.schema.json",
4
+ "title": "session.open params",
5
+ "type": "object",
6
+ "properties": {
7
+ "embodiment": { "$ref": "common.schema.json#/$defs/identifier", "description": "Omit for an observer session (AWP-EMB-004)." },
8
+ "embodiments": {
9
+ "type": "array",
10
+ "items": { "$ref": "common.schema.json#/$defs/identifier" },
11
+ "minItems": 2,
12
+ "uniqueItems": true,
13
+ "description": "Bind several embodiments of one multi_bind_group (AWP-EMB-005). Mutually exclusive with embodiment."
14
+ },
15
+ "mode": { "$ref": "common.schema.json#/$defs/time_model" },
16
+ "subscribe": {
17
+ "type": "array",
18
+ "items": {
19
+ "type": "object",
20
+ "properties": {
21
+ "channel": { "$ref": "common.schema.json#/$defs/identifier" },
22
+ "rate_hz": { "type": "number", "exclusiveMinimum": 0 }
23
+ },
24
+ "required": ["channel"],
25
+ "x-awp-closed": true
26
+ }
27
+ },
28
+ "action_types": { "type": "array", "items": { "$ref": "common.schema.json#/$defs/identifier" }, "uniqueItems": true },
29
+ "admin": { "type": "array", "items": { "$ref": "common.schema.json#/$defs/admin_operation" }, "uniqueItems": true, "description": "Requested administrative operations (AWP-PRM-005)." },
30
+ "seed": { "$ref": "common.schema.json#/$defs/u53" },
31
+ "takeover": { "type": "boolean" },
32
+ "transfer_token": { "type": "string", "minLength": 1 },
33
+ "task": { "$ref": "common.schema.json#/$defs/task" },
34
+ "extensions": { "$ref": "common.schema.json#/$defs/extensions" }
35
+ },
36
+ "required": ["mode"],
37
+ "not": { "required": ["embodiment", "embodiments"] },
38
+ "dependentRequired": { "takeover": ["transfer_token"] },
39
+ "patternProperties": { "^x-[a-z0-9]+\\.": {} },
40
+ "additionalProperties": true
41
+ }
@@ -0,0 +1,50 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://agentworldprotocol.com/schemas/v0.1/session-ready.schema.json",
4
+ "title": "session.ready (result of session.open and session.resume)",
5
+ "type": "object",
6
+ "properties": {
7
+ "session_id": { "$ref": "common.schema.json#/$defs/session_id" },
8
+ "session_token": { "type": "string", "minLength": 16, "description": "Credential; redacted in the audit log (AWP-SEC-003, AWP-AUD-006)." },
9
+ "reconnect_window_ms": { "type": "integer", "minimum": 0, "default": 30000 },
10
+ "replay_to_status_seq": { "$ref": "common.schema.json#/$defs/status_seq", "description": "session.resume result only: the highest status_seq assigned before resumption. Replay ends with this notification; later ones are live (AWP-CTL-008)." },
11
+ "heartbeat_interval_ms": { "type": "integer", "minimum": 100, "default": 5000, "description": "AWP-SAF-001." },
12
+ "granted": {
13
+ "type": "object",
14
+ "properties": {
15
+ "channels": { "type": "array", "items": { "$ref": "common.schema.json#/$defs/channel_grant" } },
16
+ "action_types": { "type": "array", "items": { "$ref": "common.schema.json#/$defs/identifier" }, "uniqueItems": true },
17
+ "admin": { "type": "array", "items": { "$ref": "common.schema.json#/$defs/admin_operation" }, "uniqueItems": true, "default": [] },
18
+ "envelopes": { "type": "array", "items": { "$ref": "safety-policy.schema.json#/$defs/envelope" } },
19
+ "expires_at": { "$ref": "common.schema.json#/$defs/ts_mono_ns", "description": "Grant expiry (AWP-PRM-003)." }
20
+ },
21
+ "required": ["channels", "action_types", "envelopes"],
22
+ "x-awp-closed": true
23
+ },
24
+ "stream_endpoints": {
25
+ "type": "array",
26
+ "minItems": 1,
27
+ "items": {
28
+ "type": "object",
29
+ "properties": {
30
+ "binding": { "type": "string", "enum": ["inline", "ws", "grpc", "webrtc", "webtransport", "shm"], "description": "Stream binding (AWP-TRN-003)." },
31
+ "url": { "type": "string" },
32
+ "signaling": { "type": "string" },
33
+ "channels": { "type": "array", "items": { "$ref": "common.schema.json#/$defs/channel_id" }, "description": "Channels this endpoint carries; when omitted, every channel of the session, including channels subscribed later (AWP-TRN-012)." },
34
+ "max_frame_bytes": { "type": "integer", "minimum": 1024, "default": 16777216, "description": "Largest frame this endpoint carries (AWP-TRN-011)." }
35
+ },
36
+ "required": ["binding"],
37
+ "additionalProperties": true
38
+ },
39
+ "contains": { "properties": { "binding": { "const": "inline" } } }
40
+ },
41
+ "frame_tree": { "$ref": "frame-tree.schema.json" },
42
+ "clock_anchor": { "type": "string", "format": "date-time", "description": "Wall time at monotonic 0 (AWP-CLK-002)." },
43
+ "tick": { "$ref": "common.schema.json#/$defs/tick", "description": "Current tick; present in lockstep sessions (AWP-TIM-009)." },
44
+ "safe_state": { "type": "boolean", "description": "On session.resume: whether the embodiment is in safe state (AWP-SAF-008)." },
45
+ "extensions": { "$ref": "common.schema.json#/$defs/extensions" }
46
+ },
47
+ "required": ["session_id", "session_token", "reconnect_window_ms", "heartbeat_interval_ms", "granted", "stream_endpoints"],
48
+ "patternProperties": { "^x-[a-z0-9]+\\.": {} },
49
+ "additionalProperties": true
50
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://agentworldprotocol.com/schemas/v0.1/session-resume.schema.json",
4
+ "title": "session.resume params",
5
+ "type": "object",
6
+ "properties": {
7
+ "session_token": { "type": "string", "minLength": 1 },
8
+ "last_status_seq": { "$ref": "common.schema.json#/$defs/status_seq", "description": "Highest status_seq processed; 0 if none (AWP-CTL-008)." }
9
+ },
10
+ "required": ["session_token", "last_status_seq"],
11
+ "x-awp-closed": true
12
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://agentworldprotocol.com/schemas/v0.1/session-state.schema.json",
4
+ "title": "session.state params (AWP-SES-007)",
5
+ "type": "object",
6
+ "properties": {
7
+ "state": {"$ref": "common.schema.json#/$defs/session_state"},
8
+ "status_seq": {"$ref": "common.schema.json#/$defs/status_seq"},
9
+ "ts_mono_ns": {"$ref": "common.schema.json#/$defs/ts_mono_ns"},
10
+ "reason": {"type": "string", "enum": ["opened", "first_activity", "connection_lost", "resumed", "session_closed", "window_expired", "world_shutdown", "transferred", "connection_replaced"], "description": "Cause of the transition."}
11
+ },
12
+ "required": ["state", "status_seq", "ts_mono_ns"],
13
+ "x-awp-closed": true
14
+ }
@@ -0,0 +1,22 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://agentworldprotocol.com/schemas/v0.1/session-telemetry.schema.json",
4
+ "title": "session.telemetry params (AWP-TIM-006)",
5
+ "description": "World-side latency measurements aggregated over the preceding window. Each quantity is present whenever at least one sample fell in the window.",
6
+ "type": "object",
7
+ "properties": {
8
+ "window_ms": { "type": "integer", "minimum": 1, "description": "Measurement window the statistics cover." },
9
+ "observation_latency_ns": { "$ref": "common.schema.json#/$defs/latency_stats", "description": "Pipeline latency, ts_send_ns − ts_mono_ns, over every observation frame sent in the window." },
10
+ "admission_latency_ns": { "$ref": "common.schema.json#/$defs/latency_stats", "description": "Admission acknowledgement transmitted − received_ts_mono_ns, over every action.submit in the window." },
11
+ "observation_to_action_ns": { "$ref": "common.schema.json#/$defs/latency_stats", "description": "received_ts_mono_ns − basis_ts_mono_ns, over every submission in the window that carried a basis." },
12
+ "command_latency_ns": { "$ref": "common.schema.json#/$defs/latency_stats", "description": "World receipt − ts_mono_ns, over every command frame received in the window." },
13
+ "channels": {
14
+ "$ref": "common.schema.json#/$defs/per_channel",
15
+ "description": "Pipeline latency per observation channel, for every channel that sent frames in the window.",
16
+ "additionalProperties": { "$ref": "common.schema.json#/$defs/latency_stats" }
17
+ }
18
+ },
19
+ "required": ["window_ms"],
20
+ "patternProperties": { "^x-[a-z0-9]+\\.": {} },
21
+ "x-awp-closed": true
22
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://agentworldprotocol.com/schemas/v0.1/session-transfer-result.schema.json",
4
+ "title": "session.transfer result",
5
+ "type": "object",
6
+ "properties": {
7
+ "transfer_token": { "type": "string", "minLength": 1, "description": "Single-use credential; redacted in the audit log (AWP-EMB-003, AWP-AUD-006)." },
8
+ "expires_in_ms": { "type": "integer", "minimum": 1 }
9
+ },
10
+ "required": ["transfer_token", "expires_in_ms"],
11
+ "x-awp-closed": true
12
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://agentworldprotocol.com/schemas/v0.1/session-transfer.schema.json",
4
+ "title": "session.transfer params (AWP-EMB-003)",
5
+ "type": "object",
6
+ "properties": {
7
+ "expires_in_ms": {"type": "integer", "minimum": 1000, "default": 30000}
8
+ },
9
+ "required": [],
10
+ "x-awp-closed": true
11
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://agentworldprotocol.com/schemas/v0.1/snapshot-result.schema.json",
4
+ "title": "world.snapshot result (AWP-REP-002)",
5
+ "type": "object",
6
+ "properties": {
7
+ "snapshot_token": {"type": "string", "minLength": 8, "description": "Opaque credential; redacted in the audit log (AWP-AUD-006)."}
8
+ },
9
+ "required": ["snapshot_token"],
10
+ "x-awp-closed": true
11
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://agentworldprotocol.com/schemas/v0.1/subscribe-result.schema.json",
4
+ "title": "obs.subscribe / obs.unsubscribe result (AWP-NEG-004)",
5
+ "type": "object",
6
+ "properties": {
7
+ "granted": {"type": "array", "items": {"$ref": "common.schema.json#/$defs/channel_grant"}, "description": "The session's complete channel grant list after the change."}
8
+ },
9
+ "required": ["granted"],
10
+ "x-awp-closed": true
11
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://agentworldprotocol.com/schemas/v0.1/subscribe.schema.json",
4
+ "title": "obs.subscribe params (AWP-NEG-004)",
5
+ "type": "object",
6
+ "properties": {
7
+ "channels": {"type": "array", "minItems": 1, "items": {"type": "object", "properties": {"channel": {"$ref": "common.schema.json#/$defs/identifier"}, "rate_hz": {"type": "number", "exclusiveMinimum": 0}}, "required": ["channel"], "x-awp-closed": true}}
8
+ },
9
+ "required": ["channels"],
10
+ "x-awp-closed": true
11
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://agentworldprotocol.com/schemas/v0.1/task-update.schema.json",
4
+ "title": "task.update params (AWP-TSK-001..003)",
5
+ "type": "object",
6
+ "properties": {
7
+ "task": { "$ref": "common.schema.json#/$defs/task" }
8
+ },
9
+ "required": ["task"],
10
+ "x-awp-closed": true
11
+ }