semvec/pypi-packages huggingface dataset:
mcp-supervisor-squad 0.1.52
MCP server for the supervisor-squad workflow.
Requires Python: <4.0,>=3.11

# mcp-supervisor-squad

Python MCP 服务器，提供最小化的 “contract-first + coder” 工作流，**仅支持 stdio 传输**，默认日志级别 ERROR 以保证 stdout 只输出 MCP JSON。

当前版本的核心思路：
- 主会话生成并覆盖写 `/.codex/contract.json`（必须存在且无未解决的 `questions`，否则拒绝执行）。
- `squad_start` 在仓库内直接写代码（无 patch 文件、无 dual 模式、无 KB），但强制读取 contract 约束 scope/denylist/验收/预算。
- 返回值永远只有 1–3 行 digest（goal 复述 + 变更概览 + artifact 路径），避免上下文堆叠。
- 默认启用 lease + watchdog：若客户端停止轮询且 lease 到期（默认 120s），会自动终止 codex 子进程并标记 canceled。

## 工具

- `squad_start(cwd, query, options?)`  
  - 必填 `cwd`（目标仓库内的绝对路径）。  
  - 读取 `/.codex/contract.json`；缺失或无效/存在 `questions` 时直接报错并拒绝执行。  
  - 创建 run，记录元数据，异步启动 coder 子任务（模型/沙箱/审批策略由 `options` 提供，默认为 `workspace-write` + `never`）。  
  - 默认 `lease_ttl_s=120`，客户端需按 `forced_wait_s` 轮询以续租，否则将自动取消。  
  - 返回简短状态：`run_id`、`forced_wait_s`、`event_lines`（≤3 行 digest）。  

- `squad_status(run_id, options?)`  
  - 必填 `options.cwd`（目标仓库内绝对路径）。  
  - 可选 `cancel`/`cancel_reason` 取消运行。  
  - 非终态调用会自动续租（重置 lease 过期时间）；断开轮询超过 `lease_ttl_s` 后，watchdog 会终止 codex。  
  - 返回简短状态：`run_id`、`forced_wait_s`、`event_lines`（终态附带 `next_step=stop polling; print event_lines once`）。缺少或找不到 run 时返回可操作错误提示（≤3 行）。  

> 无 `squad_apply`：coder 直接写入仓库，当前不生成 patch。

## 调用流程（director）

1) 调用 `squad_start(cwd, query, options)`，记下 `run_id`。  
2) 按返回的 `forced_wait_s` 轮询 `squad_status(run_id, options={"cwd":"<仓库内绝对路径>"})`。非终态不要提早轮询。  
3) 如需中止，调用 `squad_status(..., options={"cwd":"<仓库内绝对路径>", "cancel":true, "cancel_reason":"..."})`。  

## 返回字段

所有响应都会包含：

```json
{
  "run_id": "ss-...",
  "forced_wait_s": 8.0,
  "event_lines": ["...<=3 lines..."],   // 终态附加 next_step（含 digest 与 artifact 路径）
  "next_step": "stop polling; print event_lines once" // 仅终态
}
```

终态（done/error/canceled）时 `forced_wait_s=0`，非终态需按推荐等待后再 poll。

## 存储布局（仓库本地）

`<repo_root>/.codex/supervisor-squad/`：
- `runs/<run_id>/state.json`：运行状态  
- `runs/<run_id>/artifacts/report.md`：简要执行报告（含 digest 与 diffstat 路径）  
- `runs/<run_id>/artifacts/diffstat.txt`：`git diff --stat` 摘要  
- `runs/<run_id>/jobs/<job_id>/*`：coder 子任务日志与元数据  
- `worktrees/<run_id>/`：预留工作树目录（当前未使用）  
- `prune_meta.json`：清理元信息  

保留策略：启动时按 `retention_days`（默认 10 天）和最近 20 个 run 做清理。

## 运行

```bash
poetry install
poetry run mcp-supervisor-squad --transport stdio   # stdout 仅 JSON，日志输出到 stderr（级别 ERROR）
```

## 测试

```bash
python -m compileall src/mcp_supervisor_squad
```
gemato 20.12
Gentoo Manifest Tool -- a utility to verify and update Manifest files
Requires Python: >=3.9

==================================
  gemato -- Gentoo Manifest Tool
==================================
:Author: Michał Górny
:License: 2-clause BSD license


Introduction
============
gemato provides a reference implementation of the full-tree Manifest
checks as specified in GLEP 74 [#GLEP74]_. Originally focused
on verifying the integrity and authenticity of the Gentoo ebuild
repository, the tool can be used as a generic checksumming tool
for any directory trees.


Usage
=====

Verification
------------
The basic purpose of gemato is to verify a directory tree against
Manifest files. In order to do that, run the ``gemato verify`` tool
against the requested directory::

    gemato verify /var/db/repos/gentoo

The tool will automatically locate the top-level Manifest (if any)
and check the specified directory recursively. If a subdirectory
of the Manifest tree is specified, only the specified leaf is checked.


Creating new Manifest tree
--------------------------
Creating a new Manifest tree can be accomplished using the ``gemato
create`` command against the top directory of the new Manifest tree::

    gemato create -p ebuild /var/db/repos/gentoo

Note that for the ``create`` command you always need to specify either
a profile (via ``-p``) or at least a hash set (via ``-H``).


Updating existing Manifests
---------------------------
The ``gemato update`` command is provided to update an existing Manifest
tree::

    gemato update -p ebuild /var/db/repos/gentoo

Alike ``create``, ``update`` also requires specifying a profile (``-p``)
or a hash set (``-H``). The command locates the appropriate top-level
Manifest and updates the specified directory recursively.
If a subdirectory of the Manifest tree is specified, the entries
for the specified leaf and respective Manifest files are updated.


Utility commands
----------------
gemato provides a few other utility commands that provide access to
its crypto backend. These are:

``gemato hash -H <hashes> [<path>...]``
  Print hashes of the specified files in Manifest-like format.

``gemato openpgp-verify [-K <key>] [<path>...]``
  Check OpenPGP cleartext signatures embedded in the specified files.

``gemato openpgp-verify-detached [-K <key>] <sig-file> <data-file>``
  Verify the specified data file against a detached OpenPGP signature.


Requirements
============
gemato is written in Python and compatible with implementations
of Python 3.9+. gemato is currently tested against CPython 3.9
through 3.11 and PyPy3.  gemato core depends only on standard Python
library modules.

Additionally, OpenPGP requires system install of GnuPG 2.2+
and requests_ Python module.  Tests require pytest_, and responses_
for mocking.


References and footnotes
========================
.. [#GLEP74] GLEP 74: Full-tree verification using Manifest files
   (https://www.gentoo.org/glep/glep-0074.html)

.. _requests: https://2.python-requests.org/en/master/
.. _pytest: https://docs.pytest.org/en/stable/
.. _responses: https://github.com/getsentry/responses
dzcode 0.0.2
</DZ C0de> Helper Package
Requires Python: >=3.8
Keywords: python, dzcode, helper, package, utils

# </DZ C0de> Helper Package 🚀

[![PyPI version](https://img.shields.io/pypi/v/dzcode.svg)](https://pypi.org/project/dzcode/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

**dzcode** is a Python library designed to accelerate development workflows by providing ready-to-use utility functions.

## ✨ Key Features
* 🛠️ **Utility Tools**: Helper functions for common data manipulation.
* ⚡ **Performance Optimized**: Lightweight and fast with no heavy dependencies.
* 🧩 **Easy Integration**: Easily integrated into any Python project.

## 📦 Installation

Install the package via [PyPI](https://pypi.org/):

```bash
pip install dzcode
```