silas 0.1.1 → 0.1.2
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 +10 -0
- data/lib/generators/silas/install/templates/channel_email.rb +13 -2
- data/lib/silas/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e6f592c5f4b254794f9a2a9cd4efc87d70b898f685f50ffff75c7af41415a7d8
|
|
4
|
+
data.tar.gz: 43871af8708f50e68803bc727975201d693ba4337ddf056f54062fb8e6070208
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f1b8239d3d5eaaf1de6d199ac1a3fd53562cc7c1e8d8b6f67124974810fbe811692aa2d466a4d595660bca13cbc98c98ae0b500275bc54e216e2a2a4b8810fb5
|
|
7
|
+
data.tar.gz: d1a1132bb5b027b19e338e40b57ac9a418f8bdde7fefe11f1d20a196cf6f7ecd7999fd0f7209f45c1e21ef7445a313d65f88abd2dabe56c00fc5dafaf79e9279
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.2
|
|
4
|
+
|
|
5
|
+
- **Security (email channel scaffold): approvals no longer go to the session
|
|
6
|
+
initiator.** The generated `Agent::Channels::Email#deliver_approval` mailed the
|
|
7
|
+
approve link to `email["from"]` — the address that started the session, which
|
|
8
|
+
for a support agent is the customer, letting them approve their own gated
|
|
9
|
+
request. It now routes to a configured operator (`SILAS_APPROVER_EMAIL`) and
|
|
10
|
+
fails closed (sends nothing) if unset. The Slack scaffold was unaffected (its
|
|
11
|
+
card posts to the team channel/thread, not the initiator).
|
|
12
|
+
|
|
3
13
|
## 0.1.1
|
|
4
14
|
|
|
5
15
|
- **Fix: parallel tool calls.** When the model emitted several tool_use blocks
|
|
@@ -10,9 +10,20 @@ class Agent::Channels::Email < Silas::Channel
|
|
|
10
10
|
end
|
|
11
11
|
|
|
12
12
|
def deliver_approval(session:, invocation:)
|
|
13
|
-
|
|
13
|
+
# SECURITY: an approval must go to an OPERATOR, never to whoever started the
|
|
14
|
+
# session. For an email-driven agent, session.metadata["email"]["from"] is
|
|
15
|
+
# the person who emailed in — often the customer — so mailing THEM the
|
|
16
|
+
# approve link lets them approve their own request. Route approvals to your
|
|
17
|
+
# ops/approver inbox instead, and fail closed if it isn't configured.
|
|
18
|
+
approver = ENV["SILAS_APPROVER_EMAIL"] # e.g. "approvals@yourcompany.com"
|
|
19
|
+
if approver.blank?
|
|
20
|
+
Rails.logger.warn("[Silas] SILAS_APPROVER_EMAIL unset — approval for " \
|
|
21
|
+
"invocation #{invocation.id} not emailed (won't send to the sender).")
|
|
22
|
+
return
|
|
23
|
+
end
|
|
24
|
+
|
|
14
25
|
Silas::ChannelMailer.approval(
|
|
15
|
-
to:
|
|
26
|
+
to: approver, subject: "Approval needed: #{invocation.tool_name}", invocation: invocation
|
|
16
27
|
).deliver_later
|
|
17
28
|
end
|
|
18
29
|
end
|
data/lib/silas/version.rb
CHANGED