ez_logs_agent 0.1.5 → 0.1.6
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 +4 -4
- data/CHANGELOG.md +16 -0
- data/lib/ez_logs_agent/actor_validator.rb +32 -3
- data/lib/ez_logs_agent/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 452e5fb397336daeaccc2f5738be03545e5bd318243f30755d5e5205d1c9d2f6
|
|
4
|
+
data.tar.gz: 22b04cd9a432fef3006ffb33c4322c188e0d9bb4914fb07487f1a135ada3877c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 345f3c6929cf6b88bb6d909c6ada301907ccb2aee852957f8da0b278852033978d5116f6ecd67358b33c50921c4fd82e0c65d2cfa1ebb7304d4b9387f8138617
|
|
7
|
+
data.tar.gz: b412f7a99fbc624541062f0fc8ab148576f48350fc0c72636938360d7cc6c17974382b6bcb47800224e315666bd91f992fdb6b4d4218f54efb16c06b2140f08a
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## [0.1.6] — 2026-05-24
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
- Optional `actor.principal` sub-field (`{ id:, label? }`) on the wire,
|
|
9
|
+
carrying the human a `kind: "agent"` or `kind: "hybrid"` actor is
|
|
10
|
+
acting on behalf of. Drops silently if malformed; existing callers
|
|
11
|
+
unaffected. Lets the server narrate agent actions as
|
|
12
|
+
"Claude updated employee, on behalf of Razvan" instead of
|
|
13
|
+
attributing the change to either party alone.
|
|
14
|
+
|
|
15
|
+
### Internal
|
|
16
|
+
- Dropped a stray gemspec bump to `sidekiq ~> 8.1` that landed via an
|
|
17
|
+
auto-merged dependabot PR without re-resolving `Gemfile.lock`. Dev
|
|
18
|
+
deps are back in sync with the lockfile (`rails ~> 7.0`,
|
|
19
|
+
`sqlite3 ~> 1.6`, `sidekiq ~> 7.0`); no runtime change for customers.
|
|
20
|
+
|
|
5
21
|
## [0.1.5] — 2026-05-17 — security release
|
|
6
22
|
|
|
7
23
|
### Security
|
|
@@ -5,9 +5,15 @@ module EzLogsAgent
|
|
|
5
5
|
#
|
|
6
6
|
# Actor schema:
|
|
7
7
|
# {
|
|
8
|
-
# id: String,
|
|
9
|
-
# label: String | nil,
|
|
10
|
-
# kind: String | nil
|
|
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
|
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.
|
|
4
|
+
version: 0.1.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- dezsirazvan
|
|
8
8
|
bindir: bin
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date: 2026-05-
|
|
10
|
+
date: 2026-05-28 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: request_store
|