chreode-ship 0.8.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,127 @@
1
+ Metadata-Version: 2.5
2
+ Name: chreode-ship
3
+ Version: 0.8.2
4
+ Summary: Independent project setup for Ship skills, CI feedback, and Codex Review Gate
5
+ Project-URL: Source, https://github.com/Chreode/ship
6
+ Project-URL: Issues, https://github.com/Chreode/ship/issues
7
+ Project-URL: Documentation, https://github.com/Chreode/ship/blob/main/docs/install.md
8
+ License-Expression: MIT
9
+ License-File: LICENSE
10
+ Requires-Python: >=3.11
11
+ Requires-Dist: tomlkit<1,>=0.13
12
+ Description-Content-Type: text/markdown
13
+
14
+ # Ship 安装
15
+
16
+ Ship 的项目安装包名为 `chreode-ship`,主安装渠道是 PyPI,使用 `uvx` 运行一次性项目安装器。
17
+ [GitHub Releases](https://github.com/Chreode/ship/releases) 保存版本说明及同批 wheel、sdist 和 `SHA256SUMS`,
18
+ 用于校验、归档和备用安装;用户安装无需注册 PyPI 账号。
19
+ 本文使用 `@latest` 请求最新发布的安装器;需要复现指定版本时,将 `latest` 换成目标版本号。
20
+ 可用版本见 [PyPI 项目页](https://pypi.org/project/chreode-ship/),未发布的源码可用文末的本地构建验证。
21
+
22
+ ## 安装
23
+
24
+ 需要已有的 [uv](https://docs.astral.sh/uv/getting-started/installation/)。运行时需要 Python 3.11+,uv 可按需自动获取;
25
+ 不允许自动下载时在 `uvx` 后加 `--no-python-downloads`,并预先准备兼容 Python。
26
+ 在要使用 Ship 的项目根目录运行;也可用 `--project /绝对路径` 指定目标。Git 项目须指向仓库或 worktree 根目录。
27
+ 命令会下载包及依赖、使用 uv 缓存,并立即写入所选组件的项目文件;不另弹确认。
28
+
29
+ ```bash
30
+ uvx chreode-ship@latest install ship
31
+ ```
32
+
33
+ Codex 是默认宿主;Claude Code 用户追加 `--host claude`。安装后在目标项目新开任务,核对实际加载的技能路径。
34
+
35
+ 三个组件独立安装:
36
+
37
+ | 组件 | 内容 |
38
+ | --- | --- |
39
+ | `ship` | 五种职责 Skill、CI 反馈 Skill、Python waiter、共享合同及宿主角色配置 |
40
+ | `ship-feedback` | 生成汇总当前 PR 检查的 workflow,向 Writer 返回 CI 失败或通过结果 |
41
+ | `codex-review-gate` | 生成独立的 Codex Review Gate workflow,只检查 Codex 审查反馈 |
42
+
43
+ 需要 GitHub CI 反馈时,在同一项目追加:
44
+
45
+ ```bash
46
+ uvx chreode-ship@latest install ship-feedback
47
+ ```
48
+
49
+ 将生成的 `.github/workflows/ship-feedback.yml` 提交并合入默认分支后才会生效。它使用 GitHub Actions 自带的
50
+ `GITHUB_TOKEN`,无需新 App 或 Secret;已出现的测试失败会先返回,即使 Codex 未触发或仍在等待。
51
+ 反馈不解析 Codex 评论、不请求模型,不应设为 required check;反馈通过后仍需满足项目的原生合并保护。
52
+
53
+ 需要独立 Codex Gate 时,运行:
54
+
55
+ ```bash
56
+ uvx chreode-ship@latest install codex-review-gate
57
+ ```
58
+
59
+ 它只生成接入文件,并输出与已安装 Action 完整 SHA 对应的 Gate 采用说明 URL。仓库管理员按该固定版本说明
60
+ 配置 App、凭据和合并规则,再提交 workflow;安装器不会执行这些平台操作,也不会发起 `@codex review`。
61
+ `install gate` 是兼容别名;`install all` 是三项并集,三个组件也可按任意顺序分别安装。
62
+
63
+ ## 写入范围与模型配置
64
+
65
+ | 项目内路径 | 写入内容 |
66
+ | --- | --- |
67
+ | `.ship/` | 许可证、安装记录;选择 `ship` 时还包括合同、角色默认配置和 waiter |
68
+ | `.agents/skills/ship-*/` | Codex 的六份 Skill |
69
+ | `.codex/agents/{writer,researcher,verifier,reviewer}.toml` | Codex 四个子角色配置 |
70
+ | `.codex/config.toml` | 需要时把 `agents.max_depth` 补为至少 `2`,保留其他配置 |
71
+ | `.claude/skills/ship-*/` | Claude Code 的六份 Skill,替代 Codex 专用资源 |
72
+ | `.github/workflows/ship-feedback.yml` | 仅选择 `ship-feedback` 或 `all` 时生成 |
73
+ | `.github/workflows/codex-check.yml` | 仅选择 `codex-review-gate` 或 `all` 时生成 |
74
+
75
+ Git 项目通过实际 `info/exclude` 精确忽略安装器拥有的本地资源;不忽略整个 `.agents/` 或 `.codex/`,
76
+ 不改 `.gitignore`,不 untrack 既有文件,两种 workflow 保持可提交。worktree 可能共用主仓的 Git exclude。
77
+ 安装器不创建或修改项目的 `AGENTS.md`、`CLAUDE.md`、`CODEOWNERS`,遇到同名资源或受管理配置冲突时停止。
78
+
79
+ 直接编辑项目 `.codex/agents/对应角色.toml` 的 `model` 和 `model_reasoning_effort`:
80
+
81
+ | 角色 | 默认模型 | 默认 effort |
82
+ | --- | --- | --- |
83
+ | Writer | `gpt-5.6-sol` | `medium` |
84
+ | Reviewer | `gpt-5.6-sol` | `high` |
85
+ | Researcher、Verifier | `gpt-5.6-terra` | `medium` |
86
+
87
+ 同版本重复安装保留这两个字段,其余字段由安装器管理;卸载会移除角色配置及其中的模型设置。
88
+ 单次任务选择优先,配置的模型须由宿主支持。Commander 沿用顶层任务的设置;其他宿主使用其原生模型配置。
89
+ 具体选择规则见安装后的 `.agents/skills/ship-commander/SKILL.md`;Claude Code 宿主读取对应的
90
+ `.claude/skills/ship-commander/SKILL.md`。
91
+
92
+ 项目安装器不操作全局 Plugin,也不改用户级 Skill、项目信任、沙箱或账号权限。若以前通过宿主插件管理
93
+ 安装过 Ship,那份历史安装的升级和卸载仍由宿主管理;先确认其来源和版本,避免重复加载。
94
+ uv 的项目外缓存可用 `uv cache dir` 查看,项目卸载不会清除它。
95
+
96
+ ## 查看、卸载与升级
97
+
98
+ 在已安装 Ship 的项目目录运行:
99
+
100
+ ```bash
101
+ uvx chreode-ship@latest files
102
+ uvx chreode-ship@latest uninstall
103
+ ```
104
+
105
+ `files` 查看已安装清单;`uninstall` 先检查冲突,再恢复原有配置并移除自己的文件和 Git 忽略区块。
106
+ 它不会撤销远端 workflow、App、Environment 或 Ruleset。安装记录位于 `.ship/install.toml`;
107
+ 兼容的旧安装记录可以由新安装器处理。若安装器报告状态版本或 schema 不受支持,不要手改 receipt;使用
108
+ 该记录对应的原发行名、版本和可信 wheel 执行 `files`、`uninstall`,再安装目标版本。
109
+ 内部 Python 模块仍叫 `keel_ship`,它不是用户安装时输入的包名。
110
+
111
+ 尚未发布时,可在 Ship 源码目录构建本地 wheel,再指定另一个目标项目验证:
112
+
113
+ ```bash
114
+ uv build --wheel
115
+ ```
116
+
117
+ 从 `dist/` 选择本次构建生成的 wheel,将下列占位路径替换为该文件的完整路径:
118
+
119
+ ```bash
120
+ uvx --isolated --no-python-downloads --from '/abs/path/to/chreode_ship-<version>-py3-none-any.whl' chreode-ship install ship --project /abs/project
121
+ ```
122
+
123
+ GitHub Release 附件也可作备用来源:从目标版本的 Release 页面下载 wheel 并核对 `SHA256SUMS`,
124
+ 再将该文件路径传给上述 `--from`。Release 说明中的安装命令会固定到该次发布版本。
125
+ 这是同一个项目安装器,不是另一套宿主安装方式。
126
+
127
+ 完全离线安装还需提前准备 uv、兼容 Python、wheel 及其依赖;只下载 Ship wheel 并不等于依赖已齐备。
@@ -0,0 +1,25 @@
1
+ keel_ship/__init__.py,sha256=Lqi_iDkrVMQskSkekWfPcWzHK9St9nz_ZcS2WdTJKxU,95
2
+ keel_ship/cli.py,sha256=_7eVzNpPl4RPMQE0T2CpLYoG-G5KDocHO42zYYs5rfU,2863
3
+ keel_ship/installer.py,sha256=ZGTfSW_KSDdpDsMBmmeDFw52HTfttPFWpOJpX8LzdsA,37233
4
+ keel_ship/resources/LICENSE,sha256=8644tMUhLSc1wAQ5ZhNzIZImmc53YJIgKf69lqy4nps,1074
5
+ keel_ship/resources/actions/codex-review-gate/consumer-workflow.yml,sha256=jftxOZ3F_0wlK_-feAO0dIv1gXYCS3_pFiuq9c6X2ns,1003
6
+ keel_ship/resources/actions/ship-feedback/consumer-workflow.yml,sha256=OejHOzY5K3N_PM6yqF-JnNCpJZq2oKFNbtNR-YUDp7s,1764
7
+ keel_ship/resources/plugin/ship/contract.md,sha256=y8i9Bxg-TUQbQn8righmZ1m_KLZHt2bzsip9b2xCd-E,4875
8
+ keel_ship/resources/plugin/ship/feedback.md,sha256=RRNe922dm1p9NFgsQIXlhoxvwV2iZsJXH7Z3hXTAwxM,4695
9
+ keel_ship/resources/actions/ship-feedback/scripts/publisher.py,sha256=muMOSO0K6LVW9BmIjGbEhpR1_qbv3NMqsqBirzzaU60,26573
10
+ keel_ship/resources/plugin/ship/agents/researcher.toml,sha256=eF2SaguJU-a0U6XsicirRWcAMilhNKWfT9dYT75u6TM,694
11
+ keel_ship/resources/plugin/ship/agents/reviewer.toml,sha256=ZmhsQsE768W93qRl1XrpolKbNJvNtFN3eIS4yjHNlaU,689
12
+ keel_ship/resources/plugin/ship/agents/verifier.toml,sha256=V02P_r2vgJJ1s1mYXHtsDA2MtFndSAdH4orDE_S3bEw,694
13
+ keel_ship/resources/plugin/ship/agents/writer.toml,sha256=RArRsLNNZFrbZYsWHa8TjuGXRQTpX2YPHL5jOLTWZv4,753
14
+ keel_ship/resources/plugin/ship/scripts/wait_check.py,sha256=V94v1yulDZRyhM5ExQbvqNiwjh5NtrGQEz-LHRYpNSM,20721
15
+ keel_ship/resources/plugin/ship/skills/ship-commander/SKILL.md,sha256=dweIM583x9DEAqzr24S2HSa76avaKL3GhZKdO6fnHz4,4884
16
+ keel_ship/resources/plugin/ship/skills/ship-feedback/SKILL.md,sha256=2BJw4qwRYhYQNCM3ojdDu4lKhya3EfeqJNPM6a-TqKk,2533
17
+ keel_ship/resources/plugin/ship/skills/ship-researcher/SKILL.md,sha256=S5U0ywrW6u_UvVm5qZQW2Z1I3boVhMxSIP6s01ewqR0,1703
18
+ keel_ship/resources/plugin/ship/skills/ship-reviewer/SKILL.md,sha256=xSVMobLwOUkKtKSkcDnVafq-TtCLVe0ohxUKSF2KQBA,3057
19
+ keel_ship/resources/plugin/ship/skills/ship-verifier/SKILL.md,sha256=a2kJz1y7lHUu94CIOpUz6HWCRlhaEBH_k8Qvxq7M_0Q,1724
20
+ keel_ship/resources/plugin/ship/skills/ship-worker/SKILL.md,sha256=kHiPRnrdDooe6YvWTXtPr2Uap4WAlH08tjIqNrjZYCs,5828
21
+ chreode_ship-0.8.2.dist-info/METADATA,sha256=Ni8BMQfN2WrFVxA7cnY7NA11s44_57jxZ8Z2gqgDZ-E,6882
22
+ chreode_ship-0.8.2.dist-info/WHEEL,sha256=THafob7ofN-NsuMN7Mg4qZyHaQI7KkD-QlcQatYhXPo,87
23
+ chreode_ship-0.8.2.dist-info/entry_points.txt,sha256=bAnBSS7p8HwlkzqRvNcJVxoX_8m0zeZG2hi_KB_CZCw,52
24
+ chreode_ship-0.8.2.dist-info/licenses/LICENSE,sha256=8644tMUhLSc1wAQ5ZhNzIZImmc53YJIgKf69lqy4nps,1074
25
+ chreode_ship-0.8.2.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.32.3
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ chreode-ship = keel_ship.cli:main
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Ship contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
keel_ship/__init__.py ADDED
@@ -0,0 +1,5 @@
1
+ """Project-local installer for Ship."""
2
+
3
+ from .installer import VERSION
4
+
5
+ __all__ = ["VERSION"]
keel_ship/cli.py ADDED
@@ -0,0 +1,67 @@
1
+ from __future__ import annotations
2
+
3
+ import argparse
4
+ import sys
5
+ from pathlib import Path
6
+
7
+ from .installer import InstallError, install, managed_files, uninstall
8
+
9
+
10
+ def parser() -> argparse.ArgumentParser:
11
+ value = argparse.ArgumentParser(prog="chreode-ship")
12
+ subcommands = value.add_subparsers(dest="command", required=True)
13
+ install_command = subcommands.add_parser(
14
+ "install", help="install project skills, CI feedback workflow, Codex Review Gate, or all three"
15
+ )
16
+ install_command.add_argument("component", choices=("ship", "ship-feedback", "codex-review-gate", "gate", "all"))
17
+ install_command.add_argument(
18
+ "--project",
19
+ type=Path,
20
+ default=Path.cwd(),
21
+ help="target directory (must be the repository or linked-worktree root for Git)",
22
+ )
23
+ install_command.add_argument("--host", choices=("codex", "claude"), default="codex")
24
+ for name, help_text in (
25
+ ("files", "list files owned by this project's chreode-ship installation"),
26
+ ("uninstall", "remove this project's chreode-ship installation"),
27
+ ):
28
+ command = subcommands.add_parser(name, help=help_text)
29
+ command.add_argument(
30
+ "--project",
31
+ type=Path,
32
+ default=Path.cwd(),
33
+ help="target directory (must be the repository or linked-worktree root for Git)",
34
+ )
35
+ return value
36
+
37
+
38
+ def main() -> int:
39
+ arguments = parser().parse_args()
40
+ try:
41
+ if arguments.command == "files":
42
+ for kind, path in managed_files(project=arguments.project):
43
+ suffix = " (chreode-ship only owns this project's marked block)" if kind == "git-exclude-block" else ""
44
+ print(f"{kind}\t{path}{suffix}")
45
+ return 0
46
+ if arguments.command == "uninstall":
47
+ project, _ = uninstall(project=arguments.project)
48
+ print(f"chreode-ship: uninstalled project integration from {project}")
49
+ return 0
50
+ result = install(project=arguments.project, requested=arguments.component, host=arguments.host)
51
+ except InstallError as error:
52
+ print(f"chreode-ship: {error}", file=sys.stderr)
53
+ return 2
54
+ status = "unchanged" if not result.changed else "installed"
55
+ components = ", ".join(result.components)
56
+ print(f"chreode-ship: {status} {components} in {result.project}")
57
+ if "ship" in result.components:
58
+ print("Ship 项目技能与模型配置已就绪;GitHub CI 反馈通过 install ship-feedback 独立接入。")
59
+ if "ship-feedback" in result.components:
60
+ print("Ship CI 反馈:将 .github/workflows/ship-feedback.yml 接入默认分支后,Writer 等待 ship-feedback。")
61
+ if result.gate_setup_url is not None:
62
+ print(f"Codex Review Gate setup: {result.gate_setup_url}")
63
+ return 0
64
+
65
+
66
+ if __name__ == "__main__":
67
+ raise SystemExit(main())