ez_logs_agent 0.1.5 → 0.1.7

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b2d2badd73cb46e12e78d54928f6b2cec5f4a39a93f22f6ecbef5b4767ed200a
4
- data.tar.gz: c654639d447550d6c2e59a99c072a60126b8502cf749a5be65988f6bc80649ae
3
+ metadata.gz: e1155fac143bb0af7e99c95a8dde26764f1c3f2bfab758beec239adef8bfab06
4
+ data.tar.gz: d87b5b4cc03d73117e0b1759b26c149a73e8bd2c1aa670a8b79f5c0b4a0fe7de
5
5
  SHA512:
6
- metadata.gz: 703b6dba6216a3f34db5ce0038fda0e19e0a2cd0aa6de07cea95bcb974bdb3856488dc92601376ac7070d18920032b8e8ea941c998d2dc7835e903fa14d72c94
7
- data.tar.gz: 4c44195f6539f48933c7949b936f988738657d44728dc6406cf43b270958b05a107f5cec5ac6b8de3b7265c5ff2dbbf07fe276c99dea1f1f1662a1f61eabd05a
6
+ metadata.gz: 2b91f112497b1443ffe044215819e0fb9a26748026bd43859ed2b239eacb53920cb6ae27c455f34693b46e56cc62ff1775a6177b1e76805f603f2402737a5cf3
7
+ data.tar.gz: dd0ae94996e329e795da19f2017a165cbf3e81e81aa8ee493e1a1d086abc02dd1f01bd61ac12fc5c8d08192863877bd83420903e113ada489788465e7f4fcac8
data/CHANGELOG.md CHANGED
@@ -2,6 +2,30 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [0.1.7] — 2026-05-28
6
+
7
+ ### Changed
8
+ - Gem `homepage` now points at the product site (`https://ezlogs.io/`)
9
+ instead of the GitHub mirror, so the RubyGems "Homepage" link sends
10
+ installers to the product. `source_code_uri` still points at the
11
+ mirror. Metadata-only release; no code or wire change.
12
+
13
+ ## [0.1.6] — 2026-05-24
14
+
15
+ ### Added
16
+ - Optional `actor.principal` sub-field (`{ id:, label? }`) on the wire,
17
+ carrying the human a `kind: "agent"` or `kind: "hybrid"` actor is
18
+ acting on behalf of. Drops silently if malformed; existing callers
19
+ unaffected. Lets the server narrate agent actions as
20
+ "Claude updated employee, on behalf of Razvan" instead of
21
+ attributing the change to either party alone.
22
+
23
+ ### Internal
24
+ - Dropped a stray gemspec bump to `sidekiq ~> 8.1` that landed via an
25
+ auto-merged dependabot PR without re-resolving `Gemfile.lock`. Dev
26
+ deps are back in sync with the lockfile (`rails ~> 7.0`,
27
+ `sqlite3 ~> 1.6`, `sidekiq ~> 7.0`); no runtime change for customers.
28
+
5
29
  ## [0.1.5] — 2026-05-17 — security release
6
30
 
7
31
  ### Security
data/README.md CHANGED
@@ -1,10 +1,12 @@
1
1
  # EZLogs Agent
2
2
 
3
+ [Website](https://ezlogs.io/) · [Documentation](https://ezlogs.io/rails/) · [Next.js sister agent](https://github.com/dezsirazvan/ez_logs_agent_nextjs)
4
+
3
5
  **Drop-in activity logging for Rails applications.**
4
6
 
5
7
  EZLogs Agent captures what happens in your Rails app — HTTP requests, background jobs, database changes — and sends them to the EZLogs server, where they're transformed into human-readable stories that anyone on your team can understand.
6
8
 
7
- Wire-format identical to the [Next.js sister agent](https://github.com/dezsirazvan/ez_logs/tree/master/ez_logs_agent_nextjs) (`@ezlogs/nextjs`). Same server ingests both. Use Rails on the back end and Next.js on the front end? You see one unified Action timeline.
9
+ Wire-format identical to the [Next.js sister agent](https://github.com/dezsirazvan/ez_logs_agent_nextjs) (`ezlogs-nextjs` on npm). Same server ingests both. Use Rails on the back end and Next.js on the front end? You see one unified Action timeline.
8
10
 
9
11
  ---
10
12
 
@@ -5,9 +5,15 @@ module EzLogsAgent
5
5
  #
6
6
  # Actor schema:
7
7
  # {
8
- # id: String, # REQUIRED, stable identifier
9
- # label: String | nil, # optional, human-readable display
10
- # kind: String | nil # optional, one of human|agent|system|hybrid
8
+ # id: String, # REQUIRED, stable identifier
9
+ # label: String | nil, # optional, human-readable display
10
+ # kind: String | nil, # optional, one of human|agent|system|hybrid
11
+ # principal: { id:, label? } | nil # optional, only meaningful when
12
+ # # kind == "hybrid": the human who
13
+ # # authorized the agent. Drives the
14
+ # # "Claude updated employee, on
15
+ # # behalf of Razvan" framing on the
16
+ # # server's AiExplainer.
11
17
  # }
12
18
  #
13
19
  # This module ensures actors conform to the expected structure
@@ -46,13 +52,36 @@ module EzLogsAgent
46
52
  id = actor[:id] || actor["id"]
47
53
  label = actor[:label] || actor["label"]
48
54
  kind = actor[:kind] || actor["kind"]
55
+ principal = actor[:principal] || actor["principal"]
49
56
 
50
57
  result = { id: id.to_s }
51
58
  result[:label] = label.to_s if label
52
59
  result[:kind] = kind.to_s if kind && VALID_KINDS.include?(kind.to_s)
60
+ sanitized_principal = sanitize_principal(principal)
61
+ result[:principal] = sanitized_principal if sanitized_principal
53
62
 
54
63
  result
55
64
  end
65
+
66
+ private
67
+
68
+ # Sanitize the optional principal sub-structure. Reuses the same
69
+ # "id required, label optional" shape as the top-level actor — but
70
+ # principals are always human, so no `kind` field. Returns nil if
71
+ # the principal is missing or malformed (we drop silently rather
72
+ # than rejecting the whole actor; principal is purely advisory).
73
+ def sanitize_principal(principal)
74
+ return nil if principal.nil?
75
+ return nil unless principal.is_a?(Hash)
76
+
77
+ id = principal[:id] || principal["id"]
78
+ return nil if id.nil? || id.to_s.empty?
79
+
80
+ result = { id: id.to_s }
81
+ label = principal[:label] || principal["label"]
82
+ result[:label] = label.to_s if label
83
+ result
84
+ end
56
85
  end
57
86
  end
58
87
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EzLogsAgent
4
- VERSION = "0.1.5"
4
+ VERSION = "0.1.7"
5
5
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ez_logs_agent
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - dezsirazvan
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2026-05-17 00:00:00.000000000 Z
10
+ date: 2026-05-28 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: request_store
@@ -143,11 +143,11 @@ files:
143
143
  - lib/generators/ez_logs_agent/install/install_generator.rb
144
144
  - lib/generators/ez_logs_agent/install/templates/ez_logs_agent.rb.tt
145
145
  - lib/tasks/ez_logs_agent.rake
146
- homepage: https://github.com/dezsirazvan/ez_logs_agent
146
+ homepage: https://ezlogs.io/
147
147
  licenses:
148
148
  - MIT
149
149
  metadata:
150
- homepage_uri: https://github.com/dezsirazvan/ez_logs_agent
150
+ homepage_uri: https://ezlogs.io/
151
151
  source_code_uri: https://github.com/dezsirazvan/ez_logs_agent
152
152
  changelog_uri: https://github.com/dezsirazvan/ez_logs_agent/blob/master/CHANGELOG.md
153
153
  bug_tracker_uri: https://github.com/dezsirazvan/ez_logs_agent/issues