diff --git a/examples/camera-plugin-sdk-compute/Cargo.toml b/examples/camera-plugin-sdk-compute/Cargo.toml index 9c24dc493..6bf01810c 100644 --- a/examples/camera-plugin-sdk-compute/Cargo.toml +++ b/examples/camera-plugin-sdk-compute/Cargo.toml @@ -35,7 +35,6 @@ streamlib = { version = "0.16.0" } streamlib-plugin-sdk = { version = "0.16.0" } streamlib-macros = { version = "0.16.0" } streamlib-plugin-abi = { version = "0.16.0" } -streamlib-jtd-codegen = { version = "0.16.0" } tracing = { version = "0.1.41", features = ["release_max_level_debug"] } serde = { version = "1.0", features = ["derive"] } serde_json = { version = "1.0", features = ["preserve_order"] } diff --git a/examples/camera-plugin-sdk-compute/plugin/Cargo.toml b/examples/camera-plugin-sdk-compute/plugin/Cargo.toml index f5b82180f..9f096c0ce 100644 --- a/examples/camera-plugin-sdk-compute/plugin/Cargo.toml +++ b/examples/camera-plugin-sdk-compute/plugin/Cargo.toml @@ -26,8 +26,6 @@ publish = false path = "_generated_rust_crate_root_/lib.rs" crate-type = ["rlib", "cdylib"] -[build-dependencies] -streamlib-jtd-codegen = { workspace = true } [dependencies] # Engine-free authoring SDK — the whole point of this example. NO `streamlib` diff --git a/examples/camera-plugin-sdk-compute/plugin/build.rs b/examples/camera-plugin-sdk-compute/plugin/build.rs deleted file mode 100644 index 0642f5c1c..000000000 --- a/examples/camera-plugin-sdk-compute/plugin/build.rs +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) 2025 Jonathan Fontanez -// SPDX-License-Identifier: BUSL-1.1 - -#![allow(clippy::disallowed_macros)] // build.rs uses println! for `cargo:` directives - -//! Codegen + Vulkan compute-shader compilation for the engine-free -//! grayscale-compute plugin. -//! -//! `grayscale_compute.rs` embeds the resulting SPIR-V via -//! `include_bytes!(concat!(env!("OUT_DIR"), "/grayscale.comp.spv"))` and -//! hands it to `GpuContextFullAccess::create_compute_kernel` — no raw -//! `HostVulkanDevice`, so the plugin stays cdylib-safe as a -//! separately-built `.slpkg`. - -fn main() { - streamlib_jtd_codegen::build_rs::run_for_rust_crate(); - #[cfg(target_os = "linux")] - compile_shaders(); -} - -#[cfg(target_os = "linux")] -fn compile_shaders() { - use std::path::{Path, PathBuf}; - use std::process::Command; - - let shaders: &[(&str, &str, &str)] = &[("shaders/grayscale.comp", "grayscale.comp.spv", "compute")]; - - let out_dir = std::env::var("OUT_DIR").expect("OUT_DIR not set"); - - for (src, dst, stage) in shaders { - let src_path = Path::new(src); - let dst_path: PathBuf = Path::new(&out_dir).join(dst); - - println!("cargo:rerun-if-changed={}", src); - - let glslc = std::env::var("GLSLC").unwrap_or_else(|_| "glslc".to_string()); - let status = Command::new(&glslc) - .arg(format!("-fshader-stage={stage}")) - .arg("-O") - .arg(src_path) - .arg("-o") - .arg(&dst_path) - .status() - .unwrap_or_else(|e| { - panic!( - "Failed to invoke `{}` to compile {}: {}. Install shaderc-tools / vulkan-tools.", - glslc, src, e - ); - }); - assert!( - status.success(), - "{} compilation failed (exit: {:?})", - src, - status.code() - ); - } -} diff --git a/examples/camera-plugin-sdk-compute/plugin/streamlib.yaml b/examples/camera-plugin-sdk-compute/plugin/streamlib.yaml deleted file mode 100644 index 7eaf8c235..000000000 --- a/examples/camera-plugin-sdk-compute/plugin/streamlib.yaml +++ /dev/null @@ -1,32 +0,0 @@ -# yaml-language-server: $schema=../../../schemas/streamlib.schema.json -package: - org: tatolab - name: camera-plugin-sdk-compute - version: 0.1.0 - description: "Engine-free grayscale compute effect (streamlib-plugin-sdk only)" - -dependencies: - "@tatolab/core": "^1.0.0" - -schemas: - # Wire types imported from @tatolab/core. - ColorInfo: - package: "@tatolab/core" - ContentLight: - package: "@tatolab/core" - MasteringDisplay: - package: "@tatolab/core" - VideoFrame: - package: "@tatolab/core" - -processors: - - name: GrayscaleCompute - description: "Grayscale video effect via an engine-free SPIR-V compute kernel" - runtime: rust - execution: reactive - inputs: - - name: video_in - schema: VideoFrame - outputs: - - name: video_out - schema: VideoFrame diff --git a/examples/camera-python-display/Cargo.toml b/examples/camera-python-display/Cargo.toml index 273af2d22..a2b0eed88 100644 --- a/examples/camera-python-display/Cargo.toml +++ b/examples/camera-python-display/Cargo.toml @@ -44,7 +44,6 @@ streamlib = { version = "0.16.0" } # Engine-free authoring SDK chain — used by the `effects` plugin cdylib. streamlib-plugin-sdk = { version = "0.16.0" } streamlib-macros = { version = "0.16.0" } -streamlib-jtd-codegen = { version = "0.16.0" } streamlib-plugin-abi = { version = "0.16.0" } streamlib-adapter-abi = { version = "0.16.0" } streamlib-consumer-rhi = { version = "0.16.0" } diff --git a/examples/camera-python-display/effects/Cargo.toml b/examples/camera-python-display/effects/Cargo.toml index 64af65d05..6471cfc2c 100644 --- a/examples/camera-python-display/effects/Cargo.toml +++ b/examples/camera-python-display/effects/Cargo.toml @@ -25,8 +25,6 @@ publish = false path = "_generated_rust_crate_root_/lib.rs" crate-type = ["rlib", "cdylib"] -[build-dependencies] -streamlib-jtd-codegen = { workspace = true } [dependencies] # Engine-free authoring SDK — the whole point of this example. NO `streamlib` diff --git a/examples/camera-python-display/effects/build.rs b/examples/camera-python-display/effects/build.rs deleted file mode 100644 index 7a26ddd39..000000000 --- a/examples/camera-python-display/effects/build.rs +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) 2025 Jonathan Fontanez -// SPDX-License-Identifier: BUSL-1.1 - -#![allow(clippy::disallowed_macros)] // build.rs uses println! for `cargo:` directives - -//! Codegen + Vulkan shader compilation for the camera-python-display -//! effects package. -//! -//! The two graphics-kernel wrappers (`blending_compositor.rs`, -//! `crt_film_grain.rs`) and the sandboxed tone-mapper (`tone_mapper.rs`) -//! are sandboxed scenario content for the camera-python-display demo. -//! Each rides the engine-free plugin SDK's cdylib-safe FullAccess / -//! Limited primitives (`create_graphics_kernel` / `create_compute_kernel` -//! / `create_command_recorder` / `offscreen_render`), so this crate links -//! ONLY `streamlib-plugin-sdk` — no `streamlib` facade, no `vulkanalia` -//! dep, no boundary allowlist exception. -//! -//! `lib.rs` embeds the resulting SPIR-V via -//! `include_bytes!(concat!(env!("OUT_DIR"), …))`. - -fn main() { - streamlib_jtd_codegen::build_rs::run_for_rust_crate(); - #[cfg(target_os = "linux")] - compile_shaders(); -} - -#[cfg(target_os = "linux")] -fn compile_shaders() { - use std::path::{Path, PathBuf}; - use std::process::Command; - - // `(source, out_name, glslc_stage)`. The tone-mapper compute shader - // `#include`s `color_convert_common.glsl` (also copied example-local), - // resolved via the `-I shaders` include dir below. - let shaders: &[(&str, &str, &str)] = &[ - ( - "shaders/blending_compositor.vert", - "blending_compositor.vert.spv", - "vertex", - ), - ( - "shaders/blending_compositor.frag", - "blending_compositor.frag.spv", - "fragment", - ), - ( - "shaders/crt_film_grain.vert", - "crt_film_grain.vert.spv", - "vertex", - ), - ( - "shaders/crt_film_grain.frag", - "crt_film_grain.frag.spv", - "fragment", - ), - ("shaders/tone_curve.comp", "tone_curve.comp.spv", "compute"), - ]; - - // Include dir for `#include "color_convert_common.glsl"` in the - // tone-mapper compute shader. Harmless for the graphics stages (they - // include nothing). Rerun the build when the shared header changes. - let shader_include_dir = "shaders"; - println!( - "cargo:rerun-if-changed={}/color_convert_common.glsl", - shader_include_dir - ); - - let out_dir = std::env::var("OUT_DIR").expect("OUT_DIR not set"); - - for (src, dst, stage) in shaders { - let src_path = Path::new(src); - let dst_path: PathBuf = Path::new(&out_dir).join(dst); - - println!("cargo:rerun-if-changed={}", src); - - let glslc = std::env::var("GLSLC").unwrap_or_else(|_| "glslc".to_string()); - let status = Command::new(&glslc) - .arg(format!("-fshader-stage={stage}")) - .arg("-O") - .arg("-I") - .arg(shader_include_dir) - .arg(src_path) - .arg("-o") - .arg(&dst_path) - .status() - .unwrap_or_else(|e| { - panic!( - "Failed to invoke `{}` to compile {}: {}. Install shaderc-tools / vulkan-tools.", - glslc, src, e - ); - }); - assert!( - status.success(), - "{} compilation failed (exit: {:?})", - src, - status.code() - ); - } -} diff --git a/examples/camera-python-display/effects/streamlib.yaml b/examples/camera-python-display/effects/streamlib.yaml deleted file mode 100644 index cf45e3615..000000000 --- a/examples/camera-python-display/effects/streamlib.yaml +++ /dev/null @@ -1,75 +0,0 @@ -# yaml-language-server: $schema=../../../schemas/streamlib.schema.json -# -# Sibling Rust-impl package carrying camera-python-display's -# Rust-backed effect processors (CrtFilmGrain + BlendingCompositor) -# and the schemas they read/write. The runner loads this package via -# `runtime.add_module_with(..., Strategy::Path)` -# pointed at this directory; the cdylib's `STREAMLIB_PLUGIN` callback -# registers both processors with the host registry. - -package: - org: tatolab - name: camera-python-display-effects - version: 0.1.0 - description: "Camera + Python + Display example — Rust-backed CRT/film-grain + blending compositor processors" - -dependencies: - "@tatolab/core": "^1.0.0" - -# Dev-time path override; `streamlib pkg publish` rejects this (#717). -patch: - "@tatolab/core": - path: ../../../packages/core - -schemas: - # Wire types imported from @tatolab/core. - ColorInfo: - package: "@tatolab/core" - ContentLight: - package: "@tatolab/core" - MasteringDisplay: - package: "@tatolab/core" - VideoFrame: - package: "@tatolab/core" - -processors: - - name: CrtFilmGrain - description: "CRT display + 80s film grain effect" - execution: reactive - runtime: - options: - unsafe_send: true - inputs: - - name: video_in - schema: VideoFrame - description: "Video frames to process" - outputs: - - name: video_out - schema: VideoFrame - description: "Processed video frames" - - - name: BlendingCompositor - description: "Multi-layer alpha blending compositor with PiP support" - execution: manual - scheduling: - priority: realtime - runtime: - options: - unsafe_send: true - inputs: - - name: video_in - schema: VideoFrame - description: "Video frames (base layer)" - - name: lower_third_in - schema: VideoFrame - description: "Lower third overlay (RGBA with transparency)" - - name: watermark_in - schema: VideoFrame - description: "Watermark overlay (RGBA with transparency)" - - name: pip_in - schema: VideoFrame - description: "PiP overlay (avatar character with transparent background)" - outputs: - - name: video_out - schema: VideoFrame - description: "Composited video frames" diff --git a/examples/camera-python-display/python/streamlib.yaml b/examples/camera-python-display/python/streamlib.yaml deleted file mode 100644 index ed8c99432..000000000 --- a/examples/camera-python-display/python/streamlib.yaml +++ /dev/null @@ -1,79 +0,0 @@ -# yaml-language-server: $schema=../../../schemas/streamlib.schema.json -package: - org: tatolab - name: cyberpunk-processor - version: "0.1.0" - description: "Cyberpunk video overlay processors using isolated subprocess architecture" - -dependencies: - "@tatolab/core": "^1.0.0" - -schemas: - # Wire types imported from @tatolab/core (#767). - ColorInfo: - package: "@tatolab/core" - ContentLight: - package: "@tatolab/core" - MasteringDisplay: - package: "@tatolab/core" - VideoFrame: - package: "@tatolab/core" - -processors: - - name: AvatarCharacter - description: "MediaPipe pose detection + stylized 3D character as PiP overlay" - runtime: python - execution: reactive - entrypoint: "processors.avatar_character:AvatarCharacter" - inputs: - - name: video_in - schema: VideoFrame - outputs: - - name: video_out - schema: VideoFrame - - - name: CyberpunkLowerThird - description: "Cyberpunk animated lower third overlay — continuous RGBA generator" - runtime: python - execution: - type: continuous - interval_ms: 16 - entrypoint: "processors.cyberpunk_lower_third:CyberpunkLowerThird" - outputs: - - name: video_out - schema: VideoFrame - - - name: CyberpunkWatermark - description: "Spray paint style watermark overlay — continuous RGBA generator" - runtime: python - execution: - type: continuous - interval_ms: 16 - entrypoint: "processors.cyberpunk_watermark:CyberpunkWatermark" - outputs: - - name: video_out - schema: VideoFrame - - - name: CyberpunkGlitch - description: "Glitch post-processing — RGB separation, scanlines, slice displacement" - runtime: python - execution: reactive - entrypoint: "processors.cyberpunk_glitch:CyberpunkGlitch" - inputs: - - name: video_in - schema: VideoFrame - outputs: - - name: video_out - schema: VideoFrame - - - name: CyberpunkProcessor - description: "Cyberpunk overlay with Skia GPU rendering — reference @processor adopter" - runtime: python - execution: reactive - entrypoint: "processors.cyberpunk_processor:CyberpunkProcessor" - inputs: - - name: video_in - schema: VideoFrame - outputs: - - name: video_out - schema: VideoFrame diff --git a/examples/camera-python-subprocess/python/streamlib.yaml b/examples/camera-python-subprocess/python/streamlib.yaml deleted file mode 100644 index 4bebb9c6a..000000000 --- a/examples/camera-python-subprocess/python/streamlib.yaml +++ /dev/null @@ -1,33 +0,0 @@ -# yaml-language-server: $schema=../../../schemas/streamlib.schema.json -package: - org: tatolab - name: camera-python-subprocess - version: "0.1.0" - description: "Grayscale processor — converts video frames to grayscale via Python subprocess" - -dependencies: - "@tatolab/core": "^1.0.0" - -schemas: - # Wire types imported from @tatolab/core (#767). - ColorInfo: - package: "@tatolab/core" - ContentLight: - package: "@tatolab/core" - MasteringDisplay: - package: "@tatolab/core" - VideoFrame: - package: "@tatolab/core" - -processors: - - name: Grayscale - description: "Grayscale processor — converts video frames to grayscale via Python subprocess" - runtime: python - execution: reactive - entrypoint: "processors.grayscale_processor:GrayscaleProcessor" - inputs: - - name: video_in - schema: VideoFrame - outputs: - - name: video_out - schema: VideoFrame diff --git a/examples/camera-rust-plugin/Cargo.toml b/examples/camera-rust-plugin/Cargo.toml index 9535b7851..4a517928f 100644 --- a/examples/camera-rust-plugin/Cargo.toml +++ b/examples/camera-rust-plugin/Cargo.toml @@ -34,7 +34,6 @@ streamlib = { version = "0.16.0" } # Engine-free authoring SDK chain — used by the plugin cdylib. streamlib-plugin-sdk = { version = "0.16.0" } streamlib-macros = { version = "0.16.0" } -streamlib-jtd-codegen = { version = "0.16.0" } streamlib-plugin-abi = { version = "0.16.0" } tracing = { version = "0.1.41", features = ["release_max_level_debug"] } serde = { version = "1.0", features = ["derive"] } diff --git a/examples/camera-rust-plugin/plugin/Cargo.toml b/examples/camera-rust-plugin/plugin/Cargo.toml index e04c0a6aa..b5ac22b96 100644 --- a/examples/camera-rust-plugin/plugin/Cargo.toml +++ b/examples/camera-rust-plugin/plugin/Cargo.toml @@ -20,8 +20,6 @@ publish = false path = "_generated_rust_crate_root_/lib.rs" crate-type = ["rlib", "cdylib"] -[build-dependencies] -streamlib-jtd-codegen = { workspace = true } [dependencies] streamlib-plugin-sdk = { workspace = true } diff --git a/examples/camera-rust-plugin/plugin/build.rs b/examples/camera-rust-plugin/plugin/build.rs deleted file mode 100644 index e13bf9648..000000000 --- a/examples/camera-rust-plugin/plugin/build.rs +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) 2025 Jonathan Fontanez -// SPDX-License-Identifier: BUSL-1.1 - -#![allow(clippy::disallowed_macros)] // build.rs uses println! for `cargo:` directives - -//! Codegen + Vulkan shader compilation for the grayscale plugin. -//! -//! The Linux grayscale processor drives its dispatch through the engine -//! RHI's cdylib-safe `VulkanGraphicsKernel::offscreen_render` + -//! `RhiCommandRecorder` surfaces, so this crate stays inside the -//! boundary-check rule — no `vulkanalia` dep, no allowlist exception. -//! `grayscale_kernel.rs` embeds the resulting SPIR-V via -//! `include_bytes!(concat!(env!("OUT_DIR"), …))`. - -fn main() { - streamlib_jtd_codegen::build_rs::run_for_rust_crate(); - #[cfg(target_os = "linux")] - compile_shaders(); -} - -#[cfg(target_os = "linux")] -fn compile_shaders() { - use std::path::{Path, PathBuf}; - use std::process::Command; - - let shaders: &[(&str, &str, &str)] = &[ - ("shaders/grayscale.vert", "grayscale.vert.spv", "vertex"), - ("shaders/grayscale.frag", "grayscale.frag.spv", "fragment"), - ]; - - let out_dir = std::env::var("OUT_DIR").expect("OUT_DIR not set"); - - for (src, dst, stage) in shaders { - let src_path = Path::new(src); - let dst_path: PathBuf = Path::new(&out_dir).join(dst); - - println!("cargo:rerun-if-changed={}", src); - - let glslc = std::env::var("GLSLC").unwrap_or_else(|_| "glslc".to_string()); - let status = Command::new(&glslc) - .arg(format!("-fshader-stage={stage}")) - .arg("-O") - .arg(src_path) - .arg("-o") - .arg(&dst_path) - .status() - .unwrap_or_else(|e| { - panic!( - "Failed to invoke `{}` to compile {}: {}. Install shaderc-tools / vulkan-tools.", - glslc, src, e - ); - }); - assert!( - status.success(), - "{} compilation failed (exit: {:?})", - src, - status.code() - ); - } -} diff --git a/examples/camera-rust-plugin/plugin/streamlib.yaml b/examples/camera-rust-plugin/plugin/streamlib.yaml deleted file mode 100644 index 85cfad31c..000000000 --- a/examples/camera-rust-plugin/plugin/streamlib.yaml +++ /dev/null @@ -1,32 +0,0 @@ -# yaml-language-server: $schema=../../../schemas/streamlib.schema.json -package: - org: tatolab - name: camera-rust-plugin - version: 0.1.0 - description: "Grayscale video effect as Rust dylib plugin" - -dependencies: - "@tatolab/core": "^1.0.0" - -schemas: - # Wire types imported from @tatolab/core. - ColorInfo: - package: "@tatolab/core" - ContentLight: - package: "@tatolab/core" - MasteringDisplay: - package: "@tatolab/core" - VideoFrame: - package: "@tatolab/core" - -processors: - - name: GrayscaleRust - description: "Grayscale video effect (Rust dylib plugin)" - runtime: rust - execution: reactive - inputs: - - name: video_in - schema: VideoFrame - outputs: - - name: video_out - schema: VideoFrame diff --git a/examples/cuda-fisheye-detection/python/streamlib.yaml b/examples/cuda-fisheye-detection/python/streamlib.yaml deleted file mode 100644 index 06ab33e01..000000000 --- a/examples/cuda-fisheye-detection/python/streamlib.yaml +++ /dev/null @@ -1,29 +0,0 @@ -# yaml-language-server: $schema=../../../schemas/streamlib.schema.json -package: - org: tatolab - name: cuda-fisheye-python - version: "0.1.0" - description: "Polyglot CUDA texture-interop — Python imports an OPAQUE_FD VkImage as cudaTextureObject_t, undistorts a fisheye warp via cupy.RawKernel hardware bilinear sampling, runs YOLOv8n detection" - -dependencies: - "@tatolab/core": "^1.0.0" - -schemas: - ColorInfo: - package: "@tatolab/core" - ContentLight: - package: "@tatolab/core" - MasteringDisplay: - package: "@tatolab/core" - VideoFrame: - package: "@tatolab/core" - -processors: - - name: CudaFisheyeUndistortion - description: "Acquires the host-pre-registered OPAQUE_FD VkImage as a cudaTextureObject_t, runs a cupy.RawKernel undistortion + YOLOv8n detection, writes annotated PNG" - runtime: python - execution: reactive - entrypoint: "processors.cuda_fisheye.processor:CudaFisheyeUndistortionProcessor" - inputs: - - name: video_in - schema: VideoFrame diff --git a/examples/moq-roundtrip/streamlib.yaml b/examples/moq-roundtrip/streamlib.yaml deleted file mode 100644 index 288e06878..000000000 --- a/examples/moq-roundtrip/streamlib.yaml +++ /dev/null @@ -1,37 +0,0 @@ -# yaml-language-server: $schema=../../schemas/streamlib.schema.json -# Copyright (c) 2025 Jonathan Fontanez -# SPDX-License-Identifier: BUSL-1.1 -# -# moq-roundtrip example. Declares `@tatolab/core` so the runtime -# registers the wire-vocabulary schemas (VideoFrame, EncodedVideoFrame, -# AudioFrame, EncodedAudioFrame) — via the recursive dep walker that -# runs when each `runtime.add_module(...)` in `src/main.rs` follows its -# package's transitive deps. Required so iceoryx2 publishers prime from -# each schema's declared `expected_payload_bytes` hint instead of the -# 64 KiB default — the publisher grows its PowerOfTwo segment for a larger -# first IDR, and the hint just avoids a first-frame regrow. - -package: - org: tatolab - name: moq-roundtrip - version: "0.1.0" - description: "MoQ publish/subscribe roundtrip with H.264 video, Opus audio, and sensor data tracks" - -dependencies: - "@tatolab/core": "^1.0.0" - -schemas: - AudioFrame: - package: "@tatolab/core" - ColorInfo: - package: "@tatolab/core" - ContentLight: - package: "@tatolab/core" - EncodedAudioFrame: - package: "@tatolab/core" - EncodedVideoFrame: - package: "@tatolab/core" - MasteringDisplay: - package: "@tatolab/core" - VideoFrame: - package: "@tatolab/core" diff --git a/examples/vulkan-video-psnr/streamlib.yaml b/examples/vulkan-video-psnr/streamlib.yaml deleted file mode 100644 index 8c07890a1..000000000 --- a/examples/vulkan-video-psnr/streamlib.yaml +++ /dev/null @@ -1,33 +0,0 @@ -# yaml-language-server: $schema=../../schemas/streamlib.schema.json -# Copyright (c) 2025 Jonathan Fontanez -# SPDX-License-Identifier: BUSL-1.1 -# -# vulkan-video-psnr example. Declares `@tatolab/core` so the runtime -# registers the wire-vocabulary schemas (VideoFrame, EncodedVideoFrame, -# …) — via the recursive dep walker that runs when each -# `runtime.add_module(...)` in `src/main.rs` follows its package's -# transitive deps. Required so iceoryx2 publishers prime from each -# schema's declared `expected_payload_bytes` hint instead of the 64 KiB -# default — the publisher grows its PowerOfTwo segment for a larger first -# IDR, and the hint just avoids a first-frame regrow. - -package: - org: tatolab - name: vulkan-video-psnr - version: "0.1.0" - description: "PSNR fixture rig — BgraFileSource → encoder → decoder → display, paired by input-frame index" - -dependencies: - "@tatolab/core": "^1.0.0" - -schemas: - ColorInfo: - package: "@tatolab/core" - ContentLight: - package: "@tatolab/core" - EncodedVideoFrame: - package: "@tatolab/core" - MasteringDisplay: - package: "@tatolab/core" - VideoFrame: - package: "@tatolab/core" diff --git a/examples/vulkan-video-roundtrip-cdylib-camera/streamlib.yaml b/examples/vulkan-video-roundtrip-cdylib-camera/streamlib.yaml deleted file mode 100644 index c3ed0a2fa..000000000 --- a/examples/vulkan-video-roundtrip-cdylib-camera/streamlib.yaml +++ /dev/null @@ -1,34 +0,0 @@ -# yaml-language-server: $schema=../../schemas/streamlib.schema.json -# Copyright (c) 2025 Jonathan Fontanez -# SPDX-License-Identifier: BUSL-1.1 -# -# vulkan-video-roundtrip-cdylib-camera example. Declares `@tatolab/core` -# so the runtime registers the wire-vocabulary schemas (VideoFrame, -# EncodedVideoFrame, …) — via the recursive dep walker that runs when -# each `runtime.add_module(...)` in `src/main.rs` follows its package's -# transitive deps. Required so iceoryx2 publishers prime from each -# schema's declared `expected_payload_bytes` hint instead of the 64 KiB -# default — the publisher grows its PowerOfTwo segment for a larger first -# IDR (which carries SPS+PPS), and the hint just avoids a first-frame -# regrow. - -package: - org: tatolab - name: vulkan-video-roundtrip-cdylib-camera - version: "0.1.0" - description: "Camera → encoder → decoder → display roundtrip with the camera processor loaded via runtime.add_module (cdylib) instead of as a Rust dep. Manual gate that exercises the full cdylib FFI surface end-to-end through encode/decode, validating that the cdylib's per-frame compute kernel + recorder dispatch + pixel-buffer flow matches the baseline non-cdylib variant." - -dependencies: - "@tatolab/core": "^1.0.0" - -schemas: - ColorInfo: - package: "@tatolab/core" - ContentLight: - package: "@tatolab/core" - EncodedVideoFrame: - package: "@tatolab/core" - MasteringDisplay: - package: "@tatolab/core" - VideoFrame: - package: "@tatolab/core" diff --git a/examples/vulkan-video-roundtrip/streamlib.yaml b/examples/vulkan-video-roundtrip/streamlib.yaml deleted file mode 100644 index 7b02a205b..000000000 --- a/examples/vulkan-video-roundtrip/streamlib.yaml +++ /dev/null @@ -1,34 +0,0 @@ -# yaml-language-server: $schema=../../schemas/streamlib.schema.json -# Copyright (c) 2025 Jonathan Fontanez -# SPDX-License-Identifier: BUSL-1.1 -# -# vulkan-video-roundtrip example. Declares `@tatolab/core` so the -# runtime registers the wire-vocabulary schemas (VideoFrame, -# EncodedVideoFrame, …) — via the recursive dep walker that runs when -# each `runtime.add_module(...)` in `src/main.rs` follows its package's -# transitive deps. Required so iceoryx2 publishers prime from each -# schema's declared `expected_payload_bytes` hint instead of the 64 KiB -# default — the publisher grows its PowerOfTwo segment for a larger first -# IDR (which carries SPS+PPS), and the hint just avoids a first-frame -# regrow. - -package: - org: tatolab - name: vulkan-video-roundtrip - version: "0.1.0" - description: "Camera → encoder → decoder → display roundtrip exercising Vulkan Video hardware encode/decode" - -dependencies: - "@tatolab/core": "^1.0.0" - -schemas: - ColorInfo: - package: "@tatolab/core" - ContentLight: - package: "@tatolab/core" - EncodedVideoFrame: - package: "@tatolab/core" - MasteringDisplay: - package: "@tatolab/core" - VideoFrame: - package: "@tatolab/core" diff --git a/examples/webrtc-cloudflare-stream/Cargo.toml b/examples/webrtc-cloudflare-stream/Cargo.toml index 6bde81a13..1f3a8af94 100644 --- a/examples/webrtc-cloudflare-stream/Cargo.toml +++ b/examples/webrtc-cloudflare-stream/Cargo.toml @@ -20,7 +20,6 @@ publish = false [build-dependencies] # The SDK codegen crate is resolved by version (same link-by-checkout dev loop # as the `streamlib` dep below). -streamlib-jtd-codegen = { version = "0.16.0" } [dependencies] # The SDK is resolved by version. `./setup.sh` runs diff --git a/examples/webrtc-cloudflare-stream/build.rs b/examples/webrtc-cloudflare-stream/build.rs deleted file mode 100644 index 0f3236712..000000000 --- a/examples/webrtc-cloudflare-stream/build.rs +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright (c) 2025 Jonathan Fontanez -// SPDX-License-Identifier: BUSL-1.1 - -fn main() { - streamlib_jtd_codegen::build_rs::run_for_rust_crate(); -} diff --git a/examples/webrtc-cloudflare-stream/streamlib.yaml b/examples/webrtc-cloudflare-stream/streamlib.yaml deleted file mode 100644 index 5078ccef3..000000000 --- a/examples/webrtc-cloudflare-stream/streamlib.yaml +++ /dev/null @@ -1,44 +0,0 @@ -# yaml-language-server: $schema=../../schemas/streamlib.schema.json -# Copyright (c) 2025 Jonathan Fontanez -# SPDX-License-Identifier: BUSL-1.1 -package: - org: tatolab - name: webrtc-cloudflare-stream - version: 0.1.0 - description: "WebRTC WHIP publisher example streaming to Cloudflare Stream" - -dependencies: - "@tatolab/core": "^1.0.0" - "@tatolab/audio": "^1.0.0" - "@tatolab/camera": "^1.0.0" - "@tatolab/h264": "^1.0.0" - "@tatolab/opus": "^1.0.0" - "@tatolab/webrtc": "^1.0.0" - -schemas: - AudioFrame: - package: "@tatolab/core" - ColorInfo: - package: "@tatolab/core" - ContentLight: - package: "@tatolab/core" - MasteringDisplay: - package: "@tatolab/core" - VideoFrame: - package: "@tatolab/core" - AudioCaptureConfig: - package: "@tatolab/audio" - AudioResamplerConfig: - package: "@tatolab/audio" - AudioChannelConverterConfig: - package: "@tatolab/audio" - BufferRechunkerConfig: - package: "@tatolab/audio" - CameraConfig: - package: "@tatolab/camera" - H264EncoderConfig: - package: "@tatolab/h264" - OpusEncoderConfig: - package: "@tatolab/opus" - WebrtcWhipConfig: - package: "@tatolab/webrtc" diff --git a/packages/audio/Cargo.toml b/packages/audio/Cargo.toml index 8b01f5f16..92b5b12d7 100644 --- a/packages/audio/Cargo.toml +++ b/packages/audio/Cargo.toml @@ -18,8 +18,6 @@ path = "_generated_rust_crate_root_/lib.rs" name = "streamlib_audio" crate-type = ["rlib", "cdylib"] -[build-dependencies] -streamlib-jtd-codegen = {version = "0.16.0"} [dependencies] # Engine-free authoring SDK (never the `streamlib` facade) — runtime context, processor traits, generated config diff --git a/packages/audio/build.rs b/packages/audio/build.rs deleted file mode 100644 index 0f3236712..000000000 --- a/packages/audio/build.rs +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright (c) 2025 Jonathan Fontanez -// SPDX-License-Identifier: BUSL-1.1 - -fn main() { - streamlib_jtd_codegen::build_rs::run_for_rust_crate(); -} diff --git a/packages/audio/schemas/audio_capture_config.yaml b/packages/audio/schemas/audio_capture_config.yaml deleted file mode 100644 index 4096f1bf0..000000000 --- a/packages/audio/schemas/audio_capture_config.yaml +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright (c) 2025 Jonathan Fontanez -# SPDX-License-Identifier: BUSL-1.1 -# -# JSON Type Definition (RFC 8927) schema for AudioCapture config. - -metadata: - type: AudioCaptureConfig - description: "Configuration for audio capture (CoreAudio on macOS, ALSA on Linux)" - -optionalProperties: - device_id: - metadata: - description: "Audio input device name. If None, uses default device" - type: string diff --git a/packages/audio/schemas/audio_channel_converter_config.yaml b/packages/audio/schemas/audio_channel_converter_config.yaml deleted file mode 100644 index 1ec9b7ded..000000000 --- a/packages/audio/schemas/audio_channel_converter_config.yaml +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright (c) 2025 Jonathan Fontanez -# SPDX-License-Identifier: BUSL-1.1 -# -# JSON Type Definition (RFC 8927) schema for AudioChannelConverter config. - -metadata: - type: AudioChannelConverterConfig - description: "Configuration for mono to N-channel conversion" - -properties: - mode: - metadata: - description: "Channel conversion mode" - enum: - - Duplicate - - LeftOnly - - RightOnly -optionalProperties: - output_channels: - metadata: - description: "Number of output channels (default: 2)" - type: uint8 diff --git a/packages/audio/schemas/audio_mixer_config.yaml b/packages/audio/schemas/audio_mixer_config.yaml deleted file mode 100644 index 41e8e484b..000000000 --- a/packages/audio/schemas/audio_mixer_config.yaml +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright (c) 2025 Jonathan Fontanez -# SPDX-License-Identifier: BUSL-1.1 -# -# JSON Type Definition (RFC 8927) schema for AudioMixer config. - -metadata: - type: AudioMixerConfig - description: "Configuration for mixing two mono signals into stereo" - -properties: - strategy: - metadata: - description: "Mixing strategy for combining signals" - enum: - - Sum - - SumNormalized - - SumClipped diff --git a/packages/audio/schemas/audio_output_config.yaml b/packages/audio/schemas/audio_output_config.yaml deleted file mode 100644 index 116b95011..000000000 --- a/packages/audio/schemas/audio_output_config.yaml +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright (c) 2025 Jonathan Fontanez -# SPDX-License-Identifier: BUSL-1.1 -# -# JSON Type Definition (RFC 8927) schema for AudioOutput config. - -metadata: - type: AudioOutputConfig - description: "Configuration for audio output (CoreAudio on macOS, ALSA on Linux)" - -optionalProperties: - device_id: - metadata: - description: "Audio output device ID. If None, uses default device" - type: string diff --git a/packages/audio/schemas/audio_resampler_config.yaml b/packages/audio/schemas/audio_resampler_config.yaml deleted file mode 100644 index 4f6068902..000000000 --- a/packages/audio/schemas/audio_resampler_config.yaml +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright (c) 2025 Jonathan Fontanez -# SPDX-License-Identifier: BUSL-1.1 -# -# JSON Type Definition (RFC 8927) schema for AudioResampler config. - -metadata: - type: AudioResamplerConfig - description: "Configuration for audio sample rate conversion" - -properties: - source_sample_rate: - metadata: - description: "Source audio sample rate in Hz" - type: uint32 - target_sample_rate: - metadata: - description: "Target audio sample rate in Hz" - type: uint32 - quality: - metadata: - description: "Resampling quality level" - enum: - - High - - Medium - - Low diff --git a/packages/audio/schemas/buffer_rechunker_config.yaml b/packages/audio/schemas/buffer_rechunker_config.yaml deleted file mode 100644 index 55acef193..000000000 --- a/packages/audio/schemas/buffer_rechunker_config.yaml +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright (c) 2025 Jonathan Fontanez -# SPDX-License-Identifier: BUSL-1.1 -# -# JSON Type Definition (RFC 8927) schema for BufferRechunker config. - -metadata: - type: BufferRechunkerConfig - description: "Configuration for rechunking audio buffers to fixed size" - -properties: - target_buffer_size: - metadata: - description: "Target buffer size in samples per channel" - type: uint32 diff --git a/packages/audio/schemas/chord_generator_config.yaml b/packages/audio/schemas/chord_generator_config.yaml deleted file mode 100644 index 22c162ed3..000000000 --- a/packages/audio/schemas/chord_generator_config.yaml +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright (c) 2025 Jonathan Fontanez -# SPDX-License-Identifier: BUSL-1.1 -# -# JSON Type Definition (RFC 8927) schema for ChordGenerator config. - -metadata: - type: ChordGeneratorConfig - description: "Configuration for C major chord generation" - -properties: - amplitude: - metadata: - description: "Output amplitude (0.0 to 1.0)" - type: float64 - sample_rate: - metadata: - description: "Audio sample rate in Hz" - type: uint32 - buffer_size: - metadata: - description: "Output buffer size in samples" - type: uint32 diff --git a/packages/audio/streamlib-codegen.lock b/packages/audio/streamlib-codegen.lock deleted file mode 100644 index 5571de32c..000000000 --- a/packages/audio/streamlib-codegen.lock +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright (c) 2025 Jonathan Fontanez -# SPDX-License-Identifier: BUSL-1.1 -# -# AUTOGENERATED BY `streamlib generate`. DO NOT EDIT BY HAND. -# -# This lockfile pins resolved package versions + content hashes so a fresh -# checkout reconstructs the same generated bindings byte-for-byte. -# Commit it in applications and examples; don't commit it in publishable -# libraries (they inherit their consumer's lock). -version: 1 -packages: - '@tatolab/core': - version: 1.0.0 - source: - kind: path - path: ../core - content_hash: sha256:42929566e77db3311b1bcf576124ee36d5505f1cd1a2e70ccca50ffcba431ec5 diff --git a/packages/audio/streamlib.yaml b/packages/audio/streamlib.yaml deleted file mode 100644 index 57fca9f35..000000000 --- a/packages/audio/streamlib.yaml +++ /dev/null @@ -1,174 +0,0 @@ -# yaml-language-server: $schema=../../schemas/streamlib.schema.json -package: - org: tatolab - name: audio - version: 1.0.0 - description: Audio processors — capture, output, mixer, channel converter, resampler, buffer rechunker, chord generator -dependencies: - '@tatolab/core': - version: ^1.0.0 -schemas: - AudioCaptureConfig: - file: schemas/audio_capture_config.yaml - AudioChannelConverterConfig: - file: schemas/audio_channel_converter_config.yaml - AudioFrame: - package: '@tatolab/core' - AudioMixerConfig: - file: schemas/audio_mixer_config.yaml - AudioOutputConfig: - file: schemas/audio_output_config.yaml - AudioResamplerConfig: - file: schemas/audio_resampler_config.yaml - BufferRechunkerConfig: - file: schemas/buffer_rechunker_config.yaml - ChordGeneratorConfig: - file: schemas/chord_generator_config.yaml -processors: -- name: AudioCapture - description: Captures mono audio from microphones in device-native format (CoreAudio on macOS, ALSA on Linux) - runtime: - language: rust - options: - python_version: null - env: {} - entrypoint: null - execution: manual - scheduling: - priority: realtime - config: - name: config - schema: AudioCaptureConfig - state: [] - inputs: [] - outputs: - - name: audio - schema: AudioFrame - description: Captured mono audio frames in device-native sample rate - delivery_profile: null -- name: AudioOutput - description: Plays audio through speakers/headphones (CoreAudio on macOS, ALSA on Linux) - runtime: - language: rust - options: - python_version: null - env: {} - entrypoint: null - execution: manual - scheduling: - priority: realtime - config: - name: config - schema: AudioOutputConfig - state: [] - inputs: - - name: audio - schema: AudioFrame - description: Stereo audio frame to play through speakers - delivery_profile: null - outputs: [] -- name: AudioMixer - description: Mixes two mono audio signals into a single stereo signal - runtime: rust - entrypoint: null - execution: reactive - scheduling: - priority: realtime - config: - name: config - schema: AudioMixerConfig - state: [] - inputs: - - name: left - schema: AudioFrame - description: Left channel mono audio frame - delivery_profile: null - - name: right - schema: AudioFrame - description: Right channel mono audio frame - delivery_profile: null - outputs: - - name: audio - schema: AudioFrame - description: Mixed stereo audio frame - delivery_profile: null -- name: AudioChannelConverter - description: Converts mono audio to N-channel audio according to the configured mode - runtime: rust - entrypoint: null - execution: reactive - scheduling: - priority: realtime - config: - name: config - schema: AudioChannelConverterConfig - state: [] - inputs: - - name: audio_in - schema: AudioFrame - description: Mono audio frame - delivery_profile: null - outputs: - - name: audio_out - schema: AudioFrame - description: Multi-channel audio frame - delivery_profile: null -- name: AudioResampler - description: Resamples audio between sample rates - runtime: rust - entrypoint: null - execution: reactive - scheduling: - priority: realtime - config: - name: config - schema: AudioResamplerConfig - state: [] - inputs: - - name: audio_in - schema: AudioFrame - description: Audio frame to resample - delivery_profile: null - outputs: - - name: audio_out - schema: AudioFrame - description: Resampled audio frame - delivery_profile: null -- name: BufferRechunker - description: Rechunks audio buffers to a fixed sample count - runtime: rust - entrypoint: null - execution: reactive - scheduling: - priority: realtime - config: - name: config - schema: BufferRechunkerConfig - state: [] - inputs: - - name: audio_in - schema: AudioFrame - description: Variable-size audio frame - delivery_profile: null - outputs: - - name: audio_out - schema: AudioFrame - description: Fixed-size audio frame - delivery_profile: null -- name: ChordGenerator - description: Generates a C major chord (C4 + E4 + G4) driven by the runtime audio clock - runtime: rust - entrypoint: null - execution: manual - scheduling: - priority: realtime - config: - name: config - schema: ChordGeneratorConfig - state: [] - inputs: [] - outputs: - - name: chord - schema: AudioFrame - description: Stereo chord audio frame - delivery_profile: null diff --git a/packages/camera/Cargo.toml b/packages/camera/Cargo.toml index 673691c85..b0fa1d13c 100644 --- a/packages/camera/Cargo.toml +++ b/packages/camera/Cargo.toml @@ -18,8 +18,6 @@ path = "_generated_rust_crate_root_/lib.rs" name = "streamlib_camera" crate-type = ["rlib", "cdylib"] -[build-dependencies] -streamlib-jtd-codegen = {version = "0.16.0"} [dependencies] # Engine-free authoring SDK (never the `streamlib` facade) — capability-typed diff --git a/packages/camera/build.rs b/packages/camera/build.rs deleted file mode 100644 index 0f3236712..000000000 --- a/packages/camera/build.rs +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright (c) 2025 Jonathan Fontanez -// SPDX-License-Identifier: BUSL-1.1 - -fn main() { - streamlib_jtd_codegen::build_rs::run_for_rust_crate(); -} diff --git a/packages/camera/schemas/camera_config.yaml b/packages/camera/schemas/camera_config.yaml deleted file mode 100644 index 80383023b..000000000 --- a/packages/camera/schemas/camera_config.yaml +++ /dev/null @@ -1,30 +0,0 @@ -# Copyright (c) 2025 Jonathan Fontanez -# SPDX-License-Identifier: BUSL-1.1 -# -# JSON Type Definition (RFC 8927) schema for Camera config. - -metadata: - type: CameraConfig - description: "Configuration for camera capture (V4L2 on Linux, AVFoundation on macOS/iOS)" - -optionalProperties: - device_id: - metadata: - description: "Camera device path (V4L2 /dev/videoN) or AVCaptureDevice name. If None, picks the first available capture device." - type: string - min_fps: - metadata: - description: "Minimum frame rate. AVFoundation only; ignored on Linux. Default: 60.0" - type: float64 - max_fps: - metadata: - description: "Maximum frame rate. AVFoundation only; ignored on Linux. Defaults to the main display refresh rate." - type: float64 - max_width: - metadata: - description: "Upper bound on captured frame width in pixels. Caps V4L2 negotiation when the camera advertises a larger resolution (preserves real-time encoding guardrail). Default: 1920." - type: uint32 - max_height: - metadata: - description: "Upper bound on captured frame height in pixels. Caps V4L2 negotiation when the camera advertises a larger resolution (preserves real-time encoding guardrail). Default: 1080." - type: uint32 diff --git a/packages/camera/schemas/camera_to_cuda_copy_config.yaml b/packages/camera/schemas/camera_to_cuda_copy_config.yaml deleted file mode 100644 index f310079f6..000000000 --- a/packages/camera/schemas/camera_to_cuda_copy_config.yaml +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright (c) 2025 Jonathan Fontanez -# SPDX-License-Identifier: BUSL-1.1 -# -# JSON Type Definition (RFC 8927) schema for CameraToCudaCopy config. - -metadata: - type: CameraToCudaCopyConfig - description: "Configuration for CameraToCudaCopy — allocates a DEVICE_LOCAL OPAQUE_FD VkBuffer for cross-API CUDA interop and issues a per-frame vkCmdCopyImageToBuffer + timeline signal. Width and height MUST match the upstream camera processor's ring texture dimensions; mismatched sizes are rejected at the first copy." - -# Width and height are optional in the wire schema (JTD has no -# `default` keyword) but treated as required at the processor layer -# — the consumer applies the 1920×1080 defaults via `.unwrap_or(...)` -# in `setup()` so `ProcessorSpec::new(..., json!({}))` carries empty -# JSON and still works, while `json!({"width": 1280, "height": 720})` -# overrides cleanly. -optionalProperties: - width: - metadata: - description: "Cuda buffer width in pixels. Must match the camera ring texture width. Default: 1920." - type: uint32 - height: - metadata: - description: "Cuda buffer height in pixels. Must match the camera ring texture height. Default: 1080." - type: uint32 diff --git a/packages/camera/streamlib-codegen.lock b/packages/camera/streamlib-codegen.lock deleted file mode 100644 index 5571de32c..000000000 --- a/packages/camera/streamlib-codegen.lock +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright (c) 2025 Jonathan Fontanez -# SPDX-License-Identifier: BUSL-1.1 -# -# AUTOGENERATED BY `streamlib generate`. DO NOT EDIT BY HAND. -# -# This lockfile pins resolved package versions + content hashes so a fresh -# checkout reconstructs the same generated bindings byte-for-byte. -# Commit it in applications and examples; don't commit it in publishable -# libraries (they inherit their consumer's lock). -version: 1 -packages: - '@tatolab/core': - version: 1.0.0 - source: - kind: path - path: ../core - content_hash: sha256:42929566e77db3311b1bcf576124ee36d5505f1cd1a2e70ccca50ffcba431ec5 diff --git a/packages/camera/streamlib.yaml b/packages/camera/streamlib.yaml deleted file mode 100644 index 8168af336..000000000 --- a/packages/camera/streamlib.yaml +++ /dev/null @@ -1,61 +0,0 @@ -# yaml-language-server: $schema=../../schemas/streamlib.schema.json -package: - org: tatolab - name: camera - version: 1.0.0 - description: Camera capture processor — V4L2 on Linux, AVFoundation on macOS/iOS -dependencies: - '@tatolab/core': - version: ^1.0.0 -schemas: - CameraConfig: - file: schemas/camera_config.yaml - CameraToCudaCopyConfig: - file: schemas/camera_to_cuda_copy_config.yaml - ColorInfo: - package: '@tatolab/core' - ContentLight: - package: '@tatolab/core' - MasteringDisplay: - package: '@tatolab/core' - VideoFrame: - package: '@tatolab/core' -processors: -- name: Camera - description: Captures video from cameras (V4L2 on Linux, AVFoundation on macOS/iOS) - runtime: rust - entrypoint: null - execution: manual - scheduling: - priority: high - config: - name: config - schema: CameraConfig - state: [] - inputs: [] - outputs: - - name: video - schema: VideoFrame - description: Live video frames from the camera - delivery_profile: null -- name: CameraToCudaCopy - description: 'Host-pipeline producer: camera VkImage -> cuda OPAQUE_FD VkBuffer with timeline signal for cross-API CUDA interop. The CUDA interop path is Linux-only on the in-tree adapter set, so setup() returns a configuration error elsewhere.' - runtime: rust - entrypoint: null - execution: reactive - scheduling: - priority: high - config: - name: config - schema: CameraToCudaCopyConfig - state: [] - inputs: - - name: video_in - schema: VideoFrame - description: Camera ring texture (RGBA8 DMA-BUF) frame metadata - delivery_profile: null - outputs: - - name: video_out - schema: VideoFrame - description: Camera frame forwarded verbatim; cuda surface side-effect happens during process() - delivery_profile: null diff --git a/packages/clap/Cargo.toml b/packages/clap/Cargo.toml index 47a792f47..f9af774f3 100644 --- a/packages/clap/Cargo.toml +++ b/packages/clap/Cargo.toml @@ -18,8 +18,6 @@ path = "_generated_rust_crate_root_/lib.rs" name = "streamlib_clap" crate-type = ["rlib", "cdylib"] -[build-dependencies] -streamlib-jtd-codegen = {version = "0.16.0"} [dependencies] # Engine-free authoring SDK (never the `streamlib` facade) — runtime context, processor traits, generated wire diff --git a/packages/clap/build.rs b/packages/clap/build.rs deleted file mode 100644 index 0f3236712..000000000 --- a/packages/clap/build.rs +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright (c) 2025 Jonathan Fontanez -// SPDX-License-Identifier: BUSL-1.1 - -fn main() { - streamlib_jtd_codegen::build_rs::run_for_rust_crate(); -} diff --git a/packages/clap/schemas/clap_effect_config.yaml b/packages/clap/schemas/clap_effect_config.yaml deleted file mode 100644 index adc774154..000000000 --- a/packages/clap/schemas/clap_effect_config.yaml +++ /dev/null @@ -1,27 +0,0 @@ -# Copyright (c) 2025 Jonathan Fontanez -# SPDX-License-Identifier: BUSL-1.1 -# -# JSON Type Definition (RFC 8927) schema for ClapEffect config. - -metadata: - type: ClapEffectConfig - description: "Configuration for CLAP audio plugin processing." - -properties: - plugin_path: - metadata: - description: "Path to the CLAP plugin file." - type: string - buffer_size: - metadata: - description: "Processing buffer size in samples." - type: uint32 -optionalProperties: - plugin_name: - metadata: - description: "Name of the plugin to load (if multiple in file)." - type: string - plugin_index: - metadata: - description: "Index of the plugin to load (if multiple in file)." - type: uint32 diff --git a/packages/clap/streamlib-codegen.lock b/packages/clap/streamlib-codegen.lock deleted file mode 100644 index 5571de32c..000000000 --- a/packages/clap/streamlib-codegen.lock +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright (c) 2025 Jonathan Fontanez -# SPDX-License-Identifier: BUSL-1.1 -# -# AUTOGENERATED BY `streamlib generate`. DO NOT EDIT BY HAND. -# -# This lockfile pins resolved package versions + content hashes so a fresh -# checkout reconstructs the same generated bindings byte-for-byte. -# Commit it in applications and examples; don't commit it in publishable -# libraries (they inherit their consumer's lock). -version: 1 -packages: - '@tatolab/core': - version: 1.0.0 - source: - kind: path - path: ../core - content_hash: sha256:42929566e77db3311b1bcf576124ee36d5505f1cd1a2e70ccca50ffcba431ec5 diff --git a/packages/clap/streamlib.yaml b/packages/clap/streamlib.yaml deleted file mode 100644 index 151856a2a..000000000 --- a/packages/clap/streamlib.yaml +++ /dev/null @@ -1,35 +0,0 @@ -# yaml-language-server: $schema=../../schemas/streamlib.schema.json -package: - org: tatolab - name: clap - version: 1.0.0 - description: CLAP audio plugin host processor for streamlib (macOS / iOS) -dependencies: - '@tatolab/core': - version: ^1.0.0 -schemas: - AudioFrame: - package: '@tatolab/core' - ClapEffectConfig: - file: schemas/clap_effect_config.yaml -processors: -- name: ClapEffect - description: CLAP audio plugin processor with parameter control and automation - runtime: rust - entrypoint: null - execution: manual - scheduling: null - config: - name: config - schema: ClapEffectConfig - state: [] - inputs: - - name: audio_in - schema: AudioFrame - description: Stereo audio frame to process through CLAP plugin (2 channels) - delivery_profile: null - outputs: - - name: audio_out - schema: AudioFrame - description: Processed stereo audio frame from CLAP plugin (2 channels) - delivery_profile: null diff --git a/packages/core/schemas/audio_frame.yaml b/packages/core/schemas/audio_frame.yaml deleted file mode 100644 index b3e2fa51c..000000000 --- a/packages/core/schemas/audio_frame.yaml +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright (c) 2025 Jonathan Fontanez -# SPDX-License-Identifier: BUSL-1.1 -# -# JSON Type Definition (RFC 8927) schema for audio frames (1-8 channels). - -metadata: - type: AudioFrame - description: "Audio frame with interleaved samples (1-8 channels)" - -properties: - samples: - metadata: - description: "Interleaved audio samples" - elements: - type: float32 - channels: - metadata: - description: "Number of audio channels (1-8)" - type: uint8 - sample_rate: - metadata: - description: "Sample rate in Hz" - type: uint32 - timestamp_ns: - metadata: - description: "Monotonic timestamp in nanoseconds (int64 as string)" - type: string - frame_index: - metadata: - description: "Sequential frame counter (uint64 as string)" - type: string diff --git a/packages/core/schemas/color_info.yaml b/packages/core/schemas/color_info.yaml deleted file mode 100644 index 2ae52a880..000000000 --- a/packages/core/schemas/color_info.yaml +++ /dev/null @@ -1,103 +0,0 @@ -# Copyright (c) 2025 Jonathan Fontanez -# SPDX-License-Identifier: BUSL-1.1 -# -# JSON Type Definition (RFC 8927) schema for video color information. -# -# Models the four-axis color description used by every modern codec -# bitstream (H.264/H.265 VUI, AV1 OBU color_config), every container -# (MP4 nclx, WebM Colour, AVIF, PNG cICP), and every production media -# framework (FFmpeg, WebRTC, Chromium gfx::ColorSpace, NVENC, -# MediaFoundation): primaries, transfer, matrix, range. Values align -# with ITU-T H.273 / ISO/IEC 23091-2 enum identifiers so encoder / -# decoder / muxer code hands them through verbatim — no translation -# tables. -# -# Each axis is an `optionalProperties` field — **absence on the wire -# IS the unknown state.** The H.273 "Unspecified" enumerant (value 2 -# on every axis) maps to `None` here, matching what every consumer -# already does in practice (V4L2 detect collapses unknown values into -# absence; FFmpeg's encoder treats `AVCOL_PRI_UNSPECIFIED` as "skip -# the colour_description block"). This shape mirrors the W3C -# WebCodecs `VideoColorSpace` interface, which uses nullable enum -# fields with no explicit "unspecified" variant for the same reason — -# JSON-spec peers in this problem space converge on Option-wrapping -# rather than sentinel enum values, because the wrapper makes -# `ColorInfo::default()` semantically correct (all axes absent = -# unknown) without relying on a per-variant default attribute the -# generator cannot reorder. - -metadata: - type: ColorInfo - description: "Per-frame color description (H.273 / ITU-T VUI 4-tuple)" - -optionalProperties: - primaries: - metadata: - description: > - Color primaries (chromaticities). Maps to H.273 - `ColourPrimaries` enumerant. Absent = unspecified - (H.273 value 2). - enum: - - bt709 # H.273 value 1 — Rec.709, sRGB primaries - - bt470_m # H.273 value 4 — System M, NTSC 1953 - - bt470_bg # H.273 value 5 — System B/G, EBU - - smpte170m # H.273 value 6 — SMPTE-C, BT.601 525-line - - smpte240m # H.273 value 7 - - film # H.273 value 8 — generic film - - bt2020 # H.273 value 9 — Rec.2020 / Rec.2100 - - smpte428 # H.273 value 10 — XYZ - - smpte431 # H.273 value 11 — DCI-P3 (theatrical) - - smpte432 # H.273 value 12 — Display-P3 (D65) - - ebu3213 # H.273 value 22 - transfer: - metadata: - description: > - Transfer characteristic (EOTF / OETF). Maps to H.273 - `TransferCharacteristics` enumerant. Absent = unspecified - (H.273 value 2). - enum: - - bt709 # H.273 value 1 — Rec.709 OETF - - gamma22 # H.273 value 4 - - gamma28 # H.273 value 5 - - smpte170m # H.273 value 6 — BT.601 OETF - - smpte240m # H.273 value 7 - - linear # H.273 value 8 - - log100 # H.273 value 9 - - log100_sqrt10 # H.273 value 10 - - xvycc # H.273 value 11 — IEC 61966-2-4 (extended xvYCC) - - bt1361 # H.273 value 12 - - srgb # H.273 value 13 — IEC 61966-2-1 (sRGB / Display-P3) - - bt2020_ten_bit # H.273 value 14 — Rec.2020 10-bit - - bt2020_twelve_bit # H.273 value 15 — Rec.2020 12-bit - - smpte2084 # H.273 value 16 — PQ (HDR10) - - smpte428 # H.273 value 17 — XYZ - - arib_std_b67 # H.273 value 18 — HLG - matrix: - metadata: - description: > - YCbCr matrix coefficients. Maps to H.273 - `MatrixCoefficients` enumerant. Absent = unspecified - (H.273 value 2). - enum: - - identity # H.273 value 0 — RGB / GBR (no matrix) - - bt709 # H.273 value 1 - - fcc # H.273 value 4 — FCC 73.682 - - bt470_bg # H.273 value 5 — BT.601 625-line - - smpte170m # H.273 value 6 — BT.601 525-line - - smpte240m # H.273 value 7 - - ycgco # H.273 value 8 - - bt2020_ncl # H.273 value 9 — non-constant luminance - - bt2020_cl # H.273 value 10 — constant luminance - - smpte2085 # H.273 value 11 — Y'D'zD'x - - chroma_ncl # H.273 value 12 — chromaticity-derived NCL - - chroma_cl # H.273 value 13 — chromaticity-derived CL - - ictcp # H.273 value 14 — Rec.2100 ICtCp - range: - metadata: - description: > - Quantization range. Maps to H.264/H.265 VUI - `video_full_range_flag` (`limited` = 0, `full` = 1). - Absent = unspecified. - enum: - - limited - - full diff --git a/packages/core/schemas/content_light.yaml b/packages/core/schemas/content_light.yaml deleted file mode 100644 index 1a19cc14b..000000000 --- a/packages/core/schemas/content_light.yaml +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright (c) 2025 Jonathan Fontanez -# SPDX-License-Identifier: BUSL-1.1 -# -# JSON Type Definition (RFC 8927) schema for HDR10 content light level -# information (CTA-861.3 / CEA-861.3). Carried in H.265 / H.266 SEI -# `content_light_level_info` messages, MP4 `clli` boxes, AV1 OBU -# `metadata_hdr_cll`. Reports the maximum light levels actually -# present in the content (as opposed to the display capability -# captured by `MasteringDisplay`). -# -# Units are cd/m^2 as integers (1 = 1 cd/m^2). Matches the wire -# format byte-for-byte. - -metadata: - type: ContentLight - description: "HDR10 content light level info (MaxCLL / MaxFALL)" - -properties: - max_cll: - metadata: { description: "Maximum content light level in cd/m^2 (peak single-pixel light level)" } - type: uint32 - max_fall: - metadata: { description: "Maximum frame-average light level in cd/m^2" } - type: uint32 diff --git a/packages/core/schemas/encoded_audio_frame.yaml b/packages/core/schemas/encoded_audio_frame.yaml deleted file mode 100644 index 9083a1b88..000000000 --- a/packages/core/schemas/encoded_audio_frame.yaml +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright (c) 2025 Jonathan Fontanez -# SPDX-License-Identifier: BUSL-1.1 -# -# JSON Type Definition (RFC 8927) schema for encoded audio frames. - -metadata: - type: EncodedAudioFrame - description: "Encoded audio frame with Opus/AAC bitstream data" - -properties: - data: - metadata: - description: "Encoded audio bitstream data (Opus/AAC)" - elements: - type: uint8 - timestamp_ns: - metadata: - description: "Monotonic timestamp in nanoseconds (int64 as string)" - type: string - sample_count: - metadata: - description: "Number of audio samples per channel in this frame" - type: uint32 diff --git a/packages/core/schemas/encoded_video_frame.yaml b/packages/core/schemas/encoded_video_frame.yaml deleted file mode 100644 index c2105ff07..000000000 --- a/packages/core/schemas/encoded_video_frame.yaml +++ /dev/null @@ -1,69 +0,0 @@ -# Copyright (c) 2025 Jonathan Fontanez -# SPDX-License-Identifier: BUSL-1.1 -# -# JSON Type Definition (RFC 8927) schema for encoded video frames. - -imports: - ColorInfo: - org: tatolab - package: core - type: ColorInfo - version: "1.0.0" - MasteringDisplay: - org: tatolab - package: core - type: MasteringDisplay - version: "1.0.0" - ContentLight: - org: tatolab - package: core - type: ContentLight - version: "1.0.0" - -metadata: - type: EncodedVideoFrame - description: "Encoded video frame with H.264/H.265 NAL unit data" - # Slot-priming HINT, never a cap: the publisher opens under PowerOfTwo growth - # and grows the segment on the first oversized loan (a 4K IDR ≈ 8–12 MiB), so - # a keyframe past this hint delivers instead of crashing. 4 MiB covers the - # common 1080p CQP IDR (≈ 2–3 MiB) without a first-frame regrow while keeping - # the primed commitment (ring depth * hint) an order of magnitude - # below the old fixed 16 MiB slot. - expected_payload_bytes: 4194304 - -properties: - data: - metadata: - description: "Encoded NAL units (H.264/H.265 bitstream data)" - elements: - type: uint8 - timestamp_ns: - metadata: - description: "Monotonic timestamp in nanoseconds (int64 as string)" - type: string - is_keyframe: - metadata: - description: "Whether this is a keyframe (I-frame)" - type: boolean - frame_number: - metadata: - description: "Sequential frame number (uint64 as string)" - type: string - -optionalProperties: - fps: - metadata: - description: "Source frame rate in frames per second (pass-through from capture device)" - type: uint32 - color_info: - metadata: - description: "H.273 / ITU-T VUI four-tuple describing this frame's color. Encoder writes this so muxers / downstream consumers can populate VUI / colr boxes without re-deriving from the bitstream." - ref: ColorInfo - mastering_display: - metadata: - description: "SMPTE ST.2086 mastering display color volume (HDR10 static metadata). Absent for SDR streams." - ref: MasteringDisplay - content_light: - metadata: - description: "HDR10 content light level info (MaxCLL / MaxFALL). Absent for SDR streams or when not measured." - ref: ContentLight diff --git a/packages/core/schemas/mastering_display.yaml b/packages/core/schemas/mastering_display.yaml deleted file mode 100644 index a555fa1bf..000000000 --- a/packages/core/schemas/mastering_display.yaml +++ /dev/null @@ -1,57 +0,0 @@ -# Copyright (c) 2025 Jonathan Fontanez -# SPDX-License-Identifier: BUSL-1.1 -# -# JSON Type Definition (RFC 8927) schema for SMPTE ST.2086 Mastering -# Display Color Volume — the static HDR metadata describing the -# display the content was mastered on. Carried in H.265 / H.266 SEI -# messages (`mastering_display_colour_volume`), MP4 `mdcv` boxes, AV1 -# OBU metadata (`metadata_hdr_mdcv`), and WebM `MasteringMetadata` -# elements. -# -# Field units match the wire format byte-for-byte so encoders / -# decoders / muxers hand the values through verbatim: -# -# - Chromaticity values (`display_primaries_*`, `white_point_*`) are -# in increments of 0.00002 (1/50000), so 0.708 = 35400. Range -# [0, 50000]. -# - Luminance values (`min_luminance`, `max_luminance`) are in -# increments of 0.0001 cd/m², so 1000 cd/m² = 10000000. -# -# Primaries are listed in R, G, B order (matching SMPTE ST.2086 and -# the H.265 / H.266 SEI ordering). - -metadata: - type: MasteringDisplay - description: "SMPTE ST.2086 mastering display color volume (HDR10 static metadata)" - -properties: - display_primaries_r_x: - metadata: { description: "Red primary x chromaticity in 1/50000 increments" } - type: uint32 - display_primaries_r_y: - metadata: { description: "Red primary y chromaticity in 1/50000 increments" } - type: uint32 - display_primaries_g_x: - metadata: { description: "Green primary x chromaticity in 1/50000 increments" } - type: uint32 - display_primaries_g_y: - metadata: { description: "Green primary y chromaticity in 1/50000 increments" } - type: uint32 - display_primaries_b_x: - metadata: { description: "Blue primary x chromaticity in 1/50000 increments" } - type: uint32 - display_primaries_b_y: - metadata: { description: "Blue primary y chromaticity in 1/50000 increments" } - type: uint32 - white_point_x: - metadata: { description: "White point x chromaticity in 1/50000 increments" } - type: uint32 - white_point_y: - metadata: { description: "White point y chromaticity in 1/50000 increments" } - type: uint32 - min_luminance: - metadata: { description: "Minimum mastering display luminance in 0.0001 cd/m^2 increments" } - type: uint32 - max_luminance: - metadata: { description: "Maximum mastering display luminance in 0.0001 cd/m^2 increments" } - type: uint32 diff --git a/packages/core/schemas/video_frame.yaml b/packages/core/schemas/video_frame.yaml deleted file mode 100644 index af27472e7..000000000 --- a/packages/core/schemas/video_frame.yaml +++ /dev/null @@ -1,65 +0,0 @@ -# Copyright (c) 2025 Jonathan Fontanez -# SPDX-License-Identifier: BUSL-1.1 -# -# JSON Type Definition (RFC 8927) schema for video frames. - -imports: - ColorInfo: - org: tatolab - package: core - type: ColorInfo - version: "1.0.0" - MasteringDisplay: - org: tatolab - package: core - type: MasteringDisplay - version: "1.0.0" - ContentLight: - org: tatolab - package: core - type: ContentLight - version: "1.0.0" - -metadata: - type: VideoFrame - description: "Video frame for IPC - references GPU surface by ID" - -properties: - surface_id: - metadata: - description: "GPU surface ID (IOSurface on macOS)" - type: string - width: - metadata: - description: "Frame width in pixels" - type: uint32 - height: - metadata: - description: "Frame height in pixels" - type: uint32 - timestamp_ns: - metadata: - description: "Monotonic timestamp in nanoseconds (int64 as string - parse to native int64). The single ordering primitive in this schema — consumers that need 'frame N' semantics derive it from timestamps, never from a cross-processor counter. Cameras carry the source timecode here; downstream processors propagate. NOTE: a prior revision of this schema carried a `frame_index: string` field; it was removed because no legitimate cross-processor use case existed and every observed read of it was either diagnostic-only (replaceable by a processor-internal counter) or actively misused as a sync primitive (the camera→display timeline-wait path that caused #1085's residual wedge). Surface_id is the handoff contract; timestamp_ns is the ordering primitive; nothing else." - type: string - -optionalProperties: - fps: - metadata: - description: "Source frame rate in frames per second (set by capture device)" - type: uint32 - texture_layout: - metadata: - description: "Producer's published VkImageLayout for this frame's texture. Per-frame override of the per-surface current_image_layout published via surface-share register/update_layout. Encoded as the raw int32 VkImageLayout enumerant. Absent when the producer relies on the per-surface default." - type: int32 - color_info: - metadata: - description: "H.273 / ITU-T VUI four-tuple describing this frame's color. Absent means unknown — every consumer treats absent the same as all-`unspecified`. Producers fill from V4L2 (camera), VUI (decoder), application config, or leave absent." - ref: ColorInfo - mastering_display: - metadata: - description: "SMPTE ST.2086 mastering display color volume (HDR10 static metadata). Absent for SDR streams." - ref: MasteringDisplay - content_light: - metadata: - description: "HDR10 content light level info (MaxCLL / MaxFALL). Absent for SDR streams or when not measured." - ref: ContentLight diff --git a/packages/core/streamlib.yaml b/packages/core/streamlib.yaml deleted file mode 100644 index 4e7641360..000000000 --- a/packages/core/streamlib.yaml +++ /dev/null @@ -1,31 +0,0 @@ -# yaml-language-server: $schema=../../schemas/streamlib.schema.json -# Copyright (c) 2025 Jonathan Fontanez -# SPDX-License-Identifier: BUSL-1.1 - -# @tatolab/core — canonical wire vocabulary. -# -# Streamlib's google.protobuf analogue: the four wire-stable types every -# other package depends on. Per `docs/architecture/schema-identity-and-packaging.md` -# Decision 5, this package ships at 1.0.0 from day one; breaking changes -# require a deliberate v2 bump and downstream migration. -package: - org: tatolab - name: core - version: 1.0.0 - description: Canonical wire vocabulary (VideoFrame, AudioFrame, EncodedVideoFrame, EncodedAudioFrame) - -schemas: - AudioFrame: - file: schemas/audio_frame.yaml - ColorInfo: - file: schemas/color_info.yaml - ContentLight: - file: schemas/content_light.yaml - EncodedAudioFrame: - file: schemas/encoded_audio_frame.yaml - EncodedVideoFrame: - file: schemas/encoded_video_frame.yaml - MasteringDisplay: - file: schemas/mastering_display.yaml - VideoFrame: - file: schemas/video_frame.yaml diff --git a/packages/debug-utilities/Cargo.toml b/packages/debug-utilities/Cargo.toml index 3c576379e..b2bddc91c 100644 --- a/packages/debug-utilities/Cargo.toml +++ b/packages/debug-utilities/Cargo.toml @@ -18,8 +18,6 @@ path = "_generated_rust_crate_root_/lib.rs" name = "streamlib_debug_utilities" crate-type = ["rlib", "cdylib"] -[build-dependencies] -streamlib-jtd-codegen = {version = "0.16.0"} [dependencies] # Engine-free authoring SDK (never the `streamlib` facade) — runtime context, processor traits, generated config diff --git a/packages/debug-utilities/build.rs b/packages/debug-utilities/build.rs deleted file mode 100644 index 0f3236712..000000000 --- a/packages/debug-utilities/build.rs +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright (c) 2025 Jonathan Fontanez -// SPDX-License-Identifier: BUSL-1.1 - -fn main() { - streamlib_jtd_codegen::build_rs::run_for_rust_crate(); -} diff --git a/packages/debug-utilities/schemas/bgra_file_source_config.yaml b/packages/debug-utilities/schemas/bgra_file_source_config.yaml deleted file mode 100644 index af6ddb477..000000000 --- a/packages/debug-utilities/schemas/bgra_file_source_config.yaml +++ /dev/null @@ -1,30 +0,0 @@ -# Copyright (c) 2025 Jonathan Fontanez -# SPDX-License-Identifier: BUSL-1.1 -# -# JSON Type Definition (RFC 8927) schema for BGRA File Source config. - -metadata: - type: BgraFileSourceConfig - description: "Configuration for streaming raw BGRA frames from a file." - -properties: - file_path: - metadata: - description: "Path to raw BGRA file (width * height * 4 bytes per frame)." - type: string - width: - metadata: - description: "Frame width in pixels." - type: uint32 - height: - metadata: - description: "Frame height in pixels." - type: uint32 - fps: - metadata: - description: "Playback frame rate." - type: uint32 - frame_count: - metadata: - description: "Number of frames in the file." - type: uint32 diff --git a/packages/debug-utilities/schemas/jpeg_bytes_source_config.yaml b/packages/debug-utilities/schemas/jpeg_bytes_source_config.yaml deleted file mode 100644 index a8d31ce93..000000000 --- a/packages/debug-utilities/schemas/jpeg_bytes_source_config.yaml +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright (c) 2025 Jonathan Fontanez -# SPDX-License-Identifier: BUSL-1.1 -# -# JSON Type Definition (RFC 8927) schema for JPEG Bytes Source config. - -metadata: - type: JpegBytesSourceConfig - description: "Configuration for streaming a fixed JPEG file as EncodedJpegFrame messages." - -properties: - file_path: - metadata: - description: "Path to a JPEG file. The whole file is read once at setup and republished every emit interval." - type: string - -optionalProperties: - fps: - metadata: - description: "Republish rate in frames per second (default: 10). Each tick re-emits the same JPEG bytes with an updated frame_number / timestamp." - type: uint32 - frame_count: - metadata: - description: "Total number of times to emit the JPEG before stopping (default: 0 = unlimited)." - type: uint32 diff --git a/packages/debug-utilities/schemas/live_video_frame_forwarder_config.yaml b/packages/debug-utilities/schemas/live_video_frame_forwarder_config.yaml deleted file mode 100644 index 3ce68a9a8..000000000 --- a/packages/debug-utilities/schemas/live_video_frame_forwarder_config.yaml +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright (c) 2025 Jonathan Fontanez -# SPDX-License-Identifier: BUSL-1.1 -# -# JSON Type Definition (RFC 8927) schema for LiveVideoFrameForwarder config. - -metadata: - type: LiveVideoFrameForwarderConfig - description: "Configuration for the LiveVideoFrameForwarder pass-through." - -# Empty struct body — `optionalProperties: {}` (not nothing) is -# load-bearing: an empty schema becomes `pub type X = Option` -# instead of a typed struct. -optionalProperties: {} diff --git a/packages/debug-utilities/schemas/simple_passthrough_config.yaml b/packages/debug-utilities/schemas/simple_passthrough_config.yaml deleted file mode 100644 index 704a69ce9..000000000 --- a/packages/debug-utilities/schemas/simple_passthrough_config.yaml +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright (c) 2025 Jonathan Fontanez -# SPDX-License-Identifier: BUSL-1.1 -# -# JSON Type Definition (RFC 8927) schema for SimplePassthrough config. - -metadata: - type: SimplePassthroughConfig - description: "Configuration for video passthrough" - -properties: - scale: - metadata: - description: "Scale factor for passthrough" - type: float32 diff --git a/packages/debug-utilities/schemas/video_frame_counter_config.yaml b/packages/debug-utilities/schemas/video_frame_counter_config.yaml deleted file mode 100644 index ae5134c8d..000000000 --- a/packages/debug-utilities/schemas/video_frame_counter_config.yaml +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright (c) 2025 Jonathan Fontanez -# SPDX-License-Identifier: BUSL-1.1 -# -# JSON Type Definition (RFC 8927) schema for VideoFrameCounter config. - -metadata: - type: VideoFrameCounterConfig - description: "Configuration for the VideoFrameCounter test sink." - -# Empty struct body — `optionalProperties: {}` (not nothing) is -# load-bearing: an empty schema becomes `pub type X = Option` -# instead of a typed struct. -optionalProperties: {} diff --git a/packages/debug-utilities/streamlib-codegen.lock b/packages/debug-utilities/streamlib-codegen.lock deleted file mode 100644 index 37d5913c1..000000000 --- a/packages/debug-utilities/streamlib-codegen.lock +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright (c) 2025 Jonathan Fontanez -# SPDX-License-Identifier: BUSL-1.1 -# -# AUTOGENERATED BY `streamlib generate`. DO NOT EDIT BY HAND. -# -# This lockfile pins resolved package versions + content hashes so a fresh -# checkout reconstructs the same generated bindings byte-for-byte. -# Commit it in applications and examples; don't commit it in publishable -# libraries (they inherit their consumer's lock). -version: 1 -packages: - '@tatolab/core': - version: 1.0.0 - source: - kind: path - path: ../core - content_hash: sha256:dccefbd6d0f322c6bc621fa10fdeb8675090f2c9e74051a3db8a7ec4753c4580 - '@tatolab/jpeg': - version: 1.0.0 - source: - kind: path - path: ../jpeg - content_hash: sha256:25be8221db8c86ef20c2a886ba0cbe73643d510e570c8b1fe68b5636c54adea9 diff --git a/packages/debug-utilities/streamlib.yaml b/packages/debug-utilities/streamlib.yaml deleted file mode 100644 index 50cd36f09..000000000 --- a/packages/debug-utilities/streamlib.yaml +++ /dev/null @@ -1,121 +0,0 @@ -# yaml-language-server: $schema=../../schemas/streamlib.schema.json -package: - org: tatolab - name: debug-utilities - version: 1.0.0 - description: Utility processors for development, demos, and rigorous-input testing -dependencies: - '@tatolab/core': - version: ^1.0.0 - '@tatolab/jpeg': - version: ^1.0.0 -schemas: - BgraFileSourceConfig: - file: schemas/bgra_file_source_config.yaml - ColorInfo: - package: '@tatolab/core' - ContentLight: - package: '@tatolab/core' - EncodedJpegFrame: - package: '@tatolab/jpeg' - JpegBytesSourceConfig: - file: schemas/jpeg_bytes_source_config.yaml - LiveVideoFrameForwarderConfig: - file: schemas/live_video_frame_forwarder_config.yaml - MasteringDisplay: - package: '@tatolab/core' - SimplePassthroughConfig: - file: schemas/simple_passthrough_config.yaml - VideoFrame: - package: '@tatolab/core' - VideoFrameCounterConfig: - file: schemas/video_frame_counter_config.yaml -processors: -- name: SimplePassthrough - description: Passes video frames through unchanged (for testing) - runtime: rust - entrypoint: null - execution: manual - scheduling: null - config: - name: config - schema: SimplePassthroughConfig - state: [] - inputs: - - name: input - schema: VideoFrame - description: Video frame input - delivery_profile: null - outputs: - - name: output - schema: VideoFrame - description: Video frame output (unchanged) - delivery_profile: null -- name: LiveVideoFrameForwarder - description: Forwards each input VideoFrame to the output port unchanged on every frame, keeping a live-spliced graph delivering frames - runtime: rust - entrypoint: null - execution: reactive - scheduling: null - config: - name: config - schema: LiveVideoFrameForwarderConfig - state: [] - inputs: - - name: input - schema: VideoFrame - description: Video frame input - delivery_profile: every_sample - outputs: - - name: output - schema: VideoFrame - description: Video frame output (unchanged) - delivery_profile: null -- name: BgraFileSource - description: Streams raw BGRA frames from a file as Videoframes - runtime: rust - entrypoint: null - execution: manual - scheduling: null - config: - name: config - schema: BgraFileSourceConfig - state: [] - inputs: [] - outputs: - - name: video - schema: VideoFrame - description: Video frames read from the BGRA file - delivery_profile: null -- name: JpegBytesSource - description: Loads a JPEG file from disk at setup time and republishes it as EncodedJpegFrame on a paced background thread (for testing the JPEG decoder pipeline) - runtime: rust - entrypoint: null - execution: manual - scheduling: null - config: - name: config - schema: JpegBytesSourceConfig - state: [] - inputs: [] - outputs: - - name: encoded_jpeg - schema: EncodedJpegFrame - description: JPEG-encoded bytes wrapped in an EncodedJpegFrame - delivery_profile: null -- name: VideoFrameCounter - description: Counts incoming VideoFrames into process-global atomics so integration tests can assert on frame count + first-frame dimensions after runtime.stop() - runtime: rust - entrypoint: null - execution: reactive - scheduling: null - config: - name: config - schema: VideoFrameCounterConfig - state: [] - inputs: - - name: input - schema: VideoFrame - description: VideoFrame stream to observe - delivery_profile: every_sample - outputs: [] diff --git a/packages/display/Cargo.toml b/packages/display/Cargo.toml index bf1ba4274..ee1c34eea 100644 --- a/packages/display/Cargo.toml +++ b/packages/display/Cargo.toml @@ -18,8 +18,6 @@ path = "_generated_rust_crate_root_/lib.rs" name = "streamlib_display" crate-type = ["rlib", "cdylib"] -[build-dependencies] -streamlib-jtd-codegen = {version = "0.16.0"} [dependencies] # Engine-free authoring SDK (never the `streamlib` facade) — capability-typed diff --git a/packages/display/build.rs b/packages/display/build.rs deleted file mode 100644 index 751f570ec..000000000 --- a/packages/display/build.rs +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) 2025 Jonathan Fontanez -// SPDX-License-Identifier: BUSL-1.1 - -#![allow(clippy::disallowed_macros)] // build.rs uses println! for `cargo:` directives - -//! Build script: compiles the display-blit vertex + fragment shaders to -//! SPIR-V via `glslc` on Linux. The artifacts land in `OUT_DIR` and the -//! display processor `include_bytes!`'s them at compile time. - -fn main() { - streamlib_jtd_codegen::build_rs::run_for_rust_crate(); - #[cfg(target_os = "linux")] - compile_shaders(); -} - -#[cfg(target_os = "linux")] -fn compile_shaders() { - use std::path::{Path, PathBuf}; - use std::process::Command; - - let shaders: &[(&str, &str, &str)] = &[ - ("shaders/display_blit.vert", "display_blit.vert.spv", "vertex"), - ("shaders/display_blit.frag", "display_blit.frag.spv", "fragment"), - ]; - - let out_dir = std::env::var("OUT_DIR").expect("OUT_DIR not set"); - - for (src, dst, stage) in shaders { - let src_path = Path::new(src); - let dst_path: PathBuf = Path::new(&out_dir).join(dst); - - println!("cargo:rerun-if-changed={}", src); - - let status = Command::new("glslc") - .arg(format!("-fshader-stage={stage}")) - .arg("-O") - .arg(src_path) - .arg("-o") - .arg(&dst_path) - .status() - .expect("Failed to run glslc. Install the Vulkan SDK or ensure glslc is in PATH."); - - assert!(status.success(), "glslc failed to compile {}", src); - } -} diff --git a/packages/display/schemas/display_config.yaml b/packages/display/schemas/display_config.yaml deleted file mode 100644 index 76f1a79ad..000000000 --- a/packages/display/schemas/display_config.yaml +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright (c) 2025 Jonathan Fontanez -# SPDX-License-Identifier: BUSL-1.1 -# -# JSON Type Definition (RFC 8927) schema for Display config. - -metadata: - type: DisplayConfig - description: "Configuration for video display window" - -properties: - width: - metadata: - description: "Window width in pixels" - type: uint32 - height: - metadata: - description: "Window height in pixels" - type: uint32 -optionalProperties: - scaling_mode: - metadata: - description: "How video content is scaled within the window. Default: Letterbox" - enum: - - Stretch - - Letterbox - - Crop - vsync: - metadata: - description: "Enable vsync (synchronize to display refresh rate). Default: true" - type: boolean - drawable_count: - metadata: - description: "Number of drawable buffers (2=double, 3=triple). Default: 2" - type: uint32 - title: - metadata: - description: "Window title. Default: 'streamlib Display'" - type: string diff --git a/packages/display/streamlib-codegen.lock b/packages/display/streamlib-codegen.lock deleted file mode 100644 index 5571de32c..000000000 --- a/packages/display/streamlib-codegen.lock +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright (c) 2025 Jonathan Fontanez -# SPDX-License-Identifier: BUSL-1.1 -# -# AUTOGENERATED BY `streamlib generate`. DO NOT EDIT BY HAND. -# -# This lockfile pins resolved package versions + content hashes so a fresh -# checkout reconstructs the same generated bindings byte-for-byte. -# Commit it in applications and examples; don't commit it in publishable -# libraries (they inherit their consumer's lock). -version: 1 -packages: - '@tatolab/core': - version: 1.0.0 - source: - kind: path - path: ../core - content_hash: sha256:42929566e77db3311b1bcf576124ee36d5505f1cd1a2e70ccca50ffcba431ec5 diff --git a/packages/display/streamlib.yaml b/packages/display/streamlib.yaml deleted file mode 100644 index 48ed0eb00..000000000 --- a/packages/display/streamlib.yaml +++ /dev/null @@ -1,38 +0,0 @@ -# yaml-language-server: $schema=../../schemas/streamlib.schema.json -package: - org: tatolab - name: display - version: 1.0.0 - description: Display processor — renders video frames to a window via the engine's host RHI presentation primitive -dependencies: - '@tatolab/core': - version: ^1.0.0 -schemas: - ColorInfo: - package: '@tatolab/core' - ContentLight: - package: '@tatolab/core' - DisplayConfig: - file: schemas/display_config.yaml - MasteringDisplay: - package: '@tatolab/core' - VideoFrame: - package: '@tatolab/core' -processors: -- name: Display - description: Displays video frames in a window with vsync - runtime: rust - entrypoint: null - execution: manual - scheduling: - priority: high - config: - name: config - schema: DisplayConfig - state: [] - inputs: - - name: video - schema: VideoFrame - description: Video frames to display in the window - delivery_profile: null - outputs: [] diff --git a/packages/escalate/schemas/escalate_request.yaml b/packages/escalate/schemas/escalate_request.yaml deleted file mode 100644 index b7931c745..000000000 --- a/packages/escalate/schemas/escalate_request.yaml +++ /dev/null @@ -1,1138 +0,0 @@ -# Copyright (c) 2025 Jonathan Fontanez -# SPDX-License-Identifier: BUSL-1.1 -# -# JSON Type Definition (RFC 8927) schema for polyglot escalation requests. -# -# Sent from a Python or Deno subprocess over its stdout to the Rust host -# processor. Acquire/release ops are request/response — the host routes the -# op through `GpuContextLimitedAccess::escalate` and replies with -# [`EscalateResponse`] on the same stdin pipe. The `log` op is fire-and- -# forget: the host enriches the record with an authoritative `host_ts` and -# enqueues it into the unified JSONL pipeline (see parent #430), no reply -# is written back. - -metadata: - type: EscalateRequest - description: "Polyglot subprocess escalate-on-behalf request (subprocess → host)" - -discriminator: op -mapping: - acquire_pixel_buffer: - properties: - request_id: - metadata: - description: "Correlates request with response. UUID string." - type: string - width: - metadata: - description: "Pixel width of the buffer." - type: uint32 - height: - metadata: - description: "Pixel height of the buffer." - type: uint32 - format: - metadata: - description: "Pixel format identifier (e.g. bgra32, nv12_video_range, gray8)." - type: string - acquire_texture: - properties: - request_id: - metadata: - description: "Correlates request with response. UUID string." - type: string - width: - metadata: - description: "Pixel width of the texture." - type: uint32 - height: - metadata: - description: "Pixel height of the texture." - type: uint32 - format: - metadata: - description: > - Texture format identifier. Lowercase snake-case names: - rgba8_unorm, rgba8_unorm_srgb, bgra8_unorm, bgra8_unorm_srgb, - rgba16_float, rgba32_float, nv12. - type: string - usage: - metadata: - description: > - Usage flags the texture must support. Non-empty array of lowercase - snake-case tokens drawn from: copy_src, copy_dst, texture_binding, - storage_binding, render_attachment. Host validates — unknown - tokens return an error response. - elements: - type: string - acquire_image: - properties: - request_id: - metadata: - description: "Correlates request with response. UUID string." - type: string - width: - metadata: - description: "Pixel width of the image." - type: uint32 - height: - metadata: - description: "Pixel height of the image." - type: uint32 - format: - metadata: - description: > - Texture format identifier. Lowercase snake-case names: - bgra8_unorm, bgra8_unorm_srgb, rgba8_unorm, rgba8_unorm_srgb. - The host backs this with a render-target-capable VkImage - allocated via VK_EXT_image_drm_format_modifier and a tiled - DRM modifier picked from the EGL `external_only=FALSE` list - — the resulting DMA-BUF can be imported by the consumer as - a GL_TEXTURE_2D color attachment. Returns an error when the - EGL probe didn't find an RT-capable modifier for `format` - (no fallback to LINEAR — sampler-only on NVIDIA, see - docs/learnings/nvidia-egl-dmabuf-render-target.md). - - Internal host primitive — surface adapters - (streamlib-adapter-vulkan / -opengl / -skia) use this on - customers' behalf; customers never invoke acquire_image - directly. - type: string - run_cpu_readback_copy: - properties: - request_id: - metadata: - description: "Correlates request with response. UUID string." - type: string - surface_id: - metadata: - description: > - Host-assigned surface id (the u64 carried by `StreamlibSurface::id`) - of a surface previously registered with the host's cpu-readback - adapter and whose staging buffer + timeline were registered with - the surface-share service via `register_pixel_buffer_with_timeline`. - The subprocess imported them once at registration time through - `streamlib-consumer-rhi`'s `ConsumerVulkanBuffer` / - `ConsumerVulkanTimelineSemaphore`. JTD has no native u64 — the - wire form is the decimal string representation, parsed back into - u64 by the host before dispatch. - type: string - direction: - metadata: - description: > - Which copy direction to run on the host. `image_to_buffer` runs - `vkCmdCopyImageToBuffer` (image → staging) at acquire time; - `buffer_to_image` runs the reverse at write release. The host - signals a new value on the surface's timeline at end-of-submit; - the subprocess waits on the timeline (through its imported - `ConsumerVulkanTimelineSemaphore`) before reading or releasing. - No FDs travel on the wire — only the timeline value the host - signaled. - enum: - - image_to_buffer - - buffer_to_image - try_run_cpu_readback_copy: - properties: - request_id: - metadata: - description: "Correlates request with response. UUID string." - type: string - surface_id: - metadata: - description: > - Same shape as `run_cpu_readback_copy.surface_id`. The host - returns a [`contended`] response (no timeline value, no copy - executed) when its registry would have blocked instead of - performing the copy. Subprocess customers use this to skip a - frame instead of stalling their thread runner. - type: string - direction: - metadata: - description: > - Same shape as `run_cpu_readback_copy.direction`. - enum: - - image_to_buffer - - buffer_to_image - wait_device_idle: - properties: - request_id: - metadata: - description: "Correlates request with response. UUID string." - type: string - # No payload: the host waits on the one device it owns. The reply - # is the acknowledgement that the wait completed — a subprocess - # that did not wait for it would not have waited at all. - open_device_export_staging: - properties: - request_id: - metadata: - description: "Correlates request with response. UUID string." - type: string - surface_id: - metadata: - description: > - The surface whose pixels the subprocess wants in an external - device API's dialect (CUDA today). The host allocates that - surface's OPAQUE_FD device-export staging buffer if it has - none, registers the staging plus its `refill_done` timeline - with the surface-share service, and answers with the id they - are registered under. Pool allocations are DMA-BUF-flavoured - and external device APIs import OPAQUE_FD; one allocation - cannot export both on NVIDIA, which is why the staging exists - at all. - - The `ok` response carries `handle_id` (the surface-share id to - check out), `width`, `height`, `format`, `staging_byte_size`, - `bytes_per_row`, `writable`, and `exporting_device_uuid`. The - staging fd and the timeline fd travel over the surface-share - socket at check-out, never over this one. - type: string - refill_device_export_staging: - properties: - request_id: - metadata: - description: "Correlates request with response. UUID string." - type: string - surface_id: - metadata: - description: > - Same surface as `open_device_export_staging.surface_id`. The - host resolves the blit source fresh, copies the surface's - current pixels into the staging buffer, and signals a new - value on the staging's `refill_done` timeline at end-of-submit. - The response's `timeline_value` is what the subprocess waits - for on its imported `ConsumerVulkanTimelineSemaphore` before - reading the staging. No FDs travel on the wire. - - The source is resolved per refill and never cached: rotating - producers re-register a different texture under the same - surface id every frame, so a cached source blits the previous - cycle's pixels. - type: string - copy_device_export_staging_back_to_surface: - properties: - request_id: - metadata: - description: "Correlates request with response. UUID string." - type: string - surface_id: - metadata: - description: > - Same surface as `open_device_export_staging.surface_id`. - Publishes a device-side edit: the host copies the staging - buffer back into the surface's own allocation so every other - holder observes it, and signals `refill_done` at end-of-submit. - Refused when the surface's export is read-only — a - texture-backed export has no write-back path. Answers with the - signalled `timeline_value`. - type: string - register_compute_kernel: - properties: - request_id: - metadata: - description: "Correlates request with response. UUID string." - type: string - spv_hex: - metadata: - description: > - Compiled SPIR-V bytecode for the compute shader, encoded as - lowercase hex (no `0x` prefix, no whitespace). The host parses - the bytes back, derives the binding shape from - `rspirv-reflect`, and constructs a `VulkanComputeKernel` via - `GpuContext::create_compute_kernel`. - - Re-registering identical SPIR-V is a host-side cache hit - keyed by SHA-256(spv_bytes) — no re-reflection, no fresh - pipeline. The returned `kernel_id` is the same. - - The host's `VulkanComputeKernel` also persists driver- - compiled pipeline state to `/streamlib/ - pipeline-cache/.bin`, so first-inference latency - after a host process restart is fast on user-registered ML - kernels. - type: string - push_constant_size: - metadata: - description: > - Push-constant range size in bytes. 0 if the shader uses no - push constants. The host validates this against the - shader's reflected push-constant range and rejects - mismatches with an `err` response. - type: uint32 - run_compute_kernel: - properties: - request_id: - metadata: - description: "Correlates request with response. UUID string." - type: string - kernel_id: - metadata: - description: > - Handle returned by a prior `register_compute_kernel` - response. The host looks up the cached - `Arc` and dispatches against it. - Dispatching with an unrecognized kernel_id returns an - `err` response. - type: string - surface_uuid: - metadata: - description: > - UUID string of a render-target surface previously - registered with the surface-share service via - `register_texture`. The host bridge holds an - application-provided UUID→`Texture` map (populated - in `install_setup_hook`) and binds the looked-up - `VkImage` as a storage_image at slot 0 (the single-output - convention enforced for v1 — multi-binding kernels are a - future extension). UUID rather than u64 so the host can - resolve the surface without subprocess-side counter - coordination. - type: string - push_constants_hex: - metadata: - description: > - Push-constant payload for this dispatch, encoded as - lowercase hex. Length in bytes (after hex decoding) must - equal the kernel's declared `push_constant_size`. Empty - string when the kernel has no push constants. - type: string - group_count_x: - metadata: - description: "vkCmdDispatch groupCountX." - type: uint32 - group_count_y: - metadata: - description: "vkCmdDispatch groupCountY." - type: uint32 - group_count_z: - metadata: - description: "vkCmdDispatch groupCountZ." - type: uint32 - register_graphics_kernel: - properties: - request_id: - metadata: - description: "Correlates request with response. UUID string." - type: string - label: - metadata: - description: > - Human-readable label used in error messages and tracing - on the host. Echoed in `kernel_id` derivation only via - its bytes — purely diagnostic. - type: string - vertex_spv_hex: - metadata: - description: > - Compiled SPIR-V bytecode for the vertex stage, encoded - as lowercase hex (no `0x` prefix, no whitespace). Today - exactly one vertex stage is required (the host kernel - rejects zero or multiple vertex stages). Geometry / - tessellation / mesh / task stages are not yet supported. - type: string - fragment_spv_hex: - metadata: - description: > - Compiled SPIR-V bytecode for the fragment stage, encoded - as lowercase hex. Today exactly one fragment stage is - required (matching the host kernel's v1 contract). - type: string - vertex_entry_point: - metadata: - description: > - Entry-point name for the vertex stage. Empty string is - normalized to `"main"` host-side. - type: string - fragment_entry_point: - metadata: - description: > - Entry-point name for the fragment stage. Empty string is - normalized to `"main"` host-side. - type: string - bindings: - metadata: - description: > - Descriptor-set-0 bindings the host pipeline declares. - Validated against `rspirv-reflect` of the supplied - SPIR-V at register time — mismatches return an `err` - response. Empty array means no bindings. - elements: - properties: - binding: - type: uint32 - kind: - metadata: - description: > - Resource kind for this binding slot. - enum: - - sampled_texture - - storage_buffer - - uniform_buffer - - storage_image - stages: - metadata: - description: > - Bitmask of stages the binding is visible to. - `1 = VERTEX`, `2 = FRAGMENT`, `3 = VERTEX_FRAGMENT`. - type: uint32 - push_constant_size: - metadata: - description: > - Push-constant range size in bytes, validated against - the merged shader reflection. Set 0 if the shaders use - no push constants. - type: uint32 - push_constant_stages: - metadata: - description: > - Bitmask of stages the push-constant range is visible to. - `1 = VERTEX`, `2 = FRAGMENT`. Ignored when - `push_constant_size == 0`. - type: uint32 - descriptor_sets_in_flight: - metadata: - description: > - Depth of the descriptor-set ring. Render-loop callers - pass `frame_index ∈ [0, descriptor_sets_in_flight)` per - draw. Must be ≥ 1. - type: uint32 - pipeline_state: - metadata: - description: > - Fixed-function pipeline state plus attachment formats - for the graphics pipeline. Mirrors the host - `GraphicsPipelineState` shape; unsupported combinations - (multi-attachment color blend, MSAA samples > 1, etc.) - are rejected with an `err` response. - properties: - topology: - enum: - - point_list - - line_list - - line_strip - - triangle_list - - triangle_strip - - triangle_fan - vertex_input_bindings: - metadata: - description: > - Vertex buffer binding slots — stride and step rate - per binding. Empty array selects the - `VertexInputState::None` (gl_VertexIndex-driven) - shape; non-empty selects `VertexInputState::Buffers` - with the given bindings + attributes. - elements: - properties: - binding: - type: uint32 - stride: - type: uint32 - input_rate: - enum: - - vertex - - instance - vertex_input_attributes: - metadata: - description: > - Vertex attributes pulled from the bindings. Must be - empty when `vertex_input_bindings` is empty. - elements: - properties: - location: - type: uint32 - binding: - type: uint32 - format: - enum: - - r32_float - - rg32_float - - rgb32_float - - rgba32_float - - r32_uint - - rg32_uint - - rgb32_uint - - rgba32_uint - - r32_sint - - rg32_sint - - rgb32_sint - - rgba32_sint - - rgba8_unorm - - rgba8_snorm - offset: - type: uint32 - rasterization_polygon_mode: - enum: - - fill - - line - - point - rasterization_cull_mode: - enum: - - none - - front - - back - - front_and_back - rasterization_front_face: - enum: - - counter_clockwise - - clockwise - rasterization_line_width: - type: float32 - multisample_samples: - metadata: - description: > - MSAA sample count. Only `1` is supported in v1; any - other value returns an `err` response. - type: uint32 - depth_stencil_enabled: - type: boolean - depth_compare_op: - metadata: - description: > - Depth compare op. Ignored when - `depth_stencil_enabled` is false; the wire field - must still carry a valid value (use `always` as the - default placeholder when disabled). - enum: - - never - - less - - equal - - less_or_equal - - greater - - not_equal - - greater_or_equal - - always - depth_write: - type: boolean - color_blend_enabled: - type: boolean - color_write_mask: - metadata: - description: > - Color write mask bits — `1=R`, `2=G`, `4=B`, `8=A`. - `15` (`0b1111`) writes RGBA. Used both when blending - is disabled and as the blend attachment's - `color_write_mask` when enabled. - type: uint32 - color_blend_src_color_factor: - metadata: - description: > - Blend factor. Ignored when `color_blend_enabled` is - false; carry a valid value (e.g. `one`) regardless. - ref: "blend_factor_enum" - enum: &blend_factor - - zero - - one - - src_color - - one_minus_src_color - - dst_color - - one_minus_dst_color - - src_alpha - - one_minus_src_alpha - - dst_alpha - - one_minus_dst_alpha - - constant_color - - one_minus_constant_color - - constant_alpha - - one_minus_constant_alpha - - src_alpha_saturate - color_blend_dst_color_factor: - enum: *blend_factor - color_blend_color_op: - enum: &blend_op - - add - - subtract - - reverse_subtract - - min - - max - color_blend_src_alpha_factor: - enum: *blend_factor - color_blend_dst_alpha_factor: - enum: *blend_factor - color_blend_alpha_op: - enum: *blend_op - attachment_color_formats: - metadata: - description: > - Color attachment texture formats (lowercase - snake-case names matching `acquire_texture.format`). - v1 supports a single color attachment; arrays of - length other than 1 are rejected. - elements: - type: string - dynamic_state: - metadata: - description: > - Which pipeline state is set dynamically per draw vs - baked into the pipeline at creation. `none` bakes a - default 1×1 viewport (offscreen fixed-size only); - `viewport_scissor` lets the same pipeline serve - varying extents. - enum: - - none - - viewport_scissor - optionalProperties: - attachment_depth_format: - metadata: - description: > - Depth attachment format. Absent disables depth - attachments — the depth_stencil flags must be - consistent (`depth_stencil_enabled = false` when - this is absent). - ref: "depth_format_enum" - enum: - - d16_unorm - - d32_sfloat - - d24_unorm_s8_uint - run_graphics_draw: - properties: - request_id: - metadata: - description: "Correlates request with response. UUID string." - type: string - kernel_id: - metadata: - description: > - Handle returned by a prior `register_graphics_kernel` - response. The host looks up the cached - `Arc` and dispatches against it. - Dispatching with an unrecognized kernel_id returns an - `err` response. - type: string - frame_index: - metadata: - description: > - Slot in the kernel's descriptor-set ring. Must satisfy - `frame_index < descriptor_sets_in_flight` declared at - register time. Render-loop callers cycle this through - `MAX_FRAMES_IN_FLIGHT` so concurrent frames don't - scribble each other's bindings. - type: uint32 - bindings: - metadata: - description: > - Per-draw bindings — each slot's `surface_uuid` must - resolve through the host bridge's UUID → resource map. - `kind` must match the binding's declared kind from - register time. - elements: - properties: - binding: - type: uint32 - kind: - enum: - - sampled_texture - - storage_buffer - - uniform_buffer - - storage_image - surface_uuid: - type: string - vertex_buffers: - metadata: - description: > - Per-draw vertex buffer bindings. Each entry's - `surface_uuid` must resolve to a host-side - `PixelBuffer`. `offset` is the byte offset into the - buffer where vertex data starts (decimal-encoded u64 — - JTD has no native u64). Empty for vertex-fabricating - shaders (`gl_VertexIndex` patterns). - elements: - properties: - binding: - type: uint32 - surface_uuid: - type: string - offset: - type: string - color_target_uuids: - metadata: - description: > - UUIDs of color attachment textures. v1 requires exactly - one entry — multi-attachment is a future extension. Each - UUID must resolve to a host-side `Texture` - registered as a render target. - elements: - type: string - extent_width: - metadata: - description: "Render-area width in pixels." - type: uint32 - extent_height: - metadata: - description: "Render-area height in pixels." - type: uint32 - push_constants_hex: - metadata: - description: > - Push-constant payload for this draw, lowercase hex. Must - decode to exactly the kernel's declared - `push_constant_size` (or empty if zero). - type: string - draw: - metadata: - description: > - Draw call. `kind = "draw"` selects non-indexed - (`vertex_count`-driven), `kind = "draw_indexed"` requires - `index_buffer` to be set and uses `index_count` / - `first_index` / `vertex_offset`. Fields not used by the - selected kind are ignored host-side; subprocesses - should still send valid placeholder values (zero is - fine) to keep the wire shape regular. - properties: - kind: - enum: - - draw - - draw_indexed - vertex_count: - type: uint32 - index_count: - type: uint32 - instance_count: - type: uint32 - first_vertex: - type: uint32 - first_instance: - type: uint32 - first_index: - type: uint32 - vertex_offset: - type: int32 - optionalProperties: - index_buffer: - metadata: - description: > - Required when `draw.kind == "draw_indexed"`, must be - absent otherwise. `surface_uuid` resolves to a - `PixelBuffer`; `offset` is the byte offset into it. - properties: - surface_uuid: - type: string - offset: - type: string - index_type: - enum: - - uint16 - - uint32 - depth_target_uuid: - metadata: - description: > - UUID of a depth attachment texture. Reserved for future - use — v1 rejects depth attachments with an `err` - response. - type: string - viewport: - metadata: - description: > - Dynamic viewport for this draw. Required when the - kernel's pipeline state declared - `dynamic_state = "viewport_scissor"`; ignored otherwise. - properties: - x: - type: float32 - y: - type: float32 - width: - type: float32 - height: - type: float32 - min_depth: - type: float32 - max_depth: - type: float32 - scissor: - metadata: - description: > - Dynamic scissor rect for this draw. Required when the - kernel declared `dynamic_state = "viewport_scissor"`; - ignored otherwise. - properties: - x: - type: int32 - y: - type: int32 - width: - type: uint32 - height: - type: uint32 - register_acceleration_structure_blas: - properties: - request_id: - metadata: - description: "Correlates request with response. UUID string." - type: string - label: - metadata: - description: > - Human-readable label used in error messages and tracing on - the host. Echoed in the returned `as_id` derivation only via - its bytes — purely diagnostic. - type: string - vertices_hex: - metadata: - description: > - Vertex blob, lowercase hex-encoded little-endian f32s - (`R32G32B32_SFLOAT`, stride 12 bytes — interleaved - `[x,y,z,x,y,z,...]`). Length in bytes after hex decoding - must be a multiple of 12; total f32 count must equal - `3 × vertex_count`. - type: string - indices_hex: - metadata: - description: > - Index blob, lowercase hex-encoded little-endian u32s. Must - be a multiple of 3 — three indices per triangle. The host - decodes these into a `&[u32]` and forwards to - `VulkanAccelerationStructure::build_triangles_blas`. - type: string - register_acceleration_structure_tlas: - properties: - request_id: - metadata: - description: "Correlates request with response. UUID string." - type: string - label: - metadata: - description: > - Human-readable label used in error messages and tracing on - the host. Diagnostic only. - type: string - instances: - metadata: - description: > - One TLAS instance per entry. The host resolves `blas_id` to - a previously-registered BLAS via the bridge's - `as_id → Arc` map and forwards - to `VulkanAccelerationStructure::build_tlas`. Empty array - is rejected (TLAS must have at least one instance). - elements: - properties: - blas_id: - metadata: - description: > - Handle returned by a prior - `register_acceleration_structure_blas` response. - Must reference a BLAS, not a TLAS — the host - validates kind and rejects mismatches. - type: string - transform: - metadata: - description: > - Row-major 3×4 affine transform applied to the BLAS - geometry in world space. Exactly 12 floats — three - rows of four — laid out - `[m00, m01, m02, m03, m10, ..., m23]`. Matches - `VkTransformMatrixKHR` directly. - elements: - type: float32 - custom_index: - metadata: - description: > - 24-bit user data exposed to hit shaders as - `gl_InstanceCustomIndexEXT`. The high 8 bits must be - zero. - type: uint32 - mask: - metadata: - description: > - 8-bit visibility mask. Rays specify a `cullMask`; the - instance is hit only when `(mask & cullMask) != 0`. - JTD has no native u8 — the wire form is uint32 and - the host rejects values > 0xff. - type: uint32 - sbt_record_offset: - metadata: - description: > - Offset added to the SBT hit-group index. Usually 0 - for single-hit-group RT pipelines. - type: uint32 - flags: - metadata: - description: > - `VkGeometryInstanceFlagsKHR` bitmask. The host - passes this through to `VkAccelerationStructureInstanceKHR` - unchanged. `0` selects the spec default; conventional - combinations: `1 = TRIANGLE_FACING_CULL_DISABLE`, - `4 = FORCE_OPAQUE`. - type: uint32 - register_ray_tracing_kernel: - properties: - request_id: - metadata: - description: "Correlates request with response. UUID string." - type: string - label: - metadata: - description: > - Human-readable label used in error messages and tracing. - Diagnostic only. - type: string - stages: - metadata: - description: > - Shader stages composing the pipeline. Indices into this - array are referenced by `groups`. At minimum a RayGen - stage plus enough hit / miss stages to populate every - group entry — the host's - `validate_shader_groups` validates the consistency. - elements: - properties: - stage: - metadata: - description: > - Which RT stage this SPIR-V blob fills. - enum: - - ray_gen - - miss - - closest_hit - - any_hit - - intersection - - callable - spv_hex: - metadata: - description: > - Compiled SPIR-V bytecode for the stage, lowercase - hex (no `0x` prefix, no whitespace). - type: string - entry_point: - metadata: - description: > - Entry-point name. Empty string is normalized to - `"main"` host-side. - type: string - groups: - metadata: - description: > - Shader-group layout. The order here is the order entries - appear in the SBT regions (raygen / miss / hit / callable). - Each variant references stage indices into `stages`. - elements: - properties: - kind: - metadata: - description: > - - `general`: contributes one ray-gen, miss, or - callable stage via `general_stage`. - - `triangles_hit`: triangle hit group; sets at least - one of `closest_hit_stage` / `any_hit_stage` (use - `0xFFFFFFFF` as the absent sentinel — JTD has no - `Option`). - - `procedural_hit`: procedural hit group with custom - intersection shader plus optional closest-hit / - any-hit (same sentinel for absent). - enum: - - general - - triangles_hit - - procedural_hit - general_stage: - metadata: - description: > - Stage index for `general`. `0xFFFFFFFF` for the - other group kinds (ignored host-side). - type: uint32 - closest_hit_stage: - metadata: - description: > - Stage index for `triangles_hit` / - `procedural_hit`. Use `0xFFFFFFFF` to indicate - absent. Ignored for `general`. - type: uint32 - any_hit_stage: - metadata: - description: > - Stage index for `triangles_hit` / - `procedural_hit`. `0xFFFFFFFF` for absent. - Ignored for `general`. - type: uint32 - intersection_stage: - metadata: - description: > - Stage index for `procedural_hit`. `0xFFFFFFFF` for - the other group kinds. Required for - `procedural_hit`. - type: uint32 - bindings: - metadata: - description: > - Descriptor-set-0 bindings. Validated against - `rspirv-reflect` of every supplied stage at register - time — mismatches return an `err` response. - elements: - properties: - binding: - type: uint32 - kind: - metadata: - description: > - Resource kind for this binding slot. - enum: - - storage_buffer - - uniform_buffer - - sampled_texture - - storage_image - - acceleration_structure - stages: - metadata: - description: > - Bitmask of RT stages the binding is visible to. - Bits: `1=RAYGEN`, `2=MISS`, `4=CLOSEST_HIT`, - `8=ANY_HIT`, `16=INTERSECTION`, `32=CALLABLE`. - type: uint32 - push_constant_size: - metadata: - description: > - Push-constant range size in bytes. 0 if the kernel uses - no push constants. Validated against the merged shader - reflection. - type: uint32 - push_constant_stages: - metadata: - description: > - Bitmask of RT stages the push-constant range is visible - to. Same bit layout as `bindings.stages`. Ignored when - `push_constant_size == 0`. - type: uint32 - max_recursion_depth: - metadata: - description: > - Maximum ray recursion depth. Must be ≤ device's - `maxRayRecursionDepth`. Most scenes (primary rays only) - use 1; secondary-ray techniques bump this to 2 or more. - type: uint32 - run_ray_tracing_kernel: - properties: - request_id: - metadata: - description: "Correlates request with response. UUID string." - type: string - kernel_id: - metadata: - description: > - Handle returned by a prior `register_ray_tracing_kernel` - response. The host looks up the cached - `Arc` and dispatches against it. - Dispatching with an unrecognized kernel_id returns an - `err` response. - type: string - bindings: - metadata: - description: > - Per-trace bindings. `kind` must match the binding's - declared kind from register time. The host bridge - resolves `target_id` based on `kind`: - - `acceleration_structure`: `target_id` is an `as_id` - from a prior `register_acceleration_structure_tlas`. - - all other kinds: `target_id` is the surface-share UUID - of a host-side `PixelBuffer` / `Texture` - (same convention compute and graphics use). - elements: - properties: - binding: - type: uint32 - kind: - enum: - - storage_buffer - - uniform_buffer - - sampled_texture - - storage_image - - acceleration_structure - target_id: - type: string - push_constants_hex: - metadata: - description: > - Push-constant payload for this dispatch, lowercase hex. - Length in bytes (after hex decoding) must equal the - kernel's declared `push_constant_size`. Empty string - when the kernel has no push constants. - type: string - width: - metadata: - description: "vkCmdTraceRaysKHR width." - type: uint32 - height: - metadata: - description: "vkCmdTraceRaysKHR height." - type: uint32 - depth: - metadata: - description: "vkCmdTraceRaysKHR depth (usually 1 for 2D output)." - type: uint32 - release_handle: - properties: - request_id: - metadata: - description: "Correlates request with response. UUID string." - type: string - handle_id: - metadata: - description: "Opaque handle ID previously returned by acquire_*." - type: string - log: - properties: - source: - metadata: - description: > - Origin runtime of the record. Always "python" on the wire — Rust - never routes through escalate; Rust call sites hit - `tracing::*!()` directly on the host. - enum: - - python - source_seq: - metadata: - description: > - Subprocess-monotonic sequence number (uint64 as string — JTD has - no native u64). Escape hatch for recovering subprocess-local - order within a single source. Not authoritative across sources - — use `host_ts` for merged-stream ordering. - type: string - source_ts: - metadata: - description: > - Subprocess wall-clock timestamp ISO8601 (advisory). Never used - for ordering; the host stamps `host_ts` on receipt as the - authoritative sort key. - type: string - level: - metadata: - description: "Severity level of the record. Maps 1:1 onto tracing::Level." - enum: - - trace - - debug - - info - - warn - - error - message: - metadata: - description: "Primary human-readable message." - type: string - intercepted: - metadata: - description: > - True when the record was captured from subprocess stdout/stderr, - console.log, root logging handler, or a raw fd write, rather - than a direct `streamlib.log.*` call. - type: boolean - channel: - metadata: - description: > - Interceptor channel when `intercepted: true`. Conventional - values: "stdout", "stderr", "console.log", "logging", "fd1", - "fd2". Null when `intercepted: false`. - type: string - nullable: true - pipeline_id: - metadata: - description: "Pipeline identifier. Null for runtime-level records." - type: string - nullable: true - processor_id: - metadata: - description: "Processor identifier. Null outside a processor." - type: string - nullable: true - attrs: - metadata: - description: > - User-supplied structured fields. Copied flat onto the emitted - RuntimeLogEvent's `attrs` map — not nested under an `attrs.key` - path in the JSONL. - values: {} diff --git a/packages/escalate/schemas/escalate_response.yaml b/packages/escalate/schemas/escalate_response.yaml deleted file mode 100644 index 6bcc0c789..000000000 --- a/packages/escalate/schemas/escalate_response.yaml +++ /dev/null @@ -1,129 +0,0 @@ -# Copyright (c) 2025 Jonathan Fontanez -# SPDX-License-Identifier: BUSL-1.1 -# -# JSON Type Definition (RFC 8927) schema for polyglot GPU escalation responses. -# -# Sent from the Rust host processor over the subprocess's stdin in reply to an -# [`EscalateRequest`]. Correlated by `request_id`. -# -metadata: - type: EscalateResponse - description: "Polyglot subprocess escalate-on-behalf response (host → subprocess)" - -discriminator: result -mapping: - ok: - properties: - request_id: - metadata: - description: "Correlates response with request. Matches request_id in EscalateRequest." - type: string - handle_id: - metadata: - description: > - Opaque handle returned by the host. For acquire_pixel_buffer this - is the PixelBufferPoolId the host registered with its - pixel-buffer pool and SurfaceStore. For acquire_texture this is - a host-side UUID keying the EscalateHandleRegistry's texture - slot. For register_compute_kernel this is the SHA-256 hex of - the SPIR-V blob — re-registering identical SPIR-V returns the - same handle_id and re-uses the cached `VulkanComputeKernel`. - For release_handle this echoes the released id. For - run_compute_kernel this echoes the kernel_id (compute is - synchronous host-side; nothing extra travels). - type: string - optionalProperties: - width: - metadata: - description: "Width in pixels (set on acquire_pixel_buffer and acquire_texture responses)." - type: uint32 - height: - metadata: - description: "Height in pixels (set on acquire_pixel_buffer and acquire_texture responses)." - type: uint32 - format: - metadata: - description: "Resolved pixel or texture format identifier." - type: string - usage: - metadata: - description: > - Resolved usage tokens (set on acquire_texture responses). Array - reflects the exact flags the host honored. - elements: - type: string - timeline_value: - metadata: - description: > - Decimal-string-encoded u64 timeline value the host signaled on - the surface's shared timeline semaphore at end-of-submit. Set - on `run_cpu_readback_copy` and `try_run_cpu_readback_copy` - responses, and on `refill_device_export_staging` / - `copy_device_export_staging_back_to_surface` responses, where - the timeline is the staging's own `refill_done`. The subprocess - waits on its imported `ConsumerVulkanTimelineSemaphore` for - this value before reading or writing the staging buffer mapped - at registration time. JTD has no native u64 — wire form is - decimal-string, parsed back to u64 on the subprocess side. - type: string - staging_byte_size: - metadata: - description: > - Decimal-string-encoded u64 byte size of the device-export - staging buffer — the span an imported device pointer covers. - Set on `open_device_export_staging` responses. JTD has no - native u64; same decimal-string convention as - `timeline_value`. - type: string - bytes_per_row: - metadata: - description: > - Decimal-string-encoded u64 row pitch of the device-export - staging, derived from the staging's own geometry rather than - from the requesting surface's — the staging is the object the - byte span was sized for. Set on `open_device_export_staging` - responses. - type: string - writable: - metadata: - description: > - Whether the host can honour a write-back for this export. Set - on `open_device_export_staging` responses. False for - texture-backed exports, which are read-only by construction — - a subprocess that takes a write lock over one is refused - rather than silently dropping the edit at unlock. - type: boolean - exporting_device_uuid: - metadata: - description: > - Lowercase hex of the exporting Vulkan device's - `VkPhysicalDeviceIDProperties::deviceUUID` (32 characters, no - separators). Set on `open_device_export_staging` responses. - The external device API must import onto the GPU that owns the - memory; matching this UUID is the entire device-binding - contract, and falling through to device ordinal 0 corrupts - silently on a multi-GPU host. - type: string - err: - properties: - request_id: - metadata: - description: "Correlates response with request." - type: string - message: - metadata: - description: "Human-readable error message from the host side." - type: string - contended: - properties: - request_id: - metadata: - description: > - Correlates response with request. Returned by - [`try_acquire_cpu_readback`] (and any future `try_*` op that - opts into the same shape) when the host's adapter would have - blocked on a competing reader/writer. The subprocess gets no - handle, no planes, and no surface-share registrations to - release — `contended` is purely advisory, the customer skips - the frame and re-tries later. - type: string diff --git a/packages/escalate/streamlib.yaml b/packages/escalate/streamlib.yaml deleted file mode 100644 index 3954a8353..000000000 --- a/packages/escalate/streamlib.yaml +++ /dev/null @@ -1,22 +0,0 @@ -# yaml-language-server: $schema=../../schemas/streamlib.schema.json -# Copyright (c) 2025 Jonathan Fontanez -# SPDX-License-Identifier: BUSL-1.1 - -# @tatolab/escalate — JSON-RPC wire types for subprocess → host IPC. -# Pure wire-schemas package (no processors, no platform code). Peer to -# @tatolab/core: where core ships the data-plane wire vocabulary -# (VideoFrame / AudioFrame / Encoded*), escalate ships the control-plane -# wire vocabulary (the request/response envelopes used by the polyglot -# SDKs to reach GpuContextFullAccess through the LimitedAccess capability -# boundary). -package: - org: tatolab - name: escalate - version: 1.0.0 - description: "Escalate IPC wire types (subprocess → host JSON-RPC envelopes)" - -schemas: - EscalateRequest: - file: schemas/escalate_request.yaml - EscalateResponse: - file: schemas/escalate_response.yaml diff --git a/packages/frame-tap/Cargo.toml b/packages/frame-tap/Cargo.toml index f62ddd2d8..348c14cef 100644 --- a/packages/frame-tap/Cargo.toml +++ b/packages/frame-tap/Cargo.toml @@ -18,8 +18,6 @@ path = "_generated_rust_crate_root_/lib.rs" name = "streamlib_frame_tap" crate-type = ["rlib", "cdylib"] -[build-dependencies] -streamlib-jtd-codegen = {version = "0.16.0"} [dependencies] # Engine-free authoring SDK (never the `streamlib` facade) — capability-typed diff --git a/packages/frame-tap/build.rs b/packages/frame-tap/build.rs deleted file mode 100644 index 8bc56c7ca..000000000 --- a/packages/frame-tap/build.rs +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) 2025 Jonathan Fontanez -// SPDX-License-Identifier: BUSL-1.1 - -#![allow(clippy::disallowed_macros)] // build.rs uses println! for `cargo:` directives - -//! Codegen for the frame-tap package: generates the typed config + the -//! imported `@tatolab/core` wire types (VideoFrame) consumed by the processor. - -fn main() { - streamlib_jtd_codegen::build_rs::run_for_rust_crate(); -} diff --git a/packages/frame-tap/schemas/frame_tap_config.yaml b/packages/frame-tap/schemas/frame_tap_config.yaml deleted file mode 100644 index 89378871d..000000000 --- a/packages/frame-tap/schemas/frame_tap_config.yaml +++ /dev/null @@ -1,53 +0,0 @@ -# Copyright (c) 2025 Jonathan Fontanez -# SPDX-License-Identifier: BUSL-1.1 -# -# JSON Type Definition (RFC 8927) schema for the FrameTap processor config. -# The tap is a sink: it samples frames to disk (JPEG) on the selected -# strategy, off the hot path, with safe-by-default filesystem caps. - -metadata: - type: FrameTapConfig - description: "Configuration for the frame tap (sink frame sampler)." - -properties: - strategy: - metadata: - description: "When to sample a frame. EveryNFrames: every n_frames-th frame. EveryDuration: at most one sample per interval_ms (monotonic wall clock). KeepLastK: every frame, retaining only the last keep_last_k files (rotating)." - enum: - - EveryNFrames - - EveryDuration - - KeepLastK - output_dir: - metadata: - description: "Directory to write sampled JPEG frames into (created if missing)." - type: string - -optionalProperties: - n_frames: - metadata: - description: "EveryNFrames: sample every Nth frame (default 30)." - type: uint32 - interval_ms: - metadata: - description: "EveryDuration: minimum gap between samples in ms, measured on a monotonic wall clock (default 1000)." - type: uint32 - keep_last_k: - metadata: - description: "KeepLastK: number of most-recent samples to retain (default 8)." - type: uint32 - jpeg_quality: - metadata: - description: "JPEG quality 1..100 (default 85)." - type: uint32 - max_file_count: - metadata: - description: "Filesystem safety cap: max sample files retained; oldest evicted past this (default 200)." - type: uint32 - max_total_mb: - metadata: - description: "Filesystem safety cap: max total bytes of samples in MiB; oldest evicted past this (default 512)." - type: uint32 - filename_prefix: - metadata: - description: "Filename prefix for samples (default 'frame'); files are '_.jpg'." - type: string diff --git a/packages/frame-tap/streamlib.yaml b/packages/frame-tap/streamlib.yaml deleted file mode 100644 index 304810cba..000000000 --- a/packages/frame-tap/streamlib.yaml +++ /dev/null @@ -1,38 +0,0 @@ -# yaml-language-server: $schema=../../schemas/streamlib.schema.json -package: - org: tatolab - name: frame-tap - version: 1.0.0 - description: "Frame tap — a sink processor that fans out from any video output and samples frames to disk on a configurable strategy, off the hot path." - -dependencies: - "@tatolab/core": "^1.0.0" - -schemas: - FrameTapConfig: - file: schemas/frame_tap_config.yaml - # Wire types imported from @tatolab/core. - ColorInfo: - package: "@tatolab/core" - ContentLight: - package: "@tatolab/core" - MasteringDisplay: - package: "@tatolab/core" - VideoFrame: - package: "@tatolab/core" - -processors: - - name: FrameTap - description: "Samples video frames to disk (JPEG) on a configurable strategy, off the hot path. A sink: attach it to any video output port (fan-out) to inspect that output without rerouting the pipeline." - runtime: rust - execution: reactive - config: - name: config - schema: FrameTapConfig - inputs: - - name: video_in - schema: VideoFrame - # A tap is a sink — no outputs. The upstream output fans out to this - # tap in parallel with its real consumer(s); the engine broadcasts a - # port's frames to every connected input. - outputs: [] diff --git a/packages/h264/Cargo.toml b/packages/h264/Cargo.toml index 41ef5900d..4975a1fab 100644 --- a/packages/h264/Cargo.toml +++ b/packages/h264/Cargo.toml @@ -18,8 +18,6 @@ path = "_generated_rust_crate_root_/lib.rs" name = "streamlib_h264" crate-type = ["rlib", "cdylib"] -[build-dependencies] -streamlib-jtd-codegen = {version = "0.16.0"} [dependencies] # Engine-free authoring SDK (never the `streamlib` facade) — capability-typed diff --git a/packages/h264/build.rs b/packages/h264/build.rs deleted file mode 100644 index 0f3236712..000000000 --- a/packages/h264/build.rs +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright (c) 2025 Jonathan Fontanez -// SPDX-License-Identifier: BUSL-1.1 - -fn main() { - streamlib_jtd_codegen::build_rs::run_for_rust_crate(); -} diff --git a/packages/h264/schemas/h264_decoder_config.yaml b/packages/h264/schemas/h264_decoder_config.yaml deleted file mode 100644 index 7c24d9db5..000000000 --- a/packages/h264/schemas/h264_decoder_config.yaml +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright (c) 2025 Jonathan Fontanez -# SPDX-License-Identifier: BUSL-1.1 -# -# JSON Type Definition (RFC 8927) schema for H.264 Decoder config. - -metadata: - type: H264DecoderConfig - description: "Configuration for H.264 video decoding." - -# Empty struct body — JTD requires *some* shape declaration; without it, the -# schema is interpreted as "any value" and codegen emits a `pub type X = -# Option` alias instead of an empty struct. The decoder takes no -# user-tunable knobs today, so the empty `optionalProperties` block is the -# faithful representation. -optionalProperties: {} diff --git a/packages/h264/schemas/h264_encoder_config.yaml b/packages/h264/schemas/h264_encoder_config.yaml deleted file mode 100644 index b36b325ab..000000000 --- a/packages/h264/schemas/h264_encoder_config.yaml +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright (c) 2025 Jonathan Fontanez -# SPDX-License-Identifier: BUSL-1.1 -# -# JSON Type Definition (RFC 8927) schema for H.264 Encoder config. - -metadata: - type: H264EncoderConfig - description: "Configuration for H.264 video encoding." - -optionalProperties: - width: - metadata: - description: "Optional override / guardrail for video width in pixels. Unset = the encoder takes the width from the first VideoFrame it receives. Set values that disagree with the frame width log a warning and the frame still wins, matching the FPS pattern." - type: uint32 - height: - metadata: - description: "Optional override / guardrail for video height in pixels. Unset = the encoder takes the height from the first VideoFrame it receives. Set values that disagree with the frame height log a warning and the frame still wins, matching the FPS pattern." - type: uint32 - bitrate_bps: - metadata: - description: "Target bitrate in bits per second (default: 2000000)." - type: uint32 - keyframe_interval: - metadata: - description: "Frames between keyframes (overrides keyframe_interval_seconds if set)." - type: uint32 - keyframe_interval_seconds: - metadata: - description: "Seconds between keyframes (default: 2.0). Converted to frames using the encoder's fps. Ignored if keyframe_interval (frames) is set." - type: float32 - fps: - metadata: - description: "Frames per second for encoder timing (default: 60)." - type: uint32 - profile: - metadata: - description: "H.264 profile: baseline, main, or high (default: main)." - type: string - effort_level: - metadata: - description: "Vulkan API encoder-effort index (VkVideoEncodeQualityLevelInfoKHR::quality_level). Higher = more GPU work per frame (mode decision, RD-opt, motion search). NOT an H.264 quality knob — profile, QP, and rate-control are configured elsewhere. Valid values are 0..VkVideoEncodeCapabilitiesKHR::maxQualityLevels; the session clamps as a safety floor. Unset = codec default." - type: uint32 diff --git a/packages/h264/streamlib-codegen.lock b/packages/h264/streamlib-codegen.lock deleted file mode 100644 index 5571de32c..000000000 --- a/packages/h264/streamlib-codegen.lock +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright (c) 2025 Jonathan Fontanez -# SPDX-License-Identifier: BUSL-1.1 -# -# AUTOGENERATED BY `streamlib generate`. DO NOT EDIT BY HAND. -# -# This lockfile pins resolved package versions + content hashes so a fresh -# checkout reconstructs the same generated bindings byte-for-byte. -# Commit it in applications and examples; don't commit it in publishable -# libraries (they inherit their consumer's lock). -version: 1 -packages: - '@tatolab/core': - version: 1.0.0 - source: - kind: path - path: ../core - content_hash: sha256:42929566e77db3311b1bcf576124ee36d5505f1cd1a2e70ccca50ffcba431ec5 diff --git a/packages/h264/streamlib.yaml b/packages/h264/streamlib.yaml deleted file mode 100644 index 01d0028d4..000000000 --- a/packages/h264/streamlib.yaml +++ /dev/null @@ -1,67 +0,0 @@ -# yaml-language-server: $schema=../../schemas/streamlib.schema.json -package: - org: tatolab - name: h264 - version: 1.0.0 - description: H.264 encoder + decoder processors via Vulkan Video -dependencies: - '@tatolab/core': - version: ^1.0.0 -schemas: - ColorInfo: - package: '@tatolab/core' - ContentLight: - package: '@tatolab/core' - EncodedVideoFrame: - package: '@tatolab/core' - H264DecoderConfig: - file: schemas/h264_decoder_config.yaml - H264EncoderConfig: - file: schemas/h264_encoder_config.yaml - MasteringDisplay: - package: '@tatolab/core' - VideoFrame: - package: '@tatolab/core' -processors: -- name: H264Encoder - description: Encodes VideoFrame to EncodedVideoFrame (H.264) via Vulkan Video - runtime: rust - entrypoint: null - execution: reactive - scheduling: - priority: high - config: - name: config - schema: H264EncoderConfig - state: [] - inputs: - - name: video_in - schema: VideoFrame - description: Raw video frames to encode - delivery_profile: every_sample - outputs: - - name: encoded_video_out - schema: EncodedVideoFrame - description: H.264 encoded video frames - delivery_profile: null -- name: H264Decoder - description: Decodes EncodedVideoFrame (H.264) to VideoFrame via Vulkan Video - runtime: rust - entrypoint: null - execution: reactive - scheduling: - priority: high - config: - name: config - schema: H264DecoderConfig - state: [] - inputs: - - name: encoded_video_in - schema: EncodedVideoFrame - description: H.264 encoded video frames to decode - delivery_profile: null - outputs: - - name: video_out - schema: VideoFrame - description: Decoded video frames - delivery_profile: null diff --git a/packages/h265/Cargo.toml b/packages/h265/Cargo.toml index 0df93ad49..000ec047b 100644 --- a/packages/h265/Cargo.toml +++ b/packages/h265/Cargo.toml @@ -18,8 +18,6 @@ path = "_generated_rust_crate_root_/lib.rs" name = "streamlib_h265" crate-type = ["rlib", "cdylib"] -[build-dependencies] -streamlib-jtd-codegen = {version = "0.16.0"} [dependencies] # Engine-free authoring SDK (never the `streamlib` facade) — capability-typed diff --git a/packages/h265/build.rs b/packages/h265/build.rs deleted file mode 100644 index 0f3236712..000000000 --- a/packages/h265/build.rs +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright (c) 2025 Jonathan Fontanez -// SPDX-License-Identifier: BUSL-1.1 - -fn main() { - streamlib_jtd_codegen::build_rs::run_for_rust_crate(); -} diff --git a/packages/h265/schemas/h265_decoder_config.yaml b/packages/h265/schemas/h265_decoder_config.yaml deleted file mode 100644 index ed40e77af..000000000 --- a/packages/h265/schemas/h265_decoder_config.yaml +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright (c) 2025 Jonathan Fontanez -# SPDX-License-Identifier: BUSL-1.1 -# -# JSON Type Definition (RFC 8927) schema for H.265 Decoder config. - -metadata: - type: H265DecoderConfig - description: "Configuration for H.265 video decoding." - -# Empty struct body — JTD requires *some* shape declaration; without it, the -# schema is interpreted as "any value" and codegen emits a `pub type X = -# Option` alias instead of an empty struct. The decoder takes no -# user-tunable knobs today, so the empty `optionalProperties` block is the -# faithful representation. -optionalProperties: {} diff --git a/packages/h265/schemas/h265_encoder_config.yaml b/packages/h265/schemas/h265_encoder_config.yaml deleted file mode 100644 index c452260a8..000000000 --- a/packages/h265/schemas/h265_encoder_config.yaml +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright (c) 2025 Jonathan Fontanez -# SPDX-License-Identifier: BUSL-1.1 -# -# JSON Type Definition (RFC 8927) schema for H.265 Encoder config. - -metadata: - type: H265EncoderConfig - description: "Configuration for H.265 video encoding." - -optionalProperties: - width: - metadata: - description: "Optional override / guardrail for video width in pixels. Unset = the encoder takes the width from the first VideoFrame it receives. Set values that disagree with the frame width log a warning and the frame still wins, matching the FPS pattern." - type: uint32 - height: - metadata: - description: "Optional override / guardrail for video height in pixels. Unset = the encoder takes the height from the first VideoFrame it receives. Set values that disagree with the frame height log a warning and the frame still wins, matching the FPS pattern." - type: uint32 - bitrate_bps: - metadata: - description: "Target bitrate in bits per second (default: 2000000)." - type: uint32 - keyframe_interval: - metadata: - description: "Frames between keyframes (overrides keyframe_interval_seconds if set)." - type: uint32 - fps: - metadata: - description: "Frames per second for encoder timing (default: 60)." - type: uint32 - keyframe_interval_seconds: - metadata: - description: "Seconds between keyframes (default: 2.0). Converted to frames using the encoder's fps. Ignored if keyframe_interval (frames) is set." - type: float32 - effort_level: - metadata: - description: "Vulkan API encoder-effort index (VkVideoEncodeQualityLevelInfoKHR::quality_level). Higher = more GPU work per frame (mode decision, RD-opt, motion search). NOT an H.265 quality knob — profile, tier, level_idc, QP, and rate-control are configured elsewhere. Valid values are 0..VkVideoEncodeCapabilitiesKHR::maxQualityLevels; the session clamps as a safety floor. Unset = codec default." - type: uint32 diff --git a/packages/h265/streamlib-codegen.lock b/packages/h265/streamlib-codegen.lock deleted file mode 100644 index 5571de32c..000000000 --- a/packages/h265/streamlib-codegen.lock +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright (c) 2025 Jonathan Fontanez -# SPDX-License-Identifier: BUSL-1.1 -# -# AUTOGENERATED BY `streamlib generate`. DO NOT EDIT BY HAND. -# -# This lockfile pins resolved package versions + content hashes so a fresh -# checkout reconstructs the same generated bindings byte-for-byte. -# Commit it in applications and examples; don't commit it in publishable -# libraries (they inherit their consumer's lock). -version: 1 -packages: - '@tatolab/core': - version: 1.0.0 - source: - kind: path - path: ../core - content_hash: sha256:42929566e77db3311b1bcf576124ee36d5505f1cd1a2e70ccca50ffcba431ec5 diff --git a/packages/h265/streamlib.yaml b/packages/h265/streamlib.yaml deleted file mode 100644 index e917cc01a..000000000 --- a/packages/h265/streamlib.yaml +++ /dev/null @@ -1,67 +0,0 @@ -# yaml-language-server: $schema=../../schemas/streamlib.schema.json -package: - org: tatolab - name: h265 - version: 1.0.0 - description: H.265 encoder + decoder processors via Vulkan Video -dependencies: - '@tatolab/core': - version: ^1.0.0 -schemas: - ColorInfo: - package: '@tatolab/core' - ContentLight: - package: '@tatolab/core' - EncodedVideoFrame: - package: '@tatolab/core' - H265DecoderConfig: - file: schemas/h265_decoder_config.yaml - H265EncoderConfig: - file: schemas/h265_encoder_config.yaml - MasteringDisplay: - package: '@tatolab/core' - VideoFrame: - package: '@tatolab/core' -processors: -- name: H265Encoder - description: Encodes VideoFrame to EncodedVideoFrame (H.265) via Vulkan Video - runtime: rust - entrypoint: null - execution: reactive - scheduling: - priority: high - config: - name: config - schema: H265EncoderConfig - state: [] - inputs: - - name: video_in - schema: VideoFrame - description: Raw video frames to encode - delivery_profile: every_sample - outputs: - - name: encoded_video_out - schema: EncodedVideoFrame - description: H.265 encoded video frames - delivery_profile: null -- name: H265Decoder - description: Decodes EncodedVideoFrame (H.265) to VideoFrame via Vulkan Video - runtime: rust - entrypoint: null - execution: reactive - scheduling: - priority: high - config: - name: config - schema: H265DecoderConfig - state: [] - inputs: - - name: encoded_video_in - schema: EncodedVideoFrame - description: H.265 encoded video frames to decode - delivery_profile: null - outputs: - - name: video_out - schema: VideoFrame - description: Decoded video frames - delivery_profile: null diff --git a/packages/jpeg/Cargo.toml b/packages/jpeg/Cargo.toml index 37e3cb1f5..46dc34d36 100644 --- a/packages/jpeg/Cargo.toml +++ b/packages/jpeg/Cargo.toml @@ -18,8 +18,6 @@ path = "_generated_rust_crate_root_/lib.rs" name = "streamlib_jpeg" crate-type = ["rlib", "cdylib"] -[build-dependencies] -streamlib-jtd-codegen = {version = "0.16.0"} [dependencies] # Engine-free authoring SDK — runtime context views, processor traits, diff --git a/packages/jpeg/build.rs b/packages/jpeg/build.rs deleted file mode 100644 index 0f3236712..000000000 --- a/packages/jpeg/build.rs +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright (c) 2025 Jonathan Fontanez -// SPDX-License-Identifier: BUSL-1.1 - -fn main() { - streamlib_jtd_codegen::build_rs::run_for_rust_crate(); -} diff --git a/packages/jpeg/schemas/encoded_jpeg_frame.yaml b/packages/jpeg/schemas/encoded_jpeg_frame.yaml deleted file mode 100644 index f6b035582..000000000 --- a/packages/jpeg/schemas/encoded_jpeg_frame.yaml +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright (c) 2025 Jonathan Fontanez -# SPDX-License-Identifier: BUSL-1.1 -# -# JSON Type Definition (RFC 8927) schema for encoded JPEG frames. -# -# Mirrors EncodedVideoFrame's shape minus codec-specific fields: JPEG -# is self-contained per-frame (no keyframe/predicted-frame distinction, -# no inter-frame state) and carries its own colorimetry in-band via -# EXIF / ICC / Adobe APP14 segments — so no `is_keyframe` and no -# `color_info` / mastering / content-light fields out here. The -# decoder surfaces the parsed colorimetry on its output VideoFrame. - -metadata: - type: EncodedJpegFrame - description: "JPEG-encoded image bytes (one self-contained frame per message)" - flow_class: sample_stream - # Slot-priming HINT, never a cap: the publisher grows its PowerOfTwo segment - # on the first oversized loan, so a high-quality 4K JPEG (Q=100 ≈ 4–8 MiB) - # delivers via one growth event rather than crashing. 1 MiB covers the common - # 720p/1080p drone stream (30 Hz) without a first-frame regrow. - expected_payload_bytes: 1048576 - -properties: - data: - metadata: - description: "Raw JPEG bytes (SOI through EOI, one full image)" - elements: - type: uint8 - timestamp_ns: - metadata: - description: "Monotonic timestamp in nanoseconds (int64 as string)" - type: string - frame_number: - metadata: - description: "Sequential frame number (uint64 as string)" - type: string - -optionalProperties: - fps: - metadata: - description: "Source frame rate in frames per second (pass-through from capture / depayloader, when known)" - type: uint32 diff --git a/packages/jpeg/schemas/jpeg_decoder_config.yaml b/packages/jpeg/schemas/jpeg_decoder_config.yaml deleted file mode 100644 index 58155027a..000000000 --- a/packages/jpeg/schemas/jpeg_decoder_config.yaml +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright (c) 2025 Jonathan Fontanez -# SPDX-License-Identifier: BUSL-1.1 -# -# JSON Type Definition (RFC 8927) schema for JPEG Decoder config. - -metadata: - type: JpegDecoderConfig - description: "Configuration for GPU-backed JPEG decoding." - -# `optionalProperties` (rather than an empty body) is load-bearing — an -# empty schema declaration is treated as "any value" by JTD codegen and -# emits `pub type X = Option` instead of a typed struct. -optionalProperties: - max_width: - metadata: - description: > - Maximum frame width in pixels the decoder will accept. Sizes the - worst-case GPU storage backing the texture ring at setup time. - Defaults to 3840 (4K). Frames exceeding this are rejected with - a typed error; rebuild the decoder with a larger value to handle - them. - type: uint32 - max_height: - metadata: - description: > - Maximum frame height in pixels the decoder will accept. Defaults - to 2160 (4K). Same exceeded-frame behavior as max_width. - type: uint32 diff --git a/packages/jpeg/streamlib-codegen.lock b/packages/jpeg/streamlib-codegen.lock deleted file mode 100644 index fac277b8c..000000000 --- a/packages/jpeg/streamlib-codegen.lock +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright (c) 2025 Jonathan Fontanez -# SPDX-License-Identifier: BUSL-1.1 -# -# AUTOGENERATED BY `streamlib generate`. DO NOT EDIT BY HAND. -# -# This lockfile pins resolved package versions + content hashes so a fresh -# checkout reconstructs the same generated bindings byte-for-byte. -# Commit it in applications and examples; don't commit it in publishable -# libraries (they inherit their consumer's lock). -version: 1 -packages: - '@tatolab/core': - version: 1.0.0 - source: - kind: path - path: ../core - content_hash: sha256:dccefbd6d0f322c6bc621fa10fdeb8675090f2c9e74051a3db8a7ec4753c4580 diff --git a/packages/jpeg/streamlib.yaml b/packages/jpeg/streamlib.yaml deleted file mode 100644 index f048ff3b6..000000000 --- a/packages/jpeg/streamlib.yaml +++ /dev/null @@ -1,44 +0,0 @@ -# yaml-language-server: $schema=../../schemas/streamlib.schema.json -package: - org: tatolab - name: jpeg - version: 1.0.7 - description: JPEG decoder processor via the GPU SimpleJpegDecoder primitive -dependencies: - '@tatolab/core': - version: ^1.0.0 -schemas: - ColorInfo: - package: '@tatolab/core' - ContentLight: - package: '@tatolab/core' - EncodedJpegFrame: - file: schemas/encoded_jpeg_frame.yaml - JpegDecoderConfig: - file: schemas/jpeg_decoder_config.yaml - MasteringDisplay: - package: '@tatolab/core' - VideoFrame: - package: '@tatolab/core' -processors: -- name: JpegDecoder - description: Decodes EncodedJpegFrame to VideoFrame via the GPU SimpleJpegDecoder primitive - runtime: rust - entrypoint: null - execution: reactive - scheduling: - priority: high - config: - name: config - schema: JpegDecoderConfig - state: [] - inputs: - - name: encoded_jpeg_in - schema: EncodedJpegFrame - description: JPEG-encoded frames to decode - delivery_profile: null - outputs: - - name: video_out - schema: VideoFrame - description: Decoded video frames - delivery_profile: null diff --git a/packages/moq/Cargo.toml b/packages/moq/Cargo.toml index 71ad7ec6c..c9b933602 100644 --- a/packages/moq/Cargo.toml +++ b/packages/moq/Cargo.toml @@ -18,8 +18,6 @@ path = "_generated_rust_crate_root_/lib.rs" name = "streamlib_moq_processors" crate-type = ["rlib", "cdylib"] -[build-dependencies] -streamlib-jtd-codegen = {version = "0.16.0"} [dependencies] # Transport library half of @tatolab/moq (publish/subscribe sessions + catalog). diff --git a/packages/moq/build.rs b/packages/moq/build.rs deleted file mode 100644 index 0f3236712..000000000 --- a/packages/moq/build.rs +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright (c) 2025 Jonathan Fontanez -// SPDX-License-Identifier: BUSL-1.1 - -fn main() { - streamlib_jtd_codegen::build_rs::run_for_rust_crate(); -} diff --git a/packages/moq/schemas/moq_publish_track_config.yaml b/packages/moq/schemas/moq_publish_track_config.yaml deleted file mode 100644 index 04d111b83..000000000 --- a/packages/moq/schemas/moq_publish_track_config.yaml +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright (c) 2025 Jonathan Fontanez -# SPDX-License-Identifier: BUSL-1.1 -# -# JSON Type Definition (RFC 8927) schema for MoQ Publish Track config - -metadata: - type: MoqPublishTrackConfig - description: "Configuration for publishing a single track to a MoQ relay" - -optionalProperties: - track_name: - metadata: - description: "Track name (auto-generated from processor ID if not set)" - type: string diff --git a/packages/moq/schemas/moq_subscribe_track_config.yaml b/packages/moq/schemas/moq_subscribe_track_config.yaml deleted file mode 100644 index db872b557..000000000 --- a/packages/moq/schemas/moq_subscribe_track_config.yaml +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright (c) 2025 Jonathan Fontanez -# SPDX-License-Identifier: BUSL-1.1 -# -# JSON Type Definition (RFC 8927) schema for MoQ Subscribe Track config - -metadata: - type: MoqSubscribeTrackConfig - description: "Configuration for subscribing to a single track from a MoQ relay" - -properties: - track_name: - metadata: - description: "Track name to subscribe to" - type: string diff --git a/packages/moq/streamlib-codegen.lock b/packages/moq/streamlib-codegen.lock deleted file mode 100644 index 5571de32c..000000000 --- a/packages/moq/streamlib-codegen.lock +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright (c) 2025 Jonathan Fontanez -# SPDX-License-Identifier: BUSL-1.1 -# -# AUTOGENERATED BY `streamlib generate`. DO NOT EDIT BY HAND. -# -# This lockfile pins resolved package versions + content hashes so a fresh -# checkout reconstructs the same generated bindings byte-for-byte. -# Commit it in applications and examples; don't commit it in publishable -# libraries (they inherit their consumer's lock). -version: 1 -packages: - '@tatolab/core': - version: 1.0.0 - source: - kind: path - path: ../core - content_hash: sha256:42929566e77db3311b1bcf576124ee36d5505f1cd1a2e70ccca50ffcba431ec5 diff --git a/packages/moq/streamlib.yaml b/packages/moq/streamlib.yaml deleted file mode 100644 index beeb2a422..000000000 --- a/packages/moq/streamlib.yaml +++ /dev/null @@ -1,55 +0,0 @@ -# yaml-language-server: $schema=../../schemas/streamlib.schema.json -package: - org: tatolab - name: moq - version: 1.0.0 - description: MoQ (Media over QUIC) publish/subscribe track processors (IETF moq-transport draft-14) -dependencies: - '@tatolab/core': - version: ^1.0.0 -schemas: - ColorInfo: - package: '@tatolab/core' - ContentLight: - package: '@tatolab/core' - EncodedVideoFrame: - package: '@tatolab/core' - MasteringDisplay: - package: '@tatolab/core' - MoqPublishTrackConfig: - file: schemas/moq_publish_track_config.yaml - MoqSubscribeTrackConfig: - file: schemas/moq_subscribe_track_config.yaml -processors: -- name: MoqPublishTrack - description: Publishes raw bytes from a single graph input to a named MoQ track - runtime: rust - entrypoint: null - execution: reactive - scheduling: null - config: - name: config - schema: MoqPublishTrackConfig - state: [] - inputs: - - name: data_in - schema: any - description: Input data to publish to MoQ track (any serialized type) - delivery_profile: null - outputs: [] -- name: MoqSubscribeTrack - description: Subscribes to a named MoQ track and outputs raw bytes to the graph - runtime: rust - entrypoint: null - execution: manual - scheduling: null - config: - name: config - schema: MoqSubscribeTrackConfig - state: [] - inputs: [] - outputs: - - name: data_out - schema: any - description: Received data from MoQ track subscription (any serialized type) - delivery_profile: null diff --git a/packages/mp4/Cargo.toml b/packages/mp4/Cargo.toml index 5a938f1df..9a252251c 100644 --- a/packages/mp4/Cargo.toml +++ b/packages/mp4/Cargo.toml @@ -18,8 +18,6 @@ path = "_generated_rust_crate_root_/lib.rs" name = "streamlib_mp4" crate-type = ["rlib", "cdylib"] -[build-dependencies] -streamlib-jtd-codegen = {version = "0.16.0"} [dependencies] # Engine-free authoring SDK (never the `streamlib` facade) — runtime context diff --git a/packages/mp4/build.rs b/packages/mp4/build.rs deleted file mode 100644 index 0f3236712..000000000 --- a/packages/mp4/build.rs +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright (c) 2025 Jonathan Fontanez -// SPDX-License-Identifier: BUSL-1.1 - -fn main() { - streamlib_jtd_codegen::build_rs::run_for_rust_crate(); -} diff --git a/packages/mp4/schemas/linux_mp4_writer_config.yaml b/packages/mp4/schemas/linux_mp4_writer_config.yaml deleted file mode 100644 index c8ef6b7d9..000000000 --- a/packages/mp4/schemas/linux_mp4_writer_config.yaml +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright (c) 2025 Jonathan Fontanez -# SPDX-License-Identifier: BUSL-1.1 -# -# JSON Type Definition (RFC 8927) schema for Linux MP4 Writer config - -metadata: - type: LinuxMp4WriterConfig - description: "Configuration for Linux MP4 video writing via ffmpeg encode + mux." - -properties: - output_path: - metadata: - description: "Path to write the output MP4 file." - type: string - fps: - metadata: - description: "Fallback frame rate if not provided by upstream Videoframe." - type: uint32 - -optionalProperties: - duration_secs: - metadata: - description: "Expected duration in seconds (for silent audio track length)." - type: uint32 diff --git a/packages/mp4/streamlib-codegen.lock b/packages/mp4/streamlib-codegen.lock deleted file mode 100644 index 5571de32c..000000000 --- a/packages/mp4/streamlib-codegen.lock +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright (c) 2025 Jonathan Fontanez -# SPDX-License-Identifier: BUSL-1.1 -# -# AUTOGENERATED BY `streamlib generate`. DO NOT EDIT BY HAND. -# -# This lockfile pins resolved package versions + content hashes so a fresh -# checkout reconstructs the same generated bindings byte-for-byte. -# Commit it in applications and examples; don't commit it in publishable -# libraries (they inherit their consumer's lock). -version: 1 -packages: - '@tatolab/core': - version: 1.0.0 - source: - kind: path - path: ../core - content_hash: sha256:42929566e77db3311b1bcf576124ee36d5505f1cd1a2e70ccca50ffcba431ec5 diff --git a/packages/mp4/streamlib.yaml b/packages/mp4/streamlib.yaml deleted file mode 100644 index e3668d08e..000000000 --- a/packages/mp4/streamlib.yaml +++ /dev/null @@ -1,37 +0,0 @@ -# yaml-language-server: $schema=../../schemas/streamlib.schema.json -package: - org: tatolab - name: mp4 - version: 1.0.0 - description: MP4 file writer processors -dependencies: - '@tatolab/core': - version: ^1.0.0 -schemas: - ColorInfo: - package: '@tatolab/core' - ContentLight: - package: '@tatolab/core' - LinuxMp4WriterConfig: - file: schemas/linux_mp4_writer_config.yaml - MasteringDisplay: - package: '@tatolab/core' - VideoFrame: - package: '@tatolab/core' -processors: -- name: LinuxMp4Writer - description: Writes video frames to MP4 via ffmpeg encode + mux with silent audio track - runtime: rust - entrypoint: null - execution: reactive - scheduling: null - config: - name: config - schema: LinuxMp4WriterConfig - state: [] - inputs: - - name: video_in - schema: VideoFrame - description: Decoded video frames (raw pixels) to encode and write - delivery_profile: lossless - outputs: [] diff --git a/packages/opus/Cargo.toml b/packages/opus/Cargo.toml index 159ec189a..de766c615 100644 --- a/packages/opus/Cargo.toml +++ b/packages/opus/Cargo.toml @@ -18,8 +18,6 @@ path = "_generated_rust_crate_root_/lib.rs" name = "streamlib_opus" crate-type = ["rlib", "cdylib"] -[build-dependencies] -streamlib-jtd-codegen = {version = "0.16.0"} [dependencies] # Engine-free authoring SDK (never the `streamlib` facade) — runtime context, processor traits, generated wire diff --git a/packages/opus/build.rs b/packages/opus/build.rs deleted file mode 100644 index 0f3236712..000000000 --- a/packages/opus/build.rs +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright (c) 2025 Jonathan Fontanez -// SPDX-License-Identifier: BUSL-1.1 - -fn main() { - streamlib_jtd_codegen::build_rs::run_for_rust_crate(); -} diff --git a/packages/opus/schemas/opus_decoder_config.yaml b/packages/opus/schemas/opus_decoder_config.yaml deleted file mode 100644 index 48532a9b6..000000000 --- a/packages/opus/schemas/opus_decoder_config.yaml +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright (c) 2025 Jonathan Fontanez -# SPDX-License-Identifier: BUSL-1.1 -# -# JSON Type Definition (RFC 8927) schema for Opus Decoder config. - -metadata: - type: OpusDecoderConfig - description: "Configuration for Opus audio decoding." - -optionalProperties: - sample_rate: - metadata: - description: "Output sample rate in Hz (default: 48000)." - type: uint32 - channels: - metadata: - description: "Output channel count (default: 2)." - type: uint32 diff --git a/packages/opus/schemas/opus_encoder_config.yaml b/packages/opus/schemas/opus_encoder_config.yaml deleted file mode 100644 index 10f439329..000000000 --- a/packages/opus/schemas/opus_encoder_config.yaml +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright (c) 2025 Jonathan Fontanez -# SPDX-License-Identifier: BUSL-1.1 -# -# JSON Type Definition (RFC 8927) schema for Opus Encoder config. - -metadata: - type: OpusEncoderConfig - description: "Configuration for Opus audio encoding." - -optionalProperties: - bitrate_bps: - metadata: - description: "Target bitrate in bits per second (default: 128000)." - type: uint32 diff --git a/packages/opus/streamlib-codegen.lock b/packages/opus/streamlib-codegen.lock deleted file mode 100644 index 5571de32c..000000000 --- a/packages/opus/streamlib-codegen.lock +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright (c) 2025 Jonathan Fontanez -# SPDX-License-Identifier: BUSL-1.1 -# -# AUTOGENERATED BY `streamlib generate`. DO NOT EDIT BY HAND. -# -# This lockfile pins resolved package versions + content hashes so a fresh -# checkout reconstructs the same generated bindings byte-for-byte. -# Commit it in applications and examples; don't commit it in publishable -# libraries (they inherit their consumer's lock). -version: 1 -packages: - '@tatolab/core': - version: 1.0.0 - source: - kind: path - path: ../core - content_hash: sha256:42929566e77db3311b1bcf576124ee36d5505f1cd1a2e70ccca50ffcba431ec5 diff --git a/packages/opus/streamlib.yaml b/packages/opus/streamlib.yaml deleted file mode 100644 index 20f53aee4..000000000 --- a/packages/opus/streamlib.yaml +++ /dev/null @@ -1,61 +0,0 @@ -# yaml-language-server: $schema=../../schemas/streamlib.schema.json -package: - org: tatolab - name: opus - version: 1.0.0 - description: Opus audio encoder + decoder processors via libopus -dependencies: - '@tatolab/core': - version: ^1.0.0 -schemas: - AudioFrame: - package: '@tatolab/core' - EncodedAudioFrame: - package: '@tatolab/core' - OpusDecoderConfig: - file: schemas/opus_decoder_config.yaml - OpusEncoderConfig: - file: schemas/opus_encoder_config.yaml -processors: -- name: OpusEncoder - description: Encodes AudioFrame to EncodedAudioFrame (Opus) - runtime: rust - entrypoint: null - execution: reactive - scheduling: - priority: realtime - config: - name: config - schema: OpusEncoderConfig - state: [] - inputs: - - name: audio_in - schema: AudioFrame - description: Raw audio frames to encode - delivery_profile: null - outputs: - - name: encoded_audio_out - schema: EncodedAudioFrame - description: Opus encoded audio frames - delivery_profile: null -- name: OpusDecoder - description: Decodes EncodedAudioFrame (Opus) to AudioFrame - runtime: rust - entrypoint: null - execution: reactive - scheduling: - priority: realtime - config: - name: config - schema: OpusDecoderConfig - state: [] - inputs: - - name: encoded_audio_in - schema: EncodedAudioFrame - description: Opus encoded audio frames to decode - delivery_profile: null - outputs: - - name: audio_out - schema: AudioFrame - description: Decoded audio frames - delivery_profile: null diff --git a/packages/screen-capture/Cargo.toml b/packages/screen-capture/Cargo.toml index 34e2f1b91..a079f53e0 100644 --- a/packages/screen-capture/Cargo.toml +++ b/packages/screen-capture/Cargo.toml @@ -18,8 +18,6 @@ path = "_generated_rust_crate_root_/lib.rs" name = "streamlib_screen_capture" crate-type = ["rlib", "cdylib"] -[build-dependencies] -streamlib-jtd-codegen = {version = "0.16.0"} [dependencies] # Engine-free authoring SDK (never the `streamlib` facade) — runtime context diff --git a/packages/screen-capture/build.rs b/packages/screen-capture/build.rs deleted file mode 100644 index 0f3236712..000000000 --- a/packages/screen-capture/build.rs +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright (c) 2025 Jonathan Fontanez -// SPDX-License-Identifier: BUSL-1.1 - -fn main() { - streamlib_jtd_codegen::build_rs::run_for_rust_crate(); -} diff --git a/packages/screen-capture/schemas/screen_capture_config.yaml b/packages/screen-capture/schemas/screen_capture_config.yaml deleted file mode 100644 index c1dfa4916..000000000 --- a/packages/screen-capture/schemas/screen_capture_config.yaml +++ /dev/null @@ -1,54 +0,0 @@ -# Copyright (c) 2025 Jonathan Fontanez -# SPDX-License-Identifier: BUSL-1.1 -# -# JSON Type Definition (RFC 8927) schema for ScreenCapture config. - -metadata: - type: ScreenCaptureConfig - description: "Configuration for screen capture using ScreenCaptureKit (macOS 12.3+)" - -properties: - target_type: - metadata: - description: "What to capture: Display, Window, or Application" - enum: - - Display - - Window - - Application -optionalProperties: - # Display mode fields - display_index: - metadata: - description: "Display index for Display mode (default: 0 for main display)" - type: uint32 - # Window mode fields - window_title: - metadata: - description: "Window title substring for Window mode" - type: string - window_id: - metadata: - description: "Window ID for Window mode" - type: uint32 - # Application mode fields - app_bundle_id: - metadata: - description: "Bundle identifier for Application mode (e.g., 'com.apple.Safari')" - type: string - app_display_index: - metadata: - description: "Display index for Application mode (default: 0)" - type: uint32 - # Common fields - frame_rate: - metadata: - description: "Target frame rate in fps (default: 30.0)" - type: float64 - show_cursor: - metadata: - description: "Whether to capture cursor (default: false)" - type: boolean - exclude_current_app: - metadata: - description: "Exclude current application from capture (default: true)" - type: boolean diff --git a/packages/screen-capture/streamlib-codegen.lock b/packages/screen-capture/streamlib-codegen.lock deleted file mode 100644 index 5571de32c..000000000 --- a/packages/screen-capture/streamlib-codegen.lock +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright (c) 2025 Jonathan Fontanez -# SPDX-License-Identifier: BUSL-1.1 -# -# AUTOGENERATED BY `streamlib generate`. DO NOT EDIT BY HAND. -# -# This lockfile pins resolved package versions + content hashes so a fresh -# checkout reconstructs the same generated bindings byte-for-byte. -# Commit it in applications and examples; don't commit it in publishable -# libraries (they inherit their consumer's lock). -version: 1 -packages: - '@tatolab/core': - version: 1.0.0 - source: - kind: path - path: ../core - content_hash: sha256:42929566e77db3311b1bcf576124ee36d5505f1cd1a2e70ccca50ffcba431ec5 diff --git a/packages/screen-capture/streamlib.yaml b/packages/screen-capture/streamlib.yaml deleted file mode 100644 index f92c3b30c..000000000 --- a/packages/screen-capture/streamlib.yaml +++ /dev/null @@ -1,20 +0,0 @@ -# yaml-language-server: $schema=../../schemas/streamlib.schema.json -package: - org: tatolab - name: screen-capture - version: 1.0.0 - description: Screen capture processor — ScreenCaptureKit on macOS / iOS -dependencies: - '@tatolab/core': - version: ^1.0.0 -schemas: - ColorInfo: - package: '@tatolab/core' - ContentLight: - package: '@tatolab/core' - MasteringDisplay: - package: '@tatolab/core' - ScreenCaptureConfig: - file: schemas/screen_capture_config.yaml - VideoFrame: - package: '@tatolab/core' diff --git a/packages/test-fixtures/schemas/compute_kernel_test_processor_config.yaml b/packages/test-fixtures/schemas/compute_kernel_test_processor_config.yaml deleted file mode 100644 index 3bbdeed98..000000000 --- a/packages/test-fixtures/schemas/compute_kernel_test_processor_config.yaml +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright (c) 2025 Jonathan Fontanez -# SPDX-License-Identifier: BUSL-1.1 -# -# Test-only config schema for the compute-kernel CPU-reference -# integration test. The processor: -# 1. Creates a compute kernel via FullAccess. -# 2. Allocates input + output storage buffers via LimitedAccess, -# populates input with synthetic data. -# 3. Binds storage buffers (`set_storage_buffer_storage`), pushes -# the element-count constant, dispatches via `dispatch`. -# 4. Reads output buffer back through the mapped pointer. -# 5. Writes a CPU-reference comparison report (`OK\n` or -# `ERR:`) to the configured `output_path`. - -metadata: - type: ComputeKernelTestProcessorConfig - description: "Test config schema for the compute-kernel CPU-reference integration test." - -properties: - output_path: - metadata: - description: "Filesystem path where the processor writes its result. Format: 'OK\\n' on success, 'ERR:' on failure." - type: string - - element_count: - metadata: - description: "Number of u32 elements in the input/output storage buffers. Driven from the integration test." - type: uint32 diff --git a/packages/test-fixtures/schemas/concurrent_escalate_test_processor_config.yaml b/packages/test-fixtures/schemas/concurrent_escalate_test_processor_config.yaml deleted file mode 100644 index 1e9bb0d44..000000000 --- a/packages/test-fixtures/schemas/concurrent_escalate_test_processor_config.yaml +++ /dev/null @@ -1,27 +0,0 @@ -# Copyright (c) 2025 Jonathan Fontanez -# SPDX-License-Identifier: BUSL-1.1 -# -# Test-only config schema for the concurrent-escalate test processor. -# The processor spawns `thread_count` threads from inside its -# `start()` callback; each thread clones `gpu_limited_access()` and -# calls `escalate(|_full| sleep(hold_ms))`. The integration test -# parses the output file to assert `overlaps=0` — proves the escalate -# gate serializes concurrent callers. - -metadata: - type: ConcurrentEscalateTestProcessorConfig - description: "Test config schema for the concurrent-escalate test processor." - -properties: - output_path: - metadata: - description: "Filesystem path where the processor writes its result. Format: 'OK\\n\\noverlaps=' on success." - type: string - thread_count: - metadata: - description: "Number of threads spawned from start(); each independently calls escalate." - type: uint32 - hold_ms: - metadata: - description: "Milliseconds each thread sleeps inside its escalate closure — widens the overlap window so a regression has a real chance to race in." - type: uint32 diff --git a/packages/test-fixtures/schemas/escalate_smoke_test_processor_config.yaml b/packages/test-fixtures/schemas/escalate_smoke_test_processor_config.yaml deleted file mode 100644 index 1bb0f5ca9..000000000 --- a/packages/test-fixtures/schemas/escalate_smoke_test_processor_config.yaml +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright (c) 2025 Jonathan Fontanez -# SPDX-License-Identifier: BUSL-1.1 -# -# Test-only config schema for the escalate smoke test. The processor -# runs `gpu.escalate(|_full| Ok(()))` once and writes "OK" or -# "ERR:" to `output_path`, exercising the escalate scope -# end-to-end. - -metadata: - type: EscalateSmokeTestProcessorConfig - description: "Test config schema for the escalate smoke test." - -properties: - output_path: - metadata: - description: "Filesystem path where the processor writes its result. Format: 'OK' on success, 'ERR:' on failure." - type: string diff --git a/packages/test-fixtures/schemas/gpu_acquire_test_processor_config.yaml b/packages/test-fixtures/schemas/gpu_acquire_test_processor_config.yaml deleted file mode 100644 index a9c389cb5..000000000 --- a/packages/test-fixtures/schemas/gpu_acquire_test_processor_config.yaml +++ /dev/null @@ -1,30 +0,0 @@ -# Copyright (c) 2025 Jonathan Fontanez -# SPDX-License-Identifier: BUSL-1.1 -# -# Test-only config schema for the GPU integration test. The processor: -# 1. Clones its `gpu_limited_access` in `setup()`. -# 2. Acquires a pixel buffer in `start()`. -# 3. Writes a sentinel byte through `plane_base_address(0)`. -# 4. Drops the pixel buffer. -# 5. Writes "OK" or "ERR:" to `output_path` so the integration -# test can verify the full acquire→release round-trip succeeded. - -metadata: - type: GpuAcquireTestProcessorConfig - description: "Test config schema for the GPU integration test." - -properties: - output_path: - metadata: - description: "Filesystem path where the processor writes its result. Format: 'OK' on success, 'ERR:' on failure." - type: string - - width: - metadata: - description: "PixelBuffer width to acquire." - type: uint32 - - height: - metadata: - description: "PixelBuffer height to acquire." - type: uint32 diff --git a/packages/test-fixtures/schemas/graphics_kernel_smoke_test_processor_config.yaml b/packages/test-fixtures/schemas/graphics_kernel_smoke_test_processor_config.yaml deleted file mode 100644 index 559e6ae63..000000000 --- a/packages/test-fixtures/schemas/graphics_kernel_smoke_test_processor_config.yaml +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright (c) 2025 Jonathan Fontanez -# SPDX-License-Identifier: BUSL-1.1 -# -# Test-only config schema for the graphics-kernel smoke test. The -# processor: -# 1. Creates a graphics kernel via FullAccess. -# 2. Acquires a render-target Texture via LimitedAccess. -# 3. Exercises a handful of binding methods -# (set_storage_buffer_storage, set_sampled_texture, -# set_push_constants). -# 4. Runs a single offscreen_render(). -# 5. Writes "OK" (or "ERR:") to the configured output_path. -# -# The smoke test asserts the calls don't panic and the processor's -# start() body completes without an error code — it does NOT compare -# pixel output to a CPU reference. - -metadata: - type: GraphicsKernelSmokeTestProcessorConfig - description: "Test config schema for the graphics-kernel smoke test." - -properties: - output_path: - metadata: - description: "Filesystem path where the processor writes its result. Format: 'OK' on success, 'ERR:' on failure." - type: string diff --git a/packages/test-fixtures/schemas/lifecycle_probe_processor_config.yaml b/packages/test-fixtures/schemas/lifecycle_probe_processor_config.yaml deleted file mode 100644 index e18f6ac2f..000000000 --- a/packages/test-fixtures/schemas/lifecycle_probe_processor_config.yaml +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright (c) 2025 Jonathan Fontanez -# SPDX-License-Identifier: BUSL-1.1 -# -# Test-only config schema for the lifecycle-probe processor. The -# processor is a ContinuousProcessor -# whose process / on_pause / on_resume / setup / teardown hooks -# append a marker line to `output_path`. The integration test parses -# the file to confirm each lifecycle hook dispatched correctly. - -metadata: - type: LifecycleProbeProcessorConfig - description: "Test config schema for the lifecycle-probe processor." - -properties: - output_path: - metadata: - description: "Filesystem path the probe appends marker lines to. Each lifecycle hook (SETUP, PROCESS:n, PAUSE, RESUME, TEARDOWN) writes one line." - type: string - max_iterations: - metadata: - description: "Hard cap on process() iterations after which the probe stops appending PROCESS lines. Lets the test deterministically observe a bounded count rather than racing the runtime stop." - type: uint32 diff --git a/packages/test-fixtures/schemas/panicking_continuous_lifecycle_processor_config.yaml b/packages/test-fixtures/schemas/panicking_continuous_lifecycle_processor_config.yaml deleted file mode 100644 index 28b9936e8..000000000 --- a/packages/test-fixtures/schemas/panicking_continuous_lifecycle_processor_config.yaml +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright (c) 2025 Jonathan Fontanez -# SPDX-License-Identifier: BUSL-1.1 -# -# Test-only config schema for the panic-injection lifecycle Continuous -# processor. `panic_at_hook` names which hook the processor panics in -# (`process` or `"none"` for the no-panic baseline). All other hooks -# no-op. The companion integration test loads this fixture, runs the -# runtime, and asserts the host's panic-safety net caught the panic -# instead of letting it crash the runtime. - -metadata: - type: PanickingContinuousLifecycleProcessorConfig - description: "Test config schema for the panic-injection Continuous lifecycle processor." - -properties: - panic_at_hook: - metadata: - description: "Name of the hook to inject a panic in. `process` for the continuous hot path or `none` for the no-panic baseline." - type: string diff --git a/packages/test-fixtures/schemas/panicking_manual_lifecycle_processor_config.yaml b/packages/test-fixtures/schemas/panicking_manual_lifecycle_processor_config.yaml deleted file mode 100644 index a0fb67cb7..000000000 --- a/packages/test-fixtures/schemas/panicking_manual_lifecycle_processor_config.yaml +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright (c) 2025 Jonathan Fontanez -# SPDX-License-Identifier: BUSL-1.1 -# -# Test-only config schema for the panic-injection lifecycle Manual -# processor. `panic_at_hook` names which hook the processor panics in -# (`setup`, `start`, `stop`, `teardown`, `on_pause`, `on_resume`, or -# `"none"` for the no-panic baseline). All other hooks no-op. The -# companion integration test loads this fixture, runs the runtime, and -# asserts the host's panic-safety net caught the panic instead of -# letting it crash the runtime. - -metadata: - type: PanickingManualLifecycleProcessorConfig - description: "Test config schema for the panic-injection Manual lifecycle processor." - -properties: - panic_at_hook: - metadata: - description: "Name of the hook to inject a panic in. One of: setup, start, stop, teardown, on_pause, on_resume, or 'none' for the no-panic baseline." - type: string diff --git a/packages/test-fixtures/schemas/ray_tracing_kernel_smoke_test_processor_config.yaml b/packages/test-fixtures/schemas/ray_tracing_kernel_smoke_test_processor_config.yaml deleted file mode 100644 index 723f4c012..000000000 --- a/packages/test-fixtures/schemas/ray_tracing_kernel_smoke_test_processor_config.yaml +++ /dev/null @@ -1,33 +0,0 @@ -# Copyright (c) 2025 Jonathan Fontanez -# SPDX-License-Identifier: BUSL-1.1 -# -# Test-only config schema for the ray-tracing-kernel smoke test. The -# processor: -# 1. Builds a single-triangle BLAS + identity TLAS via FullAccess -# (build_triangles_blas / build_tlas). -# 2. Creates a ray-tracing kernel via FullAccess -# (create_ray_tracing_kernel). -# 3. Acquires a STORAGE_BINDING + COPY_SRC render-target Texture via -# LimitedAccess (acquire_texture). -# 4. Exercises the binding methods (set_acceleration_structure, -# set_storage_image, set_push_constants) plus trace_rays() -# end-to-end. -# 5. Writes "OK" (or "ERR:") to the configured output_path. -# -# The smoke test asserts the calls don't panic and the processor's -# start() body completes without an error code — it does NOT compare -# pixel output to a CPU reference. If the device doesn't support -# ray-tracing pipelines (no VK_KHR_ray_tracing_pipeline), the -# processor writes "OK" without exercising the kernel — the runtime -# itself must succeed regardless; per-platform RT capability is a -# host concern. - -metadata: - type: RayTracingKernelSmokeTestProcessorConfig - description: "Test config schema for the ray-tracing-kernel smoke test." - -properties: - output_path: - metadata: - description: "Filesystem path where the processor writes its result. Format: 'OK' on success, 'ERR:' on failure." - type: string diff --git a/packages/test-fixtures/schemas/test_configured_processor_config.yaml b/packages/test-fixtures/schemas/test_configured_processor_config.yaml deleted file mode 100644 index f14b4c4fd..000000000 --- a/packages/test-fixtures/schemas/test_configured_processor_config.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# Copyright (c) 2025 Jonathan Fontanez -# SPDX-License-Identifier: BUSL-1.1 -# -# Test-only config schema for the attribute-macro test fixture -# `TestConfiguredProcessor`. Verifies the `#[streamlib::sdk::processor]` -# macro emits the correct config-binding code against a real schema. - -metadata: - type: TestConfiguredProcessorConfig - description: "Test config schema for the attribute macro tests." - -properties: - threshold: - metadata: - description: "Threshold value for the test processor." - type: float32 diff --git a/packages/test-fixtures/streamlib.yaml b/packages/test-fixtures/streamlib.yaml deleted file mode 100644 index fa59bd2bc..000000000 --- a/packages/test-fixtures/streamlib.yaml +++ /dev/null @@ -1,111 +0,0 @@ -# yaml-language-server: $schema=../../schemas/streamlib.schema.json -# Copyright (c) 2025 Jonathan Fontanez -# SPDX-License-Identifier: BUSL-1.1 - -package: - org: tatolab - name: test-fixtures - version: 1.0.0 - description: "Attribute-macro test fixtures (TestConfiguredProcessor) for streamlib SDK macro contract tests" - -dependencies: - "@tatolab/core": "^1.0.0" - -# Dev-time path override; `streamlib pkg publish` rejects this. -patch: - "@tatolab/core": - path: ../core - -schemas: - # Local config schema this package owns. - TestConfiguredProcessorConfig: - file: schemas/test_configured_processor_config.yaml - GpuAcquireTestProcessorConfig: - file: schemas/gpu_acquire_test_processor_config.yaml - EscalateSmokeTestProcessorConfig: - file: schemas/escalate_smoke_test_processor_config.yaml - ComputeKernelTestProcessorConfig: - file: schemas/compute_kernel_test_processor_config.yaml - GraphicsKernelSmokeTestProcessorConfig: - file: schemas/graphics_kernel_smoke_test_processor_config.yaml - RayTracingKernelSmokeTestProcessorConfig: - file: schemas/ray_tracing_kernel_smoke_test_processor_config.yaml - LifecycleProbeProcessorConfig: - file: schemas/lifecycle_probe_processor_config.yaml - PanickingManualLifecycleProcessorConfig: - file: schemas/panicking_manual_lifecycle_processor_config.yaml - PanickingContinuousLifecycleProcessorConfig: - file: schemas/panicking_continuous_lifecycle_processor_config.yaml - ConcurrentEscalateTestProcessorConfig: - file: schemas/concurrent_escalate_test_processor_config.yaml - -processors: - - name: TestConfiguredProcessor - description: "Attribute-macro test fixture verifying config-emit against a streamlib.yaml package block" - execution: continuous - config: - name: config - schema: TestConfiguredProcessorConfig - - - name: GpuAcquireTestProcessor - description: "GPU integration test fixture — exercises acquire_pixel_buffer, plane_base_address_pixel_buffer, and the pixel-buffer lifecycle through GpuContextLimitedAccess" - execution: manual - config: - name: config - schema: GpuAcquireTestProcessorConfig - - - name: EscalateSmokeTestProcessor - description: "Escalate smoke test fixture — runs gpu.escalate(|_full| Ok(())) end-to-end through escalate_begin/escalate_end and FullAccess construction" - execution: manual - config: - name: config - schema: EscalateSmokeTestProcessorConfig - - - name: ComputeKernelTestProcessor - description: "Compute-kernel CPU-reference integration test fixture — creates a kernel via FullAccess, allocates input + output storage buffers via LimitedAccess, dispatches output[i] = input[i] * 2, and asserts CPU-reference match" - execution: manual - config: - name: config - schema: ComputeKernelTestProcessorConfig - - - name: GraphicsKernelSmokeTestProcessor - description: "Graphics-kernel smoke test fixture — creates a graphics kernel via FullAccess, acquires a render-target Texture, runs a single offscreen_render() to assert the binding methods don't panic. Smoke-only; pixel correctness not asserted." - execution: manual - config: - name: config - schema: GraphicsKernelSmokeTestProcessorConfig - - - name: RayTracingKernelSmokeTestProcessor - description: "Ray-tracing-kernel smoke test fixture — builds a single-triangle BLAS + identity TLAS via FullAccess, creates an RT kernel, acquires a STORAGE_BINDING Texture, runs a single trace_rays() to assert the binding methods (set_acceleration_structure / set_storage_image / set_push_constants / trace_rays) don't panic. Smoke-only; pixel correctness not asserted." - execution: manual - config: - name: config - schema: RayTracingKernelSmokeTestProcessorConfig - - - name: LifecycleProbeProcessor - description: "Lifecycle-probe processor — appends marker lines for each lifecycle hook (setup / process / on_pause / on_resume / teardown) to a file so the integration test can confirm every hook dispatched correctly." - execution: continuous - config: - name: config - schema: LifecycleProbeProcessorConfig - - - name: PanickingManualLifecycleProcessor - description: "Panic-injection Manual fixture. Panics in the configured lifecycle hook (setup / start / stop / teardown / on_pause / on_resume); the host's panic-safety net is expected to absorb the panic and keep the runtime alive." - execution: manual - config: - name: config - schema: PanickingManualLifecycleProcessorConfig - - - name: PanickingContinuousLifecycleProcessor - description: "Panic-injection Continuous fixture. Panics in the configured lifecycle hook (process); the host's panic-safety net is expected to absorb the panic and keep the runtime alive." - execution: continuous - config: - name: config - schema: PanickingContinuousLifecycleProcessorConfig - - - name: ConcurrentEscalateTestProcessor - description: "Concurrent-escalate fixture. Spawns thread_count threads from start(); each clones gpu_limited_access() and calls escalate concurrently. Output captures overlap count; expected overlaps=0 — proves the escalate gate serializes concurrent callers." - execution: manual - config: - name: config - schema: ConcurrentEscalateTestProcessorConfig diff --git a/packages/webrtc/Cargo.toml b/packages/webrtc/Cargo.toml index f79ec68b0..fb7ccf871 100644 --- a/packages/webrtc/Cargo.toml +++ b/packages/webrtc/Cargo.toml @@ -18,8 +18,6 @@ path = "_generated_rust_crate_root_/lib.rs" name = "streamlib_webrtc" crate-type = ["rlib", "cdylib"] -[build-dependencies] -streamlib-jtd-codegen = {version = "0.16.0"} [dependencies] # Engine-free authoring SDK (never the `streamlib` facade) — runtime context diff --git a/packages/webrtc/build.rs b/packages/webrtc/build.rs deleted file mode 100644 index 0f3236712..000000000 --- a/packages/webrtc/build.rs +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright (c) 2025 Jonathan Fontanez -// SPDX-License-Identifier: BUSL-1.1 - -fn main() { - streamlib_jtd_codegen::build_rs::run_for_rust_crate(); -} diff --git a/packages/webrtc/schemas/webrtc_whep_config.yaml b/packages/webrtc/schemas/webrtc_whep_config.yaml deleted file mode 100644 index c02fa1ed8..000000000 --- a/packages/webrtc/schemas/webrtc_whep_config.yaml +++ /dev/null @@ -1,27 +0,0 @@ -# Copyright (c) 2025 Jonathan Fontanez -# SPDX-License-Identifier: BUSL-1.1 -# -# JSON Type Definition (RFC 8927) schema for WebRTC WHEP receive configuration. - -metadata: - type: WebrtcWhepConfig - description: "Configuration for WebRTC WHEP receiving" - -properties: - whep: - metadata: - description: "WHEP endpoint configuration" - properties: - endpoint_url: - metadata: - description: "WHEP endpoint URL" - type: string - timeout_ms: - metadata: - description: "Connection timeout in milliseconds" - type: uint32 - optionalProperties: - auth_token: - metadata: - description: "Optional bearer token for authentication" - type: string diff --git a/packages/webrtc/schemas/webrtc_whip_config.yaml b/packages/webrtc/schemas/webrtc_whip_config.yaml deleted file mode 100644 index a39071144..000000000 --- a/packages/webrtc/schemas/webrtc_whip_config.yaml +++ /dev/null @@ -1,63 +0,0 @@ -# Copyright (c) 2025 Jonathan Fontanez -# SPDX-License-Identifier: BUSL-1.1 -# -# JSON Type Definition (RFC 8927) schema for WebRTC WHIP send configuration. - -metadata: - type: WebrtcWhipConfig - description: "Configuration for WebRTC WHIP streaming" - -properties: - whip: - metadata: - description: "WHIP endpoint configuration" - properties: - endpoint_url: - metadata: - description: "WHIP endpoint URL" - type: string - timeout_ms: - metadata: - description: "Connection timeout in milliseconds" - type: uint32 - optionalProperties: - auth_token: - metadata: - description: "Optional bearer token for authentication" - type: string - video: - metadata: - description: "Video encoder configuration" - properties: - width: - metadata: - description: "Video width in pixels" - type: uint32 - height: - metadata: - description: "Video height in pixels" - type: uint32 - fps: - metadata: - description: "Frames per second" - type: uint32 - bitrate_bps: - metadata: - description: "Target bitrate in bits per second" - type: uint32 - audio: - metadata: - description: "Audio encoder configuration" - properties: - sample_rate: - metadata: - description: "Sample rate in Hz" - type: uint32 - channels: - metadata: - description: "Number of audio channels" - type: uint32 - bitrate_bps: - metadata: - description: "Target bitrate in bits per second" - type: uint32 diff --git a/packages/webrtc/streamlib-codegen.lock b/packages/webrtc/streamlib-codegen.lock deleted file mode 100644 index 5571de32c..000000000 --- a/packages/webrtc/streamlib-codegen.lock +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright (c) 2025 Jonathan Fontanez -# SPDX-License-Identifier: BUSL-1.1 -# -# AUTOGENERATED BY `streamlib generate`. DO NOT EDIT BY HAND. -# -# This lockfile pins resolved package versions + content hashes so a fresh -# checkout reconstructs the same generated bindings byte-for-byte. -# Commit it in applications and examples; don't commit it in publishable -# libraries (they inherit their consumer's lock). -version: 1 -packages: - '@tatolab/core': - version: 1.0.0 - source: - kind: path - path: ../core - content_hash: sha256:42929566e77db3311b1bcf576124ee36d5505f1cd1a2e70ccca50ffcba431ec5 diff --git a/packages/webrtc/streamlib.yaml b/packages/webrtc/streamlib.yaml deleted file mode 100644 index 606724937..000000000 --- a/packages/webrtc/streamlib.yaml +++ /dev/null @@ -1,65 +0,0 @@ -# yaml-language-server: $schema=../../schemas/streamlib.schema.json -package: - org: tatolab - name: webrtc - version: 1.0.0 - description: WebRTC WHIP/WHEP transport processors (RFC 9725 + IETF WHEP) -dependencies: - '@tatolab/core': - version: ^1.0.0 -schemas: - ColorInfo: - package: '@tatolab/core' - ContentLight: - package: '@tatolab/core' - EncodedAudioFrame: - package: '@tatolab/core' - EncodedVideoFrame: - package: '@tatolab/core' - MasteringDisplay: - package: '@tatolab/core' - WebrtcWhepConfig: - file: schemas/webrtc_whep_config.yaml - WebrtcWhipConfig: - file: schemas/webrtc_whip_config.yaml -processors: -- name: WebrtcWhep - description: Receives encoded video and audio from a WHEP endpoint (WebRTC egress) - runtime: rust - entrypoint: null - execution: manual - scheduling: null - config: - name: config - schema: WebrtcWhepConfig - state: [] - inputs: [] - outputs: - - name: encoded_video_out - schema: EncodedVideoFrame - description: H.264 encoded video frames from WHEP stream - delivery_profile: null - - name: encoded_audio_out - schema: EncodedAudioFrame - description: Opus encoded audio frames from WHEP stream - delivery_profile: null -- name: WebrtcWhip - description: Streams pre-encoded video and audio to a WHIP endpoint (WebRTC ingress) - runtime: rust - entrypoint: null - execution: reactive - scheduling: null - config: - name: config - schema: WebrtcWhipConfig - state: [] - inputs: - - name: encoded_video_in - schema: EncodedVideoFrame - description: H.264 encoded video frames to stream - delivery_profile: null - - name: encoded_audio_in - schema: EncodedAudioFrame - description: Opus encoded audio frames to stream - delivery_profile: null - outputs: []