text stringlengths 185 73.3k | repo stringlengths 7 100 | path stringlengths 4 146 | language stringclasses 7
values | hash stringlengths 16 16 | score float64 7 8.5 | stars int64 0 237k |
|---|---|---|---|---|---|---|
"""Compare command for OpenAgent Eval."""
from __future__ import annotations
from pathlib import Path
import typer
from rich.console import Console # noqa: B008
from openagent_eval.cli.context import get_context
from openagent_eval.cli.utils.constants import DEFAULT_OUTPUT_DIR
from openagent_eval.cli.utils.helpers... | OpenAgentHQ/openagent-eval | openagent_eval/cli/commands/compare.py | .py | 144944a53d48f35a | 7.62 | 16 |
"""Delete command for OpenAgent Eval."""
from __future__ import annotations
from pathlib import Path
import typer
from rich.console import Console
from rich.prompt import Confirm
from openagent_eval.cli.utils.constants import DEFAULT_OUTPUT_DIR
from openagent_eval.reports.manager import ReportManager
console = Con... | OpenAgentHQ/openagent-eval | openagent_eval/cli/commands/delete.py | .py | bb55fc4c8e702244 | 7.62 | 16 |
"""Diagnose command for OpenAgent Eval.
Loads an evaluation report and runs component diagnosis to attribute blame
when things go wrong — retrieval, generation, or chunking.
Usage::
oaeval diagnose reports/eval_2024_01_15.json
oaeval diagnose reports/eval_2024_01_15.json --output json
oaeval diagnose rep... | OpenAgentHQ/openagent-eval | openagent_eval/cli/commands/diagnose.py | .py | cc1804266b693b44 | 7.62 | 16 |
"""Doctor command for OpenAgent Eval."""
from __future__ import annotations
import importlib
import os
import sys
from pathlib import Path
import typer
from rich.console import Console
from rich.table import Table
from openagent_eval import __version__
from openagent_eval.cli.context import get_context
console = C... | OpenAgentHQ/openagent-eval | openagent_eval/cli/commands/doctor.py | .py | e34f5000d5c87f22 | 7.62 | 16 |
"""Init command for OpenAgent Eval."""
from __future__ import annotations
from pathlib import Path
import typer
from rich.console import Console
from rich.prompt import Confirm, Prompt
from openagent_eval.cli.context import get_context
from openagent_eval.cli.utils.constants import DEFAULT_CONFIG_CONTENT
from opena... | OpenAgentHQ/openagent-eval | openagent_eval/cli/commands/init.py | .py | 2e8dcd3e365683af | 7.62 | 16 |
"""List command for OpenAgent Eval."""
from __future__ import annotations
from pathlib import Path
from typing import Literal
import typer
from rich.console import Console
from openagent_eval.cli.context import get_context
from openagent_eval.cli.utils.constants import DEFAULT_OUTPUT_DIR
from openagent_eval.cli.uti... | OpenAgentHQ/openagent-eval | openagent_eval/cli/commands/list_evaluations.py | .py | e7c4dbaa917cbb35 | 7.62 | 16 |
"""Report command for OpenAgent Eval."""
from __future__ import annotations
from pathlib import Path
import typer
from rich.console import Console
from openagent_eval.cli.context import get_context
from openagent_eval.cli.utils.constants import DEFAULT_OUTPUT_DIR
from openagent_eval.cli.utils.helpers import get_rep... | OpenAgentHQ/openagent-eval | openagent_eval/cli/commands/report.py | .py | f2ebab87cc29a2e7 | 7.62 | 16 |
"""Run command for OpenAgent Eval."""
from __future__ import annotations
import time
from pathlib import Path
import typer
from rich.console import Console
from rich.progress import (
BarColumn,
Progress,
SpinnerColumn,
TextColumn,
TimeElapsedColumn,
)
from openagent_eval import __version__
from... | OpenAgentHQ/openagent-eval | openagent_eval/cli/commands/run.py | .py | 11c6f60373ace805 | 7.62 | 16 |
"""Synth command for OpenAgent Eval.
Generates synthetic test cases from a document corpus or inline text.
Produces standard Q&A pairs and adversarial test cases for RAG evaluation.
Usage::
oaeval synth --corpus ./knowledge_base/ --count 100
oaeval synth --corpus ./knowledge_base/ --count 50 --adversarial
... | OpenAgentHQ/openagent-eval | openagent_eval/cli/commands/synth.py | .py | 7a8a0f0e3ec30b8e | 7.62 | 16 |
"""Test command for OpenAgent Eval CI/CD integration."""
from __future__ import annotations
import time
import typer
from rich.console import Console
from rich.table import Table
from openagent_eval import __version__
from openagent_eval.cicd.models import CICDConfig, EvaluationGate, ThresholdConfig
from openagent_... | OpenAgentHQ/openagent-eval | openagent_eval/cli/commands/test.py | .py | c8bdbff5e133e8c6 | 8.12 | 16 |
"""Validate command for OpenAgent Eval."""
from __future__ import annotations
from pathlib import Path
import typer
from rich.console import Console
from openagent_eval.cli.utils.discovery import get_config_path
from openagent_eval.config.loader import load_config
from openagent_eval.config.validator import validat... | OpenAgentHQ/openagent-eval | openagent_eval/cli/commands/validate.py | .py | ad19d9e752b6c068 | 7.62 | 16 |
"""CLI context for global state management."""
from __future__ import annotations
from dataclasses import dataclass
@dataclass
class CLIContext:
"""Global CLI context passed to all commands.
Attributes:
quiet: Suppress non-essential output.
json_output: Output machine-readable JSON.
... | OpenAgentHQ/openagent-eval | openagent_eval/cli/context.py | .py | f867bd5fa3bb7f2b | 7.62 | 16 |
"""Main CLI entry point for OpenAgent Eval."""
from __future__ import annotations
import sys
from importlib.metadata import PackageNotFoundError, version
import typer
from rich.console import Console
from rich.text import Text
from typer.core import TyperGroup
from openagent_eval.cli.banner import create_mini_banne... | OpenAgentHQ/openagent-eval | openagent_eval/cli/main.py | .py | 838f9652ef83ccbe | 7.62 | 16 |
"""Config file auto-discovery for OpenAgent Eval."""
from __future__ import annotations
import os
from pathlib import Path
import typer
from rich.console import Console
# Default config file names to search for (in order of priority)
_CONFIG_NAMES = ["config.yaml", "config.yml", "oaeval.yaml", "oaeval.yml"]
# Envi... | OpenAgentHQ/openagent-eval | openagent_eval/cli/utils/discovery.py | .py | 60734f3a042a6eb8 | 7.62 | 16 |
"""Configuration loader for OpenAgent Eval."""
from __future__ import annotations
import logging
from pathlib import Path
import yaml
from pydantic import ValidationError as PydanticValidationError
from openagent_eval.config.models import Config
from openagent_eval.exceptions import ConfigurationError
logger = log... | OpenAgentHQ/openagent-eval | openagent_eval/config/loader.py | .py | cf19f57d8b019a19 | 7.62 | 16 |
"""Pydantic models for configuration validation."""
from __future__ import annotations
from enum import StrEnum
from typing import Any
from pydantic import BaseModel, Field, SecretStr, field_validator
class OutputFormat(StrEnum):
"""Output format for reports."""
TERMINAL = "terminal"
MARKDOWN = "markd... | OpenAgentHQ/openagent-eval | openagent_eval/config/models.py | .py | 40a46d69dd8c4480 | 7.62 | 16 |
"""Configuration validator for OpenAgent Eval."""
from __future__ import annotations
from pathlib import Path
from typing import TYPE_CHECKING
from openagent_eval.exceptions import ConfigurationError
if TYPE_CHECKING:
from openagent_eval.config.models import Config
def validate_config(config: Config) -> list[... | OpenAgentHQ/openagent-eval | openagent_eval/config/validator.py | .py | 4549b26cf71fff87 | 7.62 | 16 |
"""Async task executor for OpenAgent Eval."""
from __future__ import annotations
import asyncio
from concurrent.futures import ThreadPoolExecutor
from typing import TYPE_CHECKING, Any
from openagent_eval.exceptions import MetricExecutionError
if TYPE_CHECKING:
from collections.abc import Callable
class Execut... | OpenAgentHQ/openagent-eval | openagent_eval/core/executor.py | .py | 002cc1a9ba79cbaf | 7.62 | 16 |
"""Corpus auditor orchestrator.
Runs all configured corpus analyzers and aggregates their results
into a single AuditReport.
"""
from __future__ import annotations
from pathlib import Path
from typing import TYPE_CHECKING, Any
from openagent_eval.corpus.contradiction import ContradictionDetector
from openagent_eval... | OpenAgentHQ/openagent-eval | openagent_eval/corpus/auditor.py | .py | e1be58a5e89cb4e0 | 7.62 | 16 |
"""Base interface for corpus analyzers."""
from __future__ import annotations
from abc import ABC, abstractmethod
from typing import TYPE_CHECKING, Any
if TYPE_CHECKING:
from openagent_eval.corpus.models import AuditReport, CorpusDocument
class BaseCorpusAnalyzer(ABC):
"""Abstract base class for all corpus... | OpenAgentHQ/openagent-eval | openagent_eval/corpus/base.py | .py | 024abff04c8b86d1 | 7.62 | 16 |
"""Contradiction detector using LLM-as-Judge.
Detects cross-document contradictions by comparing document pairs
using an LLM to determine if they present incompatible information.
"""
from __future__ import annotations
import asyncio
from typing import Any
from openagent_eval.corpus.base import BaseCorpusAnalyzer
f... | OpenAgentHQ/openagent-eval | openagent_eval/corpus/contradiction.py | .py | dd2c982eef78c1a0 | 7.62 | 16 |
"""Coverage analyzer for thematic gaps.
Detects missing topics or themes in the knowledge base
by analyzing document clustering and topic distribution.
"""
from __future__ import annotations
from typing import Any
from openagent_eval.corpus.base import BaseCorpusAnalyzer
from openagent_eval.corpus.models import (
... | OpenAgentHQ/openagent-eval | openagent_eval/corpus/coverage.py | .py | a4713a5506d4a9c5 | 7.62 | 16 |
"""Pydantic models for corpus health auditing."""
from __future__ import annotations
from datetime import UTC, datetime
from enum import StrEnum
from typing import Any
from pydantic import BaseModel, Field
class IssueType(StrEnum):
"""Types of corpus issues that can be detected."""
CONTRADICTION = "contra... | OpenAgentHQ/openagent-eval | openagent_eval/corpus/models.py | .py | 15302dc4a34d527a | 7.62 | 16 |
"""Staleness detector using timestamp analysis.
Detects outdated documents by analyzing metadata timestamps
and content freshness signals.
"""
from __future__ import annotations
import re
from datetime import UTC, datetime, timedelta
from typing import Any
from openagent_eval.corpus.base import BaseCorpusAnalyzer
f... | OpenAgentHQ/openagent-eval | openagent_eval/corpus/staleness.py | .py | ab015dd830cd1b95 | 7.62 | 16 |
"""Base dataset loader interface and core data models.
This module defines the abstract interface that all dataset loaders must implement,
along with the core Dataset and DatasetItem data models used throughout the framework.
"""
from __future__ import annotations
from abc import ABC, abstractmethod
from dataclasses... | OpenAgentHQ/openagent-eval | openagent_eval/datasets/base.py | .py | 98c9b63bf9979793 | 7.62 | 16 |
"""CSV dataset loader.
This module implements the dataset loader for CSV format files.
The CSV should have a header row with column names.
"""
from __future__ import annotations
import csv
from typing import TYPE_CHECKING, Any
from openagent_eval.datasets.base import BaseDatasetLoader, Dataset, DatasetItem
from ope... | OpenAgentHQ/openagent-eval | openagent_eval/datasets/csv_loader.py | .py | 8069a01d6fd8729b | 7.62 | 16 |
"""Factory function for loading datasets based on configuration.
Auto-detects format from file extension if not specified in config.
"""
from __future__ import annotations
from pathlib import Path
from typing import TYPE_CHECKING, Any
from openagent_eval.datasets.csv_loader import CSVDatasetLoader
from openagent_ev... | OpenAgentHQ/openagent-eval | openagent_eval/datasets/factory.py | .py | b9b793c2d8733c9a | 7.62 | 16 |
"""HuggingFace dataset loader.
This module implements the dataset loader for HuggingFace datasets.
Requires the `datasets` package to be installed.
Note: This loader is optional and requires the `datasets` extra:
pip install openagent-eval[datasets]
"""
from __future__ import annotations
from typing import TYPE... | OpenAgentHQ/openagent-eval | openagent_eval/datasets/hf_loader.py | .py | adec1f30e2d7629c | 7.62 | 16 |
"""Shared pytest fixtures and import-time setup for harpia tests.
``src/lib/config.py`` parses ``sys.argv`` and builds a module-level ``config``
singleton at import time. Tests that import the KML/WPML/KMZ builders therefore
need a valid argv in place before the first import. We inject a minimal CSV-based
invocation h... | traitlab/harpia | tests/conftest.py | .py | 0fc664e0a4a3491e | 8.09 | 14 |
"""DSM-coverage guards in BuildCSV — fail loud instead of flying a bad mission.
Two safety guards:
* a geographic DSM CRS would silently truncate the integer distance matrix to
zero and yield an arbitrary route;
* a feature/path buffer over DSM nodata yields max=None, which otherwise
reaches the CSV as "None" and ... | traitlab/harpia | tests/test_build_csv_dsm.py | .py | 1ede2de0ee8d07e0 | 8.09 | 14 |
"""Tests for the deterministic merge/fix helpers in ``BuildCSV``.
``merge_waypoints_and_checkpoints`` (src/lib/build_csv.py:318) interleaves
wpt/cpt rows; ``fix_cpt_wpt_elevation_duplicates`` (src/lib/build_csv.py:336)
bumps a checkpoint elevation by +1 when it equals the following waypoint's.
Both are pandas-only and... | traitlab/harpia | tests/test_build_csv_merge.py | .py | 952955e1ebe73417 | 8.09 | 14 |
"""Tests for the deterministic route-planning units in ``BuildCSV``.
``solve_tsp_ortools`` (src/lib/build_csv.py:223) and ``build_distance_matrix``
(src/lib/build_csv.py:185) are pure/static and testable without GIS data.
``get_tsp_solution_df`` (src/lib/build_csv.py:272) reorders features by route.
The full ``BuildC... | traitlab/harpia | tests/test_build_csv_tsp.py | .py | 0a6d674df7970649 | 8.09 | 14 |
"""Tests for the DJI KML/WPML XML generation.
``BuildTemplateKML`` (src/lib/build_template_kml.py:14) and
``BuildWaylinesWPML`` (src/lib/build_waylines_wpml.py:11) read the waypoints CSV,
clone the bundled template, and emit one Placemark block per (wpt, cpt) sequence.
Both write into ``{output_folder}/{output_filenam... | traitlab/harpia | tests/test_build_xml.py | .py | 14d371882daf3e5a | 8.09 | 14 |
"""Tests for KMZ packaging.
``CreateKMZ`` (src/lib/create_kmz.py:9) zips
``{output_folder}/{output_filename}/wpmz/{template.kml,waylines.wpml}`` into a
DJI-compatible ``.kmz`` archive with members under the ``wpmz/`` prefix.
"""
import zipfile
from pathlib import Path
from src.lib.create_kmz import CreateKMZ
def _... | traitlab/harpia | tests/test_create_kmz.py | .py | 205de28f24fb0773 | 8.09 | 14 |
"""MkDocs build hook: publish the ARD base context at /context/v1.
§4.1 of the specification says term IRIs come from a base context served at
`https://agenticresourcediscovery.org/context/v1`, and that a conformant consumer applies it as
the JSON-LD `expandContext`. That URL has to resolve, or the one normative refer... | ards-project/ard-docs | hooks/context_from_canonical.py | .py | cc874eccd00a4f07 | 7.59 | 14 |
"""Cache-aware cost model for a token-savings benchmark — NO fabricated prices.
Raw token COUNT and COST diverge because the four token classes are priced very differently.
The class MULTIPLIERS relative to base input are Anthropic-official and fixed:
fresh input 1.00 x base_input
cache write (5-min)... | CorvinLabs/CorvinOS | benchmark/token-savings/pricing.py | .py | 9fe4f0b7dc162781 | 7.42 | 6 |
"""Statistics for the token-savings A/B benchmark — bootstrap CI + Mann-Whitney-U.
No scipy dependency (numpy only). Token distributions are skewed (long tail), so we do NOT
assume normality: savings get a non-parametric BOOTSTRAP confidence interval, and the
"is B really cheaper than A, not just noise?" question is a... | CorvinLabs/CorvinOS | benchmark/token-savings/stats.py | .py | df50f56a1c071a52 | 7.42 | 6 |
#!/usr/bin/env python3
"""
Build wheels for CorvinOS installer across all platforms.
This script creates platform-specific wheels that can be distributed via PyPI.
Run this on each platform (Linux, macOS, Windows) to build native wheels.
Usage:
python build_wheels.py [--upload]
Environment variables:
TWINE_U... | CorvinLabs/CorvinOS | build_wheels.py | .py | 49b0a28c8724c805 | 7.42 | 6 |
"""Repo-wide pytest tripwire: tests must never destroy live operator state.
This is the third incarnation of the "test contaminates real operator state"
class (bridge-suite settings.json contamination, console sys.modules/env
pollution, and the 2026-07-08 uninstall-test wipe of the running bridge's
in-repo .corvin — s... | CorvinLabs/CorvinOS | conftest.py | .py | 3ffe19cb75ad8d37 | 7.92 | 6 |
"""SessionContext: Frozen user intent for session lifetime (ADR-0403)."""
from dataclasses import dataclass
from typing import Dict, Optional
from datetime import datetime
@dataclass(frozen=True)
class SessionContext:
"""
User's current request — FROZEN for session duration.
NEVER OVERWRITTEN by memory o... | CorvinLabs/CorvinOS | core/agent/session_context.py | .py | 13a2c395f0dd43b9 | 7.42 | 6 |
"""
Hash-Chained Audit Log — ADR-0299
Immutable audit trail with SHA256 hash chain.
Every entry links to prior entry via hash. Tampering detected immediately.
"""
import hashlib
import json
import os
from dataclasses import dataclass, asdict
from pathlib import Path
from typing import Any, Optional
@dataclass
class... | CorvinLabs/CorvinOS | core/audit/chain.py | .py | 3a4e1fc6a05400ed | 7.42 | 6 |
"""
Queue Corruption Detection and Recovery — ADR-0298
Detects and recovers from audit queue corruption:
- Hash chain integrity verification
- Timestamp monotonicity validation
- Event sequence validation (no duplicate event IDs)
- Disk I/O error detection (partial writes, truncation)
- Tenant-scoped monitoring
- Auto... | CorvinLabs/CorvinOS | core/audit/corruption_detection.py | .py | 7bfb25acfbec6765 | 7.42 | 6 |
"""Engine span tracking for orchestration audit trail.
Spans are atomic units of execution (e.g., "gather data", "analyze results").
Each span is hash-chained into the audit log (GDPR Art. 30, 32).
"""
import hashlib
import json
from dataclasses import dataclass, asdict
from datetime import datetime
from typing impor... | CorvinLabs/CorvinOS | core/audit/engine_span.py | .py | ef465998947e9e8e | 7.42 | 6 |
"""
Feature Flags for Audit Durability — ADR-0299
Configuration for audit durability features (WAL, crash recovery, metrics).
CRITICAL: `audit_durability_enabled` is LOAD-BEARING for GDPR Art. 30/32 compliance.
"""
from dataclasses import dataclass
from typing import Optional
@dataclass
class AuditDurabilityFlags:... | CorvinLabs/CorvinOS | core/audit/feature_flags.py | .py | db9b5161f5c49388 | 7.42 | 6 |
"""
Queue Corruption Detection Integration — ADR-0298
Integrates QueueIntegrityMonitor with AuditChain and feature flags.
Provides a unified interface for detecting, recovering, and auditing corruption.
"""
import logging
from pathlib import Path
from typing import Optional
from core.audit.chain import AuditChain, A... | CorvinLabs/CorvinOS | core/audit/integration.py | .py | e101cc2ef96843a9 | 7.42 | 6 |
"""Test audit isolation — prevent test writes from polluting production audit chain (ADR-0328)."""
import os
from pathlib import Path
from contextvars import ContextVar
from typing import Optional
# Context variable to track if we're in a test
_test_mode: ContextVar[bool] = ContextVar("audit_test_mode", default=Fals... | CorvinLabs/CorvinOS | core/audit/test_isolation.py | .py | ad5b0e53d781ef63 | 7.92 | 6 |
"""Audit-chain integration for AWPKG.
Wraps forge.security_events.write_event() when available; falls back to a
standalone append when the forge plugin is not on sys.path. Either way the
output format is identical so verify_chain can read a mixed log.
"""
from __future__ import annotations
try:
import fcntl
exce... | CorvinLabs/CorvinOS | core/awpkg/awpkg/audit.py | .py | 316c38bf5affd09e | 7.42 | 6 |
"""AWPKG builder — build, init and export packages."""
from __future__ import annotations
import io
import json
import os
import zipfile
from pathlib import Path
from typing import Any
from .manifest import ManifestError, parse_raw
try:
import yaml as _yaml # type: ignore[import]
_HAS_YAML = True
except Imp... | CorvinLabs/CorvinOS | core/awpkg/awpkg/builder.py | .py | 4355634cfbd35448 | 7.42 | 6 |
"""AWPKG manifest parsing and JSON Schema validation."""
from __future__ import annotations
import base64
import hashlib
import json
import re
from dataclasses import dataclass, field
from pathlib import Path
from typing import Any
try:
import jsonschema # type: ignore[import]
_HAS_JSONSCHEMA = True
except I... | CorvinLabs/CorvinOS | core/awpkg/awpkg/manifest.py | .py | 8aa3e5a68feb80f1 | 7.42 | 6 |
"""Test helpers — build .awpkg archives from fixture sources."""
from __future__ import annotations
import io
import json
import zipfile
from pathlib import Path
from typing import Any
try:
import yaml as _yaml
_HAS_YAML = True
except ImportError:
_HAS_YAML = False
FIXTURES = Path(__file__).parent / "fi... | CorvinLabs/CorvinOS | core/awpkg/tests/helpers.py | .py | 71c2346502a150a4 | 7.92 | 6 |
"""TaskContextTracker subsystem for guidance scoping.
Maintains task context stack for nested/parallel task handling.
ADR-0353: Task Context Tracking
"""
import logging
from dataclasses import dataclass, field
from datetime import datetime
from typing import Optional, List
from enum import Enum
logger = logging.get... | CorvinLabs/CorvinOS | core/brain/task_context_tracker.py | .py | 13e816f274380e2c | 7.42 | 6 |
"""
Capability Registry — deny-by-default access control.
Every actor/tenant/capability tuple defaults to DENIED.
Only explicit grants are permitted.
All grants are immutable (no revocation without audit trail).
"""
from contextvars import ContextVar
from typing import Set, Tuple, Optional
from dataclasses import dat... | CorvinLabs/CorvinOS | core/capabilities/registry.py | .py | 52fd9539d6b2ac10 | 7.42 | 6 |
"""Chat Command Handler: /skill create <prompt>
Integrates skill generation into chat commands.
Detects "/skill create" trigger → invokes create_skill MCP tool.
"""
import asyncio
from typing import Dict, Any, Optional
from dataclasses import dataclass
@dataclass
class SkillCommand:
"""Parsed skill command."""
... | CorvinLabs/CorvinOS | core/chat_runtime/skill_command.py | .py | 4f15817d6ba9acc0 | 7.42 | 6 |
"""Tests for /skill command parsing and handling."""
import pytest
from core.chat_runtime.skill_command import (
parse_skill_command,
detect_skill_creation_trigger,
)
class TestSkillCommandParsing:
"""Test /skill command parser."""
def test_parse_skill_create_command(self):
"""Parse /skill c... | CorvinLabs/CorvinOS | core/chat_runtime/tests/test_skill_command.py | .py | 1f3eb2b71a8dd346 | 7.92 | 6 |
"""AuditChainWriter — hash-chained audit logging (Phase 0).
Implements:
1. Append-only hash-chained audit log
2. GDPR Art. 30/32 requirements (record-keeping, integrity)
3. Tamper detection via continuous verification
4. RFC 3161 timestamp server integration (future)
"""
from __future__ import annotations
import has... | CorvinLabs/CorvinOS | core/compliance/audit_chain_writer.py | .py | 26bf47d6d0f6a89e | 7.42 | 6 |
"""Compliance Scanner for v1.0.0 Production Ready (Phase 4).
Verifies:
- EU AI Act 2026 (Art. 50: disclosure, Art. 5: house rules)
- GDPR (Art. 6, 7: consent; Art. 30, 32: audit; Art. 17: erasure)
- Apache 2.0 + CLA v3.1 (attribution, SIGNATORIES)
"""
import logging
from pathlib import Path
from typing import Dict, L... | CorvinLabs/CorvinOS | core/compliance/compliance_scanner.py | .py | 87013e6626ba28a4 | 7.42 | 6 |
"""Audit-Chain Integrity Attestation — third baseline report.
A short, dense PDF that runs ``forge.security_events.verify_chain``
and prints:
- Pass/fail verdict
- First + last event hashes (the chain anchors)
- Total event count + severity histogram
- Event-type histogram (top N)
- Operator signature line ... | CorvinLabs/CorvinOS | core/compliance/corvin_compliance_reports/audit_attestation.py | .py | 95e4b042171545fa | 7.92 | 6 |
"""Audit-chain walker with filters.
Reads `<tenant_home>/global/forge/audit.jsonl`, returns events
matching the supplied filters. Used by the three baseline report
generators (AI Act, GDPR, Audit-Integrity). Pure-read; never
mutates the chain.
"""
from __future__ import annotations
import json
import sys
from datacla... | CorvinLabs/CorvinOS | core/compliance/corvin_compliance_reports/audit_query.py | .py | e74d14184790b415 | 7.42 | 6 |
"""GDPR Art. 30 — Records of Processing Activities (RoPA).
Art. 30 requires data controllers to maintain a register of every
processing activity. This report reconstructs the RoPA directly
from the audit chain, listing — per tenant, per time window:
- Engines used + compliance zones
- Data handles registered + PI... | CorvinLabs/CorvinOS | core/compliance/corvin_compliance_reports/gdpr_ropa.py | .py | aea18378818a5fdb | 7.42 | 6 |
"""Shared fixtures for compliance-reports tests.
Each test runs against a sandboxed CORVIN_HOME tmpdir with a
hand-seeded audit chain — no production state touched.
"""
from __future__ import annotations
import sys
import time
from pathlib import Path
import pytest
_THIS = Path(__file__).resolve().parent
_PLUGIN = ... | CorvinLabs/CorvinOS | core/compliance/tests/conftest.py | .py | 4b122c3ef944849c | 7.92 | 6 |
#!/usr/bin/env python3
"""Fail if any Python source file contains characters that cannot be encoded as cp1252.
Windows's default ANSI codepage (cp1252) is used by Python's ``open()`` and by
setuptools/pip when reading source files during install. A character outside
cp1252 (e.g. ``->``, ``sigma``) triggers ``UnicodeDe... | gdsfactory/gsim | scripts/check_cp1252.py | .py | 43e472abd92010c3 | 7.63 | 17 |
"""List the source notebooks referenced by the documentation navigation."""
from __future__ import annotations
import argparse
import json
import tomllib
from collections.abc import Iterator
from pathlib import Path, PurePosixPath
from typing import Any
from urllib.parse import urlsplit
REPOSITORY_ROOT = Path(__file... | gdsfactory/gsim | scripts/list_docs_notebooks.py | .py | fb041a7a08927f64 | 7.63 | 17 |
"""Geometry wrapper for gdsfactory components.
This module provides a Geometry class that wraps gdsfactory Components
with computed properties useful for simulation setup.
"""
from __future__ import annotations
from functools import cached_property
from typing import Any
from pydantic import BaseModel, ConfigDict
... | gdsfactory/gsim | src/gsim/common/geometry.py | .py | 59d1616c71598ca3 | 7.63 | 17 |
"""Helpers shared by the built-in material cards."""
from pdk_schema import (
Band,
Index,
MaterialCard,
Provenance,
Regime,
Sellmeier,
Validity,
)
def wavelength_validity(minimum_um: float, maximum_um: float) -> Validity:
"""Return a strict wavelength validity range in micrometers.""... | gdsfactory/gsim | src/gsim/common/materials/_helpers.py | .py | 561d60868135fcd1 | 7.63 | 17 |
"""Project-first material-card lookup."""
from collections.abc import Mapping
from typing import Any, Literal
import gdsfactory as gf
from pdk_schema import MaterialCard
from gsim.common.materials.si_li_293k import SI_LI_293K
from gsim.common.materials.si_salzberg import SI_SALZBERG
from gsim.common.materials.sin_lu... | gdsfactory/gsim | src/gsim/common/materials/registry.py | .py | 8ad0309bcdaffa42 | 7.63 | 17 |
"""Evaluate optical MaterialCards at a simulation wavelength."""
from __future__ import annotations
from collections.abc import Mapping, Sequence
from dataclasses import dataclass
from itertools import pairwise
from math import isfinite, sqrt
from typing import Any
from pdk_schema import Index, MaterialCard, ScalarV... | gdsfactory/gsim | src/gsim/common/materials/snapshots.py | .py | a86cb6b77a07ed88 | 7.63 | 17 |
"""Canonical passive-PCell resolution models."""
from __future__ import annotations
from collections.abc import Mapping
from dataclasses import dataclass
from typing import Any
from shapely.geometry.base import BaseGeometry
from gsim.common.materials import MaterialSnapshot
class PdkResolutionError(ValueError):
... | gdsfactory/gsim | src/gsim/common/pdk/models.py | .py | fec45d354d542735 | 7.63 | 17 |
"""Polygon extraction and processing for layered GDS components.
Ported from gplugins.common.base_models.component to avoid the gplugins
dependency. Uses gdsfactory's DerivedLayer/LogicalLayer `.get_shapes()`
to resolve boolean layer operations (e.g., WG - DEEP_ETCH) and returns
merged Shapely polygons.
"""
from __fu... | gdsfactory/gsim | src/gsim/common/polygon.py | .py | 62eb0269483bf605 | 7.63 | 17 |
"""Layer stack extraction and parsing for EM simulation.
This module provides stack extraction functionality that can be shared
between different solvers (Palace, FDTD, etc.).
Usage:
# From PDK module (preferred, no file needed)
from gsim.common.stack import get_stack
stack = get_stack(pdk=ihp)
# Fro... | gdsfactory/gsim | src/gsim/common/stack/__init__.py | .py | 59fc9cb21510db23 | 7.63 | 17 |
"""Shared layer classification and GDS-layer extraction helpers.
Used by both ``extractor`` and ``visualization`` modules.
"""
from __future__ import annotations
import logging
from typing import Any, Literal
from gdsfactory.technology import LayerLevel
logger = logging.getLogger(__name__)
def get_gds_layer_tupl... | gdsfactory/gsim | src/gsim/common/stack/_layer_utils.py | .py | 6a66b8bc0a40610a | 7.63 | 17 |
"""Stack visualization utility for PDK layer stacks.
Prints ASCII diagrams showing the layer stack structure with z-positions,
thicknesses, and layer numbers.
"""
from __future__ import annotations
from dataclasses import dataclass
import plotly.graph_objects as go
from gdsfactory.technology import LayerStack as Gf... | gdsfactory/gsim | src/gsim/common/stack/visualization.py | .py | 3d69330227c6471b | 7.63 | 17 |
"""Color and layer utilities shared across 3D rendering backends.
These helpers are consumed internally by the render3d_* modules.
"""
from __future__ import annotations
def generate_layer_colors(
layer_names: list[str],
) -> dict[str, tuple[float, float, float]]:
"""Generate distinct RGB colours for each l... | gdsfactory/gsim | src/gsim/common/viz/_colors.py | .py | c129606e43435ddb | 7.63 | 17 |
"""User-facing configuration objects for GDSFactory FDTD simulations."""
from __future__ import annotations
from collections.abc import Iterator, Mapping
from math import isfinite
from typing import Any, Literal, Self
from pydantic import (
BaseModel,
ConfigDict,
Field,
PrivateAttr,
field_validat... | gdsfactory/gsim | src/gsim/fdtd/api.py | .py | c29d75b7244fcfcf | 7.63 | 17 |
"""Cloud lifecycle mixin for an FDTD simulation."""
from __future__ import annotations
from pathlib import Path
from typing import TYPE_CHECKING, Any, Literal
if TYPE_CHECKING:
from gsim.fdtd.models import SimulationArtifacts
class CloudWorkflowMixin:
"""Upload, start, monitor, and retrieve a simulation th... | gdsfactory/gsim | src/gsim/fdtd/cloud.py | .py | 1e50add197f0f9c1 | 7.63 | 17 |
"""Validated GDSFactory FDTD schema-version-1 configuration models."""
from __future__ import annotations
from collections.abc import Mapping
from typing import Literal
from pydantic import BaseModel, ConfigDict, Field, field_validator, model_validator
from gsim.common.materials import MaterialSnapshot
from gsim.fd... | gdsfactory/gsim | src/gsim/fdtd/config.py | .py | e26b454b25d8ffa6 | 7.63 | 17 |
"""Robust OCC geometry construction for coarse GDSFactory FDTD meshes."""
from __future__ import annotations
from collections import defaultdict
from collections.abc import Iterable
from math import ceil, radians, tan
from typing import Any
from shapely.geometry import GeometryCollection, MultiPolygon, Polygon, box
... | gdsfactory/gsim | src/gsim/fdtd/mesh_geometry.py | .py | 62db627608d2287f | 7.63 | 17 |
"""Strict validation for GDSFactory FDTD-compatible Gmsh artifacts."""
from __future__ import annotations
from pathlib import Path
import meshio
from gsim.fdtd.models import FDTDGeometryError, MeshManifest
def _manifest_names(manifest: MeshManifest) -> set[str]:
"""Return all physical names expected in a mesh... | gdsfactory/gsim | src/gsim/fdtd/mesh_validation.py | .py | e22d1c1aafc69ca9 | 7.63 | 17 |
"""Shared models and errors for GDSFactory FDTD artifact generation."""
from __future__ import annotations
from dataclasses import dataclass
from pathlib import Path
class FDTDArtifactError(ValueError):
"""Base error for invalid or unsupported GDSFactory FDTD artifacts."""
class FDTDGeometryError(FDTDArtifact... | gdsfactory/gsim | src/gsim/fdtd/models.py | .py | 5a6d26d30ceb2033 | 7.63 | 17 |
#!/usr/bin/env python3
"""Bump the version in pyproject.toml and CHANGELOG.md.
If the package's ``__init__.py`` contains a literal ``__version__ = "..."``
assignment, the script also rewrites that value. In repos that read
``__version__`` from package metadata (the steward-cli convention), the
``__init__.py`` step is ... | agentculture/reachy-mini-cli | .claude/skills/version-bump/scripts/bump.py | .py | c3afb96ec16f20e3 | 7.45 | 7 |
"""The contention core — who owns each channel, and what an add evicts.
Two pure functions, no I/O, no clock:
* :func:`arbitrate` runs **every tick**: given the live behaviors (in admission
order, oldest first), it assigns each channel a single owner by
``(class priority, recency)``.
* :func:`admit` runs **when a... | agentculture/reachy-mini-cli | reachy/behavior/arbitration.py | .py | 37728794fbdd54ed | 7.45 | 7 |
"""Passive held/unheld observations on the behavior engine's existing tick.
The driver in this module never commands motion and never owns a robot client.
It observes ``TickContext.pose`` only after proving that the same canonical CLI
``feel-alive`` behavior owns head, antennas, and body yaw, then samples through
the ... | agentculture/reachy-mini-cli | reachy/behavior/excited_motion_probe.py | .py | dda0fdc84936cbb4 | 7.45 | 7 |
"""The pure behavior data model — channels, contention classes, lifetimes, poses.
No I/O, no transport, no ``reachy_mini``: every type here is a plain value object
so the arbitration core and the library are trivially unit-testable. A
:class:`Behavior` pairs a small immutable spec (which channels it claims, how it
con... | agentculture/reachy-mini-cli | reachy/behavior/model.py | .py | d4aa078369a19bac | 7.45 | 7 |
"""Dog-like, sensor-driven response to a persistent :class:`PatState`.
The reaction settles *into* a hand instead of animating continuously: it latches
the first touch kind and first credible signed side-yaw, slews every claimed
channel into a complete fixed pose, then emits that pose bit-for-bit unchanged so
the prop... | agentculture/reachy-mini-cli | reachy/behavior/pet_reaction.py | .py | f34494ad55827f4e | 7.45 | 7 |
"""A live-pose feed — bridge the engine's composed pose back into the seam.
The 50 Hz engine composes and streams a complete pose every tick, but no seam
rider could previously read it: :class:`~reachy.behavior.engine.TickContext`
exposed ownership and perception, not the pose itself (see
:mod:`reachy.behavior.goto_la... | agentculture/reachy-mini-cli | reachy/behavior/pose_feed.py | .py | 768480eee6b2fe0d | 7.45 | 7 |
"""State snapshot — joints + head pose read through the one SDK client seam.
Mirrors :mod:`reachy.behavior.sense`'s duck-typing idiom: this module holds no
reference to ``reachy_mini`` (or any transport class) at all. A
:class:`StateReader` is constructed with plain injected callables — typically
bound methods on an a... | agentculture/reachy-mini-cli | reachy/behavior/state.py | .py | 01b474ea0f672933 | 7.45 | 7 |
"""Run the behavior engine as a tracked background process.
Mirrors :mod:`reachy.alive`'s supervisor half (and the ``daemon`` noun): spawn
``python -m reachy behavior engine run`` detached, track it with a PID file + log
under ``state_dir()/behavior``, and reconcile the OS process with the daemon's
health route. One l... | agentculture/reachy-mini-cli | reachy/behavior/supervisor.py | .py | b35b2a4902f6dfd7 | 7.45 | 7 |
"""Shared helpers for the robot noun groups (``device``, ``app``, ``move``).
Keeps the per-noun command modules thin: they import :func:`get_transport` and
:func:`add_robot_args` (re-exported from :mod:`reachy.robot`), render results
with :func:`emit_payload`, and describe themselves with :func:`noun_overview`.
"""
f... | agentculture/reachy-mini-cli | reachy/cli/_commands/_robot.py | .py | 91f89e6dec7eeac1 | 7.45 | 7 |
"""``reachy-mini-cli cli`` — noun grouping CLI-surface introspection.
Exists to satisfy the agent-first rubric's ``overview_cli_noun_exists`` check:
any noun with action-verbs must also expose ``overview``. There are no
action-verbs under ``cli`` today, but ``cli overview`` describes the CLI surface
(distinct from the... | agentculture/reachy-mini-cli | reachy/cli/_commands/cli.py | .py | 740bb82618c92838 | 7.45 | 7 |
#!/usr/bin/env python3
"""Calibration harness for the Diff Risk Score.
Scores every `remyx-recommendation/*` branch in the local clone against its
merge-base with `origin/main`, producing a Markdown table the maintainer can
qualitatively review. No customer impact; runs entirely
against Outrider's own git history.
Us... | remyxai/outrider | scripts/calibrate_diff_risk.py | .py | 1f2fe626a497baea | 7.66 | 20 |
"""Exploration-structure dimension for the selection pass transcript.
Adapted from *Exploration Structure in LLM Agents for Multi-File Change
Localization* (arXiv:2606.11976). That paper contrasts **linear** agentic
exploration — visiting one directory or file per step, sequentially within
a single region — against **... | remyxai/outrider | src/exploration_structure.py | .py | fe1fa3194cc8c879 | 7.66 | 20 |
#!/usr/bin/env python3
"""
gh_graph.py — dependency-navigation helper for the Outrider selection pass.
Exposed to the selection agent as the `gh-graph <file_path>` tool. Given a
Python file, it lists:
* the modules that file imports (forward imports, via ``ast``), and
* the files in the repo that import *it* (rev... | remyxai/outrider | src/gh_graph.py | .py | 27f010e2b47b1b8d | 7.66 | 20 |
"""Canonical agent-instruction-file discovery for the orientation pass.
Adapted from *Toward Instructions-as-Code: Understanding the Impact of
Instruction Files on Agentic Pull Requests* (arXiv:2606.13449). Analyzing
15,549 agentic PRs across 148 projects, that paper finds two things: the
mere *presence* of instructio... | remyxai/outrider | src/instruction_files.py | .py | 1f54160697c5b7c5 | 7.66 | 20 |
"""Linear GraphQL connector for the tool-plane.
Fetches an issue's body + relevant metadata given a ``linear.app/*/issue/<ID>``
URL. Returns a ``ToolResponse`` envelope so callers get uniform audit-shaped
output regardless of connector.
Auth: reads the Linear API key from ``INPUT_LINEAR_API_KEY`` (set by the
action.y... | remyxai/outrider | src/tool_plane/connectors/linear.py | .py | ae7384b16ccdc9c0 | 7.66 | 20 |
"""Standard tool response envelope for audit + consistent agent I/O.
Ported from ``reporanger/deep_research_agent/tool_plane/envelope.py``. Kept
narrow to what Outrider needs today; extensions land in a future shared
extraction.
Every tool-plane call — ``lead-content`` URL routing, connector fetches
from Linear / arX... | remyxai/outrider | src/tool_plane/envelope.py | .py | 097fd344fd00f0b2 | 7.66 | 20 |
"""``.remyx-recommendation/`` must not leak into target-repo commits.
The bundle holds scratch briefing files (SPEC.md, PAPER.md,
INVOCATION.md, PR_TITLE.txt) that ``commit_and_push`` deletes before
staging. But refinement runs, dispatcher scripts, and manual punch-ups
do their own git-add-alls without knowing about t... | remyxai/outrider | tests/test_bundle_gitignore.py | .py | 18766a1129f15a07 | 8.16 | 20 |
"""Tests for the Claude CLI subprocess env whitelist.
The Claude CLI subprocess inherits whatever env we pass it. If we pass
the parent runner's ``os.environ`` verbatim, the agent's Bash tool can
echo secrets the runner holds (`REMYX_API_KEY`, `GITHUB_TOKEN` /
`INPUT_GITHUB_TOKEN`, `INPUT_*` action inputs, etc.) via `... | remyxai/outrider | tests/test_claude_subprocess_env.py | .py | d2c5b7b97613f97e | 8.16 | 20 |
"""``commit_and_push`` must survive a session that changed nothing.
A warm-start refinement session can review the curated branch, judge it
already correct, and make zero edits — a valid (best-case) outcome. The
staged diff is then empty and ``git commit`` exits 1; an unconditional
``check=True`` commit turned that in... | remyxai/outrider | tests/test_commit_and_push_empty_diff.py | .py | 5d2731c2348190fc | 8.16 | 20 |
"""Tests for the workflow-authored ENVIRONMENTS.md convention.
The workflow author can leave an ENVIRONMENTS.md (or ENVIRONMENT.md) file
at the workflow workspace root (`$GITHUB_WORKSPACE`) or the target
workdir. Outrider reads it, strips OKF/YAML frontmatter, caps size, and
writes the body into the recommendation bun... | remyxai/outrider | tests/test_environments_md.py | .py | 9465b1941674cf42 | 8.16 | 20 |
"""Tests for v1.5.0 "extension" as fourth integration shape (v1.5.0 extension shape):
- Prompt template documents the fourth shape with its four gates
- Prompt schema lists `extension` as a legal value alongside
addition / replacement / simplification
- Schema requires `team_direction_signal` + `proposed_cal... | remyxai/outrider | tests/test_extension_shape.py | .py | 20d4e82a35ab86ee | 7.16 | 20 |
"""Terminal failure statuses must exit the workflow step non-zero.
Brief mode ("lead-content is the spec") and issue-convention mode set
``brief_failed`` / ``issue_convention_failed_claude`` as their
``failure_status`` when the runner throws — e.g. a rejected ``git push``.
If those aren't in ``FAILURE_EXIT_STATUSES`` ... | remyxai/outrider | tests/test_failure_exit_statuses.py | .py | b80585cc8e062c81 | 8.16 | 20 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.