codex-notify 1.0.0

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 (36) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +50 -0
  3. data/LICENSE +21 -0
  4. data/README.md +782 -0
  5. data/bin/codex-notify +6 -0
  6. data/bin/codex-notify-hook +6 -0
  7. data/lib/codex_notify/cli.rb +112 -0
  8. data/lib/codex_notify/config.rb +113 -0
  9. data/lib/codex_notify/config_diagnostics.rb +61 -0
  10. data/lib/codex_notify/config_migrator.rb +148 -0
  11. data/lib/codex_notify/config_support.rb +157 -0
  12. data/lib/codex_notify/destination_name.rb +18 -0
  13. data/lib/codex_notify/destination_resolver.rb +68 -0
  14. data/lib/codex_notify/durable_slack_publisher.rb +70 -0
  15. data/lib/codex_notify/env_source_loader.rb +91 -0
  16. data/lib/codex_notify/hook_cli.rb +90 -0
  17. data/lib/codex_notify/hook_config.rb +110 -0
  18. data/lib/codex_notify/hook_event.rb +16 -0
  19. data/lib/codex_notify/hook_formatter.rb +61 -0
  20. data/lib/codex_notify/hook_input_validator.rb +241 -0
  21. data/lib/codex_notify/hook_runner.rb +181 -0
  22. data/lib/codex_notify/hook_store.rb +133 -0
  23. data/lib/codex_notify/hook_thread_publisher.rb +107 -0
  24. data/lib/codex_notify/log_event_parser.rb +230 -0
  25. data/lib/codex_notify/message_formatter.rb +115 -0
  26. data/lib/codex_notify/outbox_commands.rb +43 -0
  27. data/lib/codex_notify/secret_protection.rb +37 -0
  28. data/lib/codex_notify/session_log.rb +63 -0
  29. data/lib/codex_notify/slack_client.rb +117 -0
  30. data/lib/codex_notify/slack_delivery_worker.rb +269 -0
  31. data/lib/codex_notify/slack_outbox.rb +206 -0
  32. data/lib/codex_notify/stream_processor.rb +141 -0
  33. data/lib/codex_notify/trusted_config_loader.rb +159 -0
  34. data/lib/codex_notify/version.rb +5 -0
  35. data/lib/codex_notify.rb +36 -0
  36. metadata +96 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: d3b7dc4b1f9edda880bd5f39324dbb56c70812bc9ebe1d37578d0915e4313a47
4
+ data.tar.gz: fb7e1ee08765f2a617d56c5d4fa2151fe8816b305051928ba5f197c3f66df2d9
5
+ SHA512:
6
+ metadata.gz: fd8a7f1b1af5e6c08f954544718b0e340edbc6433eab906678c48079950ac9df2a1d893f7d0e1092f724637b93fa3a22ff250309974640b66f07cd6c602649b6
7
+ data.tar.gz: a6c35b4741731a1f6694df415d89d1fccd51ed228ce0eaa8651ec896fcf51607144ab8d545035d10660e27a178035825c3c6c5ebff8e5d0669953eb226e290c8
data/CHANGELOG.md ADDED
@@ -0,0 +1,50 @@
1
+ # Changelog
2
+
3
+ All notable changes to codex-notify are documented in this file. Releases from
4
+ 1.0.0 onward follow [Semantic Versioning](https://semver.org/).
5
+
6
+ ## [1.0.0] - 2026-08-13
7
+
8
+ ### Added
9
+
10
+ - Added the `codex-notify` log-tail command, which follows Codex JSONL session
11
+ logs without reposting existing history.
12
+ - Added the `codex-notify-hook` command for Codex Hooks, with one Slack thread
13
+ per Codex session and support for prompts, permission requests, final
14
+ responses, session lifecycle events, and optional Bash activity.
15
+ - Added normal and debug notification modes, Slack-safe message chunking,
16
+ stale-thread recovery, and durable local delivery queues.
17
+ - Added trusted XDG YAML configuration, named Slack destinations, explicit
18
+ configuration migration, and diagnostics that do not print secret values.
19
+
20
+ ### Security
21
+
22
+ - Repository `.env` files use the restricted policy by default. They may select
23
+ a trusted destination and presentation settings, but cannot provide Slack
24
+ credentials, raw channel IDs, named profile credentials, or the policy
25
+ override.
26
+ - The temporary trusted `legacy` policy remains available for migration and
27
+ emits a warning whenever repository credentials are used. It is planned for
28
+ removal in a future major release.
29
+ - Hook input is limited to 1 MiB, validated before state or network access, and
30
+ rejects unsupported events or missing session identifiers with exit code 2.
31
+ - Outbound Slack messages receive best-effort secret redaction immediately
32
+ before delivery. Local configuration, state, and outbox files use restrictive
33
+ permissions where supported.
34
+ - RubyGems publication uses GitHub Actions OIDC Trusted Publishing and does not
35
+ require a long-lived RubyGems API key.
36
+
37
+ ### Compatibility and migration
38
+
39
+ - Ruby 3.4 or newer is required.
40
+ - Existing supported Hook event aliases and legacy payload shapes remain
41
+ compatible.
42
+ - Move Slack credentials from repository or checkout `.env` files to
43
+ `$XDG_CONFIG_HOME/codex-notify/config.yml` (or
44
+ `~/.config/codex-notify/config.yml`) and let repositories select an existing
45
+ destination with `CODEX_NOTIFY_DESTINATION`.
46
+ - Replace checkout-based Hook command paths with the absolute path returned by
47
+ `command -v codex-notify-hook`, then review and trust the changed Hook
48
+ definition in Codex.
49
+
50
+ [1.0.0]: https://github.com/koichiro/codex-notify/releases/tag/v1.0.0
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Koichiro Ohba
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.