bark-agent-hook 0.1.1__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.
Files changed (55) hide show
  1. bark_agent_hook-0.1.1/.agents/plugins/marketplace.json +20 -0
  2. bark_agent_hook-0.1.1/.claude-plugin/marketplace.json +20 -0
  3. bark_agent_hook-0.1.1/.env.example +15 -0
  4. bark_agent_hook-0.1.1/.gitattributes +1 -0
  5. bark_agent_hook-0.1.1/.github/ISSUE_TEMPLATE/bug_report.yml +43 -0
  6. bark_agent_hook-0.1.1/.github/ISSUE_TEMPLATE/feature_request.yml +51 -0
  7. bark_agent_hook-0.1.1/.github/ISSUE_TEMPLATE/tech_task.yml +53 -0
  8. bark_agent_hook-0.1.1/.github/PULL_REQUEST_TEMPLATE.md +43 -0
  9. bark_agent_hook-0.1.1/.github/dependabot.yml +12 -0
  10. bark_agent_hook-0.1.1/.github/settings.yml +26 -0
  11. bark_agent_hook-0.1.1/.github/workflows/ci.yml +113 -0
  12. bark_agent_hook-0.1.1/.github/workflows/release-pypi.yml +136 -0
  13. bark_agent_hook-0.1.1/.gitignore +13 -0
  14. bark_agent_hook-0.1.1/.pre-commit-config.yaml +66 -0
  15. bark_agent_hook-0.1.1/AGENTS.md +21 -0
  16. bark_agent_hook-0.1.1/CLAUDE.md +22 -0
  17. bark_agent_hook-0.1.1/CODEOWNERS +1 -0
  18. bark_agent_hook-0.1.1/CONTRIBUTING.md +32 -0
  19. bark_agent_hook-0.1.1/PKG-INFO +89 -0
  20. bark_agent_hook-0.1.1/README.md +78 -0
  21. bark_agent_hook-0.1.1/SECURITY.md +20 -0
  22. bark_agent_hook-0.1.1/bark_agent_hook/__init__.py +1 -0
  23. bark_agent_hook-0.1.1/bark_agent_hook/__main__.py +3 -0
  24. bark_agent_hook-0.1.1/bark_agent_hook/app.py +102 -0
  25. bark_agent_hook-0.1.1/bark_agent_hook/audit.py +103 -0
  26. bark_agent_hook-0.1.1/bark_agent_hook/cli.py +3 -0
  27. bark_agent_hook-0.1.1/bark_agent_hook/commands.py +138 -0
  28. bark_agent_hook-0.1.1/bark_agent_hook/constants.py +85 -0
  29. bark_agent_hook-0.1.1/bark_agent_hook/hook.py +31 -0
  30. bark_agent_hook-0.1.1/bark_agent_hook/install.py +3 -0
  31. bark_agent_hook-0.1.1/bark_agent_hook/installer.py +298 -0
  32. bark_agent_hook-0.1.1/bark_agent_hook/models.py +67 -0
  33. bark_agent_hook-0.1.1/bark_agent_hook/notification.py +310 -0
  34. bark_agent_hook-0.1.1/bark_agent_hook/output.py +119 -0
  35. bark_agent_hook-0.1.1/bark_agent_hook/py.typed +0 -0
  36. bark_agent_hook-0.1.1/bark_agent_hook/runtime.py +228 -0
  37. bark_agent_hook-0.1.1/bark_agent_hook/settings.py +37 -0
  38. bark_agent_hook-0.1.1/bark_agent_hook/summary.py +231 -0
  39. bark_agent_hook-0.1.1/bark_agent_hook/utils.py +36 -0
  40. bark_agent_hook-0.1.1/plugins/bark-agent-hook-claude/.claude-plugin/plugin.json +8 -0
  41. bark_agent_hook-0.1.1/plugins/bark-agent-hook-claude/hooks/hooks.json +34 -0
  42. bark_agent_hook-0.1.1/plugins/bark-agent-hook-codex/.codex-plugin/plugin.json +26 -0
  43. bark_agent_hook-0.1.1/plugins/bark-agent-hook-codex/hooks/hooks.json +24 -0
  44. bark_agent_hook-0.1.1/plugins/bark-agent-hook-openclaw/index.js +166 -0
  45. bark_agent_hook-0.1.1/plugins/bark-agent-hook-openclaw/index.ts +168 -0
  46. bark_agent_hook-0.1.1/plugins/bark-agent-hook-openclaw/openclaw.plugin.json +13 -0
  47. bark_agent_hook-0.1.1/plugins/bark-agent-hook-openclaw/package.json +11 -0
  48. bark_agent_hook-0.1.1/pyproject.toml +105 -0
  49. bark_agent_hook-0.1.1/scripts/check_versions.py +65 -0
  50. bark_agent_hook-0.1.1/scripts/sync_versions.py +122 -0
  51. bark_agent_hook-0.1.1/tests/agent_bark_hook_install_test.py +494 -0
  52. bark_agent_hook-0.1.1/tests/agent_bark_hook_test.py +1252 -0
  53. bark_agent_hook-0.1.1/tests/cli_help_test.py +29 -0
  54. bark_agent_hook-0.1.1/tests/plugin_manifest_test.py +149 -0
  55. bark_agent_hook-0.1.1/uv.lock +1035 -0
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "bark-agent-hook",
3
+ "interface": {
4
+ "displayName": "bark-agent-hook"
5
+ },
6
+ "plugins": [
7
+ {
8
+ "name": "bark-agent-hook-codex",
9
+ "source": {
10
+ "source": "local",
11
+ "path": "./plugins/bark-agent-hook-codex"
12
+ },
13
+ "policy": {
14
+ "installation": "AVAILABLE",
15
+ "authentication": "ON_INSTALL"
16
+ },
17
+ "category": "Productivity"
18
+ }
19
+ ]
20
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "$schema": "https://anthropic.com/claude-code/marketplace.schema.json",
3
+ "name": "bark-agent-hook",
4
+ "description": "Claude Code plugins for Bark agent hook workflows.",
5
+ "owner": {
6
+ "name": "qsoyq"
7
+ },
8
+ "plugins": [
9
+ {
10
+ "name": "bark-agent-hook",
11
+ "description": "Send Bark notifications from Claude Code lifecycle hooks through bark-agent-hook.",
12
+ "author": {
13
+ "name": "qsoyq"
14
+ },
15
+ "category": "productivity",
16
+ "source": "./plugins/bark-agent-hook-claude",
17
+ "homepage": "https://github.com/qsoyq/bark-agent-hook"
18
+ }
19
+ ]
20
+ }
@@ -0,0 +1,15 @@
1
+ # Copy this file to .env for local development.
2
+ # Do not put real secrets in committed files.
3
+
4
+ BARK_DEVICE_KEY=
5
+ BARK_SERVER=https://api.day.app
6
+ BARK_GROUP=
7
+ AGENT_BARK_NOTIFY_GROUP_MODE=agent
8
+ AGENT_BARK_NOTIFY_HOOK_URL=
9
+ AGENT_BARK_NOTIFY_TITLE_TEMPLATE=
10
+ AGENT_BARK_NOTIFY_AUDIT_LOG=
11
+ AGENT_BARK_NOTIFY_AUDIT_LOG_FILE=
12
+ LODY_ELECTRON_BOOTSTRAP=
13
+ LODY_ELECTRON_SESSION_USER_ID=
14
+ LODY_SESSION_ID=
15
+ LODY_WORKSPACE_SESSION_ID=
@@ -0,0 +1 @@
1
+ * text=auto eol=lf
@@ -0,0 +1,43 @@
1
+ name: Bug Report
2
+ description: Report a reproducible defect.
3
+ title: "fix: "
4
+ labels: ["bug"]
5
+ body:
6
+ - type: textarea
7
+ id: background
8
+ attributes:
9
+ label: Background
10
+ description: What happened and why does it matter?
11
+ validations:
12
+ required: true
13
+ - type: textarea
14
+ id: steps
15
+ attributes:
16
+ label: Reproduction Steps
17
+ description: Provide the smallest reproducible command or workflow.
18
+ validations:
19
+ required: true
20
+ - type: textarea
21
+ id: expected
22
+ attributes:
23
+ label: Expected Behavior
24
+ validations:
25
+ required: true
26
+ - type: textarea
27
+ id: actual
28
+ attributes:
29
+ label: Actual Behavior
30
+ validations:
31
+ required: true
32
+ - type: textarea
33
+ id: validation
34
+ attributes:
35
+ label: Validation
36
+ description: How should the fix be verified?
37
+ validations:
38
+ required: true
39
+ - type: textarea
40
+ id: risk
41
+ attributes:
42
+ label: Risk
43
+ description: Note security, compatibility, or release risks.
@@ -0,0 +1,51 @@
1
+ name: Feature Request
2
+ description: Propose a user-facing capability.
3
+ title: "feat: "
4
+ labels: ["enhancement"]
5
+ body:
6
+ - type: textarea
7
+ id: background
8
+ attributes:
9
+ label: Background
10
+ description: What problem should this solve?
11
+ validations:
12
+ required: true
13
+ - type: textarea
14
+ id: goal
15
+ attributes:
16
+ label: Goal
17
+ description: What outcome should be true when this is complete?
18
+ validations:
19
+ required: true
20
+ - type: textarea
21
+ id: scope
22
+ attributes:
23
+ label: Scope
24
+ description: What is included?
25
+ validations:
26
+ required: true
27
+ - type: textarea
28
+ id: non_scope
29
+ attributes:
30
+ label: Non-goals
31
+ description: What is intentionally excluded?
32
+ - type: textarea
33
+ id: acceptance
34
+ attributes:
35
+ label: Acceptance Criteria
36
+ description: Use checkboxes for observable acceptance criteria.
37
+ value: "- [ ] "
38
+ validations:
39
+ required: true
40
+ - type: textarea
41
+ id: validation
42
+ attributes:
43
+ label: Validation
44
+ description: Commands, manual checks, or evidence expected.
45
+ validations:
46
+ required: true
47
+ - type: textarea
48
+ id: risk
49
+ attributes:
50
+ label: Risk
51
+ description: Compatibility, security, rollout, or rollback concerns.
@@ -0,0 +1,53 @@
1
+ name: Tech Task
2
+ description: Track maintenance, governance, refactor, or infrastructure work.
3
+ title: "chore: "
4
+ labels: ["maintenance"]
5
+ body:
6
+ - type: dropdown
7
+ id: type
8
+ attributes:
9
+ label: Type
10
+ options:
11
+ - Tech Task
12
+ - Refactor
13
+ - Research
14
+ - QA Task
15
+ - Release Task
16
+ - Incident
17
+ validations:
18
+ required: true
19
+ - type: textarea
20
+ id: background
21
+ attributes:
22
+ label: Background
23
+ validations:
24
+ required: true
25
+ - type: textarea
26
+ id: goal
27
+ attributes:
28
+ label: Goal
29
+ validations:
30
+ required: true
31
+ - type: textarea
32
+ id: scope
33
+ attributes:
34
+ label: Scope
35
+ validations:
36
+ required: true
37
+ - type: textarea
38
+ id: acceptance
39
+ attributes:
40
+ label: Acceptance Criteria
41
+ value: "- [ ] "
42
+ validations:
43
+ required: true
44
+ - type: textarea
45
+ id: validation
46
+ attributes:
47
+ label: Validation
48
+ validations:
49
+ required: true
50
+ - type: textarea
51
+ id: risk
52
+ attributes:
53
+ label: Risk
@@ -0,0 +1,43 @@
1
+ ## Summary
2
+
3
+ -
4
+
5
+ ## Related Issue
6
+
7
+ Closes #
8
+
9
+ ## Change Type
10
+
11
+ - [ ] Feature
12
+ - [ ] Bug fix
13
+ - [ ] Refactor
14
+ - [ ] Docs
15
+ - [ ] CI / governance
16
+ - [ ] Test
17
+
18
+ ## Impact
19
+
20
+ -
21
+
22
+ ## Validation
23
+
24
+ - [ ] `uv run pre-commit run --all-files`
25
+ - [ ] `uv run pytest -q`
26
+ - [ ] Manual verification:
27
+
28
+ ## Risk And Rollback
29
+
30
+ -
31
+
32
+ Rollback:
33
+
34
+ -
35
+
36
+ ## AI Assistance
37
+
38
+ - [ ] AI assistance was used and the changes were reviewed by a human.
39
+ - [ ] AI assistance was not used.
40
+
41
+ ## Reviewer Focus
42
+
43
+ -
@@ -0,0 +1,12 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: "github-actions"
4
+ directory: "/"
5
+ schedule:
6
+ interval: "weekly"
7
+ open-pull-requests-limit: 5
8
+ - package-ecosystem: "uv"
9
+ directory: "/"
10
+ schedule:
11
+ interval: "weekly"
12
+ open-pull-requests-limit: 5
@@ -0,0 +1,26 @@
1
+ repository:
2
+ has_issues: true
3
+ has_projects: true
4
+ has_wiki: false
5
+ default_branch: main
6
+
7
+ branches:
8
+ - name: main
9
+ protection:
10
+ required_pull_request_reviews:
11
+ required_approving_review_count: 1
12
+ dismiss_stale_reviews: true
13
+ require_code_owner_reviews: true
14
+ require_last_push_approval: true
15
+ required_status_checks:
16
+ strict: true
17
+ contexts:
18
+ - "test (3.10)"
19
+ - "test (3.11)"
20
+ - "test (3.12)"
21
+ - "test (3.13)"
22
+ - "test (3.14)"
23
+ - "lint"
24
+ enforce_admins: false
25
+ required_conversation_resolution: true
26
+ restrictions: null
@@ -0,0 +1,113 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ permissions:
10
+ contents: read
11
+
12
+ jobs:
13
+ test:
14
+ runs-on: ubuntu-latest
15
+ timeout-minutes: 20
16
+ strategy:
17
+ matrix:
18
+ python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
19
+ steps:
20
+ - uses: actions/checkout@v7
21
+
22
+ - name: Install uv
23
+ uses: astral-sh/setup-uv@v7
24
+ with:
25
+ enable-cache: true
26
+
27
+ - name: Set up Python ${{ matrix.python-version }}
28
+ run: uv python install ${{ matrix.python-version }}
29
+
30
+ - name: Install dev group
31
+ run: uv sync --group dev --no-install-project
32
+
33
+ - name: Run tox
34
+ run: uv run tox -e ${{ matrix.python-version }}
35
+
36
+ lint:
37
+ runs-on: ubuntu-latest
38
+ timeout-minutes: 20
39
+ steps:
40
+ - uses: actions/checkout@v7
41
+
42
+ - name: Install uv
43
+ uses: astral-sh/setup-uv@v7
44
+ with:
45
+ enable-cache: true
46
+
47
+ - name: Install dev group
48
+ run: uv sync --group dev --no-install-project
49
+
50
+ - name: Check plugin versions
51
+ run: uv run python scripts/check_versions.py
52
+
53
+ - name: Run pre-commit
54
+ run: uv run pre-commit run --all-files
55
+
56
+ release:
57
+ runs-on: ubuntu-latest
58
+ timeout-minutes: 10
59
+ needs: [test, lint]
60
+ if: github.event_name == 'push' && github.ref == 'refs/heads/main'
61
+ permissions:
62
+ contents: write
63
+ steps:
64
+ - uses: actions/checkout@v7
65
+
66
+ - name: Install uv
67
+ uses: astral-sh/setup-uv@v7
68
+ with:
69
+ enable-cache: true
70
+
71
+ - name: Set up Python
72
+ run: uv python install 3.14
73
+
74
+ - name: Install release dependencies
75
+ run: uv sync --group dev --no-install-project
76
+
77
+ - name: Resolve project version
78
+ id: version
79
+ run: |
80
+ VERSION=$(uv run python - <<'PY'
81
+ from pathlib import Path
82
+ import tomllib
83
+
84
+ doc = tomllib.loads(Path("pyproject.toml").read_text(encoding="utf-8"))
85
+ project = doc.get("project", {})
86
+ if not isinstance(project, dict) or not isinstance(project.get("version"), str):
87
+ raise SystemExit("project.version is missing from pyproject.toml")
88
+ print(project["version"])
89
+ PY
90
+ )
91
+ echo "version=$VERSION" >> "$GITHUB_OUTPUT"
92
+
93
+ - name: Check release
94
+ id: release
95
+ env:
96
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
97
+ run: |
98
+ if gh release view "${{ steps.version.outputs.version }}" >/dev/null 2>&1; then
99
+ echo "exists=true" >> "$GITHUB_OUTPUT"
100
+ echo "Release ${{ steps.version.outputs.version }} already exists; skipping."
101
+ else
102
+ echo "exists=false" >> "$GITHUB_OUTPUT"
103
+ fi
104
+
105
+ - name: Create release
106
+ if: steps.release.outputs.exists == 'false'
107
+ env:
108
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
109
+ run: |
110
+ gh release create "${{ steps.version.outputs.version }}" \
111
+ --target "$GITHUB_SHA" \
112
+ --generate-notes \
113
+ --title "${{ steps.version.outputs.version }}"
@@ -0,0 +1,136 @@
1
+ name: Release to PyPI
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+
7
+ permissions:
8
+ contents: read
9
+ checks: read
10
+
11
+ jobs:
12
+ gate:
13
+ if: github.event.release.prerelease == false
14
+ runs-on: ubuntu-latest
15
+ timeout-minutes: 15
16
+ outputs:
17
+ release-sha: ${{ steps.release-target.outputs.sha }}
18
+ steps:
19
+ - uses: actions/checkout@v7
20
+ with:
21
+ fetch-depth: 0
22
+ ref: ${{ github.event.release.tag_name }}
23
+
24
+ - name: Resolve release target
25
+ id: release-target
26
+ run: |
27
+ sha="$(git rev-parse HEAD^{commit})"
28
+ echo "sha=$sha" >> "$GITHUB_OUTPUT"
29
+ echo "Release target commit: $sha"
30
+
31
+ - name: Verify required CI checks
32
+ env:
33
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34
+ RELEASE_SHA: ${{ steps.release-target.outputs.sha }}
35
+ run: |
36
+ set -euo pipefail
37
+
38
+ required_checks=(
39
+ "test (3.10)"
40
+ "test (3.11)"
41
+ "test (3.12)"
42
+ "test (3.13)"
43
+ "test (3.14)"
44
+ "lint"
45
+ )
46
+
47
+ for attempt in {1..30}; do
48
+ response="$(gh api \
49
+ -H "Accept: application/vnd.github+json" \
50
+ -H "X-GitHub-Api-Version: 2022-11-28" \
51
+ "/repos/${GITHUB_REPOSITORY}/commits/${RELEASE_SHA}/check-runs?per_page=100")"
52
+
53
+ pending=()
54
+ failed=()
55
+ missing=()
56
+
57
+ for check in "${required_checks[@]}"; do
58
+ match="$(jq -r --arg name "$check" '
59
+ .check_runs
60
+ | map(select(.name == $name))
61
+ | sort_by(.started_at // .created_at)
62
+ | last
63
+ | if . == null then empty else [.status, (.conclusion // "")] | @tsv end
64
+ ' <<<"$response")"
65
+
66
+ if [[ -z "$match" ]]; then
67
+ missing+=("$check")
68
+ continue
69
+ fi
70
+
71
+ status="${match%%$'\t'*}"
72
+ conclusion="${match#*$'\t'}"
73
+
74
+ if [[ "$status" != "completed" ]]; then
75
+ pending+=("$check: $status")
76
+ elif [[ "$conclusion" != "success" ]]; then
77
+ failed+=("$check: $conclusion")
78
+ fi
79
+ done
80
+
81
+ if (( ${#failed[@]} > 0 )); then
82
+ printf 'Required CI checks failed:\n'
83
+ printf -- '- %s\n' "${failed[@]}"
84
+ exit 1
85
+ fi
86
+
87
+ if (( ${#missing[@]} == 0 && ${#pending[@]} == 0 )); then
88
+ echo "All required CI checks passed."
89
+ exit 0
90
+ fi
91
+
92
+ if (( attempt == 30 )); then
93
+ if (( ${#missing[@]} > 0 )); then
94
+ printf 'Required CI checks were missing:\n'
95
+ printf -- '- %s\n' "${missing[@]}"
96
+ fi
97
+ if (( ${#pending[@]} > 0 )); then
98
+ printf 'Required CI checks were still pending:\n'
99
+ printf -- '- %s\n' "${pending[@]}"
100
+ fi
101
+ exit 1
102
+ fi
103
+
104
+ echo "Required CI checks are not ready yet; retrying in 20 seconds."
105
+ sleep 20
106
+ done
107
+
108
+ publish:
109
+ if: github.event.release.prerelease == false
110
+ runs-on: ubuntu-latest
111
+ timeout-minutes: 15
112
+ needs: [gate]
113
+ permissions:
114
+ contents: read
115
+ id-token: write
116
+ concurrency:
117
+ group: release-pypi
118
+ cancel-in-progress: false
119
+ environment:
120
+ name: pypi
121
+ url: https://pypi.org/p/bark-agent-hook
122
+ steps:
123
+ - uses: actions/checkout@v7
124
+ with:
125
+ ref: ${{ needs.gate.outputs.release-sha }}
126
+
127
+ - name: Install uv
128
+ uses: astral-sh/setup-uv@v7
129
+ with:
130
+ enable-cache: true
131
+
132
+ - name: Build package
133
+ run: uv build
134
+
135
+ - name: Publish package
136
+ run: uv publish --trusted-publishing always
@@ -0,0 +1,13 @@
1
+ .DS_Store
2
+ .env
3
+ .venv/
4
+ .tox/
5
+ .mypy_cache/
6
+ .pytest_cache/
7
+ .ruff_cache/
8
+ __pycache__/
9
+ *.py[cod]
10
+ build/
11
+ dist/
12
+ *.egg-info/
13
+ node_modules/
@@ -0,0 +1,66 @@
1
+ repos:
2
+ - repo: local
3
+ hooks:
4
+ - id: sync-plugin-versions
5
+ name: sync plugin versions
6
+ entry: uv run python scripts/sync_versions.py
7
+ language: system
8
+ always_run: true
9
+ pass_filenames: false
10
+
11
+ - repo: https://github.com/pre-commit/pre-commit-hooks
12
+ rev: v6.0.0
13
+ hooks:
14
+ - id: check-yaml
15
+ - id: check-toml
16
+ - id: check-json
17
+ - id: check-case-conflict
18
+ - id: check-docstring-first
19
+ - id: check-added-large-files
20
+ - id: check-executables-have-shebangs
21
+ - id: debug-statements
22
+ - id: end-of-file-fixer
23
+ - id: trailing-whitespace
24
+ files: "\\.(py|txt|yaml|json|md|toml|lock|cfg|html|sh|js|ts|yml)$"
25
+ - id: mixed-line-ending
26
+ files: "\\.(py|txt|yaml|json|md|toml|lock|cfg|html|sh|js|ts|yml)$"
27
+ - id: fix-byte-order-marker
28
+ - id: name-tests-test
29
+
30
+ - repo: https://github.com/pycqa/isort
31
+ rev: "7.0.0"
32
+ hooks:
33
+ - id: isort
34
+ files: "\\.(py)$"
35
+ args: [--settings-path=pyproject.toml]
36
+
37
+ - repo: https://github.com/hadialqattan/pycln
38
+ rev: v2.6.0
39
+ hooks:
40
+ - id: pycln
41
+ args: [--config=pyproject.toml]
42
+
43
+ - repo: https://github.com/pre-commit/mirrors-mypy
44
+ rev: "v1.19.1"
45
+ hooks:
46
+ - id: mypy
47
+ args: ["--config=pyproject.toml"]
48
+ additional_dependencies:
49
+ - httpx
50
+ - pydantic_settings
51
+ - rich
52
+ - typer
53
+
54
+ - repo: https://github.com/astral-sh/ruff-pre-commit
55
+ rev: v0.14.14
56
+ hooks:
57
+ - id: ruff-check
58
+ types_or: [python, pyi]
59
+ args: [--fix]
60
+ - id: ruff-format
61
+ types_or: [python, pyi]
62
+
63
+ - repo: https://github.com/astral-sh/uv-pre-commit
64
+ rev: 0.9.28
65
+ hooks:
66
+ - id: uv-lock
@@ -0,0 +1,21 @@
1
+ # Repository Guidelines
2
+
3
+ ## Project Structure
4
+
5
+ `bark_agent_hook/` contains the Python package and Typer CLI. The public entry point is `bark-agent-hook`, wired through `bark_agent_hook.cli:cmd`. Runtime plugin assets live under `plugins/`, with separate Codex, Claude Code, and OpenClaw plugin directories. Tests live in `tests/` and mirror CLI behavior and plugin manifests.
6
+
7
+ ## Development Commands
8
+
9
+ - `uv sync --group dev`: install the local development environment.
10
+ - `uv run pytest -q`: run the test suite.
11
+ - `uv run tox`: run the configured Python compatibility matrix.
12
+ - `uv run pre-commit run --all-files`: run formatting, linting, type, lockfile, and hygiene checks.
13
+ - `uv build`: build the wheel and source distribution.
14
+
15
+ ## Conventions
16
+
17
+ Use Python 3.10+ and keep code typed where practical. Ruff is the formatter and linter with a 200-character line length. Keep this repository focused on Bark agent hooks; do not add unrelated utilities or generated command docs.
18
+
19
+ ## Security
20
+
21
+ Do not commit real secrets, tokens, certificates, private keys, `.env`, or local service configuration. `bark-agent-hook` audit logging must not record raw hook payloads, Bark device keys/URLs, full notification bodies, or click URLs.
@@ -0,0 +1,22 @@
1
+ # CLAUDE.md
2
+
3
+ This repository contains the standalone `bark-agent-hook` CLI and companion plugin assets for Codex, Claude Code, and OpenClaw.
4
+
5
+ ## Common Commands
6
+
7
+ - `uv sync --group dev`
8
+ - `uv run pytest -q`
9
+ - `uv run pytest -q tests/<file>_test.py`
10
+ - `uv run tox`
11
+ - `uv run pre-commit run --all-files`
12
+ - `uv build`
13
+
14
+ ## Architecture
15
+
16
+ The Typer CLI is exposed as `bark-agent-hook`. It intentionally has only three subcommands: `hook`, `install`, and `uninstall`. Install guidance belongs in the root help text, not in generated command docs or a separate `plugins` command group.
17
+
18
+ Plugin manifests are under `plugins/`; marketplace manifests are under `.agents/plugins/` and `.claude-plugin/`. Keep manifest versions synchronized across Codex, Claude Code, OpenClaw package metadata, and OpenClaw native manifest.
19
+
20
+ ## Security-Sensitive Areas
21
+
22
+ The hook receives agent lifecycle payloads and sends Bark requests. Audit logging must remain opt-in and must not persist raw hook payloads, Bark device keys or URLs, full notification bodies, or rendered click URLs.
@@ -0,0 +1 @@
1
+ * @qsoyq