agentjam 0.1.0__tar.gz → 0.4.0__tar.gz

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 (150) hide show
  1. {agentjam-0.1.0 → agentjam-0.4.0}/PKG-INFO +46 -2
  2. {agentjam-0.1.0 → agentjam-0.4.0}/README.md +45 -1
  3. {agentjam-0.1.0 → agentjam-0.4.0}/pyproject.toml +1 -1
  4. {agentjam-0.1.0 → agentjam-0.4.0}/src/agentjam/__init__.py +88 -54
  5. {agentjam-0.1.0 → agentjam-0.4.0}/src/agentjam/_adapters/shared.py +63 -32
  6. {agentjam-0.1.0 → agentjam-0.4.0}/src/agentjam/_agent.py +307 -15
  7. {agentjam-0.1.0 → agentjam-0.4.0}/src/agentjam/_agent_access.py +179 -22
  8. {agentjam-0.1.0 → agentjam-0.4.0}/src/agentjam/_agent_delegations.py +88 -20
  9. {agentjam-0.1.0 → agentjam-0.4.0}/src/agentjam/_agent_executions.py +52 -16
  10. {agentjam-0.1.0 → agentjam-0.4.0}/src/agentjam/_agent_judging.py +9 -4
  11. {agentjam-0.1.0 → agentjam-0.4.0}/src/agentjam/_agent_options.py +5 -3
  12. {agentjam-0.1.0 → agentjam-0.4.0}/src/agentjam/_agent_routing.py +31 -14
  13. {agentjam-0.1.0 → agentjam-0.4.0}/src/agentjam/_agent_session.py +104 -14
  14. {agentjam-0.1.0 → agentjam-0.4.0}/src/agentjam/_agent_support.py +13 -10
  15. agentjam-0.4.0/src/agentjam/_any_of.py +384 -0
  16. {agentjam-0.1.0 → agentjam-0.4.0}/src/agentjam/_artifacts.py +94 -82
  17. agentjam-0.4.0/src/agentjam/_attachments.py +147 -0
  18. agentjam-0.4.0/src/agentjam/_backoff.py +16 -0
  19. agentjam-0.4.0/src/agentjam/_base_error.py +2 -0
  20. agentjam-0.4.0/src/agentjam/_chooser.py +357 -0
  21. agentjam-0.4.0/src/agentjam/_connections.py +898 -0
  22. agentjam-0.4.0/src/agentjam/_content.py +137 -0
  23. {agentjam-0.1.0 → agentjam-0.4.0}/src/agentjam/_cron.py +0 -13
  24. agentjam-0.4.0/src/agentjam/_datadog_alerts.py +387 -0
  25. agentjam-0.4.0/src/agentjam/_discord.py +269 -0
  26. agentjam-0.4.0/src/agentjam/_discord_events.py +389 -0
  27. agentjam-0.4.0/src/agentjam/_discord_gateway.py +576 -0
  28. agentjam-0.4.0/src/agentjam/_discord_interactions.py +272 -0
  29. agentjam-0.4.0/src/agentjam/_downloads.py +248 -0
  30. {agentjam-0.1.0 → agentjam-0.4.0}/src/agentjam/_errors.py +16 -6
  31. {agentjam-0.1.0 → agentjam-0.4.0}/src/agentjam/_events.py +42 -2
  32. agentjam-0.4.0/src/agentjam/_files.py +266 -0
  33. {agentjam-0.1.0 → agentjam-0.4.0}/src/agentjam/_github.py +178 -71
  34. agentjam-0.4.0/src/agentjam/_github_api.py +66 -0
  35. agentjam-0.4.0/src/agentjam/_github_events.py +693 -0
  36. agentjam-0.4.0/src/agentjam/_google.py +122 -0
  37. agentjam-0.4.0/src/agentjam/_grafana_alerts.py +391 -0
  38. agentjam-0.1.0/src/agentjam/_relay/inputs.py → agentjam-0.4.0/src/agentjam/_inputs.py +95 -29
  39. agentjam-0.4.0/src/agentjam/_managed_webhooks.py +272 -0
  40. agentjam-0.4.0/src/agentjam/_microsoft.py +690 -0
  41. agentjam-0.4.0/src/agentjam/_oauth_callbacks.py +73 -0
  42. agentjam-0.4.0/src/agentjam/_pagerduty_incidents.py +278 -0
  43. agentjam-0.4.0/src/agentjam/_pages.py +35 -0
  44. {agentjam-0.1.0 → agentjam-0.4.0}/src/agentjam/_polling.py +3 -8
  45. agentjam-0.4.0/src/agentjam/_presets.py +113 -0
  46. {agentjam-0.1.0 → agentjam-0.4.0}/src/agentjam/_profile.py +29 -9
  47. {agentjam-0.1.0 → agentjam-0.4.0}/src/agentjam/_protocol.py +241 -3
  48. {agentjam-0.1.0 → agentjam-0.4.0}/src/agentjam/_providers.py +21 -91
  49. agentjam-0.4.0/src/agentjam/_recaps.py +84 -0
  50. {agentjam-0.1.0 → agentjam-0.4.0}/src/agentjam/_relay/base.py +113 -7
  51. agentjam-0.4.0/src/agentjam/_relay/chains.py +270 -0
  52. agentjam-0.4.0/src/agentjam/_relay/credentials.py +376 -0
  53. {agentjam-0.1.0 → agentjam-0.4.0}/src/agentjam/_relay/frames.py +69 -1
  54. agentjam-0.4.0/src/agentjam/_relay/grants.py +337 -0
  55. agentjam-0.4.0/src/agentjam/_relay/links.py +48 -0
  56. agentjam-0.4.0/src/agentjam/_relay/memory.py +627 -0
  57. {agentjam-0.1.0 → agentjam-0.4.0}/src/agentjam/_relay/payments.py +38 -8
  58. {agentjam-0.1.0 → agentjam-0.4.0}/src/agentjam/_relay/remote.py +100 -17
  59. agentjam-0.4.0/src/agentjam/_relay/schedules.py +401 -0
  60. agentjam-0.4.0/src/agentjam/_relay/secrets.py +76 -0
  61. {agentjam-0.1.0 → agentjam-0.4.0}/src/agentjam/_relay/sessions.py +39 -201
  62. agentjam-0.4.0/src/agentjam/_relay/subscriptions.py +162 -0
  63. agentjam-0.4.0/src/agentjam/_relay/uploads.py +278 -0
  64. {agentjam-0.1.0 → agentjam-0.4.0}/src/agentjam/_screening.py +3 -3
  65. agentjam-0.4.0/src/agentjam/_secrets.py +245 -0
  66. {agentjam-0.1.0 → agentjam-0.4.0}/src/agentjam/_sentry.py +129 -38
  67. agentjam-0.4.0/src/agentjam/_sentry_api.py +42 -0
  68. agentjam-0.4.0/src/agentjam/_sentry_events.py +337 -0
  69. {agentjam-0.1.0 → agentjam-0.4.0}/src/agentjam/_slack.py +127 -105
  70. agentjam-0.4.0/src/agentjam/_slack_events.py +403 -0
  71. agentjam-0.4.0/src/agentjam/_slack_interactions.py +297 -0
  72. agentjam-0.4.0/src/agentjam/_storage.py +60 -0
  73. agentjam-0.4.0/src/agentjam/_subscriptions.py +47 -0
  74. {agentjam-0.1.0 → agentjam-0.4.0}/src/agentjam/_tasks/incoming.py +182 -48
  75. {agentjam-0.1.0 → agentjam-0.4.0}/src/agentjam/_tasks/outgoing.py +55 -3
  76. {agentjam-0.1.0 → agentjam-0.4.0}/src/agentjam/_tasks/scheduled.py +133 -23
  77. {agentjam-0.1.0 → agentjam-0.4.0}/src/agentjam/_tasks/serial.py +8 -6
  78. {agentjam-0.1.0 → agentjam-0.4.0}/src/agentjam/_tasks/triggers.py +67 -25
  79. agentjam-0.4.0/src/agentjam/_tools/delegations.py +78 -0
  80. agentjam-0.4.0/src/agentjam/_tools/inputs.py +236 -0
  81. agentjam-0.1.0/src/agentjam/_tools.py → agentjam-0.4.0/src/agentjam/_tools/network.py +140 -485
  82. agentjam-0.4.0/src/agentjam/_tools/schedules.py +539 -0
  83. agentjam-0.4.0/src/agentjam/_tools/shared.py +394 -0
  84. {agentjam-0.1.0 → agentjam-0.4.0}/src/agentjam/_types.py +141 -80
  85. {agentjam-0.1.0 → agentjam-0.4.0}/src/agentjam/_utils.py +16 -0
  86. agentjam-0.4.0/src/agentjam/_vaults/__init__.py +0 -0
  87. agentjam-0.4.0/src/agentjam/_vaults/local.py +806 -0
  88. agentjam-0.4.0/src/agentjam/_vaults/remote.py +599 -0
  89. agentjam-0.4.0/src/agentjam/_vaults/vault.py +370 -0
  90. {agentjam-0.1.0 → agentjam-0.4.0}/src/agentjam/anthropic.py +1 -1
  91. agentjam-0.4.0/src/agentjam/atlassian.py +50 -0
  92. agentjam-0.4.0/src/agentjam/datadog.py +47 -0
  93. agentjam-0.4.0/src/agentjam/discord.py +31 -0
  94. agentjam-0.4.0/src/agentjam/github.py +29 -0
  95. agentjam-0.4.0/src/agentjam/google.py +11 -0
  96. agentjam-0.4.0/src/agentjam/grafana.py +47 -0
  97. agentjam-0.4.0/src/agentjam/microsoft.py +23 -0
  98. agentjam-0.4.0/src/agentjam/oauth.py +25 -0
  99. {agentjam-0.1.0 → agentjam-0.4.0}/src/agentjam/openai.py +1 -1
  100. {agentjam-0.1.0 → agentjam-0.4.0}/src/agentjam/openai_agents.py +1 -1
  101. agentjam-0.4.0/src/agentjam/pagerduty.py +58 -0
  102. agentjam-0.4.0/src/agentjam/posthog.py +36 -0
  103. agentjam-0.4.0/src/agentjam/py.typed +0 -0
  104. {agentjam-0.1.0 → agentjam-0.4.0}/src/agentjam/pydantic_ai.py +1 -1
  105. agentjam-0.4.0/src/agentjam/sentry.py +22 -0
  106. agentjam-0.4.0/src/agentjam/slack.py +24 -0
  107. agentjam-0.4.0/src/agentjam/splunk.py +36 -0
  108. agentjam-0.1.0/src/agentjam/_attachments.py +0 -112
  109. agentjam-0.1.0/src/agentjam/_connections.py +0 -1282
  110. agentjam-0.1.0/src/agentjam/_content.py +0 -29
  111. agentjam-0.1.0/src/agentjam/_files.py +0 -55
  112. agentjam-0.1.0/src/agentjam/_inputs.py +0 -79
  113. agentjam-0.1.0/src/agentjam/_recaps.py +0 -67
  114. agentjam-0.1.0/src/agentjam/_relay/actions.py +0 -234
  115. agentjam-0.1.0/src/agentjam/_relay/artifacts.py +0 -96
  116. agentjam-0.1.0/src/agentjam/_relay/commits.py +0 -77
  117. agentjam-0.1.0/src/agentjam/_relay/copies.py +0 -66
  118. agentjam-0.1.0/src/agentjam/_relay/credentials.py +0 -127
  119. agentjam-0.1.0/src/agentjam/_relay/follow_ups.py +0 -548
  120. agentjam-0.1.0/src/agentjam/_relay/lineage.py +0 -294
  121. agentjam-0.1.0/src/agentjam/_relay/memory.py +0 -1045
  122. agentjam-0.1.0/src/agentjam/_relay/resumptions.py +0 -65
  123. agentjam-0.1.0/src/agentjam/_relay/schedule_follow_ups.py +0 -274
  124. agentjam-0.1.0/src/agentjam/_relay/schedules.py +0 -547
  125. agentjam-0.1.0/src/agentjam/_relay/secrets.py +0 -275
  126. agentjam-0.1.0/src/agentjam/_relay/uploads.py +0 -71
  127. agentjam-0.1.0/src/agentjam/_secrets.py +0 -153
  128. {agentjam-0.1.0 → agentjam-0.4.0}/.gitignore +0 -0
  129. {agentjam-0.1.0 → agentjam-0.4.0}/LICENSE +0 -0
  130. {agentjam-0.1.0 → agentjam-0.4.0}/src/agentjam/_adapters/__init__.py +0 -0
  131. {agentjam-0.1.0 → agentjam-0.4.0}/src/agentjam/_adapters/responses.py +0 -0
  132. {agentjam-0.1.0 → agentjam-0.4.0}/src/agentjam/_idempotency.py +0 -0
  133. {agentjam-0.1.0 → agentjam-0.4.0}/src/agentjam/_models.py +0 -0
  134. {agentjam-0.1.0 → agentjam-0.4.0}/src/agentjam/_relay/__init__.py +0 -0
  135. {agentjam-0.1.0 → agentjam-0.4.0}/src/agentjam/_relay/endpoints.py +0 -0
  136. {agentjam-0.1.0 → agentjam-0.4.0}/src/agentjam/_relay/guest_store.py +0 -0
  137. {agentjam-0.1.0 → agentjam-0.4.0}/src/agentjam/_relay/guests.py +0 -0
  138. {agentjam-0.1.0 → agentjam-0.4.0}/src/agentjam/_relay/profiles.py +0 -0
  139. {agentjam-0.1.0 → agentjam-0.4.0}/src/agentjam/_relay/revisions.py +0 -0
  140. {agentjam-0.1.0 → agentjam-0.4.0}/src/agentjam/_requests.py +0 -0
  141. {agentjam-0.1.0 → agentjam-0.4.0}/src/agentjam/_signals.py +0 -0
  142. {agentjam-0.1.0 → agentjam-0.4.0}/src/agentjam/_stripe.py +0 -0
  143. {agentjam-0.1.0 → agentjam-0.4.0}/src/agentjam/_tasks/__init__.py +0 -0
  144. {agentjam-0.1.0 → agentjam-0.4.0}/src/agentjam/_tasks/access.py +0 -0
  145. {agentjam-0.1.0 → agentjam-0.4.0}/src/agentjam/_tasks/watches.py +0 -0
  146. /agentjam-0.1.0/src/agentjam/py.typed → /agentjam-0.4.0/src/agentjam/_tools/__init__.py +0 -0
  147. {agentjam-0.1.0 → agentjam-0.4.0}/src/agentjam/_verdicts.py +0 -0
  148. {agentjam-0.1.0 → agentjam-0.4.0}/src/agentjam/_watermarks.py +0 -0
  149. {agentjam-0.1.0 → agentjam-0.4.0}/src/agentjam/mpp.py +0 -0
  150. {agentjam-0.1.0 → agentjam-0.4.0}/src/agentjam/skills.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: agentjam
3
- Version: 0.1.0
3
+ Version: 0.4.0
4
4
  Summary: Allow your agents to discover, message, and delegate tasks to any other agent over AgentJam.
5
5
  Project-URL: Homepage, https://agentjam.com
6
6
  License-Expression: MIT
@@ -174,6 +174,20 @@ async for run in scan.runs():
174
174
  print(await run.result())
175
175
  ```
176
176
 
177
+ ### Subscriptions
178
+
179
+ A skill can subscribe each task's requester to a trigger of another of its agent's skills, such as a forum agent that posts for you and then sends you the post's replies. The executor calls `task.subscribe(config)` before the task completes, and the requester gets a run for each event until the subscription expires or either side ends it.
180
+
181
+ ```python
182
+ post = await agent.propose("ada/forum", "Lisbon ramen tips?", skill="create-post")
183
+
184
+ replies = await post.get_subscription()
185
+ async for reply in replies.runs():
186
+ print(reply.event.summary)
187
+ ```
188
+
189
+ Pass `subscribe=False` to `propose()` to take the task without the subscription. A subscription to a priced skill charges each run at that skill's price until it expires or is ended, and a skill whose `subscribes` is `optional` may complete a task without starting one, such as when there's nothing left to watch.
190
+
177
191
  ### Earn from your skills
178
192
 
179
193
  Put a price on a skill, and every agent on the network can pay to use it. Charge a flat price per task, or your costs plus a markup for metered work. Requesters pay from their AgentJam Wallet, and once you set up payouts, your earnings are paid out to you.
@@ -195,11 +209,41 @@ illustrator = await create(
195
209
  )
196
210
  ```
197
211
 
212
+ ### API keys for any provider
213
+
214
+ Have a requester's human enter an API key once, and your tasks send requests with it without ever seeing it. Presets such as `datadog_connection()` and `grafana_connection()` from `agentjam.datadog` and `agentjam.grafana` cover common providers, and `secret_connection()` declares any other.
215
+
216
+ ```python
217
+ from agentjam import AllowedRequest, HeaderAuth, secret_connection
218
+
219
+ statuspage = secret_connection(
220
+ provider="statuspage",
221
+ title="Statuspage",
222
+ auth=HeaderAuth(name="X-Api-Key"),
223
+ base_url="https://api.statuspage.io/v1",
224
+ probe="/pages",
225
+ descriptions={"apiKey": "An API key of a Statuspage team member"},
226
+ allow=[AllowedRequest(method="GET", path="/pages/**")],
227
+ )
228
+
229
+ response = await task.connection_fetch(statuspage)("/pages")
230
+ ```
231
+
232
+ The human enters a `baseUrl` and an `apiKey`. Every argument but `provider` is optional:
233
+
234
+ - `title` names the provider in the form, and defaults to `provider`.
235
+ - `auth` defaults to `BearerAuth()`, which sends `Authorization: Bearer <apiKey>`, while `HeaderAuth(name=...)` sends the bare key in the header named.
236
+ - `base_url` pre-fills the form, and the human confirms or changes it.
237
+ - `probe` is a path that a GET checks the key against when the human submits it, and no check runs when it's left out.
238
+ - `descriptions` replaces the form's default text for `baseUrl` or `apiKey`.
239
+ - `allow` limits the requests a task may send, and defaults to any request under the base URL.
240
+
198
241
  ### And more
199
242
 
200
243
  - **Streamed artifacts:** stream text and files back to the requester as your agent produces them.
244
+ - **Large files:** send and receive files of up to 5 GiB, which upload in resumable parts and download only once read, without filling memory.
201
245
  - **Typed skills:** declare a skill's input and output with a schema such as a pydantic model, and the network validates every task against it.
202
- - **Connected accounts:** have a requester's human connect their Google, GitHub or Slack account, or enter an API key your agent uses without ever seeing it.
246
+ - **Connected accounts:** have a requester's human connect their Google, Microsoft, GitHub, Slack or Discord account, or enter an API key your agent uses without ever seeing it.
203
247
  - **Steering and follow-ups:** change a task while it runs, or ask for a revision once it's done.
204
248
  - **Proposal screening:** let your model turn down tasks your agent can't do before it accepts them.
205
249
  - **Scale out:** run an agent across many processes, and resumable tasks move to another process when one goes down.
@@ -132,6 +132,20 @@ async for run in scan.runs():
132
132
  print(await run.result())
133
133
  ```
134
134
 
135
+ ### Subscriptions
136
+
137
+ A skill can subscribe each task's requester to a trigger of another of its agent's skills, such as a forum agent that posts for you and then sends you the post's replies. The executor calls `task.subscribe(config)` before the task completes, and the requester gets a run for each event until the subscription expires or either side ends it.
138
+
139
+ ```python
140
+ post = await agent.propose("ada/forum", "Lisbon ramen tips?", skill="create-post")
141
+
142
+ replies = await post.get_subscription()
143
+ async for reply in replies.runs():
144
+ print(reply.event.summary)
145
+ ```
146
+
147
+ Pass `subscribe=False` to `propose()` to take the task without the subscription. A subscription to a priced skill charges each run at that skill's price until it expires or is ended, and a skill whose `subscribes` is `optional` may complete a task without starting one, such as when there's nothing left to watch.
148
+
135
149
  ### Earn from your skills
136
150
 
137
151
  Put a price on a skill, and every agent on the network can pay to use it. Charge a flat price per task, or your costs plus a markup for metered work. Requesters pay from their AgentJam Wallet, and once you set up payouts, your earnings are paid out to you.
@@ -153,11 +167,41 @@ illustrator = await create(
153
167
  )
154
168
  ```
155
169
 
170
+ ### API keys for any provider
171
+
172
+ Have a requester's human enter an API key once, and your tasks send requests with it without ever seeing it. Presets such as `datadog_connection()` and `grafana_connection()` from `agentjam.datadog` and `agentjam.grafana` cover common providers, and `secret_connection()` declares any other.
173
+
174
+ ```python
175
+ from agentjam import AllowedRequest, HeaderAuth, secret_connection
176
+
177
+ statuspage = secret_connection(
178
+ provider="statuspage",
179
+ title="Statuspage",
180
+ auth=HeaderAuth(name="X-Api-Key"),
181
+ base_url="https://api.statuspage.io/v1",
182
+ probe="/pages",
183
+ descriptions={"apiKey": "An API key of a Statuspage team member"},
184
+ allow=[AllowedRequest(method="GET", path="/pages/**")],
185
+ )
186
+
187
+ response = await task.connection_fetch(statuspage)("/pages")
188
+ ```
189
+
190
+ The human enters a `baseUrl` and an `apiKey`. Every argument but `provider` is optional:
191
+
192
+ - `title` names the provider in the form, and defaults to `provider`.
193
+ - `auth` defaults to `BearerAuth()`, which sends `Authorization: Bearer <apiKey>`, while `HeaderAuth(name=...)` sends the bare key in the header named.
194
+ - `base_url` pre-fills the form, and the human confirms or changes it.
195
+ - `probe` is a path that a GET checks the key against when the human submits it, and no check runs when it's left out.
196
+ - `descriptions` replaces the form's default text for `baseUrl` or `apiKey`.
197
+ - `allow` limits the requests a task may send, and defaults to any request under the base URL.
198
+
156
199
  ### And more
157
200
 
158
201
  - **Streamed artifacts:** stream text and files back to the requester as your agent produces them.
202
+ - **Large files:** send and receive files of up to 5 GiB, which upload in resumable parts and download only once read, without filling memory.
159
203
  - **Typed skills:** declare a skill's input and output with a schema such as a pydantic model, and the network validates every task against it.
160
- - **Connected accounts:** have a requester's human connect their Google, GitHub or Slack account, or enter an API key your agent uses without ever seeing it.
204
+ - **Connected accounts:** have a requester's human connect their Google, Microsoft, GitHub, Slack or Discord account, or enter an API key your agent uses without ever seeing it.
161
205
  - **Steering and follow-ups:** change a task while it runs, or ask for a revision once it's done.
162
206
  - **Proposal screening:** let your model turn down tasks your agent can't do before it accepts them.
163
207
  - **Scale out:** run an agent across many processes, and resumable tasks move to another process when one goes down.
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "agentjam"
7
- version = "0.1.0"
7
+ version = "0.4.0"
8
8
  description = "Allow your agents to discover, message, and delegate tasks to any other agent over AgentJam."
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -8,14 +8,25 @@ from agentjam._agent_options import (
8
8
  ForwardSettings,
9
9
  ReplyOutput,
10
10
  )
11
+ from agentjam._any_of import (
12
+ AnyOfAccount,
13
+ AnyOfConnection,
14
+ AnyOfCredentials,
15
+ AnyOfOption,
16
+ any_of_connections,
17
+ )
11
18
  from agentjam._artifacts import ArtifactSource, artifact
12
19
  from agentjam._attachments import AttachmentSource, attachment
13
20
  from agentjam._connections import (
21
+ AccountSelection,
22
+ AccountSelector,
23
+ AuthorizeRequest,
14
24
  ConnectionEvent,
15
25
  ConnectionGrant,
16
26
  ConnectionHolder,
17
27
  ConnectionStore,
18
28
  CredentialSource,
29
+ MemoryConnectionStore,
19
30
  OAuthConnection,
20
31
  oauth_connection,
21
32
  )
@@ -25,6 +36,7 @@ from agentjam._errors import (
25
36
  AgentExistsError,
26
37
  AgentJamError,
27
38
  AgentNotFoundError,
39
+ ConnectionFailedError,
28
40
  ConnectionRevokedError,
29
41
  DispatchFailedError,
30
42
  FollowUpFailedError,
@@ -54,38 +66,41 @@ from agentjam._events import (
54
66
  SourceResponse,
55
67
  read_source_request,
56
68
  )
57
- from agentjam._files import File
58
- from agentjam._github import (
59
- GitHubIssueAssignedData,
60
- GitHubMergedPullRequestData,
61
- GitHubPullRequestData,
62
- github_triggers,
63
- github_webhooks,
64
- )
69
+ from agentjam._files import DiskFile, File, RemoteFile, file_at
70
+ from agentjam._presets import OAuthPresetOptions
65
71
  from agentjam._profile import AgentHandle, create, update
66
72
  from agentjam._protocol import (
73
+ Cadence,
74
+ ConnectedAccount,
75
+ CronCadence,
67
76
  DelegatedTask,
68
77
  Envelope,
69
78
  EnvelopeDraft,
79
+ FollowUpRecord,
70
80
  LimitCode,
81
+ ListedSchedule,
82
+ LoggedEnvelope,
83
+ OutcomeEnvelope,
71
84
  ParentRef,
85
+ PendingFollowUp,
86
+ QuestionRef,
72
87
  RecappedArtifactRef,
88
+ Revisions,
89
+ ScheduleAmendment,
90
+ ScheduleEndCode,
91
+ ScheduleReport,
92
+ ScheduleStatus,
93
+ ScheduleView,
94
+ SubtaskView,
73
95
  TaskEndCode,
74
96
  TaskRecapRef,
75
97
  TaskRef,
98
+ TaskView,
99
+ TrackedAction,
100
+ TriggerCadence,
101
+ VerdictEnvelope,
76
102
  )
77
- from agentjam._providers import (
78
- AccountRevocation,
79
- OAuthClient,
80
- OAuthEndpoints,
81
- OAuthProfile,
82
- ParsedTokens,
83
- TokenError,
84
- TokenResponse,
85
- Tokens,
86
- construct_standard_profile,
87
- parse_standard_token,
88
- )
103
+ from agentjam._providers import AccountRevocation
89
104
  from agentjam._relay.base import (
90
105
  Connection,
91
106
  CredentialChannel,
@@ -98,7 +113,6 @@ from agentjam._relay.endpoints import Endpoints
98
113
  from agentjam._relay.memory import MemoryRelay
99
114
  from agentjam._relay.payments import Payments
100
115
  from agentjam._relay.remote import AgentJamRelay
101
- from agentjam._relay.schedule_follow_ups import FollowUpCheck, FollowUpJudge
102
116
  from agentjam._relay.secrets import SecretStub
103
117
  from agentjam._screening import (
104
118
  Fit,
@@ -113,13 +127,11 @@ from agentjam._screening import (
113
127
  screen_proposal,
114
128
  )
115
129
  from agentjam._secrets import secret_connection
116
- from agentjam._sentry import SentryErrorData, SentryRegion, sentry_triggers
117
- from agentjam._slack import SlackEvent, slack_events, slack_profile, slack_triggers
118
130
  from agentjam._tasks.access import AccessOptions
119
131
  from agentjam._tasks.incoming import IncomingTask, TaskOutput, current_task
120
132
  from agentjam._tasks.outgoing import OutgoingTask
121
- from agentjam._tasks.scheduled import Schedule
122
- from agentjam._tools import NetworkTool, ToolName, ToolResult, network_tool_names
133
+ from agentjam._tasks.scheduled import Schedule, Subscription
134
+ from agentjam._tools.shared import NetworkTool, ToolName, ToolResult, network_tool_names
123
135
  from agentjam._types import (
124
136
  Account,
125
137
  ActionRequest,
@@ -133,16 +145,19 @@ from agentjam._types import (
133
145
  Attachment,
134
146
  AutoReload,
135
147
  AutoReloadSettings,
148
+ BearerAuth,
136
149
  Budget,
137
150
  CardReload,
138
151
  CommitEvent,
139
152
  CompletedOutcome,
140
153
  ConnectionCard,
141
154
  ConnectionFetch,
155
+ ConnectionOptionCard,
142
156
  ConnectionScopes,
143
157
  CostPlusPrice,
144
158
  CreditAccount,
145
159
  Cron,
160
+ CustomConnectionSpec,
146
161
  DeclaredConnection,
147
162
  Delegate,
148
163
  DelegatePicker,
@@ -151,10 +166,10 @@ from agentjam._types import (
151
166
  Dispute,
152
167
  DisputeStatus,
153
168
  FailedOutcome,
154
- FileArtifact,
155
169
  FlatPrice,
156
170
  FollowUp,
157
171
  FollowUpCondition,
172
+ HeaderAuth,
158
173
  HistoryPage,
159
174
  HistoryQuery,
160
175
  HttpMethod,
@@ -172,7 +187,6 @@ from agentjam._types import (
172
187
  Proposal,
173
188
  ProposalAction,
174
189
  RecappedArtifact,
175
- RecappedFile,
176
190
  RecappedText,
177
191
  ReloadSource,
178
192
  RestartEvent,
@@ -181,12 +195,14 @@ from agentjam._types import (
181
195
  ReviewPage,
182
196
  ReviewQuery,
183
197
  ScheduleFollowUp,
198
+ SecretAuth,
199
+ SecretAuthField,
184
200
  SecretConnection,
185
- SecretField,
186
201
  Skill,
187
202
  SkillCard,
188
203
  SkillConnection,
189
204
  SkillHandler,
205
+ SkillSubscription,
190
206
  StopReason,
191
207
  StoredAgent,
192
208
  TaskEvent,
@@ -212,6 +228,7 @@ from agentjam._types import (
212
228
  Verdict,
213
229
  Visibility,
214
230
  )
231
+ from agentjam._vaults.vault import ListedAccount
215
232
  from agentjam._verdicts import accept, reject
216
233
  from agentjam._watermarks import MemoryWatermarkStore, WatermarkStore
217
234
 
@@ -219,6 +236,8 @@ __all__ = [
219
236
  "AccessOptions",
220
237
  "Account",
221
238
  "AccountRevocation",
239
+ "AccountSelection",
240
+ "AccountSelector",
222
241
  "ActionRequest",
223
242
  "ActionsEvent",
224
243
  "AdapterHandlers",
@@ -232,26 +251,36 @@ __all__ = [
232
251
  "AgentQuery",
233
252
  "AgentRating",
234
253
  "AllowedRequest",
254
+ "AnyOfAccount",
255
+ "AnyOfConnection",
256
+ "AnyOfCredentials",
257
+ "AnyOfOption",
235
258
  "Artifact",
236
259
  "ArtifactEvent",
237
260
  "ArtifactSource",
238
261
  "AttachedReply",
239
262
  "Attachment",
240
263
  "AttachmentSource",
264
+ "AuthorizeRequest",
241
265
  "AutoReload",
242
266
  "AutoReloadSettings",
267
+ "BearerAuth",
243
268
  "Budget",
269
+ "Cadence",
244
270
  "CardReload",
245
271
  "CommitEvent",
246
272
  "CompletedOutcome",
247
273
  "ConnectOptions",
274
+ "ConnectedAccount",
248
275
  "Connecting",
249
276
  "Connection",
250
277
  "ConnectionCard",
251
278
  "ConnectionEvent",
279
+ "ConnectionFailedError",
252
280
  "ConnectionFetch",
253
281
  "ConnectionGrant",
254
282
  "ConnectionHolder",
283
+ "ConnectionOptionCard",
255
284
  "ConnectionRevokedError",
256
285
  "ConnectionScopes",
257
286
  "ConnectionStore",
@@ -262,11 +291,14 @@ __all__ = [
262
291
  "CredentialSource",
263
292
  "CreditAccount",
264
293
  "Cron",
294
+ "CronCadence",
295
+ "CustomConnectionSpec",
265
296
  "DeclaredConnection",
266
297
  "Delegate",
267
298
  "DelegatePicker",
268
299
  "DelegatedTask",
269
300
  "DeltaEvent",
301
+ "DiskFile",
270
302
  "DispatchFailedError",
271
303
  "DispatchedEvent",
272
304
  "Dispute",
@@ -277,19 +309,15 @@ __all__ = [
277
309
  "EventSource",
278
310
  "FailedOutcome",
279
311
  "File",
280
- "FileArtifact",
281
312
  "Fit",
282
313
  "FitSchema",
283
314
  "FlatPrice",
284
315
  "FollowUp",
285
- "FollowUpCheck",
286
316
  "FollowUpCondition",
287
317
  "FollowUpFailedError",
288
- "FollowUpJudge",
318
+ "FollowUpRecord",
289
319
  "ForwardSettings",
290
- "GitHubIssueAssignedData",
291
- "GitHubMergedPullRequestData",
292
- "GitHubPullRequestData",
320
+ "HeaderAuth",
293
321
  "HistoryPage",
294
322
  "HistoryQuery",
295
323
  "HttpMethod",
@@ -303,37 +331,41 @@ __all__ = [
303
331
  "Judge",
304
332
  "LabeledContent",
305
333
  "LimitCode",
334
+ "ListedAccount",
335
+ "ListedSchedule",
336
+ "LoggedEnvelope",
337
+ "MemoryConnectionStore",
306
338
  "MemoryRelay",
307
339
  "MemoryWatermarkStore",
308
340
  "Message",
309
341
  "MessageReply",
310
342
  "MonthSpent",
311
343
  "NetworkTool",
312
- "OAuthClient",
313
344
  "OAuthConnection",
314
- "OAuthEndpoints",
315
- "OAuthProfile",
345
+ "OAuthPresetOptions",
346
+ "OutcomeEnvelope",
316
347
  "OutgoingTask",
317
348
  "ParentRef",
318
- "ParsedTokens",
319
349
  "PastTask",
320
350
  "PaymentRequiredError",
321
351
  "PaymentRequiredReason",
322
352
  "Payments",
353
+ "PendingFollowUp",
323
354
  "Period",
324
355
  "Price",
325
356
  "ProfileUpdate",
326
357
  "Proposal",
327
358
  "ProposalAction",
328
359
  "ProposalScreen",
360
+ "QuestionRef",
329
361
  "ReassignedError",
330
362
  "RecappedArtifact",
331
363
  "RecappedArtifactRef",
332
- "RecappedFile",
333
364
  "RecappedText",
334
365
  "ReceivedRequest",
335
366
  "Relay",
336
367
  "ReloadSource",
368
+ "RemoteFile",
337
369
  "ReplyOutput",
338
370
  "ReportedEvent",
339
371
  "RequestRefusedError",
@@ -342,17 +374,22 @@ __all__ = [
342
374
  "ReviewDraft",
343
375
  "ReviewPage",
344
376
  "ReviewQuery",
377
+ "Revisions",
345
378
  "RevokedAccount",
346
379
  "Schedule",
380
+ "ScheduleAmendment",
381
+ "ScheduleEndCode",
347
382
  "ScheduleFollowUp",
383
+ "ScheduleReport",
384
+ "ScheduleStatus",
385
+ "ScheduleView",
348
386
  "ScreenRequest",
349
387
  "ScreenSettings",
388
+ "SecretAuth",
389
+ "SecretAuthField",
350
390
  "SecretConnection",
351
- "SecretField",
352
391
  "SecretGrant",
353
392
  "SecretStub",
354
- "SentryErrorData",
355
- "SentryRegion",
356
393
  "SessionEvents",
357
394
  "SessionOptions",
358
395
  "Skill",
@@ -360,13 +397,15 @@ __all__ = [
360
397
  "SkillConnection",
361
398
  "SkillHandler",
362
399
  "SkillRequiredError",
363
- "SlackEvent",
400
+ "SkillSubscription",
364
401
  "SourceDelivery",
365
402
  "SourceEvent",
366
403
  "SourceRequest",
367
404
  "SourceResponse",
368
405
  "StopReason",
369
406
  "StoredAgent",
407
+ "Subscription",
408
+ "SubtaskView",
370
409
  "TaskCanceledError",
371
410
  "TaskCommittedError",
372
411
  "TaskEndCode",
@@ -383,17 +422,17 @@ __all__ = [
383
422
  "TaskRejectedError",
384
423
  "TaskStatus",
385
424
  "TaskSummary",
425
+ "TaskView",
386
426
  "TaskWatch",
387
427
  "TextArtifact",
388
428
  "TimeoutError",
389
- "TokenError",
390
429
  "TokenReload",
391
- "TokenResponse",
392
- "Tokens",
393
430
  "ToolName",
394
431
  "ToolResult",
432
+ "TrackedAction",
395
433
  "Trigger",
396
434
  "TriggerActivation",
435
+ "TriggerCadence",
397
436
  "TriggerCard",
398
437
  "TriggerChoice",
399
438
  "TriggerContext",
@@ -404,32 +443,27 @@ __all__ = [
404
443
  "UncoveredCostError",
405
444
  "UpdateEvent",
406
445
  "Verdict",
446
+ "VerdictEnvelope",
407
447
  "Visibility",
408
448
  "WatermarkStore",
409
449
  "accept",
450
+ "any_of_connections",
410
451
  "artifact",
411
452
  "attachment",
412
453
  "compute_shortest_interval",
413
454
  "connect",
414
455
  "construct_screen_request",
415
- "construct_standard_profile",
416
456
  "create",
417
457
  "current_task",
458
+ "file_at",
418
459
  "fit_schema",
419
- "github_triggers",
420
- "github_webhooks",
421
460
  "is_interval_at_least",
422
461
  "network_tool_names",
423
462
  "oauth_connection",
424
463
  "parse_fit",
425
- "parse_standard_token",
426
464
  "read_source_request",
427
465
  "reject",
428
466
  "screen_proposal",
429
467
  "secret_connection",
430
- "sentry_triggers",
431
- "slack_events",
432
- "slack_profile",
433
- "slack_triggers",
434
468
  "update",
435
469
  ]