Skip to main content

Module schema

Module schema 

Source
Expand description

Schema ID constants for JSON output contracts.

All sysprims JSON outputs include a schema_id field that references the corresponding schema. These constants define the canonical schema URLs.

§Schema Hosting

sysprims schemas are hosted at schemas.3leaps.dev/sysprims/ (not fulmenhq.dev). While sysprims uses rsfulmen for signal/exit code constants from the Fulmen ecosystem, sysprims itself is a 3leaps project aimed at wider community use.

For Crucible/Fulmen schemas consumed via rsfulmen, use rsfulmen’s resolver.

§URI Structure

Follows the Canonical URI Resolution Standard:

https://schemas.3leaps.dev/<module>/<topic>/<version>/<filename>

Where:

  • module = sysprims (source repository)
  • topic = feature area (e.g., timeout, process, signal)
  • version = SemVer (e.g., v1.0.0)
  • filename = schema file with .schema.json suffix

§Validation Strategy

sysprims does NOT perform runtime JSON schema validation (too heavy). Instead:

  • Input validation: serde(deny_unknown_fields) + manual range checks
  • Output validation: goneat CLI in CI pipeline
  • Schema ID verification: Unit tests against SSOT

§Example

use sysprims_core::schema::TIMEOUT_RESULT_V1;
use serde::Serialize;

#[derive(Serialize)]
struct TimeoutResult {
    schema_id: &'static str,
    status: String,
    // ... other fields
}

let result = TimeoutResult {
    schema_id: TIMEOUT_RESULT_V1,
    status: "completed".into(),
};

Constants§

ANCESTORS_RESULT_V1
Schema ID for ancestors result JSON output (v1.0.0).
BATCH_KILL_RESULT_V1
Schema ID for batch kill result JSON output (v1.0.0).
DESCENDANTS_RESULT_SAMPLED_V1
Schema ID for descendants result JSON output with sampled (monitor-style) CPU (v1.1.0).
DESCENDANTS_RESULT_V1
Schema ID for descendants result JSON output (v1.0.0).
FD_FILTER_V1
Schema ID for file descriptor filter input (v1.0.0).
FD_SNAPSHOT_V1
Schema ID for file descriptor snapshot output (v1.0.0).
GUARD_EVENT_V1
Schema ID for guard step event JSON output (v1.0.0).
PORT_BINDINGS_V1
Schema ID for port binding snapshot output (v1.0.0).
PORT_FILTER_V1
Schema ID for port filter input (v1.0.0).
PROCESS_INFO_SAMPLED_V1
Schema ID for process snapshot output with sampled (monitor-style) CPU (v1.1.0).
PROCESS_INFO_V1
Schema ID for process info JSON output (v1.1.0).
PROC_FILTER_V1
Schema ID for process filter input (v1.0.0).
RUN_NOHUP_CONFIG_V1
Schema ID for run-nohup config JSON input (v1.0.0).
RUN_SETSID_CONFIG_V1
Schema ID for run-setsid config JSON input (v1.0.0).
SCHEMA_HOST
Base URL for sysprims schemas.
SCHEMA_MODULE
Module name for sysprims in schema URIs.
SESSION_SPAWN_RESULT_V1
Schema ID for session spawn result JSON output (v1.0.0).
SPAWN_IN_GROUP_CONFIG_V1
Schema ID for spawn-in-group config JSON input (v1.0.0).
SPAWN_IN_GROUP_RESULT_V1
Schema ID for spawn-in-group result JSON output (v1.0.0).
TERMINATE_TREE_CONFIG_V1
Schema ID for terminate-tree config JSON input (v1.0.0).
TERMINATE_TREE_RESULT_V1
Schema ID for terminate-tree result JSON output (v1.0.0).
TIMEOUT_RESULT_V1
Schema ID for timeout result JSON output (v1.0.0).
TIMEOUT_RESULT_V1_1
Schema ID for timeout result JSON output with unproven reliability (v1.1.0).
WAIT_PID_RESULT_V1
Schema ID for wait-pid result JSON output (v1.0.0).