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 |
|---|---|---|---|---|---|---|
"""
Desktop notifications via notify-send (libnotify).
Falls back to QSystemTrayIcon.showMessage() if notify-send is unavailable
or reports an error.
notify-send works on KDE Plasma (via plasma-integration) and Hyprland
(via dunst, mako, or any notification daemon).
"""
import logging
import subprocess
import threadi... | RiDDiX/adguard-tray | adguard_tray/notifications.py | .py | 176bee79bf3c4975 | 7.6 | 15 |
"""Report whether browsers can bypass AdGuard over HTTP/3 (QUIC).
adguard-cli does handle QUIC, but only in `auto` proxy mode: its iptables rules
redirect UDP as well as TCP, and `https_filtering.http3_filtering_enabled`
decides whether an intercepted QUIC connection is filtered (true) or blocked so
the client falls b... | RiDDiX/adguard-tray | adguard_tray/quic.py | .py | abcf8cf1ccf69f16 | 7.6 | 15 |
#!/usr/bin/env python3
"""
Test script for the Quantum Hardware MCP HTTP server.
Usage:
# Start the server in another terminal:
python server.py --transport http
# Then run this test:
python test_http_server.py
"""
import requests
import json
import sys
import time
SERVER_URL = "http://127.0.0.1... | Lokesh-2025/quantum-hardware-mcp | test_http_server.py | .py | cecf6cd481df8809 | 7.92 | 6 |
"""
Tests for _find_connected_qubit_subset (server.py), added 2026-08-25 —
fixes a real bug reported by a real user (quantum-chemistry-vqe): best_qubits
used to pick the top-n qubits by individual score alone, only warning after
the fact if they happened not to be connected. Confirmed live and
reproducible against real... | Lokesh-2025/quantum-hardware-mcp | tests/test_best_qubits_connectivity.py | .py | 778a06968caab4be | 7.92 | 6 |
from __future__ import annotations
from typing import Any
from a2a.client.client import ClientCallContext
from a2a.types import Role, SendMessageRequest
from common.logging_utils import format_payload_log, format_stage_log, summarize_text
from common.sse_event_consumer import normalize_event
from client_example.scen... | project-openan/a2a-t-sdk-python | a2a-t-sample/subscribe-incident/src/client_example/client_flow.py | .py | 94b86fae849c886e | 7.66 | 20 |
"""Sample scenario input data for the subscribe-incident e2e flow.
Contains the scenario tag, agent_card_query, subscription_filter, and
diagnosis_context used by the sample client. The prompt generation input is
selected based on the configured language (zh-CN / en-US), so the input
language matches `A2AT_LANGUAGE`.
... | project-openan/a2a-t-sdk-python | a2a-t-sample/subscribe-incident/src/client_example/scenario_data.py | .py | 9eeeac299340aa38 | 7.66 | 20 |
"""Adapter helpers for building A2A protobuf messages (artifacts, status updates, messages)."""
from __future__ import annotations
import uuid
from collections.abc import Mapping
from a2a.server.agent_execution.context import RequestContext
from a2a.server.events.event_queue import EventQueue
from a2a.types import (... | project-openan/a2a-t-sdk-python | a2a-t-sample/subscribe-incident/src/common/a2a_adapter.py | .py | e6016b11964921cd | 7.66 | 20 |
"""LLM request/response logger with mock fallback support.
Patches OpenAIClient.structured and _build_structured_payload to print
request/response payloads. When mock is enabled, returns canned responses
instead of calling the real LLM API.
"""
from __future__ import annotations
from typing import Any
from a2a_t.ll... | project-openan/a2a-t-sdk-python | a2a-t-sample/subscribe-incident/src/common/llm_logger.py | .py | 581b0556036a1371 | 7.66 | 20 |
"""Mock LLM data provider for e2e tests when no real API key is available.
Only patches DotEnvConfigSource.load to inject a placeholder api_key (so
A2ATClient construction does not fail) and exposes is_mock_enabled() /
get_mock_response() for llm_logger to call.
Mock response files live under resources/mock_responses... | project-openan/a2a-t-sdk-python | a2a-t-sample/subscribe-incident/src/common/mock_llm.py | .py | 833f6e0a78b0cbf6 | 7.66 | 20 |
from __future__ import annotations
import asyncio
import json
from collections.abc import Awaitable, Callable, Mapping
from a2a.server.agent_execution.context import RequestContext
from a2a.server.events.event_queue import EventQueue
from a2a.types import Task, TaskArtifactUpdateEvent, TaskState
from common.a2a_adapt... | project-openan/a2a-t-sdk-python | a2a-t-sample/subscribe-incident/src/server_example/server_flow.py | .py | a38019456bd39597 | 7.66 | 20 |
from __future__ import annotations
import asyncio
import os
from contextlib import contextmanager
from pathlib import Path
from typing import Any
import uvicorn
from a2a.server.agent_execution.agent_executor import AgentExecutor
from a2a.server.agent_execution.context import RequestContext
from a2a.server.events.even... | project-openan/a2a-t-sdk-python | a2a-t-sample/subscribe-incident/src/server_example/server_main.py | .py | 453ed91760bbaf37 | 7.66 | 20 |
from __future__ import annotations
from pathlib import Path
from typing import Any
from a2a_t.config.models import A2ATConfig
from a2a_t.llm.config_loader import LLMConfigLoader
from a2a_t.llm.factory import LLMClientFactory
from a2a_t.negotiation.common.models import ContinueNegotiationInput, StartNegotiationInput
... | project-openan/a2a-t-sdk-python | src/a2a_t/client/a2at_client.py | .py | 9d10ee8a6dbe67a3 | 7.66 | 20 |
from __future__ import annotations
from typing import Any
from a2a_t.negotiation.common.enums import NegotiationRole
from a2a_t.negotiation.runtime.base_negotiation_orchestrator import BaseNegotiationOrchestrator
class NegotiationOrchestrator(BaseNegotiationOrchestrator):
"""Bind the shared negotiation runtime ... | project-openan/a2a-t-sdk-python | src/a2a_t/client/negotiation/negotiation_orchestrator.py | .py | 6e8f4a9b0409148a | 7.66 | 20 |
from __future__ import annotations
from pathlib import Path
from typing import Any
from a2a_t.negotiation.common.enums import NegotiationType
from a2a_t.negotiation.handling import NegotiationHandler
from a2a_t.negotiation.rendering import NegotiationPromptRenderer
from a2a_t.negotiation.store import NegotiationState... | project-openan/a2a-t-sdk-python | src/a2a_t/client/negotiation/negotiation_orchestrator_builder.py | .py | d3fd7b9656a0ef72 | 7.66 | 20 |
from __future__ import annotations
import json
from .models import NormalizedInput
class InputNormalizer:
"""Normalize raw prompt-generation input into a canonical string payload."""
def normalize(self, user_input: str | dict[str, object]) -> NormalizedInput:
"""Classify user input and convert it i... | project-openan/a2a-t-sdk-python | src/a2a_t/client/prompt_generation/input_normalizer.py | .py | c58fe22ea0569827 | 7.66 | 20 |
from __future__ import annotations
from dataclasses import asdict, dataclass
@dataclass(slots=True)
class NormalizedInput:
"""Carry the normalized text and the input shape detected upstream."""
input_kind: str
normalized_input: str
@dataclass(slots=True)
class PromptGenerationFailure:
"""Describe ... | project-openan/a2a-t-sdk-python | src/a2a_t/client/prompt_generation/models.py | .py | d5ad04649d0d003c | 7.66 | 20 |
from __future__ import annotations
import logging
from typing import Any
from a2a_t.common.prompt_resources import (
PromptResourceNotFoundError,
PromptResourceParseError,
)
from a2a_t.config.models import PromptRuntimeConfig
from a2a_t.prompt.analysis import ScenarioResolutionOrchestrator
from a2a_t.prompt.a... | project-openan/a2a-t-sdk-python | src/a2a_t/client/prompt_generation/prompt_generation_orchestrator.py | .py | 7e537d1860e11fe1 | 7.66 | 20 |
from __future__ import annotations
from typing import Any
from a2a_t.common.prompt_runtime import PromptRuntimeComponentsBuilder
from a2a_t.config.models import A2ATConfig
from a2a_t.prompt.analysis import ScenarioRecognizer, ScenarioResolutionOrchestrator, SlotExtractor
from a2a_t.prompt.task_rendering import TaskPr... | project-openan/a2a-t-sdk-python | src/a2a_t/client/prompt_generation/prompt_generation_orchestrator_builder.py | .py | 36c7a8e2dfad7ed0 | 7.66 | 20 |
from __future__ import annotations
class PromptResourceError(Exception):
"""Base class for shared prompt resource loading errors."""
def __init__(self, message: str, **context: object) -> None:
super().__init__(message)
self.context = context
class PromptResourceNotFoundError(PromptResource... | project-openan/a2a-t-sdk-python | src/a2a_t/common/prompt_resources/errors.py | .py | dd42f0a9ce5fdb2d | 7.66 | 20 |
from __future__ import annotations
import json
from pathlib import Path
from typing import Any
from a2a_t.common.resource_roots import resolve_prompt_resource_root
from a2a_t.prompt.common.errors import PromptSourceError
from .errors import PromptResourceNotFoundError, PromptResourceParseError
def _packaged_prompt... | project-openan/a2a-t-sdk-python | src/a2a_t/common/prompt_resources/local_resources.py | .py | c9ead428c4d68eb7 | 7.66 | 20 |
from __future__ import annotations
from .local_resources import BasePromptResourceLoader
from .models import PromptMessages
class PromptResourceLoader(BasePromptResourceLoader):
"""Load shared analysis prompts used by LLM-powered prompt analysis."""
def load(self, *, analysis_action: str, language: str) -> ... | project-openan/a2a-t-sdk-python | src/a2a_t/common/prompt_resources/prompt_resource_loader.py | .py | ffe1ab7f33aa70b5 | 7.66 | 20 |
from __future__ import annotations
from .local_resources import BasePromptResourceLoader
from .models import ScenarioDefinition
class ScenarioLoader(BasePromptResourceLoader):
"""Load scenario definitions for scenario recognition."""
def load(self, *, language: str) -> list[ScenarioDefinition]:
"""R... | project-openan/a2a-t-sdk-python | src/a2a_t/common/prompt_resources/scenario_loader.py | .py | 077a015edd30fd6c | 7.66 | 20 |
from __future__ import annotations
from a2a_t.prompt.common.models import PromptReference
from .errors import PromptResourceParseError
from .local_resources import BasePromptResourceLoader
from .models import SlotDefinition, SlotRange, SlotSchema
class SlotSchemaLoader(BasePromptResourceLoader):
"""Load slot sc... | project-openan/a2a-t-sdk-python | src/a2a_t/common/prompt_resources/slot_schema_loader.py | .py | dda4d20fb3e2aacf | 7.66 | 20 |
from __future__ import annotations
from a2a_t.prompt.common.models import PromptReference
from .local_resources import BasePromptResourceLoader
class TemplateLoader(BasePromptResourceLoader):
"""Load scenario-specific task prompt templates."""
def load(self, *, reference: PromptReference) -> str:
"... | project-openan/a2a-t-sdk-python | src/a2a_t/common/prompt_resources/template_loader.py | .py | 2ef9b442537309e0 | 7.66 | 20 |
"""Let a repair round say *what to change* instead of retyping the file.
The developer's output contract had one verb: here is a file, here are its full contents. So every
repair regenerated whole files, and a regenerated file is retyped from the model's memory of it —
which is where invented names come from. Straight... | alexar76/aicom | agents/dev_edits.py | .py | 74560f02d1a5bb53 | 7.42 | 6 |
"""
Product delivery profile — drives PM depth, spec gate, and architect emphasis.
"""
from __future__ import annotations
import os
import re
from core.delivery_profile import DESKTOP_APP, FULL_SOFTWARE, MARKETING_LANDING, normalize_delivery_profile
__all__ = [
"DESKTOP_APP",
"FULL_SOFTWARE",
"MARKETING_... | alexar76/aicom | agents/product_profile.py | .py | 6d770beaf80f51ec | 7.42 | 6 |
"""The emitter must produce documents the reference verifier accepts, and nothing else.
Every assertion here goes through `awr.verify_document` rather than inspecting fields by
hand: the emitter's contract is "the result verifies", not "the dict looks right".
"""
from __future__ import annotations
import json
import... | alexar76/aicom | awr/emitters/python/tests/test_emitter.py | .py | 9130e008a867b1cb | 7.92 | 6 |
"""SHA-256 digests and W3C SRI digest references (SPEC.md sections 3.2, 8.1).
An SRI string in AWR/2 is exactly ``sha256-`` followed by *standard, padded* base64
(``+/`` alphabet) of the 32-byte digest. base64url is not accepted: a digest reference is
inside the signature, so accepting a second spelling of the same v... | alexar76/aicom | awr/reference/python/awr/digest.py | .py | f13f5ba842f57403 | 7.42 | 6 |
"""Reason-code registry and the single exception type of the AWR reference implementation.
The registry is a transcription of AWR/2 SPEC.md section 11.2. Codes are stable:
a code is never re-used for a different meaning (section 11.1).
"""
from __future__ import annotations
from typing import Dict, List, NamedTuple... | alexar76/aicom | awr/reference/python/awr/errors.py | .py | dedb0f7d3dd17308 | 7.42 | 6 |
"""RFC 8785 JSON Canonicalization Scheme, profiled by AWR/2 SPEC.md section 4.
Two things in here are the reason this module is hand-written instead of delegating to a
library:
1. Property names are sorted as **arrays of UTF-16 code units compared as unsigned
integers** (RFC 8785 section 3.2.3). Python's ``sorted... | alexar76/aicom | awr/reference/python/awr/jcs.py | .py | eda0097c2eb7318b | 7.42 | 6 |
"""AWR/1 legacy verification (SPEC.md section 12).
AWR/1 documents carry ``Ed25519Signature2018``, a base64 ``proofValue``, and a signature
over a pipe-delimited rendering of ``credentialSubject`` **only**. Consequences that this
module enforces:
* ``id``, ``type``, ``issuer`` and any ``hubInfo`` are **unsigned** an... | alexar76/aicom | awr/reference/python/awr/legacy.py | .py | 1e06ebc5d8c7bf85 | 7.42 | 6 |
"""Hand-written base58btc and the multibase ``z`` prefix (SPEC.md section 5.1, 6.1).
base58btc is needed in two places -- the ``did:key`` method-specific identifier and
``proof.proofValue`` -- and is implemented here rather than pulled in as a dependency so
that the reference implementation has no dependency beyond ``... | alexar76/aicom | awr/reference/python/awr/multibase.py | .py | c95fe2f4cfc4dfd5 | 7.42 | 6 |
"""ABO's seeded simulation: the floor, the four styles, and what it measures.
These run tiny samples. The 1,000-completed-game floor is a property of the
gate, not of the sample size a check can afford, so it is proved by handing the
gate a sample that falls one short rather than by playing a thousand games in a
unit ... | autonomous-ai/autonomous-workshop | inventors/abo/skills/abo-inventor/scripts/tests/test_simulation.py | .py | 893586846a33b1fc | 8.04 | 11 |
"""Opt-in Git push for one generated toy directory."""
from __future__ import annotations
import os
import subprocess
from pathlib import Path
from typing import Mapping, Optional
from workshop.errors import EffectError, StateConflict
class GitPushError(EffectError):
"""The requested Git command failed."""
d... | autonomous-ai/autonomous-workshop | src/workshop/integrations/git.py | .py | 2fe7df1ab1986e6e | 7.54 | 11 |
#!/usr/bin/env python
"""FDM mating fits — one source of truth for assembled-part clearances.
A mating interface (tab/slot, lip/groove, peg/socket, pin/hole, lid/cavity) has
a male and a female half that **must** derive from one nominal dimension plus a
clearance, or they drift until the parts jam or fall apart. Size ... | autonomous-ai/autonomous-workshop | src/workshop/make/skills/cad/scripts/cadfits.py | .py | f69cb9f34a6c7871 | 7.54 | 11 |
"""Stdlib-only client for the warm CAD CLI daemon.
The tool launchers' ``CADGEN_WARM`` shim imports this module BEFORE any heavy
import, so it must stay dependency-free and cheap to import. Everything here
falls back to ``None`` (caller runs inline, cold) on any spawn or protocol
problem — the daemon is a fast path, n... | autonomous-ai/autonomous-workshop | src/workshop/make/skills/cad/scripts/cadgen_daemon/client.py | .py | f12f40c4d0b744f1 | 7.54 | 11 |
"""Warm-process daemon server for the CAD skill CLIs.
One long-lived process imports cadgen / OCP / build123d ONCE and then services
``scripts/gen`` / ``scripts/export`` / ``scripts/artifact`` / ``scripts/inspect``
invocations over a socket shared by one materialized CAD skill tree, so opted-in
sessions (``CADGEN_WARM... | autonomous-ai/autonomous-workshop | src/workshop/make/skills/cad/scripts/cadgen_daemon/server.py | .py | 3f6fda5c75eebb17 | 7.54 | 11 |
#!/usr/bin/env python3
"""Print-parameter derivations for FDM, and the hollow that actually hollows.
The sibling of `cadfits`. That one derives the second half of a mate from the
first so a clearance cannot be typed twice; this one derives a wall from the
nozzle that has to lay it down, and removes material the same w... | autonomous-ai/autonomous-workshop | src/workshop/make/skills/cad/scripts/cadprint.py | .py | 15123dad21e7948d | 7.54 | 11 |
"""
Shared machinery of the two chDB (embedded ClickHouse) in-memory executors.
Both run the same ClickHouse SQL from artifacts/queries/inmemory/chdb.psv in one
chDB session. They differ in where the data they query lives -- which the query
file's {name} table placeholders abstract away -- and, with it, in the form a
... | KxSystems/NYSETAQBenchmarks | pysrc/queryrunner/executors/inmemory/chdb_base.py | .py | 1aedb414216aada2 | 7.5 | 9 |
"""
chDB (embedded ClickHouse) in-memory query executor over Apache Arrow tables.
The tables (master, trade, quote, exnames, timeBuckets) are stored in memory as
Apache Arrow tables. The queries reference them through chDB's Python() table
function (e.g. SELECT ... FROM Python(trade)), which scans the Arrow data
direc... | KxSystems/NYSETAQBenchmarks | pysrc/queryrunner/executors/inmemory/chdb_pyarrow.py | .py | eae4d771bda2a818 | 7.5 | 9 |
"""
Polars in-memory executor running the eager API (single partition loaded into
memory): the tables are DataFrames, every setup step runs eagerly, and a query
returns a DataFrame. The shared machinery is in polars_base.py.
"""
from pathlib import Path
import polars as pl
from executors.inmemory.polars_base import Q... | KxSystems/NYSETAQBenchmarks | pysrc/queryrunner/executors/inmemory/polars_eager.py | .py | f792f93d367401ca | 7.5 | 9 |
"""
Polars in-memory executor running the lazy API with the streaming engine (single
partition loaded into memory): the queries see LazyFrames and their results are
collected with the streaming engine, as are the load and transform steps. The
sort stays on the in-memory engine, which is faster for it. The shared machin... | KxSystems/NYSETAQBenchmarks | pysrc/queryrunner/executors/inmemory/polars_lazy_streaming.py | .py | a04f7be9393e7c06 | 7.5 | 9 |
import logging
from datetime import datetime
from typing import List, Dict
import pyarrow as pa
import pyarrow.compute as pc
def letter_filter(start_char: str, end_char: str, table: pa.Table) -> pa.Table:
"""Filters a table based on the first letter of the 'Symbol' column.
Includes rows where the first chara... | KxSystems/NYSETAQBenchmarks | pysrc/taqToParquet/table_converters.py | .py | 6791b3b3fbcf68d0 | 7.5 | 9 |
#!/usr/bin/env python3
"""Import every shipped module on the OLDEST Python this repo supports.
`pyproject.toml` declares `requires-python = ">=3.9"` and the README promises
"python3 (3.9 or newer)". These skills are publicly installed and run against
whatever `python3` a user happens to have — while every workflow her... | starslingdev/skills | .github/scripts/check_python_floor.py | .py | 31d18019c93d41ce | 7.65 | 19 |
"""One place that knows what the scanner says, so a rename breaks one file loudly.
The workflow reads the scanner's answer in three independent places — the gate
decides pass/fail, the reporter surfaces warnings, the red-proof control checks the
scanner can still see. Each used to hardcode its own understanding of the... | starslingdev/skills | .github/scripts/registry_scan_contract.py | .py | acdb16c1a6f1d3ea | 7.65 | 19 |
#!/usr/bin/env python3
"""Prove the registry-scan gate can actually go red.
A check that cannot fail is not a check. `.github/workflows/registry-scan.yml`
scans the skills under `skills/` and fails the build on a finding — but if the
scanner stopped detecting the class of problem we care about, the gate would go
on pa... | starslingdev/skills | .github/scripts/registry_scan_redprove.py | .py | b4feb28bd9977f1f | 7.65 | 19 |
#!/usr/bin/env python3
"""Surface every registry-scan finding, without letting a warning block the build.
`.github/workflows/registry-scan.yml` blocks on every risk 0.6.0 reports except the
ones named in `registry_scan_contract.NON_BLOCKING_RISKS`. Those exempt risks are real
findings we want a human or a review agent... | starslingdev/skills | .github/scripts/registry_scan_report.py | .py | 14122dda36631ca5 | 7.65 | 19 |
"""A session that never started must not be graded as a session that misbehaved.
The first CI run of the eval workflow failed every grader on all five cases in
1.6 seconds with zero tool calls: `claude` refused to start under
`--permission-mode bypassPermissions` as root and exited immediately, printing
its reason on ... | starslingdev/skills | maintainers/ci-secure/tests/test_run_skill_evals.py | .py | 74ee4228cd4d4c53 | 7.15 | 19 |
#!/usr/bin/env python3
"""Phase 4c helper — turn captured catalog gaps into drafted detectors.
SKILL.md phase 4b captures every coverage-gap pole (a drilled job whose log
matched no `_parse_log` detector) to `.ci-speedup-gaps/<repo>__<job>/`. Phase 4c
(maintainer source only) promotes those one-off LLM gap-fills into ... | starslingdev/skills | maintainers/ci-speedup/scripts/draft_detector.py | .py | d8180a6b494f7961 | 7.65 | 19 |
#!/usr/bin/env python3
"""(Re)install the /ci-speedup-dogfood slash command from its canonical body.
The committed canonical body lives at
`maintainers/ci-speedup/workflows/ci-speedup-dogfood.command.md`; the *installed*
command Claude Code actually runs lives at the gitignored
`.claude/commands/ci-speedup-dogfood.md`... | starslingdev/skills | maintainers/ci-speedup/scripts/install_dogfood_command.py | .py | 728b90b11adedae6 | 7.65 | 19 |
#!/usr/bin/env python3
"""Phase-0 baseline producer (maintainers-only) — seal-single-door.md §4(B).
Runs the cross-seam **contradiction property** (`verify_report`'s Phase-0 checks) over a panel
of already-rendered reports and prints the two baseline rates that the relocation **Decision
gate** (§4) consumes:
- **co... | starslingdev/skills | maintainers/ci-speedup/scripts/measure_contradictions.py | .py | 05db51a3be4aae64 | 7.65 | 19 |
"""Pin the /ci-speedup-dogfood slash command's entry point to a workflow that exists.
The command is installed by copying the canonical body
(`maintainers/ci-speedup/workflows/ci-speedup-dogfood.command.md`) into the gitignored
`.claude/commands/` dir. That body launches the loop via
`workflow({ scriptPath: '<path>' }... | starslingdev/skills | maintainers/ci-speedup/tests/test_dogfood_command_integrity.py | .py | 7b5109ed1228228e | 8.15 | 19 |
"""Tests for `draft_detector.py` — the phase-4c gap → catalog helper.
The script's value is that its three deterministic halves can't drift from what
the renderer does: a capture is "pending" iff `_parse_log` returns None on its
real job log (same ground truth), `prepare` emits a task only for pending gaps,
and `verif... | starslingdev/skills | maintainers/ci-speedup/tests/test_draft_detector.py | .py | 211d4146373ef4c0 | 8.15 | 19 |
"""Pin the /ci-speedup-dogfood installer's transform so a refresh can't corrupt the command.
`install_dogfood_command.render_installed_body` turns the committed canonical body into the
form written to the gitignored `.claude/commands/`. These tests exercise that transform purely
(no `.claude/` needed, so CI runs them)... | starslingdev/skills | maintainers/ci-speedup/tests/test_install_dogfood_command.py | .py | 55c3516138ed9249 | 8.15 | 19 |
"""ci-score entry point (B1) — collect a repo's CI configuration and stamp
the CI Score, offline, from a local checkout only.
Flow: verify the target is a git checkout → read + parse
`.github/workflows/*.yml|yaml` → `_practice_facts(parsed, root)` (which itself
walks local composite actions and the repo-root build-too... | starslingdev/skills | skills/ci-score/scripts/collect_config.py | .py | a53dcbcf689a193b | 7.65 | 19 |
"""ci-score report invariant checker (B2) — one command, PASS/FAIL.
`verify(doc, report_text, registry)` asserts the report faithfully renders its
findings document. Verifying a report must never be manual archaeology: CI,
the dogfood sweep, and a human all run the same checks and get the same
verdict. Invariants (eac... | starslingdev/skills | skills/ci-score/scripts/verify_report.py | .py | 21f97739304dc355 | 7.65 | 19 |
"""Materialize the cloaked third-party control fixtures back to their exact
original trees at test time.
The two frozen control checkouts (mastra, better-auth) are real third-party
repo snapshots — workflow YAML, ``.github/actions/**`` composite actions, and
root build-tool configs, exactly the input surface the score... | starslingdev/skills | skills/ci-score/tests/_fixture_checkouts.py | .py | 42a9662cf86f263b | 8.15 | 19 |
"""B4 layer (a): exact-match controls on frozen fixture checkouts.
The calibration positive controls (mastra 82 B+, better-auth 82 B+) must
reproduce EXACTLY from the committed fixture trees under
`tests/fixtures/checkouts-src/` — the full collector path (acquire → facts →
score), not just the arithmetic. Live repos d... | starslingdev/skills | skills/ci-score/tests/test_b4_controls.py | .py | bfb4493015300295 | 8.15 | 19 |
"""The relocated close-honesty pin (moved from ci-speedup's test_close_guidance
by the score-ectomy, 2026-07-16).
ci-score's close opens with the CI Score read straight off the stamp and NEVER
fabricates a score — the no-score cases (refusal / `ci_score_error` / absent
stamp) are each handled honestly. The close is LL... | starslingdev/skills | skills/ci-score/tests/test_close_contract.py | .py | 1fbedeb998b9e333 | 8.15 | 19 |
"""Byte-fidelity + cloak-property proof for the frozen control fixtures.
The two third-party control checkouts (mastra, better-auth) ship "cloaked" so
registry security scanners don't attribute their workflow files to this repo:
under ``tests/fixtures/checkouts-src/<name>/`` every ``.github`` path segment is
renamed t... | starslingdev/skills | skills/ci-score/tests/test_fixture_cloak.py | .py | c9ec53aca99f55e0 | 8.15 | 19 |
"""Guards for the OD-L4 prompt-routing contract (B3).
The routing itself is LLM-driven (skill descriptions), so the committed
artifact + the SKILL.md description are the only guardable surfaces. These
cells pin: the artifact exists and is well-shaped; OD-L4's required routings
hold (ambiguous middle → ci-speedup; expl... | starslingdev/skills | skills/ci-score/tests/test_routing_artifact.py | .py | 56c8277a0a53a975 | 8.15 | 19 |
#!/usr/bin/env python3
"""
Bounded Concurrency Demonstration
This script sends a bounded batch of synthetic evidence-triage requests to the
Cloudflare Worker. It reports observed task states and latency for this run. It
does not establish capacity, cost savings, production readiness, or equivalence
to human review.
U... | vassiliylakhonin/agenda-intelligence-md | examples/infinite-swarm-batch.py | .py | 3a7507bb4fb4bcdf | 7.42 | 6 |
"""DFIR JSON line output module for Plaso.
A drop-in psort output module (`-o l2t_json_dfir`) that emits the same rich,
per-parser json_line as the built-in `json_line`, but adds four attribution
fields resolved FROM THE .plaso DB — so the output is self-describing and no
second pass over the logs is needed:
image_... | Get-Sybers/DX_DFIR | dev-scripts/plaso/l2t_json_dfir.py | .py | ef88838f331a082b | 7.45 | 7 |
"""Volatility 3 output renderer: flat JSON Lines for the DFIR pipeline.
`-r jsonl_dfir` — emits ONE JSON object per TreeGrid node, not per tree-root the
way the built-in `JSONL` (JsonLinesRenderer) does. The built-in keeps the tree
nesting (`__children`), so a `pstree` line is a whole subtree; this flattens it,
so eve... | Get-Sybers/DX_DFIR | dev-scripts/volatility/jsonl_dfir_renderer.py | .py | 565ab444c3151836 | 7.45 | 7 |
"""Volatility 3 plugin: DFIR process records for the CAR data model.
`dfir_processes.DfirProcesses` — one row per process, enumerated with psscan
(pool-tag scanning) so UNLINKED / terminated processes a rootkit hid from the
active list are still found. Each row carries what CarProcess wants and no single
built-in plug... | Get-Sybers/DX_DFIR | dev-scripts/volatility/plugins/dfir_processes.py | .py | 2359fe3698588f3a | 7.45 | 7 |
"""Targeted artefact extraction from disk images, via log2timeline/plaso.
The evtx lane needs real ``.evtx`` files, but evidence often arrives as a disk image
(E01/raw/VMDK), not loose logs. This module pulls ONLY a named artefact set out of an
image with Plaso's ``image_export.py`` (dfVFS, userspace, E01-capable) — t... | Get-Sybers/DX_DFIR | python/get_sybers_dfir/imageexport.py | .py | bfba164398846f98 | 7.45 | 7 |
"""Tool-image inventory guard — refuse to run against anything but the known,
hardened dfir/* images, and flag anything added to that namespace that should
not be there.
Two checks:
- ``require(image)`` — run at the START of every processor (its role preflight):
the exact image the lane is about to run must exist, ... | Get-Sybers/DX_DFIR | python/get_sybers_dfir/images.py | .py | e12b776116889609 | 7.45 | 7 |
"""Record-shaping for ingest — the constant-column wrapping ``.ingest`` cannot do.
``.ingest into`` cannot inject a per-file constant (which log type / plugin /
artefact / image a row came from), and it cannot convert Plaso's microsecond epoch
to a datetime. So each source's files are rewritten to JSON Lines with the ... | Get-Sybers/DX_DFIR | python/get_sybers_dfir/ingest/prepare.py | .py | fd368a87f0cc93fe | 7.45 | 7 |
"""Signature/detection processors — YARA, Suricata, Hayabusa.
Port of the retired ``process-signatures.sh`` (+ its ``signatures/{yara,suricata,
hayabusa}.sh`` lanes and ``lib/disk-image.sh``). Runs the three signature engines
over the evidence and lands their native events as ingest-ready JSON Lines under
``<output_di... | Get-Sybers/DX_DFIR | python/get_sybers_dfir/signatures/__init__.py | .py | 617ae3a78c8d8201 | 7.45 | 7 |
"""DetectRaptor YARA provisioning — fetch, verify, merge into one ruleset.
`mgreen27/DetectRaptor <https://github.com/mgreen27/DetectRaptor>`_ ships bulk
Velociraptor detection content. Most of it (VQL artifacts + the CSV lookups that
drive them) needs a Velociraptor server and has no consuming lane here; what THIS
pi... | Get-Sybers/DX_DFIR | python/get_sybers_dfir/signatures/detectraptor.py | .py | 1683ccfee66ce61d | 7.45 | 7 |
"""Hayabusa lane — Sigma-based Windows event-log detection -> native JSONL.
Scans loose ``*.evtx`` under the raw tree AND disk images, standalone — no fuse
mount and no prior processor run required. Disk-image EVTX come from the SHARED
staged extraction (``imageexport.extract_staged``: log2timeline/plaso
``image_expor... | Get-Sybers/DX_DFIR | python/get_sybers_dfir/signatures/hayabusa.py | .py | 0635ba56c41f9d82 | 7.45 | 7 |
"""Velociraptor processor — lay out offline-collector ZIPs for ingestion.
Unpack each collection
ZIP and lay its per-artefact ``results/<Artefact>.json`` (JSON Lines) out flat under
one folder per collection, where the ingest loader (``get_sybers_dfir.ingest``)
expects it. The ingest-side wrap does the ``{Artefact, So... | Get-Sybers/DX_DFIR | python/get_sybers_dfir/velociraptor.py | .py | 35fd1f3d3fc55afb | 7.45 | 7 |
"""Volatility 3 processor — memory images -> per-plugin JSON Lines.
Run a fixed set of
Volatility 3 plugins over each memory image with the custom ``jsonl_dfir`` renderer
(one flat JSON object per TreeGrid node — one process/connection/artefact per line),
writing ``<plugin>.jsonl`` per image. The ingest loader wraps e... | Get-Sybers/DX_DFIR | python/get_sybers_dfir/volatility.py | .py | 0d4dc07ac500d359 | 7.45 | 7 |
"""Zeek processor — PCAPs → Zeek JSON logs.
Discover captures anywhere
under a pcap tree (magic bytes first, extension as fallback), run the ``zeek/zeek``
container per capture with ``LogAscii::use_json=T`` + ISO-8601 timestamps, and
rename each ``*.log`` (Zeek keeps the extension even for JSON) to ``*.json`` under
on... | Get-Sybers/DX_DFIR | python/get_sybers_dfir/zeek.py | .py | 773820b4a66cb423 | 7.45 | 7 |
"""Unit tests for the DetectRaptor provisioning module (pure logic, no network)."""
import os
from get_sybers_dfir.signatures import detectraptor
_A = (
'import "pe"\n'
"rule Alpha : FILE {\n"
" strings:\n $s = \"x\"\n condition:\n $s\n}\n"
"private rule Helper {\n condition:\n... | Get-Sybers/DX_DFIR | python/tests/test_detectraptor.py | .py | 5f29d2408acef74a | 7.95 | 7 |
"""Unit tests for the SOF-ELK delivery module (local copy + ledger idempotence)."""
import os
from get_sybers_dfir import sofelk
def _seed(src):
os.makedirs(os.path.join(src, "zeek", "cap"))
with open(os.path.join(src, "zeek", "cap", "conn.json"), "w") as fh:
fh.write('{"id":1}\n')
with open(os.p... | Get-Sybers/DX_DFIR | python/tests/test_sofelk.py | .py | f925d96e7f5f6450 | 7.95 | 7 |
"""Unit tests for the velociraptor processor (pure logic + real zipfile, no tool)."""
import json
import os
import zipfile
from get_sybers_dfir import velociraptor
def _make_zip(path, entries):
with zipfile.ZipFile(path, "w") as zf:
for name, data in entries.items():
zf.writestr(name, data)
... | Get-Sybers/DX_DFIR | python/tests/test_velociraptor.py | .py | 7601b12a4963f475 | 7.95 | 7 |
"""Glyph id lookup for tests that build a :class:`torchfont.GlyphRef` by hand.
``GlyphRef`` names a glyph by id. ``CodepointDataset`` resolves ids from codepoints
while indexing, so tests that skip the dataset resolve them here with fontTools
instead.
"""
from __future__ import annotations
from fontTools.ttLib impor... | torchfont/torchfont | tests/_glyphs.py | .py | b08bf1bbd4200f91 | 8.13 | 17 |
"""Tensor-pair adapters for kernels whose public API takes an ``Outline``.
Many kernel tests were written against ``(types, coords)`` pairs. The public
functional API takes and returns :class:`torchfont.Outline`, so these adapters
keep those tests focused on kernel behaviour instead of container plumbing.
"""
from __... | torchfont/torchfont | tests/_pairs.py | .py | 09d8fee673ced04c | 8.13 | 17 |
import logging
from pathlib import Path
import pytest
import torch
from torch import Tensor
from torch.utils.data import DataLoader
from tests._pairs import remove_overlaps
from torchfont import CodepointSample, ElementType, Outline
from torchfont.datasets import CodepointDataset
from torchfont.transforms import func... | torchfont/torchfont | tests/google_fonts/test_remove_overlaps.py | .py | a47c810915835db4 | 7.13 | 17 |
"""Unit tests for the force-push classification and the guard's target parsing.
The default-branch guard now runs before the HTTPS push as well, which means
it has to recognise a history rewrite from the argument list alone. These
tests pin that down, plus the refspec parsing that decides *which* remote
branch the pus... | phantomyard/phantomtools | github-app-auth/tests/test_force_args.py | .py | 665e85853273e219 | 7.92 | 6 |
"""SQLite FTS5 full-text index for an OKF bundle (H1).
Replaces okf.search()'s str.count() scoring with a proper inverted index.
Design:
- One index.db per agent, at <agent_dir>/.fts/index.db (inside the bundle,
git-trackable, not a concept dir so it never shows up as knowledge).
- Tokenizer: unicode61 with remove_d... | sillogic/sill-ensoul | ensoul/fts.py | .py | a35974001586ab81 | 7.42 | 6 |
"""sill-ensoul HTTP MCP server: the same 8 OKF tools over Streamable HTTP,
protected by Bearer-token auth (SIL-7).
Purpose: deploy the knowledge base as a REMOTE MCP server (cloud VPS / tailnet)
so multiple machines share ONE memory. Authentication is the connection layer
— "who may connect". Every request must carry ... | sillogic/sill-ensoul | ensoul/http.py | .py | 39b55c5d453fcd49 | 7.42 | 6 |
"""`sill-ensoul-init` console script: initialize an empty global KB and manage
per-CLI shell integration.
Designed for sharing sill-ensoul with teammates: they `pip install` the package,
run `sill-ensoul-init`, then follow the printed steps to wire it into their CLI.
The KB starts empty — each user builds their own ag... | sillogic/sill-ensoul | ensoul/init_cmd.py | .py | e6a9ddccb1ce29a7 | 7.42 | 6 |
"""sill-ensoul MCP server: exposes an OKF knowledge base as agent tools.
Run as a stdio MCP server: python -m ensoul.server
Register it from Codex / Claude Code / OpenCode (see README.md).
Terminology: an "agent" in the tool names below is what users call an "ensouler"
(a role-scoped memory bundle). The MCP tool nam... | sillogic/sill-ensoul | ensoul/server.py | .py | 2b7dcefa09f4b38f | 7.42 | 6 |
"""One-command test runner for sill-ensoul.
Usage:
python -m tests.run_tests # from repo root (preferred)
python tests/run_tests.py # also works
"""
import subprocess
import sys
from pathlib import Path
# Repo root = parent of this tests/ directory. Tests are imported as
# `tests.test_*`, so cwd mus... | sillogic/sill-ensoul | tests/run_tests.py | .py | 1608f8d367240f69 | 7.92 | 6 |
"""搜索回归测试:防 H1(FTS5 检索)/H7(persona 排除)退化。
自建隔离的临时 agent,写多条 concept,验证检索行为,跑完清理。
不依赖真实 algo-engineer 数据,可任意次数重复运行。
用法: python -m tests.test_search
"""
import os
import shutil
import tempfile
import yaml
from ensoul import okf, fts
AGENT = "search-regression-fixture" # 临时 agent,跑完删除
def setup_agent(kb_root):
... | sillogic/sill-ensoul | tests/test_search.py | .py | eb623606558d4055 | 7.92 | 6 |
"""Circuit breaker - fail-fast protection for a slow/failing LLM provider.
State is process-global and keyed by ``(provider, model)`` so each candidate
model accumulates its own failure history independently. Transitions follow the
standard closed -> open -> half-open cycle:
- **CLOSED**: calls allowed. Each fallback... | PrisonBreakPB/Folium | folium/circuit_breaker.py | .py | 71d1fe58ff1c6ce0 | 7.45 | 7 |
"""Configuration - env vars and defaults."""
import os
import re
from dataclasses import dataclass
from pathlib import Path
DEFAULT_MAX_CONTEXT_TOKENS = 1_000_000
@dataclass
class LLMProfile:
"""A named, self-contained LLM endpoint configuration."""
name: str
provider: str
api_key: str
base_ur... | PrisonBreakPB/Folium | folium/config.py | .py | c824e26ebece127a | 7.45 | 7 |
"""Cost meter - per-session rolling budget for LLM spend.
Owned by the agent that drives a task/session; every LLM call (main loop,
context compression, background memory maintenance) reports its cost here so
the agent can watch how much it has spent. Budgets are in dollars. A
``budget_usd`` of 0 disables the meter (s... | PrisonBreakPB/Folium | folium/cost_meter.py | .py | 57794aa723206789 | 7.45 | 7 |
"""LLM gateway - control plane for model selection (rule-based routing).
Holds everything that decides *which* model to call: scene -> tier candidates
and tier -> concrete model id. Transport (retry/streaming/errors) stays in
``llm.py``; callers only report their ``scene`` and do not pick a model.
"""
from __future__... | PrisonBreakPB/Folium | folium/gateway.py | .py | 428d8203ad11c948 | 7.45 | 7 |
"""Trace event recorders."""
from __future__ import annotations
import json
import threading
from pathlib import Path
from typing import Any
from ..database import get_connection
class NullRecorder:
def record(self, event: dict[str, Any]) -> None:
return None
def flush(self, trace_id: str) -> None... | PrisonBreakPB/Folium | folium/observability/recorder.py | .py | 7f392391058997a4 | 7.45 | 7 |
"""SQLite trace query helpers."""
from __future__ import annotations
import json
from pathlib import Path
from ..database import get_connection
def _db_path(value: str | Path | None) -> Path | None:
if value is None:
return None
path = Path(value)
return path if path.suffix == ".db" else path /... | PrisonBreakPB/Folium | folium/observability/summary.py | .py | 63a5a8c7083989cb | 7.45 | 7 |
"""System prompt - the instructions that turn an LLM into a research assistant."""
import os
import platform
from pathlib import Path
MEMORY_FILE = Path(r"D:\learn-Agent\Folium\memory.md")
MAX_MEMORY_CHARS = 2000
_ROLE_FALLBACK = """\
You are Folium, an AI research assistant designed to support the full academic res... | PrisonBreakPB/Folium | folium/prompt.py | .py | be39f6c9f5f457f1 | 7.45 | 7 |
"""Filesystem routing for local and sandbox-backed tools."""
from pathlib import Path
from .session import SandboxPathError, get_current_session, get_host_workspace, use_copy_workspace
def resolve_tool_path(file_path: str) -> Path:
if use_copy_workspace():
return get_current_session().resolve_path(file_p... | PrisonBreakPB/Folium | folium/sandbox/filesystem.py | .py | 927b1f8e3e1b825a | 7.45 | 7 |
"""SQLite-backed session persistence."""
from __future__ import annotations
import copy
import json
import re
import time
import uuid
from pathlib import Path
from typing import Any
from .database import get_connection
from .encoding import repair_mojibake_text
_SAFE_SESSION_RE = re.compile(r"[^A-Za-z0-9._-]+")
_SU... | PrisonBreakPB/Folium | folium/session.py | .py | dca5261b55bafa92 | 7.45 | 7 |
"""Base class for all tools."""
from abc import ABC, abstractmethod
from dataclasses import dataclass
from typing import ClassVar
from pydantic import BaseModel, ValidationError
@dataclass
class ToolValidationError(Exception):
"""Raised when a tool call does not match the tool's JSON schema."""
tool_name: ... | PrisonBreakPB/Folium | folium/tools/base.py | .py | 015bf42f4b8f5832 | 7.45 | 7 |
"""Content search with regex support."""
import re
from pathlib import Path
from pydantic import BaseModel, ConfigDict, Field
from .base import Tool, ToolFailure, tool_failure
from ..sandbox.filesystem import SandboxPathError, resolve_tool_path
# skip these dirs to avoid noise
_SKIP_DIRS = {".git", "node_modules", ... | PrisonBreakPB/Folium | folium/tools/grep.py | .py | 02ff9fed9d95dcf8 | 7.45 | 7 |
# Copyright 2026 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | huggingface/transformers-mlinter | mlinter/_helpers.py | .py | a8618a5375170391 | 7.42 | 6 |
# Copyright 2026 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | huggingface/transformers-mlinter | mlinter/trf003.py | .py | 0591489e10228d1a | 7.42 | 6 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.