repo_full_name stringlengths 6 93 | repo_url stringlengths 25 112 | repo_api_url stringclasses 28
values | owner stringclasses 28
values | repo_name stringclasses 28
values | description stringclasses 28
values | stars int64 617 98.8k | forks int64 31 355 ⌀ | watchers int64 990 999 ⌀ | license stringclasses 2
values | default_branch stringclasses 2
values | repo_created_at timestamp[s]date 2012-07-24 23:12:50 2025-06-16 08:07:28 ⌀ | repo_updated_at timestamp[s]date 2026-02-23 15:23:15 2026-05-03 18:52:12 ⌀ | repo_topics listlengths 0 13 ⌀ | repo_languages unknown | is_fork bool 1
class | open_issues int64 3 104 ⌀ | file_path stringlengths 3 208 | file_name stringclasses 509
values | file_extension stringclasses 1
value | file_size_bytes int64 101 84k ⌀ | file_url stringclasses 627
values | file_raw_url stringclasses 627
values | file_sha stringclasses 624
values | language stringclasses 8
values | parsed_at stringdate 2026-05-04 01:12:36 2026-05-04 19:41:55 | text stringlengths 100 102k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
microsoft/VibeVoice | https://github.com/microsoft/VibeVoice | null | null | null | null | 46,378 | null | null | mit | null | null | null | null | null | null | null | vibevoice/modular/modeling_vibevoice_streaming_inference.py | null | null | null | null | null | null | Python | 2026-05-04T02:19:52.709779 | from dataclasses import dataclass
from typing import Any, Dict, List, Optional, Tuple, Union, Callable
from tqdm import tqdm
import inspect
import torch
import torch.nn as nn
from transformers.models.auto import AutoModel, AutoModelForCausalLM
from transformers.generation import GenerationMixin, GenerationConfig, Logi... |
microsoft/VibeVoice | https://github.com/microsoft/VibeVoice | null | null | null | null | 46,378 | null | null | mit | null | null | null | null | null | null | null | vibevoice/modular/streamer.py | null | null | null | null | null | null | Python | 2026-05-04T02:19:52.763730 | from __future__ import annotations
import torch
import asyncio
from queue import Empty, Queue
from typing import TYPE_CHECKING, Optional
from transformers.generation import BaseStreamer
class AudioStreamer(BaseStreamer):
"""
Audio streamer that stores audio chunks in queues for each sample in the batch.
... |
microsoft/VibeVoice | https://github.com/microsoft/VibeVoice | null | null | null | null | 46,378 | null | null | mit | null | null | null | null | null | null | null | vibevoice/processor/vibevoice_asr_processor.py | null | null | null | null | null | null | Python | 2026-05-04T02:19:53.145790 | """
Processor class for VibeVoice ASR models.
"""
import os
import json
import math
import warnings
from typing import List, Optional, Union, Dict, Any, Tuple
import numpy as np
import torch
from transformers.tokenization_utils_base import BatchEncoding
from transformers.utils import TensorType, logging
from .vibevo... |
microsoft/VibeVoice | https://github.com/microsoft/VibeVoice | null | null | null | null | 46,378 | null | null | mit | null | null | null | null | null | null | null | vibevoice/processor/audio_utils.py | null | null | null | null | null | null | Python | 2026-05-04T02:19:53.147765 | import os
import threading
import numpy as np
from subprocess import run
from typing import List, Optional, Union, Dict, Any
COMMON_AUDIO_EXTS = [
'.mp3', '.MP3', '.Mp3', # All case variations of mp3
'.m4a',
'.mp4', '.MP4',
'.wav', '.WAV',
'.m4v',
'.aac',
'.ogg',
'.mov', '.MOV',
... |
microsoft/VibeVoice | https://github.com/microsoft/VibeVoice | null | null | null | null | 46,378 | null | null | mit | null | null | null | null | null | null | null | vibevoice/processor/vibevoice_streaming_processor.py | null | null | null | null | null | null | Python | 2026-05-04T02:19:53.177918 | import math
import warnings
from typing import List, Optional, Union, Dict, Any, Tuple
import os
import re
import numpy as np
import torch
from transformers.tokenization_utils_base import BatchEncoding, PaddingStrategy, PreTokenizedInput, TextInput, TruncationStrategy
from transformers.utils import TensorType, loggin... |
microsoft/VibeVoice | https://github.com/microsoft/VibeVoice | null | null | null | null | 46,378 | null | null | mit | null | null | null | null | null | null | null | vibevoice/processor/vibevoice_tokenizer_processor.py | null | null | null | null | null | null | Python | 2026-05-04T02:19:53.191888 | """
Processor class for VibeVoice models.
"""
import os
import json
import warnings
from typing import List, Optional, Union, Dict, Any
import numpy as np
import torch
from transformers.feature_extraction_utils import FeatureExtractionMixin
from transformers.utils import logging
from .audio_utils import AudioNormal... |
microsoft/VibeVoice | https://github.com/microsoft/VibeVoice | null | null | null | null | 46,378 | null | null | mit | null | null | null | null | null | null | null | vibevoice/processor/vibevoice_processor.py | null | null | null | null | null | null | Python | 2026-05-04T02:19:53.193734 | import math
import warnings
from typing import List, Optional, Union, Dict, Any, Tuple
import os
import re
import numpy as np
import torch
from transformers.tokenization_utils_base import BatchEncoding, PaddingStrategy, PreTokenizedInput, TextInput, TruncationStrategy
from transformers.utils import TensorType, loggin... |
microsoft/VibeVoice | https://github.com/microsoft/VibeVoice | null | null | null | null | 46,378 | null | null | mit | null | null | null | null | null | null | null | vibevoice/schedule/timestep_sampler.py | null | null | null | null | null | null | Python | 2026-05-04T02:19:53.249415 | import math
import torch
class UniformSampler:
def __init__(self, timesteps = 1000):
self.timesteps = timesteps
def sample(self, batch_size, device):
return torch.randint(0, self.timesteps, (batch_size,), device=device)
class LogitNormalSampler:
def __init__(self, timesteps = 1000, m ... |
microsoft/VibeVoice | https://github.com/microsoft/VibeVoice | null | null | null | null | 46,378 | null | null | mit | null | null | null | null | null | null | null | vibevoice/schedule/dpm_solver.py | null | null | null | null | null | null | Python | 2026-05-04T02:19:53.275180 | # Copyright 2024 TSAIL Team and 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 requir... |
microsoft/VibeVoice | https://github.com/microsoft/VibeVoice | null | null | null | null | 46,378 | null | null | mit | null | null | null | null | null | null | null | vllm_plugin/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:19:53.325562 | """VibeVoice vLLM Plugin - Registers VibeVoice model for vLLM inference.
This plugin enables VibeVoice ASR models to be loaded and served through vLLM.
It registers the model architecture, configuration, tokenizer, and processor
with their respective registries.
The plugin is automatically loaded by vLLM via the 'vll... |
microsoft/VibeVoice | https://github.com/microsoft/VibeVoice | null | null | null | null | 46,378 | null | null | mit | null | null | null | null | null | null | null | vllm_plugin/inputs.py | null | null | null | null | null | null | Python | 2026-05-04T02:19:53.710266 | """Audio input mapper for vLLM multimodal pipeline.
This module handles audio data loading and preprocessing for VibeVoice ASR inference.
It converts various audio input formats (path, bytes, numpy array) into tensors
that can be processed by the VibeVoice model.
"""
import os
import logging
import torch
import numpy ... |
microsoft/VibeVoice | https://github.com/microsoft/VibeVoice | null | null | null | null | 46,378 | null | null | mit | null | null | null | null | null | null | null | vllm_plugin/scripts/gradio_asr_demo_api_video.py | null | null | null | null | null | null | Python | 2026-05-04T02:19:53.754983 | #!/usr/bin/env python
"""
VibeVoice ASR Gradio Demo
This demo uses the vLLM API server instead of loading the model directly.
Supports concurrent requests (non-blocking) and streaming output.
Usage:
python gradio_asr_demo_api.py --api_url http://localhost:8000
"""
import os
import sys
import io
import json
import... |
microsoft/VibeVoice | https://github.com/microsoft/VibeVoice | null | null | null | null | 46,378 | null | null | mit | null | null | null | null | null | null | null | vllm_plugin/model.py | null | null | null | null | null | null | Python | 2026-05-04T02:19:53.768155 | """
VibeVoice vLLM Plugin Model - Native Multimodal Integration
This module implements the VibeVoice ASR model with full vLLM multimodal registry
integration for speech-to-text inference.
"""
from typing import List, Optional, Tuple, Union, Dict, Any, Iterable, Mapping, Sequence
import os
import torch
import torch.nn... |
microsoft/VibeVoice | https://github.com/microsoft/VibeVoice | null | null | null | null | 46,378 | null | null | mit | null | null | null | null | null | null | null | vllm_plugin/tests/test_api.py | null | null | null | null | null | null | Python | 2026-05-04T02:19:53.802329 | #!/usr/bin/env python3
"""
Test VibeVoice vLLM API with Streaming and Optional Hotwords Support.
This script tests ASR transcription via the vLLM OpenAI-compatible API.
By default, it runs standard transcription without hotwords.
Optionally, you can provide hotwords (context_info) to improve recognition
of domain-spe... |
microsoft/VibeVoice | https://github.com/microsoft/VibeVoice | null | null | null | null | 46,378 | null | null | mit | null | null | null | null | null | null | null | vllm_plugin/scripts/start_server.py | null | null | null | null | null | null | Python | 2026-05-04T02:19:53.822068 | #!/usr/bin/env python3
"""
VibeVoice vLLM ASR Server Launcher
One-click deployment script that handles:
1. Installing system dependencies (FFmpeg, etc.)
2. Installing VibeVoice Python package
3. Downloading model from HuggingFace
4. Generating tokenizer files
5. Starting vLLM server
For DP > 1, launches N independent... |
microsoft/VibeVoice | https://github.com/microsoft/VibeVoice | null | null | null | null | 46,378 | null | null | mit | null | null | null | null | null | null | null | vllm_plugin/tests/test_api_auto_recover.py | null | null | null | null | null | null | Python | 2026-05-04T02:19:53.822832 | #!/usr/bin/env python3
"""
Test VibeVoice vLLM API with Streaming, Hotwords, and Auto-Recovery.
This script tests ASR transcription with automatic recovery from repetition loops.
Supports optional hotwords to improve recognition of domain-specific terms.
Features:
- Streaming output with real-time repetition detectio... |
microsoft/VibeVoice | https://github.com/microsoft/VibeVoice | null | null | null | null | 46,378 | null | null | mit | null | null | null | null | null | null | null | vllm_plugin/tools/generate_tokenizer_files.py | null | null | null | null | null | null | Python | 2026-05-04T02:19:54.008753 | #!/usr/bin/env python3
"""
Standalone tool to generate VibeVoice tokenizer files from Qwen2 base.
Downloads base tokenizer from Qwen2 and patches it with VibeVoice-specific
audio tokens and chat template modifications.
Usage:
python generate_tokenizer_files.py --output /path/to/output [--compare /path/to/referenc... |
9001/copyparty | https://github.com/9001/copyparty | null | null | null | null | 44,659 | null | null | mit | null | null | null | null | null | null | null | bin/handlers/randpic.py | null | null | null | null | null | null | Python | 2026-05-04T02:20:01.502413 | import os
import random
from urllib.parse import quote
# assuming /foo/bar/ is a valid URL but /foo/bar/randpic.png does not exist,
# hijack the 404 with a redirect to a random pic in that folder
#
# thx to lia & kipu for the idea
def main(cli, vn, rem):
req_fn = rem.split("/")[-1]
if not cli.can_read or no... |
9001/copyparty | https://github.com/9001/copyparty | null | null | null | null | 44,659 | null | null | mit | null | null | null | null | null | null | null | bin/handlers/nooo.py | null | null | null | null | null | null | Python | 2026-05-04T02:20:01.551600 | # reply with an endless "noooooooooooooooooooooooo"
def say_no():
yield b"n"
while True:
yield b"o" * 4096
def main(cli, vn, rem):
cli.send_headers("oh_f", None, 404, "text/plain")
for chunk in say_no():
cli.s.sendall(chunk)
return "false"
|
9001/copyparty | https://github.com/9001/copyparty | null | null | null | null | 44,659 | null | null | mit | null | null | null | null | null | null | null | bin/handlers/never404.py | null | null | null | null | null | null | Python | 2026-05-04T02:20:01.552490 | # create a dummy file and let copyparty return it
def main(cli, vn, rem):
print("hello", cli.ip)
abspath = vn.canonical(rem)
with open(abspath, "wb") as f:
f.write(b"404? not on MY watch!")
return "retry"
|
9001/copyparty | https://github.com/9001/copyparty | null | null | null | null | 44,659 | null | null | mit | null | null | null | null | null | null | null | bin/handlers/ip-ok.py | null | null | null | null | null | null | Python | 2026-05-04T02:20:01.554561 | # disable permission checks and allow access if client-ip is 1.2.3.4
def main(cli, vn, rem):
if cli.ip == "1.2.3.4":
return "allow"
|
9001/copyparty | https://github.com/9001/copyparty | null | null | null | null | 44,659 | null | null | mit | null | null | null | null | null | null | null | bin/handlers/404-to-fail2ban.py | null | null | null | null | null | null | Python | 2026-05-04T02:20:01.555664 | # /!\ Warning: be careful, as webdav clients often generate a large number of 404 requets.
# In your `jail.local`, add:
# [copyparty]
# enabled = true
# logtimezone = UTC
# logpath = /path/to/log/file # or keep the default value if you're using systemd
# Create the `copyparty.conf` file in `filter.d` with the followi... |
9001/copyparty | https://github.com/9001/copyparty | null | null | null | null | 44,659 | null | null | mit | null | null | null | null | null | null | null | .vscode/launch.py | null | null | null | null | null | null | Python | 2026-05-04T02:20:01.562670 | #!/usr/bin/env python3
# takes arguments from launch.json
# is used by no_dbg in tasks.json
# launches 10x faster than mspython debugpy
# and is stoppable with ^C
import re
import os
import sys
print(sys.executable)
import json5
import shlex
import subprocess as sp
with open(".vscode/launch.json", "r", encoding="... |
9001/copyparty | https://github.com/9001/copyparty | null | null | null | null | 44,659 | null | null | mit | null | null | null | null | null | null | null | bin/dbtool.py | null | null | null | null | null | null | Python | 2026-05-04T02:20:01.564127 | #!/usr/bin/env python3
import os
import sys
import time
import shutil
import sqlite3
import argparse
DB_VER1 = 3
DB_VER2 = 6
BY_PATH = None
NC = None
def die(msg):
print("\033[31m\n" + msg + "\n\033[0m")
sys.exit(1)
def read_ver(db):
for tab in ["ki", "kv"]:
try:
c = db.execute(r"... |
9001/copyparty | https://github.com/9001/copyparty | null | null | null | null | 44,659 | null | null | mit | null | null | null | null | null | null | null | bin/handlers/sorry.py | null | null | null | null | null | null | Python | 2026-05-04T02:20:01.592594 | # sends a custom response instead of the usual 404
def main(cli, vn, rem):
msg = f"sorry {cli.ip} but {cli.vpath} doesn't exist"
return str(cli.reply(msg.encode("utf-8"), 404, "text/plain"))
|
9001/copyparty | https://github.com/9001/copyparty | null | null | null | null | 44,659 | null | null | mit | null | null | null | null | null | null | null | bin/handlers/caching-proxy.py | null | null | null | null | null | null | Python | 2026-05-04T02:20:01.594480 | # assume each requested file exists on another webserver and
# download + mirror them as they're requested
# (basically pretend we're warnish)
import os
import requests
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from copyparty.httpcli import HttpCli
def main(cli: "HttpCli", vn, rem):
url = "https:/... |
9001/copyparty | https://github.com/9001/copyparty | null | null | null | null | 44,659 | null | null | mit | null | null | null | null | null | null | null | bin/handlers/redirect.py | null | null | null | null | null | null | Python | 2026-05-04T02:20:01.595699 | # if someone hits a 404, redirect them to another location
def send_http_302_temporary_redirect(cli, new_path):
"""
replies with an HTTP 302, which is a temporary redirect;
"new_path" can be any of the following:
- "http://a.com/" would redirect to another website,
- "/foo/bar" would redirect ... |
9001/copyparty | https://github.com/9001/copyparty | null | null | null | null | 44,659 | null | null | mit | null | null | null | null | null | null | null | bin/hooks/discord-announce.py | null | null | null | null | null | null | Python | 2026-05-04T02:20:02.133783 | #!/usr/bin/env python3
import sys
import json
import requests
from copyparty.util import humansize, quotep
_ = r"""
announces a new upload on discord
example usage as global config:
--xau f,t5,j,bin/hooks/discord-announce.py
parameters explained,
xau = execute after upload
f = fork; don't delay other ... |
9001/copyparty | https://github.com/9001/copyparty | null | null | null | null | 44,659 | null | null | mit | null | null | null | null | null | null | null | bin/hooks/into-the-cache-it-goes.py | null | null | null | null | null | null | Python | 2026-05-04T02:20:02.203111 | #!/usr/bin/env python3
import sys
import json
import shutil
import platform
import subprocess as sp
from urllib.parse import quote
_ = r"""
try to avoid race conditions in caching proxies
(primarily cloudflare, but probably others too)
by means of the most obvious solution possible:
just as each file has finished u... |
9001/copyparty | https://github.com/9001/copyparty | null | null | null | null | 44,659 | null | null | mit | null | null | null | null | null | null | null | bin/hooks/msg-log.py | null | null | null | null | null | null | Python | 2026-05-04T02:20:02.204420 | #!/usr/bin/env python
# coding: utf-8
# vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab
from __future__ import print_function, unicode_literals
import json
import os
import sys
import time
try:
from datetime import datetime, timezone
except:
from datetime import datetime
_ = r"""
use copyparty as a dumb mess... |
9001/copyparty | https://github.com/9001/copyparty | null | null | null | null | 44,659 | null | null | mit | null | null | null | null | null | null | null | bin/hooks/import-me.py | null | null | null | null | null | null | Python | 2026-05-04T02:20:02.227275 | #!/usr/bin/env python3
from typing import Any
_ = r"""
the fastest hook in the west
(runs directly inside copyparty, not as a subprocess)
example usage as global config:
--xbu I,bin/hooks/import-me.py
example usage as a volflag (per-volume config):
-v srv/inc:inc:r:rw,ed:c,xbu=I,bin/hooks/import-me.py
... |
9001/copyparty | https://github.com/9001/copyparty | null | null | null | null | 44,659 | null | null | mit | null | null | null | null | null | null | null | bin/hooks/image-noexif.py | null | null | null | null | null | null | Python | 2026-05-04T02:20:02.228254 | #!/usr/bin/env python3
import os
import sys
import subprocess as sp
_ = r"""
remove exif tags from uploaded images; the eventhook edition of
https://github.com/9001/copyparty/blob/hovudstraum/bin/mtag/image-noexif.py
dependencies:
exiftool / perl-Image-ExifTool
being an upload hook, this will take effect after... |
9001/copyparty | https://github.com/9001/copyparty | null | null | null | null | 44,659 | null | null | mit | null | null | null | null | null | null | null | bin/hooks/podcast-normalizer.py | null | null | null | null | null | null | Python | 2026-05-04T02:20:02.245963 | #!/usr/bin/env python3
import json
import os
import sys
import subprocess as sp
_ = r"""
sends all uploaded audio files through an aggressive
dynamic-range-compressor to even out the volume levels
dependencies:
ffmpeg
being an xau hook, this gets eXecuted After Upload completion
but before copyparty has st... |
9001/copyparty | https://github.com/9001/copyparty | null | null | null | null | 44,659 | null | null | mit | null | null | null | null | null | null | null | bin/hooks/reject-and-explain.py | null | null | null | null | null | null | Python | 2026-05-04T02:20:02.247196 | #!/usr/bin/env python3
import json
import os
import re
import sys
_ = r"""
reject file upload (with a nice explanation why)
example usage as global config:
--xbu j,c1,bin/hooks/reject-and-explain.py
example usage as a volflag (per-volume config):
-v srv/inc:inc:r:rw,ed:c,xbu=j,c1,bin/hooks/reject-and-expla... |
9001/copyparty | https://github.com/9001/copyparty | null | null | null | null | 44,659 | null | null | mit | null | null | null | null | null | null | null | bin/hooks/notify2.py | null | null | null | null | null | null | Python | 2026-05-04T02:20:02.248354 | #!/usr/bin/env python3
import json
import os
import sys
import subprocess as sp
from datetime import datetime, timezone
from plyer import notification
_ = r"""
same as notify.py but with additional info (uploader, ...)
and also supports --xm (notify on 📟 message)
example usages; either as global config (all volume... |
9001/copyparty | https://github.com/9001/copyparty | null | null | null | null | 44,659 | null | null | mit | null | null | null | null | null | null | null | bin/hooks/notify.py | null | null | null | null | null | null | Python | 2026-05-04T02:20:02.297584 | #!/usr/bin/env python3
import os
import sys
import subprocess as sp
from plyer import notification
_ = r"""
show os notification on upload; works on windows, linux, macos, android
dependencies:
windows: python3 -m pip install --user -U plyer
linux: python3 -m pip install --user -U plyer
macos: pytho... |
9001/copyparty | https://github.com/9001/copyparty | null | null | null | null | 44,659 | null | null | mit | null | null | null | null | null | null | null | bin/hooks/qbittorrent-magnet.py | null | null | null | null | null | null | Python | 2026-05-04T02:20:02.299066 | #!/usr/bin/env python3
# coding: utf-8
import os
import sys
import json
import shutil
import subprocess as sp
_ = r"""
start downloading a torrent by POSTing a magnet URL to copyparty,
for example using 📟 (message-to-server-log) in the web-ui
by default it will download the torrent to the folder you were in
when y... |
9001/copyparty | https://github.com/9001/copyparty | null | null | null | null | 44,659 | null | null | mit | null | null | null | null | null | null | null | bin/hooks/reject-extension.py | null | null | null | null | null | null | Python | 2026-05-04T02:20:02.734867 | #!/usr/bin/env python3
import sys
_ = r"""
reject file uploads by file extension
example usage as global config:
--xbu c,bin/hooks/reject-extension.py
example usage as a volflag (per-volume config):
-v srv/inc:inc:r:rw,ed:c,xbu=c,bin/hooks/reject-extension.py
^^^^^^^^^^^^^^^^^^^^... |
9001/copyparty | https://github.com/9001/copyparty | null | null | null | null | 44,659 | null | null | mit | null | null | null | null | null | null | null | bin/hooks/reject-ramdisk.py | null | null | null | null | null | null | Python | 2026-05-04T02:20:02.779025 | #!/usr/bin/env python3
import os
import threading
from argparse import Namespace
from jinja2.nodes import Name
from copyparty.fsutil import Fstab
from typing import Any, Optional
_ = r"""
reject an upload if the target folder is on a ramdisk; useful when you
have a volume where some folders inside are ramdisks but ... |
9001/copyparty | https://github.com/9001/copyparty | null | null | null | null | 44,659 | null | null | mit | null | null | null | null | null | null | null | bin/hooks/usb-eject.py | null | null | null | null | null | null | Python | 2026-05-04T02:20:03.479714 | #!/usr/bin/env python3
import os
import stat
import subprocess as sp
import sys
from urllib.parse import unquote_to_bytes as unquote
"""
if you've found yourself using copyparty to serve flashdrives on a LAN
and your only wish is that the web-UI had a button to unmount / safely
remove those flashdrives, then boy how... |
9001/copyparty | https://github.com/9001/copyparty | null | null | null | null | 44,659 | null | null | mit | null | null | null | null | null | null | null | bin/hooks/reloc-by-wark-xau.py | null | null | null | null | null | null | Python | 2026-05-04T02:20:03.480837 | #!/usr/bin/env python3
import os
import sys
_ = r"""
rename incoming uploads according to the "wark" (the file identifier)
which is basically but not exactly a sha512 hash of the file contents
NOTE: this does NOT work with up2k uploads (dragdrop into browser);
combine this hook with reloc-by-wark-xbu.py to fix th... |
9001/copyparty | https://github.com/9001/copyparty | null | null | null | null | 44,659 | null | null | mit | null | null | null | null | null | null | null | bin/hooks/reloc-by-ext.py | null | null | null | null | null | null | Python | 2026-05-04T02:20:03.482749 | #!/usr/bin/env python3
import json
import os
import re
import sys
_ = r"""
relocate/redirect incoming uploads according to file extension or name
example usage as global config:
--xbu j,c1,bin/hooks/reloc-by-ext.py
parameters explained,
xbu = execute before upload
j = this hook needs upload informati... |
9001/copyparty | https://github.com/9001/copyparty | null | null | null | null | 44,659 | null | null | mit | null | null | null | null | null | null | null | bin/hooks/wget.py | null | null | null | null | null | null | Python | 2026-05-04T02:20:03.484024 | #!/usr/bin/env python3
import os
import sys
import json
import subprocess as sp
_ = r"""
use copyparty as a file downloader by POSTing URLs as
application/x-www-form-urlencoded (for example using the
📟 message-to-server-log in the web-ui)
example usage as global config:
--xm aw,f,j,t3600,bin/hooks/wget.py
par... |
9001/copyparty | https://github.com/9001/copyparty | null | null | null | null | 44,659 | null | null | mit | null | null | null | null | null | null | null | bin/hooks/wget-i.py | null | null | null | null | null | null | Python | 2026-05-04T02:20:03.485075 | #!/usr/bin/env python3
import os
import threading
import subprocess as sp
_ = r"""
use copyparty as a file downloader by POSTing URLs as
application/x-www-form-urlencoded (for example using the
📟 message-to-server-log in the web-ui)
this hook is a modified copy of wget.py, modified to
make it import-safe so it can... |
9001/copyparty | https://github.com/9001/copyparty | null | null | null | null | 44,659 | null | null | mit | null | null | null | null | null | null | null | bin/hooks/reloc-by-wark-xbu.py | null | null | null | null | null | null | Python | 2026-05-04T02:20:03.485842 | #!/usr/bin/env python3
import os
_ = r"""
rename incoming uploads according to the "wark" (the file identifier)
which is basically but not exactly a sha512 hash of the file contents
NOTE: this only works for up2k uploads (dragdrop into browser);
combine this with reloc-by-wark-xau.py to cover the other protocols
... |
9001/copyparty | https://github.com/9001/copyparty | null | null | null | null | 44,659 | null | null | mit | null | null | null | null | null | null | null | bin/hooks/reject-mimetype.py | null | null | null | null | null | null | Python | 2026-05-04T02:20:04.421761 | #!/usr/bin/env python3
import sys
import magic
_ = r"""
reject file uploads by mimetype
dependencies (linux, macos):
python3 -m pip install --user -U python-magic
dependencies (windows):
python3 -m pip install --user -U python-magic-bin
example usage as global config:
--xau c,bin/hooks/reject-mimetype... |
9001/copyparty | https://github.com/9001/copyparty | null | null | null | null | 44,659 | null | null | mit | null | null | null | null | null | null | null | bin/hooks/xiu-sha.py | null | null | null | null | null | null | Python | 2026-05-04T02:20:04.533020 | #!/usr/bin/env python3
import hashlib
import json
import sys
from datetime import datetime, timezone
_ = r"""
this hook will produce a single sha512 file which
covers all recent uploads (plus metadata comments)
use this with --xiu, which makes copyparty buffer
uploads until server is idle, providing file infos
on s... |
9001/copyparty | https://github.com/9001/copyparty | null | null | null | null | 44,659 | null | null | mit | null | null | null | null | null | null | null | bin/hooks/xiu.py | null | null | null | null | null | null | Python | 2026-05-04T02:20:04.595447 | #!/usr/bin/env python3
import json
import sys
_ = r"""
this hook prints absolute filepaths + total size
use this with --xiu, which makes copyparty buffer
uploads until server is idle, providing file infos
on stdin (filepaths or json)
example usage as global config:
--xiu i1,j,bin/hooks/xiu.py
example usage as... |
9001/copyparty | https://github.com/9001/copyparty | null | null | null | null | 44,659 | null | null | mit | null | null | null | null | null | null | null | bin/mtag/file-ext.py | null | null | null | null | null | null | Python | 2026-05-04T02:20:05.123210 | #!/usr/bin/env python
import sys
"""
example that just prints the file extension
"""
print(sys.argv[1].split(".")[-1])
|
9001/copyparty | https://github.com/9001/copyparty | null | null | null | null | 44,659 | null | null | mit | null | null | null | null | null | null | null | bin/mtag/guestbook-read.py | null | null | null | null | null | null | Python | 2026-05-04T02:20:05.337991 | #!/usr/bin/env python3
"""
fetch latest msg from guestbook and return as tag
example copyparty config to use this:
--urlform save,get -vsrv/hello:hello:w:c,e2ts,mtp=guestbook=t10,ad,p,bin/mtag/guestbook-read.py:mte=+guestbook
explained:
for realpath srv/hello (served at /hello), write-only for everyone,
enable... |
9001/copyparty | https://github.com/9001/copyparty | null | null | null | null | 44,659 | null | null | mit | null | null | null | null | null | null | null | bin/mtag/cksum.py | null | null | null | null | null | null | Python | 2026-05-04T02:20:05.538736 | #!/usr/bin/env python3
import sys
import json
import struct
import base64
import hashlib
try:
from zlib_ng import zlib_ng as zlib
except:
import zlib
try:
from copyparty.util import fsenc
except:
def fsenc(p):
return p
"""
calculates various checksums for uploads,
usage: -mtp crc32,md5,sha... |
9001/copyparty | https://github.com/9001/copyparty | null | null | null | null | 44,659 | null | null | mit | null | null | null | null | null | null | null | bin/mtag/audio-key.py | null | null | null | null | null | null | Python | 2026-05-04T02:20:05.539712 | #!/usr/bin/env python
import os
import sys
import tempfile
import subprocess as sp
try:
import keyfinder
PKF = True
except:
PKF = False
from copyparty.util import fsenc
"""
dep: github/mixxxdj/libkeyfinder
dep: pypi/keyfinder -OR- EvanPurkhiser/keyfinder-cli
dep: ffmpeg
"""
# tried trimming the fir... |
9001/copyparty | https://github.com/9001/copyparty | null | null | null | null | 44,659 | null | null | mit | null | null | null | null | null | null | null | bin/mtag/geotag.py | null | null | null | null | null | null | Python | 2026-05-04T02:20:05.541484 | import json
import re
import sys
from copyparty.util import fsenc, runcmd
"""
uses exiftool to geotag images based on embedded gps coordinates in exif data
adds four new metadata keys:
.gps_lat = latitute
.gps_lon = longitude
.masl = meters above sea level
city = "city, subregion, region"
usage: -m... |
9001/copyparty | https://github.com/9001/copyparty | null | null | null | null | 44,659 | null | null | mit | null | null | null | null | null | null | null | bin/mtag/audio-key-slicing.py | null | null | null | null | null | null | Python | 2026-05-04T02:20:05.542793 | #!/usr/bin/env python
import re
import os
import sys
import tempfile
import subprocess as sp
import keyfinder
from copyparty.util import fsenc
"""
dep: github/mixxxdj/libkeyfinder
dep: pypi/keyfinder
dep: ffmpeg
note: this is a janky edition of the regular audio-key.py,
slicing the files at 20sec intervals and k... |
9001/copyparty | https://github.com/9001/copyparty | null | null | null | null | 44,659 | null | null | mit | null | null | null | null | null | null | null | bin/mtag/exe.py | null | null | null | null | null | null | Python | 2026-05-04T02:20:05.887549 | #!/usr/bin/env python
import sys
import time
import json
import pefile
"""
retrieve exe info,
example for multivalue providers
"""
def unk(v):
return "unk({:04x})".format(v)
class PE2(pefile.PE):
def __init__(self, *a, **ka):
for k in [
# -- parse_data_directories:
"parse_i... |
9001/copyparty | https://github.com/9001/copyparty | null | null | null | null | 44,659 | null | null | mit | null | null | null | null | null | null | null | bin/mtag/media-hash.py | null | null | null | null | null | null | Python | 2026-05-04T02:20:05.917445 | #!/usr/bin/env python
import re
import sys
import json
import time
import base64
import hashlib
import subprocess as sp
try:
from copyparty.util import fsenc
except:
def fsenc(p):
return p.encode("utf-8")
"""
dep: ffmpeg
"""
def det():
# fmt: off
cmd = [
b"ffmpeg",
b"-nost... |
9001/copyparty | https://github.com/9001/copyparty | null | null | null | null | 44,659 | null | null | mit | null | null | null | null | null | null | null | bin/mtag/mousepad.py | null | null | null | null | null | null | Python | 2026-05-04T02:20:06.016985 | #!/usr/bin/env python3
import os
import sys
import subprocess as sp
"""
mtp test -- opens a texteditor
usage:
-vsrv/v1:v1:r:c,mte=+x1:c,mtp=x1=ad,p,bin/mtag/mousepad.py
explained:
c,mte: list of tags to index in this volume
c,mtp: add new tag provider
x1: dummy tag to provide
ad: dontcare if audio ... |
9001/copyparty | https://github.com/9001/copyparty | null | null | null | null | 44,659 | null | null | mit | null | null | null | null | null | null | null | bin/mtag/very-bad-idea.py | null | null | null | null | null | null | Python | 2026-05-04T02:20:06.128050 | #!/usr/bin/env python3
"""
WARNING -- DANGEROUS PLUGIN --
if someone is able to upload files to a copyparty which is
running this plugin, they can execute malware on your machine
so please keep this on a LAN and protect it with a password
here is a MUCH BETTER ALTERNATIVE (which also works on Windows):
https:... |
9001/copyparty | https://github.com/9001/copyparty | null | null | null | null | 44,659 | null | null | mit | null | null | null | null | null | null | null | bin/mtag/vidchk.py | null | null | null | null | null | null | Python | 2026-05-04T02:20:06.142631 | #!/usr/bin/env python3
import json
import re
import os
import sys
import subprocess as sp
try:
from copyparty.util import fsenc
except:
def fsenc(p):
return p.encode("utf-8")
_ = r"""
inspects video files for errors and such
plus stores a bunch of metadata to filename.ff.json
usage:
-mtp vidchk=... |
9001/copyparty | https://github.com/9001/copyparty | null | null | null | null | 44,659 | null | null | mit | null | null | null | null | null | null | null | bin/mtag/guestbook.py | null | null | null | null | null | null | Python | 2026-05-04T02:20:06.183181 | #!/usr/bin/env python3
"""
store messages from users in an sqlite database
which can be read from another mtp for example
takes input from application/x-www-form-urlencoded POSTs,
for example using the message/pager function on the website
example copyparty config to use this:
--urlform save,get -vsrv/hello:hello:... |
9001/copyparty | https://github.com/9001/copyparty | null | null | null | null | 44,659 | null | null | mit | null | null | null | null | null | null | null | bin/mtag/sleep.py | null | null | null | null | null | null | Python | 2026-05-04T02:20:06.188200 | #!/usr/bin/env python
import time
import random
v = random.random() * 6
time.sleep(v)
print(f"{v:.2f}")
|
9001/copyparty | https://github.com/9001/copyparty | null | null | null | null | 44,659 | null | null | mit | null | null | null | null | null | null | null | bin/mtag/rclone-upload.py | null | null | null | null | null | null | Python | 2026-05-04T02:20:06.240349 | #!/usr/bin/env python
import json
import os
import subprocess as sp
import sys
import time
try:
from copyparty.util import fsenc
except:
def fsenc(p):
return p.encode("utf-8")
_ = r"""
first checks the tag "vidchk" which must be "ok" to continue,
then uploads all files to some cloud storage (RCLONE... |
9001/copyparty | https://github.com/9001/copyparty | null | null | null | null | 44,659 | null | null | mit | null | null | null | null | null | null | null | bin/mtag/wget.py | null | null | null | null | null | null | Python | 2026-05-04T02:20:06.466027 | #!/usr/bin/env python3
"""
DEPRECATED -- replaced by event hooks;
https://github.com/9001/copyparty/blob/hovudstraum/bin/hooks/wget.py
---
use copyparty as a file downloader by POSTing URLs as
application/x-www-form-urlencoded (for example using the
message/pager function on the website)
example copyparty config to... |
9001/copyparty | https://github.com/9001/copyparty | null | null | null | null | 44,659 | null | null | mit | null | null | null | null | null | null | null | bin/mtag/yt-ipr.py | null | null | null | null | null | null | Python | 2026-05-04T02:20:06.519843 | #!/usr/bin/env python
import re
import os
import sys
import gzip
import json
import base64
import string
import urllib.request
from datetime import datetime
"""
youtube initial player response
it's probably best to use this through a config file; see res/yt-ipr.conf
but if you want to use plain arguments instead th... |
9001/copyparty | https://github.com/9001/copyparty | null | null | null | null | 44,659 | null | null | mit | null | null | null | null | null | null | null | bin/partyfuse-streaming.py | null | null | null | null | null | null | Python | 2026-05-04T02:20:06.579585 | #!/usr/bin/env python3
from __future__ import print_function, unicode_literals
"""partyfuse-streaming: remote copyparty as a local filesystem"""
__author__ = "ed <copyparty@ocv.me>"
__copyright__ = 2020
__license__ = "MIT"
__url__ = "https://github.com/9001/copyparty/"
"""
mount a copyparty server (local or remote) ... |
9001/copyparty | https://github.com/9001/copyparty | null | null | null | null | 44,659 | null | null | mit | null | null | null | null | null | null | null | bin/mtag/audio-bpm.py | null | null | null | null | null | null | Python | 2026-05-04T02:20:08.813948 | #!/usr/bin/env python
import os
import sys
import vamp
import tempfile
import numpy as np
import subprocess as sp
from copyparty.util import fsenc
"""
dep: vamp
dep: beatroot-vamp
dep: ffmpeg
"""
# save beat timestamps to ".beats/filename.txt"
SAVE = False
def det(tf):
# fmt: off
sp.check_call([
... |
9001/copyparty | https://github.com/9001/copyparty | null | null | null | null | 44,659 | null | null | mit | null | null | null | null | null | null | null | bin/mtag/image-noexif.py | null | null | null | null | null | null | Python | 2026-05-04T02:20:10.483451 | #!/usr/bin/env python3
"""
remove exif tags from uploaded images
dependencies:
exiftool
about:
creates a "noexif" subfolder and puts exif-stripped copies of each image there,
the reason for the subfolder is to avoid issues with the up2k.db / deduplication:
if the original image is modified in-place, then co... |
zhayujie/CowAgent | https://github.com/zhayujie/CowAgent | null | null | null | null | 43,987 | null | null | mit | null | null | null | null | null | null | null | agent/chat/service.py | null | null | null | null | null | null | Python | 2026-05-04T02:20:12.701179 | """
ChatService - Wraps the Agent stream execution to produce CHAT protocol chunks.
Translates agent events (message_update, message_end, tool_execution_end, etc.)
into the CHAT socket protocol format (content chunks with segment_id, tool_calls chunks).
"""
import time
from typing import Callable, Optional
from comm... |
zhayujie/CowAgent | https://github.com/zhayujie/CowAgent | null | null | null | null | 43,987 | null | null | mit | null | null | null | null | null | null | null | agent/memory/chunker.py | null | null | null | null | null | null | Python | 2026-05-04T02:20:12.731429 | """
Text chunking utilities for memory
Splits text into chunks with token limits and overlap
"""
from __future__ import annotations
from typing import List, Tuple
from dataclasses import dataclass
@dataclass
class TextChunk:
"""Represents a text chunk with line numbers"""
text: str
start_line: int
e... |
zhayujie/CowAgent | https://github.com/zhayujie/CowAgent | null | null | null | null | 43,987 | null | null | mit | null | null | null | null | null | null | null | agent/memory/embedding.py | null | null | null | null | null | null | Python | 2026-05-04T02:20:12.733920 | """
Embedding providers for memory
Supports OpenAI and local embedding models
"""
import hashlib
from abc import ABC, abstractmethod
from typing import List, Optional
class EmbeddingProvider(ABC):
"""Base class for embedding providers"""
@abstractmethod
def embed(self, text: str) -> List[float]:
... |
zhayujie/CowAgent | https://github.com/zhayujie/CowAgent | null | null | null | null | 43,987 | null | null | mit | null | null | null | null | null | null | null | agent/memory/config.py | null | null | null | null | null | null | Python | 2026-05-04T02:20:12.735285 | """
Memory configuration module
Provides global memory configuration with simplified workspace structure
"""
from __future__ import annotations
import os
from dataclasses import dataclass, field
from typing import Optional, List
from pathlib import Path
def _default_workspace():
"""Get default workspace path wi... |
zhayujie/CowAgent | https://github.com/zhayujie/CowAgent | null | null | null | null | 43,987 | null | null | mit | null | null | null | null | null | null | null | agent/chat/session_service.py | null | null | null | null | null | null | Python | 2026-05-04T02:20:12.739391 | """
SessionService - Manages multi-session lifecycle for both web channel and cloud client.
Provides a unified interface for listing, deleting, renaming, clearing context,
and generating AI titles for conversation sessions. Backed by ConversationStore
(SQLite) and AgentBridge (in-memory agent instances).
"""
import r... |
zhayujie/CowAgent | https://github.com/zhayujie/CowAgent | null | null | null | null | 43,987 | null | null | mit | null | null | null | null | null | null | null | agent/memory/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:20:12.755375 | """
Memory module for AgentMesh
Provides both long-term memory (vector/keyword search) and short-term
conversation history persistence (SQLite).
"""
from agent.memory.manager import MemoryManager
from agent.memory.config import MemoryConfig, get_default_memory_config, set_global_memory_config
from agent.memory.embedd... |
zhayujie/CowAgent | https://github.com/zhayujie/CowAgent | null | null | null | null | 43,987 | null | null | mit | null | null | null | null | null | null | null | agent/memory/conversation_store.py | null | null | null | null | null | null | Python | 2026-05-04T02:20:12.785955 | """
Conversation history persistence using SQLite.
Design:
- sessions table: per-session metadata (channel_type, last_active, msg_count)
- messages table: individual messages stored as JSON, append-only
- Pruning: age-based only (sessions not updated within N days are deleted)
- Thread-safe via a single in-process loc... |
zhayujie/CowAgent | https://github.com/zhayujie/CowAgent | null | null | null | null | 43,987 | null | null | mit | null | null | null | null | null | null | null | agent/knowledge/service.py | null | null | null | null | null | null | Python | 2026-05-04T02:20:12.813151 | """
Knowledge service for handling knowledge base operations.
Provides a unified interface for listing, reading, and graphing knowledge files,
callable from the web console, API, or CLI.
Knowledge file layout (under workspace_root):
knowledge/index.md
knowledge/log.md
knowledge/<category>/<slug>.md
"""
i... |
zhayujie/CowAgent | https://github.com/zhayujie/CowAgent | null | null | null | null | 43,987 | null | null | mit | null | null | null | null | null | null | null | agent/memory/manager.py | null | null | null | null | null | null | Python | 2026-05-04T02:20:13.311231 | """
Memory manager for AgentMesh
Provides high-level interface for memory operations
"""
import os
from typing import List, Optional, Dict, Any
from pathlib import Path
import hashlib
from datetime import datetime, timedelta
from agent.memory.config import MemoryConfig, get_default_memory_config
from agent.memory.st... |
zhayujie/CowAgent | https://github.com/zhayujie/CowAgent | null | null | null | null | 43,987 | null | null | mit | null | null | null | null | null | null | null | agent/memory/service.py | null | null | null | null | null | null | Python | 2026-05-04T02:20:13.323348 | """
Memory service for handling memory query operations via cloud protocol.
Provides a unified interface for listing and reading memory files,
callable from the cloud client (LinkAI) or a future web console.
Memory file layout (under workspace_root):
MEMORY.md -> type: global
memory/2026-02-20.m... |
zhayujie/CowAgent | https://github.com/zhayujie/CowAgent | null | null | null | null | 43,987 | null | null | mit | null | null | null | null | null | null | null | agent/prompt/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:20:13.366028 | """
Agent Prompt Module - 系统提示词构建模块
"""
from .builder import PromptBuilder, build_agent_system_prompt
from .workspace import ensure_workspace, load_context_files
__all__ = [
'PromptBuilder',
'build_agent_system_prompt',
'ensure_workspace',
'load_context_files',
]
|
zhayujie/CowAgent | https://github.com/zhayujie/CowAgent | null | null | null | null | 43,987 | null | null | mit | null | null | null | null | null | null | null | agent/memory/storage.py | null | null | null | null | null | null | Python | 2026-05-04T02:20:13.393595 | """
Storage layer for memory using SQLite + FTS5
Provides vector and keyword search capabilities
"""
from __future__ import annotations
import sqlite3
import json
import hashlib
from typing import List, Dict, Optional, Any
from pathlib import Path
from dataclasses import dataclass
@dataclass
class MemoryChunk:
... |
zhayujie/CowAgent | https://github.com/zhayujie/CowAgent | null | null | null | null | 43,987 | null | null | mit | null | null | null | null | null | null | null | agent/prompt/builder.py | null | null | null | null | null | null | Python | 2026-05-04T02:20:13.395305 | """
System Prompt Builder - 系统提示词构建器
实现模块化的系统提示词构建,支持工具、技能、记忆等多个子系统
"""
from __future__ import annotations
import os
from typing import List, Dict, Optional, Any
from dataclasses import dataclass
from common.log import logger
from config import conf
@dataclass
class ContextFile:
"""上下文文件"""
path: str
c... |
zhayujie/CowAgent | https://github.com/zhayujie/CowAgent | null | null | null | null | 43,987 | null | null | mit | null | null | null | null | null | null | null | agent/protocol/agent.py | null | null | null | null | null | null | Python | 2026-05-04T02:20:13.400853 | import json
import os
import time
import threading
from common.log import logger
from agent.protocol.models import LLMRequest, LLMModel
from agent.protocol.agent_stream import AgentStreamExecutor
from agent.protocol.result import AgentAction, AgentActionType, ToolResult, AgentResult
from agent.tools.base_tool import B... |
zhayujie/CowAgent | https://github.com/zhayujie/CowAgent | null | null | null | null | 43,987 | null | null | mit | null | null | null | null | null | null | null | agent/prompt/workspace.py | null | null | null | null | null | null | Python | 2026-05-04T02:20:13.402359 | """
Workspace Management - 工作空间管理模块
负责初始化工作空间、创建模板文件、加载上下文文件
"""
from __future__ import annotations
import os
from typing import List, Optional, Dict
from dataclasses import dataclass
from common.log import logger
from .builder import ContextFile
# 默认文件名常量
DEFAULT_AGENT_FILENAME = "AGENT.md"
DEFAULT_USER_FILENAME ... |
zhayujie/CowAgent | https://github.com/zhayujie/CowAgent | null | null | null | null | 43,987 | null | null | mit | null | null | null | null | null | null | null | agent/memory/summarizer.py | null | null | null | null | null | null | Python | 2026-05-04T02:20:13.422938 | """
Memory flush manager with Deep Dream distillation
Handles memory persistence when conversation context is trimmed or overflows:
- Uses LLM to summarize discarded messages into concise daily records
- Writes to daily memory files (lazy creation)
- Deduplicates trim flushes to avoid repeated writes
- Runs summarizat... |
zhayujie/CowAgent | https://github.com/zhayujie/CowAgent | null | null | null | null | 43,987 | null | null | mit | null | null | null | null | null | null | null | agent/protocol/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:20:13.424510 | from .agent import Agent
from .agent_stream import AgentStreamExecutor
from .task import Task, TaskType, TaskStatus
from .result import AgentResult, AgentAction, AgentActionType, ToolResult
from .models import LLMModel, LLMRequest, ModelFactory
__all__ = [
'Agent',
'AgentStreamExecutor',
'Task',
'Tas... |
zhayujie/CowAgent | https://github.com/zhayujie/CowAgent | null | null | null | null | 43,987 | null | null | mit | null | null | null | null | null | null | null | agent/protocol/agent_stream.py | null | null | null | null | null | null | Python | 2026-05-04T02:20:13.519059 | """
Agent Stream Execution Module - Multi-turn reasoning based on tool-call
Provides streaming output, event system, and complete tool-call loop
"""
import json
import time
from typing import List, Dict, Any, Optional, Callable, Tuple
from agent.protocol.models import LLMRequest, LLMModel
from agent.protocol.message_... |
zhayujie/CowAgent | https://github.com/zhayujie/CowAgent | null | null | null | null | 43,987 | null | null | mit | null | null | null | null | null | null | null | agent/protocol/context.py | null | null | null | null | null | null | Python | 2026-05-04T02:20:13.928740 | class TeamContext:
def __init__(self, name: str, description: str, rule: str, agents: list, max_steps: int = 100):
"""
Initialize the TeamContext with a name, description, rules, a list of agents, and a user question.
:param name: The name of the group context.
:param description: A ... |
zhayujie/CowAgent | https://github.com/zhayujie/CowAgent | null | null | null | null | 43,987 | null | null | mit | null | null | null | null | null | null | null | agent/protocol/models.py | null | null | null | null | null | null | Python | 2026-05-04T02:20:13.987777 | """
Models module for agent system.
Provides basic model classes needed by tools and bridge integration.
"""
from typing import Any, Dict, List, Optional
class LLMRequest:
"""Request model for LLM operations"""
def __init__(self, messages: List[Dict[str, str]] = None, model: Optional[str] = None,
... |
zhayujie/CowAgent | https://github.com/zhayujie/CowAgent | null | null | null | null | 43,987 | null | null | mit | null | null | null | null | null | null | null | agent/protocol/result.py | null | null | null | null | null | null | Python | 2026-05-04T02:20:13.997352 | from __future__ import annotations
import time
import uuid
from dataclasses import dataclass, field
from enum import Enum
from typing import List, Dict, Any, Optional
from agent.protocol.task import Task, TaskStatus
class AgentActionType(Enum):
"""Enum representing different types of agent actions."""
TOOL_U... |
zhayujie/CowAgent | https://github.com/zhayujie/CowAgent | null | null | null | null | 43,987 | null | null | mit | null | null | null | null | null | null | null | agent/protocol/message_utils.py | null | null | null | null | null | null | Python | 2026-05-04T02:20:13.998716 | """
Message sanitizer — fix broken tool_use / tool_result pairs.
Provides two public helpers that can be reused across agent_stream.py
and any bot that converts messages to OpenAI format:
1. sanitize_claude_messages(messages)
Operates on the internal Claude-format message list (in-place).
2. drop_orphaned_tool_re... |
zhayujie/CowAgent | https://github.com/zhayujie/CowAgent | null | null | null | null | 43,987 | null | null | mit | null | null | null | null | null | null | null | agent/skills/config.py | null | null | null | null | null | null | Python | 2026-05-04T02:20:14.027378 | """
Configuration support for skills.
"""
import os
import platform
from typing import Dict, Optional, List
from agent.skills.types import SkillEntry
def resolve_runtime_platform() -> str:
"""Get the current runtime platform."""
return platform.system().lower()
def has_binary(bin_name: str) -> bool:
""... |
zhayujie/CowAgent | https://github.com/zhayujie/CowAgent | null | null | null | null | 43,987 | null | null | mit | null | null | null | null | null | null | null | agent/protocol/task.py | null | null | null | null | null | null | Python | 2026-05-04T02:20:14.028324 | from __future__ import annotations
import time
import uuid
from dataclasses import dataclass, field
from enum import Enum
from typing import Dict, Any, List
class TaskType(Enum):
"""Enum representing different types of tasks."""
TEXT = "text"
IMAGE = "image"
VIDEO = "video"
AUDIO = "audio"
FIL... |
zhayujie/CowAgent | https://github.com/zhayujie/CowAgent | null | null | null | null | 43,987 | null | null | mit | null | null | null | null | null | null | null | agent/skills/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:20:14.058986 | """
Skills module for agent system.
This module provides the framework for loading, managing, and executing skills.
Skills are markdown files with frontmatter that provide specialized instructions
for specific tasks.
"""
from agent.skills.types import (
Skill,
SkillEntry,
SkillMetadata,
SkillInstallSp... |
zhayujie/CowAgent | https://github.com/zhayujie/CowAgent | null | null | null | null | 43,987 | null | null | mit | null | null | null | null | null | null | null | agent/skills/formatter.py | null | null | null | null | null | null | Python | 2026-05-04T02:20:14.097289 | """
Skill formatter for generating prompts from skills.
"""
from typing import Dict, List
from agent.skills.types import Skill, SkillEntry
def format_skills_for_prompt(skills: List[Skill]) -> str:
"""
Format skills for inclusion in a system prompt.
Uses XML format per Agent Skills standard.
Skil... |
zhayujie/CowAgent | https://github.com/zhayujie/CowAgent | null | null | null | null | 43,987 | null | null | mit | null | null | null | null | null | null | null | agent/skills/frontmatter.py | null | null | null | null | null | null | Python | 2026-05-04T02:20:14.109008 | """
Frontmatter parsing for skills.
"""
import re
import json
from typing import Dict, Any, Optional, List
from agent.skills.types import SkillMetadata, SkillInstallSpec
def parse_frontmatter(content: str) -> Dict[str, Any]:
"""
Parse YAML-style frontmatter from markdown content.
Returns a dictionar... |
zhayujie/CowAgent | https://github.com/zhayujie/CowAgent | null | null | null | null | 43,987 | null | null | mit | null | null | null | null | null | null | null | agent/skills/loader.py | null | null | null | null | null | null | Python | 2026-05-04T02:20:14.158895 | """
Skill loader for discovering and loading skills from directories.
"""
import os
from pathlib import Path
from typing import List, Optional, Dict
from common.log import logger
from agent.skills.types import Skill, SkillEntry, LoadSkillsResult, SkillMetadata
from agent.skills.frontmatter import parse_frontmatter, pa... |
zhayujie/CowAgent | https://github.com/zhayujie/CowAgent | null | null | null | null | 43,987 | null | null | mit | null | null | null | null | null | null | null | agent/skills/manager.py | null | null | null | null | null | null | Python | 2026-05-04T02:20:14.557334 | """
Skill manager for managing skill lifecycle and operations.
"""
import os
import json
from typing import Dict, List, Optional
from pathlib import Path
from common.log import logger
from agent.skills.types import Skill, SkillEntry, SkillSnapshot
from agent.skills.loader import SkillLoader
from agent.skills.formatter... |
zhayujie/CowAgent | https://github.com/zhayujie/CowAgent | null | null | null | null | 43,987 | null | null | mit | null | null | null | null | null | null | null | agent/skills/service.py | null | null | null | null | null | null | Python | 2026-05-04T02:20:14.641988 | """
Skill service for handling skill CRUD operations.
This service provides a unified interface for managing skills, which can be
called from the cloud control client (LinkAI), the local web console, or any
other management entry point.
"""
import os
import shutil
import zipfile
import tempfile
from typing import Dic... |
zhayujie/CowAgent | https://github.com/zhayujie/CowAgent | null | null | null | null | 43,987 | null | null | mit | null | null | null | null | null | null | null | agent/tools/base_tool.py | null | null | null | null | null | null | Python | 2026-05-04T02:20:14.662319 | from enum import Enum
from typing import Any, Optional
from common.log import logger
import copy
class ToolStage(Enum):
"""Enum representing tool decision stages"""
PRE_PROCESS = "pre_process" # Tools that need to be actively selected by the agent
POST_PROCESS = "post_process" # Tools that automatically... |
zhayujie/CowAgent | https://github.com/zhayujie/CowAgent | null | null | null | null | 43,987 | null | null | mit | null | null | null | null | null | null | null | agent/skills/types.py | null | null | null | null | null | null | Python | 2026-05-04T02:20:14.664637 | """
Type definitions for skills system.
"""
from __future__ import annotations
from typing import Dict, List, Optional, Any
from dataclasses import dataclass, field
@dataclass
class SkillInstallSpec:
"""Specification for installing skill dependencies."""
kind: str # brew, pip, npm, download, etc.
id: Op... |
zhayujie/CowAgent | https://github.com/zhayujie/CowAgent | null | null | null | null | 43,987 | null | null | mit | null | null | null | null | null | null | null | agent/tools/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:20:14.666169 | # Import base tool
from agent.tools.base_tool import BaseTool
from agent.tools.tool_manager import ToolManager
# Import file operation tools
from agent.tools.read.read import Read
from agent.tools.write.write import Write
from agent.tools.edit.edit import Edit
from agent.tools.bash.bash import Bash
from agent.tools.ls... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.