agentd 0.2.0 → 0.3.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.
- checksums.yaml +4 -4
- data/lib/agentd/agent.rb +60 -0
- data/lib/agentd/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: fda3feca327f360b15345c78f2d83b952a5177b123d863ee1421b60936ba734b
|
|
4
|
+
data.tar.gz: 7983c9195ff2fe05f5bd1f141a775c1b0944f8add3356cffe911d9d9b33a7d53
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 80aacaf2b65677cbc1c057e6b3d582cf25ba11e5b52adb99192e233cf5524f19f437064021b9c63664fc1d3eac1222bd75bdf7245bed796c59929286ee8fe289
|
|
7
|
+
data.tar.gz: 62562416e81c24b5bb939035d3d402b525ffbea80ee7120ec0a83f6d687bdf872a93f7621fd4dbe7f223a9d1ae37537e0e5339f7e3494378a4d7781ca9cc2909
|
data/lib/agentd/agent.rb
CHANGED
|
@@ -158,5 +158,65 @@ module Agentd
|
|
|
158
158
|
def reactions(slug, type: nil)
|
|
159
159
|
client.tool("list_reactions", **{ slug:, type: }.compact)
|
|
160
160
|
end
|
|
161
|
+
|
|
162
|
+
# --- Session keys ---
|
|
163
|
+
|
|
164
|
+
def session_key_create(label:, expires_in: "24h", spending_cap_usdc: nil)
|
|
165
|
+
client.tool("session_key_create", **{ label:, expires_in:, spending_cap_usdc: }.compact)
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
def session_key_list
|
|
169
|
+
client.tool("session_key_list")
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
def session_key_revoke(token:)
|
|
173
|
+
client.tool("session_key_revoke", token:)
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
# --- Schedules ---
|
|
177
|
+
|
|
178
|
+
def schedule_create(name:, cron:, title:, instructions:, payload: {})
|
|
179
|
+
client.tool("schedule_create", name:, cron:, title:, instructions:, payload:)
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
def schedule_list
|
|
183
|
+
client.tool("schedule_list")
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
def schedule_toggle(name:, enabled:)
|
|
187
|
+
client.tool("schedule_toggle", name:, enabled:)
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
def schedule_delete(name:)
|
|
191
|
+
client.tool("schedule_delete", name:)
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
# --- Spending ---
|
|
195
|
+
|
|
196
|
+
def spending_status
|
|
197
|
+
client.tool("spending_status")
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
# --- Broadcast ---
|
|
201
|
+
|
|
202
|
+
def broadcast(channels:, body:, subject: nil, recipient_map: {})
|
|
203
|
+
client.tool("broadcast", **{ channels:, body:, subject:, recipient_map: }.compact)
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
# --- Reputation ---
|
|
207
|
+
|
|
208
|
+
def reputation(handle: nil)
|
|
209
|
+
client.tool("get_reputation", **{ handle: }.compact)
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
# --- Profile ---
|
|
213
|
+
|
|
214
|
+
def update(name: nil, description: nil, model: nil, capabilities: nil, **metadata)
|
|
215
|
+
client.tool("update_agent", **{ name:, description:, model:, capabilities:, **metadata }.compact)
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
def nostr_sync
|
|
219
|
+
client.tool("nostr_sync")
|
|
220
|
+
end
|
|
161
221
|
end
|
|
162
222
|
end
|
data/lib/agentd/version.rb
CHANGED