cc-agent-messenger 0.1.0__tar.gz
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.
- cc_agent_messenger-0.1.0/.github/CODEOWNERS +2 -0
- cc_agent_messenger-0.1.0/.github/ISSUE_TEMPLATE/bug_report.yml +92 -0
- cc_agent_messenger-0.1.0/.github/ISSUE_TEMPLATE/config.yml +14 -0
- cc_agent_messenger-0.1.0/.github/ISSUE_TEMPLATE/feature_request.yml +61 -0
- cc_agent_messenger-0.1.0/.github/PULL_REQUEST_TEMPLATE.md +38 -0
- cc_agent_messenger-0.1.0/.github/workflows/ci.yml +23 -0
- cc_agent_messenger-0.1.0/.github/workflows/release.yml +48 -0
- cc_agent_messenger-0.1.0/.gitignore +29 -0
- cc_agent_messenger-0.1.0/CHANGELOG.md +40 -0
- cc_agent_messenger-0.1.0/CONTRIBUTING.md +74 -0
- cc_agent_messenger-0.1.0/LICENSE +21 -0
- cc_agent_messenger-0.1.0/PKG-INFO +125 -0
- cc_agent_messenger-0.1.0/README.ja.md +96 -0
- cc_agent_messenger-0.1.0/README.md +103 -0
- cc_agent_messenger-0.1.0/RELEASING.md +59 -0
- cc_agent_messenger-0.1.0/SECURITY.md +56 -0
- cc_agent_messenger-0.1.0/docs/ARCHITECTURE.md +128 -0
- cc_agent_messenger-0.1.0/docs/SETUP.md +260 -0
- cc_agent_messenger-0.1.0/docs/USAGE.ja.md +91 -0
- cc_agent_messenger-0.1.0/docs/USAGE.md +98 -0
- cc_agent_messenger-0.1.0/docs/images/logo.png +0 -0
- cc_agent_messenger-0.1.0/pyproject.toml +41 -0
- cc_agent_messenger-0.1.0/src/cc_agent_messenger/__init__.py +27 -0
- cc_agent_messenger-0.1.0/src/cc_agent_messenger/agentrunner.py +49 -0
- cc_agent_messenger-0.1.0/src/cc_agent_messenger/assets/config.example.toml +27 -0
- cc_agent_messenger-0.1.0/src/cc_agent_messenger/assets/profile.example.json +24 -0
- cc_agent_messenger-0.1.0/src/cc_agent_messenger/assets/settings.snippet.json +9 -0
- cc_agent_messenger-0.1.0/src/cc_agent_messenger/assets/skill/SKILL.md +73 -0
- cc_agent_messenger-0.1.0/src/cc_agent_messenger/audit.py +71 -0
- cc_agent_messenger-0.1.0/src/cc_agent_messenger/authz.py +23 -0
- cc_agent_messenger-0.1.0/src/cc_agent_messenger/cli.py +331 -0
- cc_agent_messenger-0.1.0/src/cc_agent_messenger/commands.py +68 -0
- cc_agent_messenger-0.1.0/src/cc_agent_messenger/config.py +99 -0
- cc_agent_messenger-0.1.0/src/cc_agent_messenger/context.py +22 -0
- cc_agent_messenger-0.1.0/src/cc_agent_messenger/daemon.py +164 -0
- cc_agent_messenger-0.1.0/src/cc_agent_messenger/doctor.py +74 -0
- cc_agent_messenger-0.1.0/src/cc_agent_messenger/egress.py +105 -0
- cc_agent_messenger-0.1.0/src/cc_agent_messenger/ingress.py +188 -0
- cc_agent_messenger-0.1.0/src/cc_agent_messenger/ipcclient.py +30 -0
- cc_agent_messenger-0.1.0/src/cc_agent_messenger/killswitch.py +37 -0
- cc_agent_messenger-0.1.0/src/cc_agent_messenger/lifecycle.py +80 -0
- cc_agent_messenger-0.1.0/src/cc_agent_messenger/models.py +103 -0
- cc_agent_messenger-0.1.0/src/cc_agent_messenger/multiagent.py +87 -0
- cc_agent_messenger-0.1.0/src/cc_agent_messenger/profile.py +168 -0
- cc_agent_messenger-0.1.0/src/cc_agent_messenger/router.py +30 -0
- cc_agent_messenger-0.1.0/src/cc_agent_messenger/sendapi.py +114 -0
- cc_agent_messenger-0.1.0/src/cc_agent_messenger/slackclient.py +70 -0
- cc_agent_messenger-0.1.0/tests/_helpers.py +74 -0
- cc_agent_messenger-0.1.0/tests/test_agents.py +65 -0
- cc_agent_messenger-0.1.0/tests/test_audit.py +53 -0
- cc_agent_messenger-0.1.0/tests/test_cli.py +131 -0
- cc_agent_messenger-0.1.0/tests/test_config.py +57 -0
- cc_agent_messenger-0.1.0/tests/test_doctor_lifecycle.py +65 -0
- cc_agent_messenger-0.1.0/tests/test_egress.py +83 -0
- cc_agent_messenger-0.1.0/tests/test_ingress.py +122 -0
- cc_agent_messenger-0.1.0/tests/test_killswitch.py +30 -0
- cc_agent_messenger-0.1.0/tests/test_multiagent.py +124 -0
- cc_agent_messenger-0.1.0/tests/test_profile.py +106 -0
- cc_agent_messenger-0.1.0/tests/test_sendapi.py +63 -0
- cc_agent_messenger-0.1.0/uv.lock +107 -0
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
name: 🐞 Bug report
|
|
2
|
+
description: Something doesn't work as documented
|
|
3
|
+
labels: ["bug", "needs-triage"]
|
|
4
|
+
body:
|
|
5
|
+
- type: markdown
|
|
6
|
+
attributes:
|
|
7
|
+
value: |
|
|
8
|
+
Thanks for the report. Before filling this in:
|
|
9
|
+
|
|
10
|
+
- **Not a security issue?** Vulnerabilities go through a private
|
|
11
|
+
[Security Advisory](https://github.com/noboru2000/cc-agent-messenger/security/advisories/new),
|
|
12
|
+
not a public issue (see SECURITY.md).
|
|
13
|
+
- **Redact secrets.** Never paste Slack tokens (`xoxb-…`, `xapp-…`), IDs,
|
|
14
|
+
or anything from `.cc-agent-messenger/config.toml` into this issue.
|
|
15
|
+
- type: checkboxes
|
|
16
|
+
id: preflight
|
|
17
|
+
attributes:
|
|
18
|
+
label: Pre-submission checks
|
|
19
|
+
options:
|
|
20
|
+
- label: I searched existing issues and this isn't a duplicate.
|
|
21
|
+
required: true
|
|
22
|
+
- label: This is a bug, not a security vulnerability or a usage question.
|
|
23
|
+
required: true
|
|
24
|
+
- label: I have removed all tokens / secrets / private IDs from this report.
|
|
25
|
+
required: true
|
|
26
|
+
- type: input
|
|
27
|
+
id: version
|
|
28
|
+
attributes:
|
|
29
|
+
label: Version
|
|
30
|
+
description: Output of `cc-agent-messenger --version`.
|
|
31
|
+
placeholder: cc-agent-messenger 0.1.0
|
|
32
|
+
validations:
|
|
33
|
+
required: true
|
|
34
|
+
- type: dropdown
|
|
35
|
+
id: install
|
|
36
|
+
attributes:
|
|
37
|
+
label: How did you install it?
|
|
38
|
+
options:
|
|
39
|
+
- uv tool install (PyPI)
|
|
40
|
+
- pipx install (PyPI)
|
|
41
|
+
- pip install (PyPI)
|
|
42
|
+
- from git (uv tool install git+…)
|
|
43
|
+
- from source / editable
|
|
44
|
+
validations:
|
|
45
|
+
required: true
|
|
46
|
+
- type: dropdown
|
|
47
|
+
id: mode
|
|
48
|
+
attributes:
|
|
49
|
+
label: Agent / mode in use
|
|
50
|
+
options:
|
|
51
|
+
- Claude Code — live session (C0)
|
|
52
|
+
- Claude Code — headless (C1)
|
|
53
|
+
- Codex (C1)
|
|
54
|
+
- Copilot (C1)
|
|
55
|
+
- Not applicable / setup-only
|
|
56
|
+
validations:
|
|
57
|
+
required: true
|
|
58
|
+
- type: input
|
|
59
|
+
id: env
|
|
60
|
+
attributes:
|
|
61
|
+
label: OS + Python
|
|
62
|
+
description: e.g. macOS 15.5 / Python 3.12 (and WSL if applicable).
|
|
63
|
+
placeholder: macOS 15.5, Python 3.12
|
|
64
|
+
validations:
|
|
65
|
+
required: true
|
|
66
|
+
- type: textarea
|
|
67
|
+
id: what-happened
|
|
68
|
+
attributes:
|
|
69
|
+
label: What happened
|
|
70
|
+
description: What you did, what you expected, and what actually happened.
|
|
71
|
+
validations:
|
|
72
|
+
required: true
|
|
73
|
+
- type: textarea
|
|
74
|
+
id: repro
|
|
75
|
+
attributes:
|
|
76
|
+
label: Steps to reproduce
|
|
77
|
+
placeholder: |
|
|
78
|
+
1. cc-agent-messenger init
|
|
79
|
+
2. …
|
|
80
|
+
3. Send `@bot !status` from Slack
|
|
81
|
+
validations:
|
|
82
|
+
required: true
|
|
83
|
+
- type: textarea
|
|
84
|
+
id: logs
|
|
85
|
+
attributes:
|
|
86
|
+
label: Relevant output (redacted)
|
|
87
|
+
description: >-
|
|
88
|
+
`cc-agent-messenger doctor` output and any daemon error lines. Double-check
|
|
89
|
+
there are no tokens or IDs before pasting — this will be rendered as code.
|
|
90
|
+
render: shell
|
|
91
|
+
validations:
|
|
92
|
+
required: false
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Force contributors through a template; route security + questions elsewhere.
|
|
2
|
+
blank_issues_enabled: false
|
|
3
|
+
contact_links:
|
|
4
|
+
- name: 🔐 Security vulnerability (do NOT open a public issue)
|
|
5
|
+
url: https://github.com/noboru2000/cc-agent-messenger/security/advisories/new
|
|
6
|
+
about: >-
|
|
7
|
+
This tool runs commands in response to Slack messages. Report security
|
|
8
|
+
issues privately via a GitHub Security Advisory (or email the maintainer).
|
|
9
|
+
See SECURITY.md.
|
|
10
|
+
- name: 💬 Questions & usage help
|
|
11
|
+
url: https://github.com/noboru2000/cc-agent-messenger/discussions
|
|
12
|
+
about: >-
|
|
13
|
+
Ask how-to / setup / usage questions in Discussions. The issue tracker is
|
|
14
|
+
for actionable bug reports and feature requests only.
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
name: ✨ Feature request
|
|
2
|
+
description: Propose a change or new capability
|
|
3
|
+
labels: ["enhancement", "needs-triage"]
|
|
4
|
+
body:
|
|
5
|
+
- type: markdown
|
|
6
|
+
attributes:
|
|
7
|
+
value: |
|
|
8
|
+
This is a small, security-sensitive tool maintained by one person.
|
|
9
|
+
**Significant changes should start as a discussion** so we agree on the
|
|
10
|
+
approach before any PR. Please open or link a
|
|
11
|
+
[Discussion](https://github.com/noboru2000/cc-agent-messenger/discussions)
|
|
12
|
+
for non-trivial proposals.
|
|
13
|
+
- type: checkboxes
|
|
14
|
+
id: preflight
|
|
15
|
+
attributes:
|
|
16
|
+
label: Pre-submission checks
|
|
17
|
+
options:
|
|
18
|
+
- label: I searched existing issues / discussions and this isn't a duplicate.
|
|
19
|
+
required: true
|
|
20
|
+
- label: I understand that PRs for non-trivial changes should be discussed first.
|
|
21
|
+
required: true
|
|
22
|
+
- type: textarea
|
|
23
|
+
id: problem
|
|
24
|
+
attributes:
|
|
25
|
+
label: Problem / motivation
|
|
26
|
+
description: What are you trying to do, and why is it hard today?
|
|
27
|
+
validations:
|
|
28
|
+
required: true
|
|
29
|
+
- type: textarea
|
|
30
|
+
id: proposal
|
|
31
|
+
attributes:
|
|
32
|
+
label: Proposed solution
|
|
33
|
+
description: What would you like to see? Sketch the CLI / config / behavior.
|
|
34
|
+
validations:
|
|
35
|
+
required: true
|
|
36
|
+
- type: textarea
|
|
37
|
+
id: alternatives
|
|
38
|
+
attributes:
|
|
39
|
+
label: Alternatives considered
|
|
40
|
+
validations:
|
|
41
|
+
required: false
|
|
42
|
+
- type: dropdown
|
|
43
|
+
id: security-impact
|
|
44
|
+
attributes:
|
|
45
|
+
label: Does this touch the security model?
|
|
46
|
+
description: >-
|
|
47
|
+
e.g. authorization (NN4), kill switch, audit, token handling, the closed
|
|
48
|
+
command set, or running new commands. See SECURITY.md.
|
|
49
|
+
options:
|
|
50
|
+
- "No — UX / docs / non-security change"
|
|
51
|
+
- "Maybe — not sure, needs discussion"
|
|
52
|
+
- "Yes — it changes the security model"
|
|
53
|
+
validations:
|
|
54
|
+
required: true
|
|
55
|
+
- type: checkboxes
|
|
56
|
+
id: contribution
|
|
57
|
+
attributes:
|
|
58
|
+
label: Contribution
|
|
59
|
+
options:
|
|
60
|
+
- label: I'd be willing to open a PR after the approach is agreed.
|
|
61
|
+
required: false
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Thanks for contributing! This is a small, security-sensitive tool.
|
|
3
|
+
For anything non-trivial, please open an issue / discussion FIRST so the
|
|
4
|
+
approach is agreed before review. PRs are squash-merged.
|
|
5
|
+
-->
|
|
6
|
+
|
|
7
|
+
## Summary
|
|
8
|
+
|
|
9
|
+
<!-- What does this change and why? Keep PRs small and reviewable. -->
|
|
10
|
+
|
|
11
|
+
## Linked issue / discussion
|
|
12
|
+
|
|
13
|
+
<!-- Required for non-trivial changes. e.g. Closes #123 -->
|
|
14
|
+
Closes #
|
|
15
|
+
|
|
16
|
+
## Type
|
|
17
|
+
|
|
18
|
+
<!-- Conventional Commits — the PR title should match (e.g. `fix: …`, `feat: …`). -->
|
|
19
|
+
- [ ] `fix` — bug fix
|
|
20
|
+
- [ ] `feat` — new feature
|
|
21
|
+
- [ ] `docs` — documentation only
|
|
22
|
+
- [ ] `refactor` / `test` / `chore` — internal change
|
|
23
|
+
|
|
24
|
+
## Security impact
|
|
25
|
+
|
|
26
|
+
<!-- Does this touch authorization (NN4), kill switch, audit, token handling,
|
|
27
|
+
the closed command set, or run new commands? If yes, explain. -->
|
|
28
|
+
- [ ] This change does **not** weaken the security model (SECURITY.md).
|
|
29
|
+
|
|
30
|
+
## Checklist
|
|
31
|
+
|
|
32
|
+
- [ ] The PR title follows Conventional Commits.
|
|
33
|
+
- [ ] For a non-trivial change, it was discussed in an issue / discussion first.
|
|
34
|
+
- [ ] Tests added or updated for every behavior change.
|
|
35
|
+
- [ ] `uv run pytest` passes locally.
|
|
36
|
+
- [ ] No secrets, tokens, or host-specific paths are committed.
|
|
37
|
+
- [ ] Docs updated (README / SETUP / USAGE / CHANGELOG) where relevant.
|
|
38
|
+
- [ ] The change is small and focused (split large changes into multiple PRs).
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
pull_request:
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
test:
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
strategy:
|
|
11
|
+
fail-fast: false
|
|
12
|
+
matrix:
|
|
13
|
+
python-version: ["3.11", "3.12", "3.13"]
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v4
|
|
16
|
+
- name: Install uv
|
|
17
|
+
uses: astral-sh/setup-uv@v5
|
|
18
|
+
with:
|
|
19
|
+
python-version: ${{ matrix.python-version }}
|
|
20
|
+
- name: Sync
|
|
21
|
+
run: uv sync --extra dev
|
|
22
|
+
- name: Test
|
|
23
|
+
run: uv run pytest -q
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
# Publishes to PyPI when a GitHub Release is published.
|
|
4
|
+
#
|
|
5
|
+
# Uses PyPI Trusted Publishing (OIDC) — no API token stored. Before the first
|
|
6
|
+
# run, configure a Trusted Publisher on PyPI:
|
|
7
|
+
# pypi.org → (your project, or "pending publisher" for a new name) → Publishing →
|
|
8
|
+
# Add a GitHub publisher:
|
|
9
|
+
# owner: noboru2000
|
|
10
|
+
# repository: cc-agent-messenger
|
|
11
|
+
# workflow: release.yml
|
|
12
|
+
# environment: pypi
|
|
13
|
+
# Optionally create a GitHub environment named "pypi" with protection rules.
|
|
14
|
+
# To dry-run first, point at TestPyPI (configure a publisher on test.pypi.org and
|
|
15
|
+
# set `repository-url: https://test.pypi.org/legacy/` on the publish step).
|
|
16
|
+
|
|
17
|
+
on:
|
|
18
|
+
release:
|
|
19
|
+
types: [published]
|
|
20
|
+
|
|
21
|
+
permissions:
|
|
22
|
+
contents: read
|
|
23
|
+
|
|
24
|
+
jobs:
|
|
25
|
+
publish:
|
|
26
|
+
runs-on: ubuntu-latest
|
|
27
|
+
environment:
|
|
28
|
+
name: pypi
|
|
29
|
+
url: https://pypi.org/p/cc-agent-messenger
|
|
30
|
+
permissions:
|
|
31
|
+
id-token: write # required for Trusted Publishing (OIDC)
|
|
32
|
+
steps:
|
|
33
|
+
- uses: actions/checkout@v4
|
|
34
|
+
- name: Verify tag matches package version
|
|
35
|
+
run: |
|
|
36
|
+
TAG="${GITHUB_REF_NAME#v}"
|
|
37
|
+
VER="$(grep -m1 '^version' pyproject.toml | sed -E 's/.*"([^"]+)".*/\1/')"
|
|
38
|
+
echo "release tag: ${GITHUB_REF_NAME} (-> ${TAG}); pyproject version: ${VER}"
|
|
39
|
+
if [ "$TAG" != "$VER" ]; then
|
|
40
|
+
echo "::error::release tag '${TAG}' does not match pyproject version '${VER}'"
|
|
41
|
+
exit 1
|
|
42
|
+
fi
|
|
43
|
+
- name: Install uv
|
|
44
|
+
uses: astral-sh/setup-uv@v5
|
|
45
|
+
- name: Build sdist + wheel
|
|
46
|
+
run: uv build
|
|
47
|
+
- name: Publish to PyPI
|
|
48
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
.venv/
|
|
3
|
+
venv/
|
|
4
|
+
__pycache__/
|
|
5
|
+
*.py[cod]
|
|
6
|
+
*.egg-info/
|
|
7
|
+
.eggs/
|
|
8
|
+
build/
|
|
9
|
+
dist/
|
|
10
|
+
.pytest_cache/
|
|
11
|
+
.mypy_cache/
|
|
12
|
+
.ruff_cache/
|
|
13
|
+
.coverage
|
|
14
|
+
|
|
15
|
+
# Secrets & local runtime (never commit) ------------------------------------
|
|
16
|
+
.cc-agent-messenger/
|
|
17
|
+
tmp/
|
|
18
|
+
*.sock
|
|
19
|
+
.env
|
|
20
|
+
.env.*
|
|
21
|
+
*.token
|
|
22
|
+
*.secret
|
|
23
|
+
|
|
24
|
+
# Claude Code local (per-user) settings — keep skills, drop local overrides.
|
|
25
|
+
.claude/settings.local.json
|
|
26
|
+
|
|
27
|
+
# OS / editor
|
|
28
|
+
.DS_Store
|
|
29
|
+
*.swp
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project are documented here. The format is based on
|
|
4
|
+
[Keep a Changelog](https://keepachangelog.com/), and this project adheres to
|
|
5
|
+
semantic versioning.
|
|
6
|
+
|
|
7
|
+
## [Unreleased]
|
|
8
|
+
|
|
9
|
+
## [0.1.0] - 2026-06-20
|
|
10
|
+
|
|
11
|
+
First public release.
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
- Resident Slack bot daemon (Bolt + Socket Mode) with a single egress chokepoint:
|
|
15
|
+
kill switch → destination authorization → outbound filter/split → audit → post.
|
|
16
|
+
The Slack bot token stays inside the daemon only.
|
|
17
|
+
- Unix-domain-socket send API + unified CLI: `init`, `uninstall`, `daemon`, `send`,
|
|
18
|
+
`ping`, `status`, `stop`, `kill`, `doctor`, plus `--version`.
|
|
19
|
+
- **Explicit command prefix** (`command_prefix`, default `!`): `@bot !status`,
|
|
20
|
+
`!select 2`, `!doctor`, … — deterministic, exactly-resolved commands needing
|
|
21
|
+
**no Slack slash registration** (and dodging reserved-word slashes like
|
|
22
|
+
`/status`). Configurable (`!` / `$` / `^`). Free-text `@mention`, Block Kit
|
|
23
|
+
buttons, and emoji reactions are also supported; native `/slash` commands are
|
|
24
|
+
opt-in (the shipped `slash_map` is empty).
|
|
25
|
+
- **Upgrade-safe `init`**: re-running refreshes the skill while preserving
|
|
26
|
+
`config.toml` (tokens/owner/channel) and `profile.json`; `--refresh-profile`
|
|
27
|
+
regenerates the profile (backing the old one up to `.bak`) with a migration hint.
|
|
28
|
+
See SETUP.md §10 (Update / upgrade).
|
|
29
|
+
- Claude Code skill (C0 live-session monitor mode), config/profile templates, and
|
|
30
|
+
the `init` scaffolder; `uninstall` (with `--purge`) reverses it.
|
|
31
|
+
- Multi-agent C1 skeleton (`AgentRunner`, `Router`) — Claude / Codex / Copilot C1
|
|
32
|
+
PoC-verified; daemon wiring is a later increment.
|
|
33
|
+
- Author/contact/copyright metadata: pyproject author + maintainer email,
|
|
34
|
+
`__author__`/`__email__`/`__license__`/`__copyright__`, per-file SPDX headers.
|
|
35
|
+
- Project hygiene: issue/PR templates + contribution policy (CONTRIBUTING),
|
|
36
|
+
security policy (SECURITY), CI across Python 3.11–3.13, and a PyPI
|
|
37
|
+
Trusted-Publishing release workflow.
|
|
38
|
+
|
|
39
|
+
[Unreleased]: https://github.com/noboru2000/cc-agent-messenger/compare/v0.1.0...HEAD
|
|
40
|
+
[0.1.0]: https://github.com/noboru2000/cc-agent-messenger/releases/tag/v0.1.0
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
Thanks for your interest. This is a small, **security-sensitive** tool maintained
|
|
4
|
+
by one person, so the workflow favors agreeing on an approach before code lands.
|
|
5
|
+
Please keep changes small and reviewable, and add or update tests for every
|
|
6
|
+
behavior change.
|
|
7
|
+
|
|
8
|
+
## Reporting bugs
|
|
9
|
+
|
|
10
|
+
Open a **Bug report** issue (the blank issue option is disabled — pick a template).
|
|
11
|
+
Include the version (`cc-agent-messenger --version`), install method, OS/Python,
|
|
12
|
+
and steps to reproduce.
|
|
13
|
+
|
|
14
|
+
- **Security vulnerabilities** do **not** go in public issues. Report them
|
|
15
|
+
privately via a [Security Advisory](https://github.com/noboru2000/cc-agent-messenger/security/advisories/new)
|
|
16
|
+
or email the maintainer — see [SECURITY.md](SECURITY.md).
|
|
17
|
+
- **Redact secrets.** Never paste Slack tokens (`xoxb-…`, `xapp-…`), IDs, or
|
|
18
|
+
`.cc-agent-messenger/config.toml` contents.
|
|
19
|
+
|
|
20
|
+
## Questions & usage help
|
|
21
|
+
|
|
22
|
+
Use [Discussions](https://github.com/noboru2000/cc-agent-messenger/discussions),
|
|
23
|
+
not the issue tracker — the tracker is for actionable bugs and feature requests.
|
|
24
|
+
|
|
25
|
+
## Proposing changes (pull requests)
|
|
26
|
+
|
|
27
|
+
1. **Discuss first.** For anything non-trivial, open a **Feature request** issue or
|
|
28
|
+
a Discussion so we agree on the approach before you invest in a PR. Trivial
|
|
29
|
+
fixes (typos, small doc fixes, obvious bugs) can go straight to a PR.
|
|
30
|
+
2. **Branch & PR.** Work on a branch; open a PR against `main` and fill in the PR
|
|
31
|
+
template. Link the issue/discussion (`Closes #NN`).
|
|
32
|
+
3. **Keep it small and focused.** Split large changes into multiple PRs.
|
|
33
|
+
4. **Tests + CI.** Add/adjust tests; `uv run pytest` must pass (CI runs it).
|
|
34
|
+
5. **Review & merge.** The maintainer reviews; PRs are **squash-merged**, so the PR
|
|
35
|
+
title becomes the commit — make it a good Conventional Commit (below).
|
|
36
|
+
6. By contributing you agree your contribution is licensed under the project's
|
|
37
|
+
[MIT License](LICENSE).
|
|
38
|
+
|
|
39
|
+
## Development setup
|
|
40
|
+
|
|
41
|
+
git clone https://github.com/noboru2000/cc-agent-messenger
|
|
42
|
+
cd cc-agent-messenger
|
|
43
|
+
uv sync --extra dev
|
|
44
|
+
uv run pytest
|
|
45
|
+
|
|
46
|
+
The test suite runs offline (Slack is mocked). You can also run it without `uv`:
|
|
47
|
+
|
|
48
|
+
PYTHONPATH=src python -m unittest discover -s tests
|
|
49
|
+
|
|
50
|
+
## Commit messages
|
|
51
|
+
|
|
52
|
+
Use [Conventional Commits](https://www.conventionalcommits.org/): a `type(scope):`
|
|
53
|
+
prefix and an imperative summary. Common types: `feat`, `fix`, `docs`, `refactor`,
|
|
54
|
+
`test`, `chore`, `ci`. Examples:
|
|
55
|
+
|
|
56
|
+
feat(commands): add the `!` command prefix
|
|
57
|
+
fix(ingress): avoid double-ingestion of bot-mentioned thread replies
|
|
58
|
+
docs(setup): add the update/upgrade section
|
|
59
|
+
|
|
60
|
+
## Code guidelines
|
|
61
|
+
|
|
62
|
+
- Type-annotate public functions; avoid OS-specific assumptions and hard-coded
|
|
63
|
+
machine paths (use config).
|
|
64
|
+
- Never commit secrets or host-specific values — keep them under
|
|
65
|
+
`.cc-agent-messenger/` (gitignored).
|
|
66
|
+
- Keep the security model intact (see [SECURITY.md](SECURITY.md)): single
|
|
67
|
+
operator, authorization, kill switch, audit, local-only token handling.
|
|
68
|
+
- The inbound command set is a **closed allowlist**; destructive/irreversible
|
|
69
|
+
actions stay behind explicit in-Slack approval (NN5).
|
|
70
|
+
|
|
71
|
+
## Labels (maintainer reference)
|
|
72
|
+
|
|
73
|
+
`bug`, `enhancement`, `docs`, `question`, `security`, `needs-triage`,
|
|
74
|
+
`good first issue`, `wontfix`, `duplicate`.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Noboru Harada
|
|
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.
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: cc-agent-messenger
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Slack message-turn bridge to AI coding agents (Claude Code / Codex / Copilot) running on your Mac
|
|
5
|
+
Project-URL: Homepage, https://github.com/noboru2000/cc-agent-messenger
|
|
6
|
+
Project-URL: Issues, https://github.com/noboru2000/cc-agent-messenger/issues
|
|
7
|
+
Author-email: Noboru Harada <noboru@ieee.org>
|
|
8
|
+
Maintainer-email: Noboru Harada <noboru@ieee.org>
|
|
9
|
+
License: MIT
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Keywords: ai-agent,bot,claude-code,codex,copilot,slack,socket-mode
|
|
12
|
+
Classifier: Development Status :: 3 - Alpha
|
|
13
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
14
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
15
|
+
Classifier: Topic :: Communications :: Chat
|
|
16
|
+
Requires-Python: >=3.11
|
|
17
|
+
Requires-Dist: slack-bolt>=1.18
|
|
18
|
+
Requires-Dist: slack-sdk>=3.27
|
|
19
|
+
Provides-Extra: dev
|
|
20
|
+
Requires-Dist: pytest>=8; extra == 'dev'
|
|
21
|
+
Description-Content-Type: text/markdown
|
|
22
|
+
|
|
23
|
+
<p align="center">
|
|
24
|
+
<img src="docs/images/logo.png" alt="cc-agent-messenger logo" width="160">
|
|
25
|
+
</p>
|
|
26
|
+
|
|
27
|
+
# cc-agent-messenger
|
|
28
|
+
|
|
29
|
+
**English** | [日本語](README.ja.md)
|
|
30
|
+
|
|
31
|
+
[](https://pypi.org/project/cc-agent-messenger/)
|
|
32
|
+
[](https://pypi.org/project/cc-agent-messenger/)
|
|
33
|
+
[](https://github.com/noboru2000/cc-agent-messenger/actions/workflows/ci.yml)
|
|
34
|
+
[](LICENSE)
|
|
35
|
+
|
|
36
|
+
Reply to your AI coding agents from **Slack on your phone**, while they keep
|
|
37
|
+
working in VS Code on your Mac. A small resident bot bridges a Slack channel to
|
|
38
|
+
the live Claude Code session (and, headlessly, to Codex / Copilot), so you can
|
|
39
|
+
ask for status, choose the next step, or get pinged when a long job finishes —
|
|
40
|
+
as **complete message turns**, not live terminal mirroring.
|
|
41
|
+
|
|
42
|
+
> ⚠️ **Security & responsibility.** This tool runs commands in response to Slack
|
|
43
|
+
> messages (RCE-adjacent). It is built for a **single trusted operator** on a
|
|
44
|
+
> trusted machine. Enabling hands-free auto-reply grants auto-execution of the
|
|
45
|
+
> reply command — a conscious risk you accept. No warranty; use at your own risk.
|
|
46
|
+
> See [SECURITY.md](SECURITY.md).
|
|
47
|
+
|
|
48
|
+
```text
|
|
49
|
+
iPhone Slack ──(@bot !status)──► resident bot (Bolt + Socket Mode)
|
|
50
|
+
│ authorize (NN4) + match command
|
|
51
|
+
▼
|
|
52
|
+
tmp/.slack_message ◄── tail -f Monitor (live Claude session)
|
|
53
|
+
iPhone push ◄── bot chat.postMessage ◄── cc-agent-messenger send (Unix-socket send API)
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## What it does
|
|
57
|
+
|
|
58
|
+
- **Inbound:** a Slack message in your private channel is authorized and appended
|
|
59
|
+
to a local file; your live Claude Code session (watching it with `tail -f`)
|
|
60
|
+
wakes, interprets the command, and replies.
|
|
61
|
+
- **Outbound:** the reply is posted by the project's own bot, @-mentioning you, so
|
|
62
|
+
your phone gets a push.
|
|
63
|
+
- **Agents:** Claude Code via the **live session (C0)**; Codex and Copilot via
|
|
64
|
+
**headless CLIs (C1)**. (C1 is also available for Claude.)
|
|
65
|
+
|
|
66
|
+
## Requirements
|
|
67
|
+
|
|
68
|
+
- macOS or Linux/WSL, VS Code + the Claude Code extension, Python ≥ 3.11, `uv`.
|
|
69
|
+
- A Slack workspace + one **private** channel, and a Slack app (Socket Mode).
|
|
70
|
+
- For Codex/Copilot: their own CLIs installed + authenticated (`codex`,
|
|
71
|
+
`@github/copilot`). Claude via C0 needs no extra CLI.
|
|
72
|
+
|
|
73
|
+
## Install
|
|
74
|
+
|
|
75
|
+
uv tool install cc-agent-messenger
|
|
76
|
+
# or from source:
|
|
77
|
+
uv tool install git+https://github.com/noboru2000/cc-agent-messenger
|
|
78
|
+
|
|
79
|
+
## Quickstart
|
|
80
|
+
|
|
81
|
+
cd your-project
|
|
82
|
+
cc-agent-messenger init # scaffolds the skill, config template, gitignore, allowlist
|
|
83
|
+
# 1) create a Slack app (Socket Mode + scopes + Event Subscriptions); see docs/SETUP.md
|
|
84
|
+
# 2) fill .cc-agent-messenger/config.toml with your tokens + channel id
|
|
85
|
+
cc-agent-messenger daemon # run the resident bot
|
|
86
|
+
|
|
87
|
+
# verify the return path:
|
|
88
|
+
cc-agent-messenger ping # -> {"status":"alive"}
|
|
89
|
+
cc-agent-messenger send --text "test" # -> posts to your channel; phone gets a push
|
|
90
|
+
|
|
91
|
+
Then, in your VS Code Claude Code session, invoke the **`cc-agent-messenger`** skill
|
|
92
|
+
to start watching the channel and replying. Add the printed allow-rule to
|
|
93
|
+
`.claude/settings.json` to make replies hands-free.
|
|
94
|
+
|
|
95
|
+
## Commands
|
|
96
|
+
|
|
97
|
+
`cc-agent-messenger <init | uninstall | daemon | send | ping | status | stop | kill on|off | doctor>`
|
|
98
|
+
— see `cc-agent-messenger --help`. From Slack, `@bot` the bot with either an
|
|
99
|
+
explicit command — `!status`, `!options`, `!select 2`, `!continue`, `!doctor`,
|
|
100
|
+
`!help` (a leading `!` is deterministic and needs no Slack slash registration) —
|
|
101
|
+
or plain words (`状況は?`, `status`). Full reference in
|
|
102
|
+
[docs/USAGE.md](docs/USAGE.md).
|
|
103
|
+
|
|
104
|
+
## Limitations
|
|
105
|
+
|
|
106
|
+
- **Session-bound:** the live (C0) bridge works only while VS Code and the Mac are
|
|
107
|
+
awake and the skill's monitor is armed. It is not a 24/7 service.
|
|
108
|
+
- Copilot/Codex replies come from a **headless CLI turn**, separate from their
|
|
109
|
+
VS Code GUI panels.
|
|
110
|
+
|
|
111
|
+
## Docs
|
|
112
|
+
|
|
113
|
+
- [docs/SETUP.md](docs/SETUP.md) — Slack app creation, invite, config, run, E2E,
|
|
114
|
+
troubleshooting.
|
|
115
|
+
- [docs/USAGE.md](docs/USAGE.md) — Slack command reference (`!status`, `!options`,
|
|
116
|
+
…), keywords, and expected behavior once it is running.
|
|
117
|
+
- [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) — the C0 loop, the egress
|
|
118
|
+
chokepoint, the four input surfaces, the security model.
|
|
119
|
+
|
|
120
|
+
## License & author
|
|
121
|
+
|
|
122
|
+
[MIT](LICENSE) © 2026 Noboru Harada.
|
|
123
|
+
|
|
124
|
+
**Author / maintainer:** Noboru Harada <noboru@ieee.org>. Security reports:
|
|
125
|
+
see [SECURITY.md](SECURITY.md). Bugs / features: [open an issue](https://github.com/noboru2000/cc-agent-messenger/issues).
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="docs/images/logo.png" alt="cc-agent-messenger logo" width="160">
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
# cc-agent-messenger
|
|
6
|
+
|
|
7
|
+
[English](README.md) | **日本語**
|
|
8
|
+
|
|
9
|
+
[](https://pypi.org/project/cc-agent-messenger/)
|
|
10
|
+
[](https://pypi.org/project/cc-agent-messenger/)
|
|
11
|
+
[](https://github.com/noboru2000/cc-agent-messenger/actions/workflows/ci.yml)
|
|
12
|
+
[](LICENSE)
|
|
13
|
+
|
|
14
|
+
Mac の VS Code で AI コーディングエージェントが作業を続けている間に、**iPhone の
|
|
15
|
+
Slack** から状況確認・次の選択・完了通知などをやり取りできるツールです。常駐 bot が
|
|
16
|
+
Slack チャネルと**ライブの Claude Code セッション**(および Codex / Copilot のヘッド
|
|
17
|
+
レス CLI)を橋渡しします。**完結したメッセージ単位**のやり取りで、ターミナルのライブ
|
|
18
|
+
ミラーリングではありません。
|
|
19
|
+
|
|
20
|
+
> ⚠️ **セキュリティと自己責任。** 本ツールは Slack メッセージに応じてコマンドを実行
|
|
21
|
+
> します(RCE 隣接)。**単一の信頼できるオペレータ**が信頼できるマシンで使う前提です。
|
|
22
|
+
> ハンズフリー自動返信を有効化すると、返信コマンドの自動実行を許可することになります
|
|
23
|
+
> (意識的に受け入れるリスク)。無保証・自己責任。[SECURITY.md](SECURITY.md) 参照。
|
|
24
|
+
|
|
25
|
+
```text
|
|
26
|
+
iPhone Slack ──(@bot / /status)──► 常駐 bot (Bolt + Socket Mode)
|
|
27
|
+
│ 認可(NN4)+ コマンド照合
|
|
28
|
+
▼
|
|
29
|
+
tmp/.slack_message ◄── tail -f Monitor(ライブ Claude セッション)
|
|
30
|
+
iPhone プッシュ ◄── bot chat.postMessage ◄── cc-agent-messenger send(Unix socket 送信 API)
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## 何ができるか
|
|
34
|
+
|
|
35
|
+
- **受信:** プライベートチャネルのメッセージを認可しローカルファイルに追記。`tail -f`
|
|
36
|
+
で監視中のライブ Claude Code セッションが起床し、コマンドを解釈して返信。
|
|
37
|
+
- **送信:** 返信は**自前 bot** があなたを `@mention` して投稿 → スマホにプッシュ。
|
|
38
|
+
- **エージェント:** Claude Code は**ライブセッション(C0)**、Codex/Copilot は**ヘッド
|
|
39
|
+
レス CLI(C1)**。Claude も C1 可。
|
|
40
|
+
|
|
41
|
+
## 必要環境
|
|
42
|
+
|
|
43
|
+
- macOS または Linux/WSL、VS Code + Claude Code 拡張、Python ≥ 3.11、`uv`。
|
|
44
|
+
- Slack ワークスペース + あなた専用の**プライベートチャネル**、Socket Mode の Slack アプリ。
|
|
45
|
+
- Codex/Copilot を使う場合は各 CLI の導入+認証(`codex`、`@github/copilot`)。Claude の
|
|
46
|
+
C0 は追加 CLI 不要。
|
|
47
|
+
|
|
48
|
+
## インストール
|
|
49
|
+
|
|
50
|
+
uv tool install cc-agent-messenger
|
|
51
|
+
# ソースから:
|
|
52
|
+
uv tool install git+https://github.com/noboru2000/cc-agent-messenger
|
|
53
|
+
|
|
54
|
+
## クイックスタート
|
|
55
|
+
|
|
56
|
+
cd your-project
|
|
57
|
+
cc-agent-messenger init # skill / 設定テンプレ / .gitignore / allowlist を配置
|
|
58
|
+
# 1) Slack アプリ作成(Socket Mode + スコープ + Event Subscriptions);docs/SETUP.md
|
|
59
|
+
# 2) .cc-agent-messenger/config.toml にトークン + チャンネル ID を記入
|
|
60
|
+
cc-agent-messenger daemon # 常駐 bot 起動
|
|
61
|
+
|
|
62
|
+
cc-agent-messenger ping # -> {"status":"alive"}
|
|
63
|
+
cc-agent-messenger send --text "テスト" # -> チャネルに投稿、スマホにプッシュ
|
|
64
|
+
|
|
65
|
+
その後、VS Code の Claude Code セッションで **`cc-agent-messenger`** スキルを起動して
|
|
66
|
+
待ち受け開始。`init` が表示する allow ルールを `.claude/settings.json` に貼ると
|
|
67
|
+
ハンズフリーになります。
|
|
68
|
+
|
|
69
|
+
## コマンド
|
|
70
|
+
|
|
71
|
+
`cc-agent-messenger <init | uninstall | daemon | send | ping | status | stop | kill on|off | doctor>`
|
|
72
|
+
— 詳細は `cc-agent-messenger --help`。Slack からは `/help`、`/status`、`/options`、
|
|
73
|
+
`/continue`、`/doctor`、または `@bot <メッセージ>` — 全コマンドは
|
|
74
|
+
[docs/USAGE.md](docs/USAGE.md) を参照。
|
|
75
|
+
|
|
76
|
+
## 制限
|
|
77
|
+
|
|
78
|
+
- **セッション束縛:** ライブ(C0)ブリッジは VS Code と Mac が起きていてスキルの監視が
|
|
79
|
+
動いている間のみ。24/7 サービスではありません。
|
|
80
|
+
- Copilot/Codex の返信は**ヘッドレス CLI ターン**で、VS Code の GUI パネルとは別文脈です。
|
|
81
|
+
|
|
82
|
+
## ドキュメント
|
|
83
|
+
|
|
84
|
+
- [docs/SETUP.md](docs/SETUP.md) — Slack アプリ作成・招待・設定・起動・E2E・トラブルシュート。
|
|
85
|
+
- [docs/USAGE.ja.md](docs/USAGE.ja.md) — Slack コマンドリファレンス(`/help`・`/status` 等)・
|
|
86
|
+
キーワード・起動後の期待動作。
|
|
87
|
+
- [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) — C0 ループ・egress chokepoint・4入力面・
|
|
88
|
+
セキュリティモデル。
|
|
89
|
+
|
|
90
|
+
## ライセンス・作者
|
|
91
|
+
|
|
92
|
+
[MIT](LICENSE) © 2026 Noboru Harada。
|
|
93
|
+
|
|
94
|
+
**作者・メンテナ:** Noboru Harada <noboru@ieee.org>。脆弱性報告は
|
|
95
|
+
[SECURITY.md](SECURITY.md)、不具合・要望は
|
|
96
|
+
[Issue](https://github.com/noboru2000/cc-agent-messenger/issues) へ。
|