Datasets:
Download code/evaluation-code/ent400-a06a1576/apps/console/web/src/contract.ts from VEHwang/cocogni4d: direct link, hf CLI and curl.
- Browser
- Download file 17.9 kB
-
https://huggingface.co/datasets/VEHwang/cocogni4d/resolve/main/code/evaluation-code/ent400-a06a1576/apps/console/web/src/contract.ts
- Command line
-
hf download hf://datasets/VEHwang/cocogni4d/code/evaluation-code/ent400-a06a1576/apps/console/web/src/contract.ts
-
curl -L -o contract.ts https://huggingface.co/datasets/VEHwang/cocogni4d/resolve/main/code/evaluation-code/ent400-a06a1576/apps/console/web/src/contract.ts
17.9 kB
| // Generated by tools/generate_contract.py; edit contract.schema.json. | |
| export type UV = [number, number]; | |
| export type Span = [number, number]; | |
| export type InputRef = { "path": string; "sha256": string; "artifact": boolean }; | |
| export type Provenance = { "artifact_sha256": string; "script_content_sha256": string; "capability_fingerprint": string | null; "generator_version": string; "inputs": Record<string, InputRef> }; | |
| export type Frame = { "uv_axes": [string, string]; "units": "m"; "yaw_zero": "+u" | "+v"; "yaw_positive": "clockwise" | "counterclockwise"; [key: string]: unknown }; | |
| export type Segment = { "id": string; "script_id": string; "world_id": string; "duration_tier": string | number; "span_s": Span; "duration_s": number; "control_hz": number }; | |
| export type Room = { "id": string; "name": string; "polygon_uv": (UV)[]; "label_uv": UV; "semantics_verified": boolean }; | |
| export type Doorway = { "id": string; "segment_uv": [UV, UV] }; | |
| export type StopPoint = { "id": string; "position_uv": UV; "region_id": string }; | |
| export type Raster = { "url": string; "width_px": number; "height_px": number; "pixel_to_uv": [number, number, number, number, number, number]; "navigation_profile": string }; | |
| export type Basemap = { "bounds_uv": [UV, UV]; "rooms": (Room)[]; "doorways": (Doorway)[]; "stop_points": (StopPoint)[]; "occluder_contours_uv": ((UV)[])[]; "occluder_height_m": number; "raster": Raster }; | |
| export type Actor = { "order": number; "id": string; "kind": string; "virtual": boolean; "radius_m": number | null; "profile": string }; | |
| export type Track = { "t_s": (number)[]; "u_m": (number)[]; "v_m": (number)[]; "yaw_rad": (number)[] | null; "distance_m": (number)[]; "speed_mps": (number)[]; "cam_yaw_rad"?: (number)[]; "cam_pitch_rad"?: (number)[]; "cam_u_m"?: (number)[]; "cam_v_m"?: (number)[]; "cam_z_m"?: (number)[] }; | |
| export type StateName = "moving" | "turning" | "yield_wait" | "planned_stay" | "station" | "idle_remainder" | "unclassified" | "uncovered" | "forced_idle" | "retargeting"; | |
| export type State = { "start_s": number; "end_s": number; "state": StateName; "reason": string; "intent_index": number | null; "forced": boolean | null; "waiting_for": (string)[] }; | |
| export type Target = { "position_uv"?: UV; "region_id"?: string; "id"?: string; "stop_id"?: string; [key: string]: unknown }; | |
| export type Intent = { "intent_index": number; "kind": string; "target": Target | null; "start_s": number; "end_s": number; "status": "completed" | "discarded" | "truncated" | "retreat"; "reason": string | null; "discard_reason": string | null; "target_stages": (TargetStage)[]; "discard_class": "A" | "B" | null; "requested_duration_s"?: number; "planned_duration_s"?: number; "requested_shortfall_s"?: number; "duration_adjustment"?: "control_quantization" | "pause_budget" | "activity_end" }; | |
| export type Discard = { "time_s": number; "actor_id": string; "intent_index": number; "target_uv": UV; "reason": string; "discard_class": "A" | "B" | null; "event_kind": "discard" | "proposal_failure" }; | |
| export type ObserverTurn = { "start_s": number; "duration_s": number; "target_yaw_rad": number; "source": string; "target_actor"?: string | null; "first_seen_s"?: number | null; "static_wall_safe_at_start"?: boolean; [key: string]: unknown }; | |
| export type CameraMount = { "kind": "rigid"; "offset_body_m": [number, number, number]; "yaw_offset_rad": number; "pitch_rad": number; "source": string; "provisional": boolean }; | |
| export type Observer = { "hfov_rad": number; "eye_height_m": number; "mount": string | CameraMount; "first_seen_s": Record<string, number>; "turns": (ObserverTurn)[]; "actual_visibility": string; "causal": boolean | null; "recording_span_s"?: Span; "split"?: ObserverSplit }; | |
| export type ObserverSplit = { "layer": "time" | "none"; "drawn"?: boolean; "mover"?: string | null; "first_s"?: number | null; "second_s"?: number | null; "early_view"?: string | null }; | |
| export type DiscardGroup = { "actor_id": string; "row_indices": (number)[]; "count": number; "start_s": number; "end_s": number; "reason_counts": Record<string, number> }; | |
| export type Construction = { "priority_order": (string)[]; "retries": number | null; "discard_groups": (DiscardGroup)[]; "discard_reason_counts": Record<string, number> }; | |
| export type Warning = { "code": string; "message": string; "actor_id"?: string; "start_s"?: number; "end_s"?: number }; | |
| export type SegmentView = { "schema": "segment-view/6"; "builder_version": "review-import/2"; "provenance": Provenance; "frame": Frame; "segment": Segment; "basemap": Basemap; "actors": (Actor)[]; "tracks": Record<string, Track>; "tracks_max_error_m": number; "states": Record<string, (State)[]>; "intents": Record<string, (Intent)[]>; "discards": (Discard)[]; "observers": Record<string, Observer>; "construction": Construction; "warnings": (Warning)[]; "visibility": Visibility | null; "visibility_builder_version": "review-evidence/2"; "generation": GenerationRecords; "metric_units": MetricUnits; "media"?: RenderMedia; "media_ref"?: MediaReference; "review"?: ScriptReview }; | |
| export type VisibilityRun = { "start_s": number; "end_s": number; "value": (string)[] }; | |
| export type SharedRun = { "start_s": number; "end_s": number; "value": boolean }; | |
| export type VisibilityObserver = { "moving_visible": ((string)[])[]; "bodies_visible": ((string)[])[]; "region_indices": (number)[]; "timeline": (VisibilityRun)[]; "recorded"?: (boolean)[]; "raw_row_indices"?: ((number)[])[] }; | |
| export type NearestDistance = { "mean": number; "min": number; "max_of_nearest": number }; | |
| export type PairDistance = { "mean": number; "min": number; "max": number }; | |
| export type ObserverMetric = { "kind": string; "intent": string | null; "eye_height_m": number; "frac_any_moving_visible": number | null; "frac_any_moving_in_fov_ignoring_walls": number | null; "mean_visible_count": number | null; "per_actor_visible_frac": Record<string, number>; "longest_no_actor_s": number | null; "nearest_actor_dist_m": NearestDistance | null; "path_length_m": number; "recording_span_s"?: Span; "denominator_frames"?: number; "denominator_s"?: number }; | |
| export type SharedRegionMetric = { "frac_ticks_overlap_ge_2m2": number; "mean_overlap_m2": number; "max_overlap_m2": number }; | |
| export type PairMetric = { "pair": [string, string]; "frac_covisible_motion_same_time": number | null; "actors_seen_by_both_any_time": (string)[]; "body_seen_frac": Record<string, number | null>; "shared_region": SharedRegionMetric | null; "observer_distance_m": PairDistance | null }; | |
| export type VisibilityMetrics = { "case": string; "world_id": string; "span_s": Span; "moving": (string)[]; "observers": Record<string, ObserverMetric>; "pairs": (PairMetric)[] }; | |
| export type VisibilityPair = { "pair": [string, string]; "moving_visible_by_both": ((string)[])[]; "shared_area_m2": (number)[]; "same_actor_duration_s": number; "shared_region_duration_s": number | null; "timeline": (SharedRun)[]; "denominator_s"?: number }; | |
| export type VisibilityCue = { "longest_no_actor_span_s": Span }; | |
| export type Visibility = { "schema": "plan-visibility/1" | "recording-visibility/2"; "builder_version": string; "artifact_sha256": string; "scope": "private_plan_geometry_not_rendered"; "actor_step_s": number; "mask_step_s": number | null; "region_min_m2": number | null; "sample_weighting": "midpoint" | "frame_half_open"; "actor_t_s": (number)[]; "mask_t_s": (number)[]; "actor_spans_s": (Span)[]; "mask_spans_s": (Span)[]; "regions_uv": (((UV)[])[])[]; "observers": Record<string, VisibilityObserver>; "pairs": (VisibilityPair)[]; "metrics": VisibilityMetrics; "cues": Record<string, VisibilityCue>; "raw_table"?: RawPlanTable; "not_provided"?: (string)[]; "measurement_scope"?: string }; | |
| export type VisibilityJob = { "schema": "visibility-job/1"; "artifact_sha256": string; "builder_version": string; "status": "queued" | "running"; "completed_steps": number; "total_steps": number; "progress_percent": number; "stage": string }; | |
| export type RegionChunkRef = { "url": string; "start_index": number; "count": number; "sha256": string }; | |
| export type RegionChunk = { "schema": "visibility-regions/1"; "artifact_sha256": string; "builder_version": string; "start_index": number; "regions_uv": (((UV)[])[])[] }; | |
| export type VisibilityIndex = { "schema": "plan-visibility-index/1" | "recording-visibility-index/2"; "builder_version": string; "artifact_sha256": string; "scope": "private_plan_geometry_not_rendered"; "actor_step_s": number; "mask_step_s": number | null; "region_min_m2": number | null; "sample_weighting": "midpoint" | "frame_half_open"; "actor_t_s": (number)[]; "mask_t_s": (number)[]; "actor_spans_s": (Span)[]; "mask_spans_s": (Span)[]; "observers": Record<string, VisibilityObserver>; "pairs": (VisibilityPair)[]; "metrics": VisibilityMetrics; "cues": Record<string, VisibilityCue>; "region_chunks": (RegionChunkRef)[]; "raw_table"?: RawPlanTable; "not_provided"?: (string)[]; "measurement_scope"?: string; "table_chunks"?: (RegionChunkRef)[] }; | |
| export type TargetStage = { "start_s": number; "end_s": number; "target": Target | null }; | |
| export type DetourDetail = { "status": string | null; "parameterization_result": string | null; "cost_cells": number | null; "final_points_in_avoidance": number | null; "same_route": boolean | null; "route_geometry_failed": boolean | null; "hausdorff_m": (number)[] }; | |
| export type TokenDetail = { "sequence": number; "tick": number; "phase": string; "anchor_flag": number }; | |
| export type GenerationEvent = { "kind": "waiting" | "detour" | "retargeting" | "discard" | "token" | "proposal_failure"; "actor_id": string; "intent_index": number | null; "time_s": number; "end_s": number; "reason": string | null; "waiting_for": (string)[]; "blocked_by": (string)[]; "forced": boolean | null; "original_target": Target | null; "new_target": Target | null; "discard_class": "A" | "B" | null; "no_route_mechanism": string | null; "failed_step": string | null; "detour": DetourDetail | null; "token": TokenDetail | null; "state": StateName | null }; | |
| export type IntentBudget = { "actor_id": string; "intent_index": number; "limit": number; "used": number; "attempts_count": number }; | |
| export type GenerationRecords = { "method": string; "events": (GenerationEvent)[]; "budgets": (IntentBudget)[]; "event_counts": Record<string, number>; "observer_generation": ObserverGeneration }; | |
| export type OmittedObserver = { "actor_id": string; "status": string; "reason": string; "time_s": number; "residual_counts": Record<string, number> }; | |
| export type ObserverGeneration = { "requested_observers": number | null; "generated_observers": number | null; "omitted": (OmittedObserver)[] }; | |
| export type MetricUnits = Record<string, "count" | "s" | "ratio">; | |
| export type ReviewProgress = { "total": number; "generated": number; "not_generated": number; "ready": number; "pending": number; "failed": number }; | |
| export type RawPlanColumns = { "observer_id"?: (string)[]; "target_id"?: (string)[]; "frame"?: (number)[]; "tick"?: (number)[]; "center_visible"?: (boolean)[]; "projected_height"?: (number | null)[]; "occlusion_fraction"?: (number)[]; "occluder_kind"?: ((number)[])[]; "occluder_object_id"?: ((number)[])[]; "center_edge_margin_deg"?: (number)[]; "bbox_edge_margin_deg"?: (number)[]; "distance_m"?: (number)[] }; | |
| export type RawPlanTable = { "schema": "plan-visibility/2"; "header": RawPlanHeader; "columns": RawPlanColumns; "null_encoding": string }; | |
| export type RawTableChunk = { "schema": "visibility-table-columns/2"; "artifact_sha256": string; "builder_version": string; "start_index": number; "columns": RawPlanColumns }; | |
| export type RawPlanHeader = { [key: string]: unknown }; | |
| export type MediaFrame = { "frame_index": number; "control_tick": number; "local_s": number; "world_s": number }; | |
| export type MediaRoute = { "observer_id": string; "url": string; "fps": number; "frame_count": number; "width": number; "height": number; "world_start_s": number; "window_world_span": Span; "color_tags": Record<string, unknown>; "frames": (MediaFrame)[]; "provisional_mount": Record<string, unknown>; "rgb_audit": Record<string, unknown> }; | |
| export type RenderMedia = { "schema": "render-media/1"; "access": "private_evidence"; "obs_id": string; "source_group_id": string; "routes": (MediaRoute)[]; "readback_summary": Record<string, unknown>; "quality": Record<string, unknown>; "synchronization": string; "browser_display": string; "public_answerability": string; "ground_sampling_resolution": Record<string, unknown>; "known_display_limit": Record<string, unknown> }; | |
| export type MediaFrameSelection = { "status": "recording" | "not_recording"; "observer_id": string; "world_s": number; "frame_index"?: number; "control_tick"?: number; "local_s"?: number; "seek_local_s"?: number }; | |
| export type MediaFrameResponse = { "schema": "render-media-frames/1"; "obs_id": string; "world_s": number; "routes": (MediaFrameSelection)[] }; | |
| export type MediaReference = { "schema": "render-media-reference/1"; "obs_id": string; "source_group_id": string; "url": string; "payload_bytes": number; "routes": (MediaReferenceRoute)[] }; | |
| export type MediaReferenceRoute = { "observer_id": string; "width": number; "height": number }; | |
| export type ReviewEvent = { "id": string; "kind": string; "label": string; "entity_ids": (string)[]; "span_s": Span | null; "status": "effective" | "deviated" | "ineffective" | "NOT_CHECKED"; "source": string; "basis": string; "regions_uv": ((UV)[])[] }; | |
| export type ReviewQuestion = { "id": string; "version_id": string; "decision": "PASS" | "FAIL" | "UNKNOWN"; "text": string; "span_s": Span | null; "entity_ids": (string)[]; "proof_url": string }; | |
| export type ScriptReview = { "schema": "script-review/1"; "batch": string; "scope": string; "planned": (ReviewEvent)[]; "actual_arrangements": null | (ReviewEvent)[]; "actual_arrangements_status": "generator_not_emitted" | "generator_plan"; "body_yaw"?: string; "situations": (ReviewEvent)[]; "situation_source": string; "situation_missing": (string)[]; "questions": (ReviewQuestion)[]; "question_counts": ReviewQuestionCounts; "unavailable": (string)[] }; | |
| export type ReviewQuestionCounts = { "PASS": number; "FAIL": number; "UNKNOWN": number }; | |
| // NP interface supplement: np-runs-interface.md; separate from segment-view schema. | |
| export type NPValue = string | number | boolean | null | NPValue[] | {[key: string]: NPValue}; | |
| export type NPConfig = {[key: string]: NPValue}; | |
| export type NPField = { | |
| type?: string; title?: string; default?: NPValue; const?: NPValue; minimum?: number; maximum?: number; | |
| properties?: Record<string, NPField>; additionalProperties?: NPField | boolean; items?: {enum?: string[]}; | |
| }; | |
| export type NPFamily = {id: string; name: string; paused?: {id: string; reason: string | null}[]; versions: {id: string; version_id?: string; supported: boolean; videos: unknown[]; subtask_name?: string | null; form_name?: string; name?: string | null}[]}; | |
| export type NPSchema = NPField & {properties: Record<string, NPField>; 'x-families'?: NPFamily[]; | |
| 'x-arrangement-labels'?: Record<string, string>; 'x-generator-arrangements'?: Record<string, string>}; | |
| export type NPPlan = { | |
| schema: 'np-plan/1'; estimated_questions: number; warnings: string[]; | |
| segments: number; segments_needed: number | null; bottleneck_version: string | null; | |
| yield_unknown: {total: number; versions: string[]}; | |
| unmet: {total: number; families: {id: string; name: string; count: number}[]}; | |
| families: {id: string; name: string; expected: number | null; target: number}[]; | |
| arrangements: {kind: string; label: string; version_ids: string[]; generator_type: string | null; in_batch: boolean}[]; | |
| arrangement_requirements: {version_id: string; any_of: string[]; source: string}[]; | |
| commands?: {generate: string[]; generate_total: number; questions: string; convert: string}; | |
| }; | |
| export type NPRun = { | |
| schema: 'np-run/1'; id: string; status: 'running' | 'completed' | 'completed_with_failures' | 'failed'; | |
| created_at: string; label: string; limit: number; generator_commit: string; root_alias: string | null; | |
| stages: {id: 'generate' | 'questions' | 'convert' | 'render'; label: string; state: 'queued' | 'running' | 'done' | 'failed'; done: number; total: number; seconds: number; | |
| rejected?: {code: string; label: string; count: number}[]}[]; | |
| segments: {index: number; id: string; world: string; duration_s: number; seed: number; script_id: string | null; | |
| state: 'queued' | 'generating' | 'generated' | 'converted' | 'failed'; reason: string | null; seconds: number | null; segment_id: string | null; rejected?: string | null; | |
| arrangements?: ArrangementCounts; | |
| render?: {state: 'rendered' | 'render_failed' | 'skipped'; seconds: number; reason: string | null}}[]; | |
| result_url: string | null; error: string | {code?: string; message: string} | null; | |
| }; | |
| export type NPRuns = {schema: 'np-runs/1'; runs: NPRun[]}; | |
| export type NPResultSegment = {id: string; script_id: string; world: string; length: string; duration_s: number; | |
| candidates: number; pass: number; fail: number; unknown: number; arrangements: ArrangementCounts | null; reasons?: Record<string, number>}; | |
| export type NPResult = { | |
| schema: 'np-batch-result/1'; id: string; scope: string; provenance: {source: string; sha256: string; rebuild: string}; | |
| funnel: {id: string; label: string; count: number | null; unit: string}[]; | |
| reasons: {id: string; label: string; count: number; setting: string; fix: string; stage?: 'prover' | 'prefilter' | 'checked'}[]; | |
| heatmap: {family: string; mode: 'single' | 'multi'; pass_versions: number; tested_versions: number}[]; | |
| segments: NPResultSegment[]; missing: string[]; | |
| }; | |
| /** 段的安排计数:剧本验收台那一段同一份安排清单的计数(server np_generation.arrangement_counts)。 */ | |
| export type ArrangementCounts = {total: number; effective: number; deviated: number; ineffective: number}; | |