Compare commits

..

239 Commits

Author SHA1 Message Date
Bentlybro
7cfc0a0c4f update blocks.md 2025-01-13 11:05:15 +00:00
Bently
c869fd0119 Update block docs for: slant3d/slicing.md 2025-01-13 10:24:59 +00:00
Bently
097348e2ba Update block docs for: slant3d/order.md 2025-01-13 10:24:57 +00:00
Bently
2f97724ba5 Update block docs for: slant3d/filament.md 2025-01-13 10:24:54 +00:00
Bently
805a988e21 Update block docs for: slant3d/base.md 2025-01-13 10:24:51 +00:00
Bently
6166e31942 Update block docs for: nvidia/deepfake.md 2025-01-13 10:24:48 +00:00
Bently
fa56b68071 Update block docs for: jina/search.md 2025-01-13 10:24:46 +00:00
Bently
4207dc2bcf Update block docs for: jina/fact_checker.md 2025-01-13 10:24:44 +00:00
Bently
73d032a937 Update block docs for: jina/embeddings.md 2025-01-13 10:24:42 +00:00
Bently
2011322511 Update block docs for: jina/chunking.md 2025-01-13 10:24:40 +00:00
Bently
09e1a4081f Update block docs for: hubspot/engagement.md 2025-01-13 10:24:39 +00:00
Bently
3831aa99e7 Update block docs for: hubspot/contact.md 2025-01-13 10:24:36 +00:00
Bently
f15633833c Update block docs for: hubspot/company.md 2025-01-13 10:24:29 +00:00
Bently
2352c50433 Update block docs for: helpers/http.md 2025-01-13 10:24:27 +00:00
Bently
00add5738f Update block docs for: google/sheets.md 2025-01-13 10:24:24 +00:00
Bently
00b163b0a5 Update block docs for: google/gmail.md 2025-01-13 10:24:23 +00:00
Bently
3c23fd5b1a Update block docs for: github/triggers.md 2025-01-13 10:24:21 +00:00
Bently
7c719d6835 Update block docs for: github/repo.md 2025-01-13 10:24:20 +00:00
Bently
0b0c810861 Update block docs for: github/pull_requests.md 2025-01-13 10:24:18 +00:00
Bently
1c1dda57e8 Update block docs for: github/issues.md 2025-01-13 10:24:17 +00:00
Bently
20e93f32ff Update block docs for: fal/ai_video_generator.md 2025-01-13 10:24:10 +00:00
Bently
8fc00dfe02 Update block docs for: exa/similar.md 2025-01-13 10:24:02 +00:00
Bently
185d103371 Update block docs for: exa/search.md 2025-01-13 10:23:59 +00:00
Bently
dfc024acc3 Update block docs for: exa/contents.md 2025-01-13 10:23:58 +00:00
Bently
791ab5d671 Update block docs for: compass/triggers.md 2025-01-13 10:23:57 +00:00
Bently
6dc88e3f21 Update block docs for: youtube.md 2025-01-13 10:23:55 +00:00
Bently
d3f5718cac Update block docs for: time_blocks.md 2025-01-13 10:23:51 +00:00
Bently
aef7b5db7d Update block docs for: text.md 2025-01-13 10:23:50 +00:00
Bently
df071ca5a5 Update block docs for: talking_head.md 2025-01-13 10:23:49 +00:00
Bently
2b192a0d20 Update block docs for: search.md 2025-01-13 10:23:48 +00:00
Bently
9572415b74 Update block docs for: sampling.md 2025-01-13 10:23:46 +00:00
Bently
ad1bf2f27f Update block docs for: rss.md 2025-01-13 10:23:45 +00:00
Bently
67991f7c6d Update block docs for: replicate_flux_advanced.md 2025-01-13 10:23:44 +00:00
Bently
c2aad7d2d9 Update block docs for: reddit.md 2025-01-13 10:23:43 +00:00
Bently
504a0a1250 Update block docs for: pinecone.md 2025-01-13 10:23:42 +00:00
Bently
69ae276bb8 Update block docs for: medium.md 2025-01-13 10:23:40 +00:00
Bently
66f2e2a77b Update block docs for: maths.md 2025-01-13 10:23:39 +00:00
Bently
c463d1022b Update block docs for: llm.md 2025-01-13 10:23:38 +00:00
Bently
88dc0bbe0b Update block docs for: iteration.md 2025-01-13 10:23:37 +00:00
Bently
5ea176e457 Update block docs for: ideogram.md 2025-01-13 10:23:35 +00:00
Bently
134163aa88 Update block docs for: http.md 2025-01-13 10:23:34 +00:00
Bently
ff494bee93 Update block docs for: google_maps.md 2025-01-13 10:23:33 +00:00
Bently
f02e2fd8bb Update block docs for: discord.md 2025-01-13 10:23:32 +00:00
Bently
2012213af5 Update block docs for: csv.md 2025-01-13 10:23:31 +00:00
Bently
94f4702f6b Update block docs for: code_executor.md 2025-01-13 10:23:29 +00:00
Bently
abf05d6407 Update block docs for: branching.md 2025-01-13 10:23:28 +00:00
Bently
58a8b0ddeb Update block docs for: basic.md 2025-01-13 10:23:27 +00:00
Bently
6a4a8f5a46 Update block docs for: ai_music_generator.md 2025-01-13 10:23:26 +00:00
Bentlybro
240ad756aa rm files 2025-01-13 10:10:59 +00:00
Bently
6c62a6a558 Update block docs for: slant3d/base.md 2025-01-13 10:06:26 +00:00
Bently
d36ac1471c Update block docs for: nvidia/deepfake.md 2025-01-13 10:06:25 +00:00
Bently
a2b34739c9 Update block docs for: jina/search.md 2025-01-13 10:06:24 +00:00
Bently
7d4775e3b7 Update block docs for: jina/fact_checker.md 2025-01-13 10:06:23 +00:00
Bently
d133b474a8 Update block docs for: jina/embeddings.md 2025-01-13 10:06:21 +00:00
Bently
14ef675784 Update block docs for: jina/chunking.md 2025-01-13 10:06:19 +00:00
Bently
2c9baa6966 Update block docs for: hubspot/engagement.md 2025-01-13 10:06:18 +00:00
Bently
43ca817a85 Update block docs for: hubspot/contact.md 2025-01-13 10:06:17 +00:00
Bently
5cf97dd296 Update block docs for: hubspot/company.md 2025-01-13 10:06:15 +00:00
Bently
c577758b4a Update block docs for: helpers/http.md 2025-01-13 10:06:14 +00:00
Bently
ed9d0b85b4 Update block docs for: google/sheets.md 2025-01-13 10:06:13 +00:00
Bently
cfb92dd4f9 Update block docs for: google/gmail.md 2025-01-13 10:06:12 +00:00
Bently
b892c2b272 Update block docs for: github/triggers.md 2025-01-13 10:06:10 +00:00
Bently
d4679bbae8 Update block docs for: github/repo.md 2025-01-13 10:06:09 +00:00
Bently
34954d8df3 Update block docs for: github/pull_requests.md 2025-01-13 10:06:08 +00:00
Bently
780c893c91 Update block docs for: github/issues.md 2025-01-13 10:06:07 +00:00
Bently
a113fdb134 Update block docs for: fal/ai_video_generator.md 2025-01-13 10:06:05 +00:00
Bently
b73cb9fc98 Update block docs for: exa/similar.md 2025-01-13 10:06:04 +00:00
Bently
223e3de073 Update block docs for: exa/search.md 2025-01-13 10:06:03 +00:00
Bently
abfbdd0934 Update block docs for: exa/helpers.md 2025-01-13 10:06:01 +00:00
Bently
d8e38b505c Update block docs for: exa/contents.md 2025-01-13 10:06:00 +00:00
Bently
4ebc34da62 Update block docs for: compass/triggers.md 2025-01-13 10:05:59 +00:00
Bently
056c539bde Update block docs for: youtube.md 2025-01-13 10:05:57 +00:00
Bently
7e2e8843c0 Update block docs for: time_blocks.md 2025-01-13 10:05:55 +00:00
Bently
a8cde7c3c5 Update block docs for: text_to_speech_block.md 2025-01-13 10:05:53 +00:00
Bently
64e59c5324 Update block docs for: text.md 2025-01-13 10:05:52 +00:00
Bently
0da1461a79 Update block docs for: talking_head.md 2025-01-13 10:05:51 +00:00
Bently
192ff65bbf Update block docs for: search.md 2025-01-13 10:05:50 +00:00
Bently
388003ff2d Update block docs for: sampling.md 2025-01-13 10:05:49 +00:00
Bently
1081b15c91 Update block docs for: rss.md 2025-01-13 10:05:48 +00:00
Bently
0e17f5757b Update block docs for: replicate_flux_advanced.md 2025-01-13 10:05:47 +00:00
Bently
80de45c610 Update block docs for: reddit.md 2025-01-13 10:05:45 +00:00
Bently
bd237c5b52 Update block docs for: pinecone.md 2025-01-13 10:05:44 +00:00
Bently
6f8f7ac716 Update block docs for: medium.md 2025-01-13 10:05:43 +00:00
Bently
cca71f99b9 Update block docs for: maths.md 2025-01-13 10:05:42 +00:00
Bently
e54a999ff4 Update block docs for: llm.md 2025-01-13 10:05:40 +00:00
Bently
36360b3ade Update block docs for: iteration.md 2025-01-13 10:05:39 +00:00
Bently
a1607a3b21 Update block docs for: ideogram.md 2025-01-13 10:05:38 +00:00
Bently
8804417c72 Update block docs for: http.md 2025-01-13 10:05:37 +00:00
Bently
6aeec36a3c Update block docs for: google_maps.md 2025-01-13 10:05:36 +00:00
Bently
6d09a46652 Update block docs for: email_block.md 2025-01-13 10:05:34 +00:00
Bently
be4b2b1ba1 Update block docs for: discord.md 2025-01-13 10:05:33 +00:00
Bently
d2d6346f59 Update block docs for: decoder_block.md 2025-01-13 10:05:32 +00:00
Bently
d83984bf38 Update block docs for: csv.md 2025-01-13 10:05:31 +00:00
Bently
146bf8e692 Update block docs for: count_words_and_char_block.md 2025-01-13 10:05:29 +00:00
Bently
015e7d2b10 Update block docs for: code_extraction_block.md 2025-01-13 10:05:28 +00:00
Bently
dac7e4aa57 Update block docs for: code_executor.md 2025-01-13 10:05:27 +00:00
Bently
1764cf9837 Update block docs for: branching.md 2025-01-13 10:05:26 +00:00
Bently
fbd1e26524 Update block docs for: 45e78db5-03e9-447f-9395-308d712f5f08.md 2025-01-13 10:05:25 +00:00
Bently
fb10bacfda Update block docs for: basic.md 2025-01-13 10:05:23 +00:00
Bently
f6a12828f0 Update block docs for: ai_shortform_video_block.md 2025-01-13 10:05:22 +00:00
Bently
fba186e5e1 Update block docs for: ai_music_generator.md 2025-01-13 10:05:21 +00:00
Bently
91b88b840e Update block docs for: ai_image_generator_block.md 2025-01-13 10:05:19 +00:00
Bentlybro
f6b00f07ce rm 2025-01-12 12:42:45 +00:00
Bently
a4bd7c9b58 Update block docs for: google_maps.md 2025-01-12 12:41:05 +00:00
Bently
bc643492e8 Update block docs for: email_block.md 2025-01-12 12:41:04 +00:00
Bently
ba64e05803 Update block docs for: discord.md 2025-01-12 12:41:03 +00:00
Bently
01c0284fd2 Update block docs for: text_decoder.md 2025-01-12 12:41:02 +00:00
Bently
a08a7bd1e1 Update block docs for: read_csv.md 2025-01-12 12:41:00 +00:00
Bently
25bab0eaa5 Update block docs for: word_character_count_block.md 2025-01-12 12:40:59 +00:00
Bently
bb646e865e Update block docs for: code_extraction_block.md 2025-01-12 12:40:57 +00:00
Bently
dc777ce89a Update block docs for: code_executor.md 2025-01-12 12:40:56 +00:00
Bently
a3955385ec Update block docs for: condition_block.md 2025-01-12 12:40:55 +00:00
Bently
88b03563f5 Update block docs for: block_installation.md 2025-01-12 12:40:54 +00:00
Bently
f57f6fc1c0 Update block docs for: basic.md 2025-01-12 12:40:53 +00:00
Bently
2f7ad767c2 Update block docs for: ai_shortform_video_block.md 2025-01-12 12:40:52 +00:00
Bently
e3e4bc8c96 Update block docs for: ai_music_generator.md 2025-01-12 12:40:51 +00:00
Bently
d3cb3c73d1 Update block docs for: ai_image_generator_block.md 2025-01-12 12:40:50 +00:00
Bently
cc75eea402 Update block docs for: agent.md 2025-01-12 12:40:49 +00:00
Bentlybro
40961cb9f1 rm 2025-01-12 12:23:46 +00:00
Bently
13be1a03b7 Update block docs for: youtube.md 2025-01-12 11:53:52 +00:00
Bently
757381c889 Update block docs for: time_blocks.md 2025-01-12 11:53:50 +00:00
Bently
154f0a2b83 Update block docs for: unreal_text_to_speech.md 2025-01-12 11:53:49 +00:00
Bently
bf91cc507f Update block docs for: text.md 2025-01-12 11:53:48 +00:00
Bently
940fef027a Update block docs for: talking_avatar_video.md 2025-01-12 11:53:47 +00:00
Bently
d1b51ad09b Update block docs for: search.md 2025-01-12 11:53:46 +00:00
Bently
4cb0bbe67e Update block docs for: sampling.md 2025-01-12 11:53:45 +00:00
Bently
ebbb7b07cf Update block docs for: rss.md 2025-01-12 11:53:44 +00:00
Bently
db3d86bce6 Update block docs for: replicate_flux_advanced.md 2025-01-12 11:53:43 +00:00
Bently
f1f6f87b25 Update block docs for: reddit.md 2025-01-12 11:53:42 +00:00
Bently
0d5ab20f14 Update block docs for: pinecone.md 2025-01-12 11:53:41 +00:00
Bently
4017c5be70 Update block docs for: medium.md 2025-01-12 11:53:40 +00:00
Bently
b7cc83854a Update block docs for: maths.md 2025-01-12 11:53:39 +00:00
Bently
0599083e0e Update block docs for: llm.md 2025-01-12 11:53:38 +00:00
Bently
9e36144b40 Update block docs for: step_through_items.md 2025-01-12 11:53:36 +00:00
Bently
ce3c86cb1d Update block docs for: ideogram.md 2025-01-12 11:53:35 +00:00
Bently
e33263c9fc Update block docs for: http.md 2025-01-12 11:53:34 +00:00
Bently
04f0f64fbb Update block docs for: google_maps.md 2025-01-12 11:53:33 +00:00
Bently
755a7b620d Update block docs for: email_block.md 2025-01-12 11:53:32 +00:00
Bently
d54c9d4e7e Update block docs for: discord.md 2025-01-12 11:53:31 +00:00
Bently
852af17294 Update block docs for: text_decoder.md 2025-01-12 11:53:29 +00:00
Bently
8889d029d4 Update block docs for: read_csv.md 2025-01-12 11:53:28 +00:00
Bently
e93c7dc89e Update block docs for: word_character_count_block.md 2025-01-12 11:53:27 +00:00
Bently
7791281b90 Update block docs for: code_extraction_block.md 2025-01-12 11:53:26 +00:00
Bently
cc9ff9e2bb Update block docs for: code_executor.md 2025-01-12 11:53:25 +00:00
Bently
6b82b9e73b Update block docs for: condition_block.md 2025-01-12 11:53:24 +00:00
Bently
61bfbeeb01 Update block docs for: block_installation.md 2025-01-12 11:53:23 +00:00
Bently
9518ff4f02 Update block docs for: basic.md 2025-01-12 11:53:21 +00:00
Bently
49490e899e Update block docs for: ai_shortform_video_block.md 2025-01-12 11:53:20 +00:00
Bently
d19866bdf5 Update block docs for: ai_music_generator.md 2025-01-12 11:53:19 +00:00
Bently
b6c946ac4f Update block docs for: ai_image_generator_block.md 2025-01-12 11:53:18 +00:00
Bently
d6f5dcd717 Update block docs for: agent.md 2025-01-12 11:53:17 +00:00
Bently
99779f52b2 Update block docs for:
blocks_init.md
2025-01-12 11:53:15 +00:00
Bently
d4e5a48163 Update block docs for: code_execution_block.md 2025-01-12 11:07:29 +00:00
Bentlybro
a40bb6f6d6 rm file 2025-01-12 11:07:08 +00:00
Bently
a393f8bf9f Update block docs for: code_executor.md 2025-01-12 11:05:08 +00:00
Bentlybro
d56931f4cb rm files 2025-01-10 13:30:37 +00:00
Bently
03691329be Update block docs for: text_to_speech_block.md 2025-01-10 12:55:02 +00:00
Bently
9813012c12 Update block docs for: text.md 2025-01-10 12:55:01 +00:00
Bently
8f74e58ecc Update block docs for: talking_head.md 2025-01-10 12:55:00 +00:00
Bently
b1f5413dab Update block docs for: search.md 2025-01-10 12:54:59 +00:00
Bently
cc41b2f4ab Update block docs for: sampling.md 2025-01-10 12:54:58 +00:00
Bently
f45b4cc243 Update block docs for: rss.md 2025-01-10 12:54:56 +00:00
Bently
ed2e5e813d Update block docs for: replicate_flux_advanced.md 2025-01-10 12:54:55 +00:00
Bently
ab33d079e2 Update block docs for: reddit.md 2025-01-10 12:54:54 +00:00
Bently
a24c869a44 Update block docs for: pinecone.md 2025-01-10 12:54:52 +00:00
Bently
d6b1cf64ed Update block docs for: medium.md 2025-01-10 12:54:51 +00:00
Bently
e9982ba9bd Update block docs for: maths.md 2025-01-10 12:54:50 +00:00
Bently
58c1e050f2 Update block docs for: llm.md 2025-01-10 12:54:49 +00:00
Bently
f125bb658c Update block docs for: iteration.md 2025-01-10 12:54:48 +00:00
Bently
ba9c91d0b7 Update block docs for: ideogram.md 2025-01-10 12:54:46 +00:00
Bently
e6254f0e83 Update block docs for: http.md 2025-01-10 12:54:45 +00:00
Bently
3c8cf8bd1e Update block docs for: google_maps.md 2025-01-10 12:54:44 +00:00
Bently
79f3888d61 Update block docs for: email_block.md 2025-01-10 12:54:43 +00:00
Bently
ace5d34cc6 Update block docs for: discord.md 2025-01-10 12:54:42 +00:00
Bently
100ab90f44 Update block docs for: decoder_block.md 2025-01-10 12:54:40 +00:00
Bently
a0ad796432 Update block docs for: csv.md 2025-01-10 12:54:39 +00:00
Bently
0cc625ca15 Update block docs for: count_words_and_char_block.md 2025-01-10 12:54:38 +00:00
Bently
a43b329132 Update block docs for: code_extraction_block.md 2025-01-10 12:54:37 +00:00
Bently
beeadd16f1 Update block docs for: code_executor.md 2025-01-10 12:54:36 +00:00
Bently
b2d5b9efb4 Update block docs for: branching.md 2025-01-10 12:54:35 +00:00
Bently
c77f32b23f Update block docs for: block.md 2025-01-10 12:54:33 +00:00
Bently
b92223cf7b Update block docs for: basic.md 2025-01-10 12:54:32 +00:00
Bently
0d47b0ce38 Update block docs for: ai_shortform_video_block.md 2025-01-10 12:54:31 +00:00
Bently
c0409ba0b1 Update block docs for: ai_music_generator.md 2025-01-10 12:54:29 +00:00
Bently
41c8504bdc Update block docs for: ai_image_generator_block.md 2025-01-10 12:54:28 +00:00
Bently
c4d38e4ff3 Update block docs for: agent.md 2025-01-10 12:54:27 +00:00
Bently
b10a275676 Update block docs for: __init__.md 2025-01-10 12:54:26 +00:00
Bentlybro
8baabb0379 remove files 2025-01-10 12:47:54 +00:00
Bently
8bf977958a Update block docs for: pinecone.md 2025-01-10 11:10:33 +00:00
Bently
c73da1f79c Update block docs for: count_words_and_char_block.md 2025-01-10 11:10:29 +00:00
Bently
3c3c1ce90a Update block docs for: code_extraction_block.md 2025-01-10 11:10:27 +00:00
Bently
e9a198f5da Update block docs for: code_executor.md 2025-01-10 11:10:26 +00:00
Bently
706bf0578e Update block docs for: block.md 2025-01-10 11:10:25 +00:00
Bently
610b613367 Update block docs for: ai_music_generator.md 2025-01-10 11:10:22 +00:00
Bently
5f4a411b15 Update block docs for: ai_image_generator_block.md 2025-01-10 11:10:21 +00:00
Bently
7b004f07e7 Update block docs for: agent.md 2025-01-10 11:10:20 +00:00
Bently
c16d2f94a6 Update block docs for: __init__.md 2025-01-10 11:10:19 +00:00
Zamil Majdy
9d1bc25ffa hotfix(backend): Increase statement timeout for the double brace migration (#9245)
### Changes 🏗️


https://github.com/Significant-Gravitas/AutoGPT/actions/runs/12696734339/job/35391431786

### Checklist 📋

#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [ ] ...

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>
2025-01-09 21:59:22 +00:00
Zamil Majdy
3a3ee994c2 hotfix(backend): Increase statement timeout for the double brace migration (#9244)
### Changes 🏗️


https://github.com/Significant-Gravitas/AutoGPT/actions/runs/12696734339/job/35391431786

### Checklist 📋

#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [ ] ...

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>
2025-01-09 19:44:37 +00:00
Aarushi
0d44f5be13 feat(backend/blocks/nvidia): Provide Nvidia by default (#9235)
We want to allow users to use Nvidia without their own keys

### Changes 🏗️

Added nvidia api key to credentials store.

### Checklist 📋

#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [ ] ...

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

#### For configuration changes:
- [x] `.env.example` is updated or already compatible with my changes

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>
2025-01-09 18:12:05 +00:00
Zamil Majdy
1670579a61 fix(block): Remove Python.format & Jinja templating format backward compatibility (#9229)
Python format uses `{Variable}` as the variable placeholder, while Jinja
uses `{{Variable}}` as its default.
Jinja is used as the main templating engine on the system, but the
Python format version is still maintained for backward compatibility.

However, the backward compatibility support can cause a side effect
while passing JSON string value into the block that uses it:
https://github.com/Significant-Gravitas/AutoGPT/issues/9194

### Changes 🏗️

* Use `{{Variable}}` place holder format and removed `{Variable}`
support in these blocks:
 - '363ae599-353e-4804-937e-b2ee3cef3da4', -- AgentOutputBlock
 - 'db7d8f02-2f44-4c55-ab7a-eae0941f0c30', -- FillTextTemplateBlock
 - '1f292d4a-41a4-4977-9684-7c8d560b9f91', -- AITextGeneratorBlock
- 'ed55ac19-356e-4243-a6cb-bc599e9b716f' --
AIStructuredResponseGeneratorBlock
* Add Jinja templating support on `AITextGeneratorBlock` &
`AIStructuredResponseGeneratorBlock`
* Migrated the existing database content to prevent breaking changes.

### Checklist 📋

#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [ ] ...

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>
2025-01-09 16:29:16 +00:00
Bently
a1889e6212 docs(Ollama): Update Ollama docs (#9234)
The Ollama docs where very out of date and needed updating so I have
updated them and added some screenshots so its easier to follow.

I have also added a new Ollama model to the platform, "llama3.2" as that
is what i based the tutorial off and its name is easy to find in the
list of models

I also added a new folder in the "imgs" dir to store the Ollama related
photo just to keep things tidy
2025-01-09 15:19:37 +00:00
Abhimanyu Yadav
9c702516fd feat(platform): fix carousel on store page (#9230)
- resolves #8973 

Adding smooth scrolling and solving some weird interaction on carousal

### Changes

- Update `CarouselPrevious`, `CarouselPrevious` and add
`CarouselIndicator` in `carousel.tsx`
- Add `CarouselPrevious`, `CarouselPrevious` and `CarouselIndicator`
support in `FeaturedSection.tsx`

### Demo 


https://github.com/user-attachments/assets/ba9a22fa-ddf2-469f-ba8a-aee1a7fc5f78
2025-01-09 13:48:53 +00:00
Aarushi
32c908ae13 fix(backend): Add default credentials for Fal, Exa, E2B (#9233)
We want to provide certain providers by default on our platform. These
three were not added previously, so fixing that.

### Changes 🏗️

If api keys for Fal Exa or E2B exist in environment variables, load them
by default as credentials that are usable by our users.

### Checklist 📋

#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [ ] ...

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

#### For configuration changes:
- [x] `.env.example` is updated or already compatible with my changes

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>
2025-01-09 13:47:54 +00:00
Abhimanyu Yadav
b4a0100c22 feat(platform): Add Twitter integration (#8754)
- Resolves #8326  

Create a Twitter integration with some small frontend changes.

### Changes
1. Add Twitter OAuth 2.0 with PKCE support for authentication.
2. Add a way to multi-select from a list of enums by creating a
multi-select on the frontend.
3. Add blocks for Twitter integration.
4. `_types.py` for repetitive enums and input types.
5. `_builders.py` for creating parameters without repeating the same
logic.
6. `_serializer.py` to serialize the Tweepy enums into dictionaries so
they can travel easily from Pyro5.
7. `_mappers.py` to map the frontend values to the correct request
values.

> I have added a new multi-select feature because my list contains many
items, and selecting all of them makes the block cluttered. This new
block displays only the first two items and then show something like "2
more" . It works only for list of enums.


### Blocks

Block Name | What It Does | Error Reason | Manual Testing
-- | -- | -- | --
`TwitterBookmarkTweetBlock` | Bookmark a tweet on Twitter | No error | 
`TwitterGetBookmarkedTweetsBlock` | Get all your bookmarked tweets from
Twitter | No error | 
`TwitterRemoveBookmarkTweetBlock` | Remove a bookmark for a tweet on
Twitter | No error | 
`TwitterHideReplyBlock` | Hides a reply of one of your tweets | No error
| 
`TwitterUnhideReplyBlock` | Unhides a reply to a tweet | No error | 
`TwitterLikeTweetBlock` | Likes a tweet | No error | 
`TwitterGetLikingUsersBlock` | Gets information about users who liked
one of your tweets | No error | 
`TwitterGetLikedTweetsBlock` | Gets information about tweets liked by
you | No error | 
`TwitterUnlikeTweetBlock` | Unlikes a tweet that was previously liked |
No error | 
`TwitterPostTweetBlock` | Create a tweet on Twitter with the option to
include one additional element such as media, quote, or deep link. | No
error | 
`TwitterDeleteTweetBlock` | Deletes a tweet on Twitter using Twitter ID
| No error | 
`TwitterSearchRecentTweetsBlock` | Searches all public Tweets in Twitter
history | No error | 
`TwitterGetQuoteTweetsBlock` | Gets quote tweets for a specified tweet
ID | No error | 
`TwitterRetweetBlock` | Retweets a tweet on Twitter | No error | 
`TwitterRemoveRetweetBlock` | Removes a retweet on Twitter | No error |

`TwitterGetRetweetersBlock` | Gets information about who has retweeted a
tweet | No error | 
`TwitterGetUserMentionsBlock` | Returns Tweets where a single user is
mentioned, just put that user ID | No error | 
`TwitterGetHomeTimelineBlock` | Returns a collection of the most recent
Tweets and Retweets posted by you and users you follow | No error | 
`TwitterGetUserTweetsBlock` | Returns Tweets composed by a single user,
specified by the requested user ID | No error | 
`TwitterGetTweetBlock` | Returns information about a single Tweet
specified by the requested ID | No error | 
`TwitterGetTweetsBlock` | Returns information about multiple Tweets
specified by the requested IDs | No error | 
`TwitterUnblockUserBlock` | Unblock a specific user on Twitter | No
error | 
`TwitterGetBlockedUsersBlock` | Get a list of users who are blocked by
the authenticating user | No error | 
`TwitterBlockUserBlock` | Block a specific user on Twitter | No error |

`TwitterUnfollowUserBlock` | Allows a user to unfollow another user
specified by target user ID | No error | 
`TwitterFollowUserBlock` | Allows a user to follow another user
specified by target user ID | No error | 
`TwitterGetFollowersBlock` | Retrieves a list of followers for a
specified Twitter user ID | Need Enterprise level access | 
`TwitterGetFollowingBlock` | Retrieves a list of users that a specified
Twitter user ID is following | Need Enterprise level access | 
`TwitterUnmuteUserBlock` | Allows a user to unmute another user
specified by target user ID | No error | 
`TwitterGetMutedUsersBlock` | Returns a list of users who are muted by
the authenticating user | No error | 
`TwitterMuteUserBlock` | Allows a user to mute another user specified by
target user ID | No error | 
`TwitterGetUserBlock` | Gets information about a single Twitter user
specified by ID or username | No error | 
`TwitterGetUsersBlock` | Gets information about multiple Twitter users
specified by IDs or usernames | No error | 
`TwitterSearchSpacesBlock` | Returns live or scheduled Spaces matching
specified search terms [for a week only] | No error | 
`TwitterGetSpacesBlock` | Gets information about multiple Twitter Spaces
specified by Space IDs or creator user IDs | No error | 
`TwitterGetSpaceByIdBlock` | Gets information about a single Twitter
Space specified by Space ID | No error | 
`TwitterGetSpaceBuyersBlock` | Gets list of users who purchased a ticket
to the requested Space | I do not have a monetized account for this | 
`TwitterGetSpaceTweetsBlock` | Gets list of Tweets shared in the
requested Space | No error | 
`TwitterUnfollowListBlock` | Unfollows a Twitter list for the
authenticated user | No error | 
`TwitterFollowListBlock` | Follows a Twitter list for the authenticated
user | No error | 
`TwitterListGetFollowersBlock` | Gets followers of a specified Twitter
list | Enterprise level access | 
`TwitterGetFollowedListsBlock` | Gets lists followed by a specified
Twitter user | Enterprise level access | 
`TwitterGetListBlock` | Gets information about a Twitter List specified
by ID | No error | 
`TwitterGetOwnedListsBlock` | Gets all Lists owned by the specified user
| No error | 
`TwitterRemoveListMemberBlock` | Removes a member from a Twitter List
that the authenticated user owns | No error | 
`TwitterAddListMemberBlock` | Adds a member to a Twitter List that the
authenticated user owns | No error | 
`TwitterGetListMembersBlock` | Gets the members of a specified Twitter
List | No error | 
`TwitterGetListMembershipsBlock` | Gets all Lists that a specified user
is a member of | No error | 
`TwitterGetListTweetsBlock` | Gets tweets from a specified Twitter list
| No error | 
`TwitterDeleteListBlock` | Deletes a Twitter List owned by the
authenticated user | No error | 
`TwitterUpdateListBlock` | Updates a Twitter List owned by the
authenticated user | No error | 
`TwitterCreateListBlock` | Creates a Twitter List owned by the
authenticated user | No error | 
`TwitterUnpinListBlock` | Enables the authenticated user to unpin a
List. | No error | 
`TwitterPinListBlock` | Enables the authenticated user to pin a List. |
No error | 
`TwitterGetPinnedListsBlock` | Returns the Lists pinned by the
authenticated user. | No error | 
`TwitterGetDMEventsBlock` | Gets a list of Direct Message events for the
authenticated user | Need Enterprise level access | 
`TwitterSendDirectMessageBlock` | Sends a direct message to a Twitter
user | Need Enterprise level access | 
`TwitterCreateDMConversationBlock` | Creates a new group direct message
| Need Enterprise level access | 

### Need to add more stuff
1. A normal input to select date and time.
2. Some more enterprise-level blocks, especially webhook triggers.

Supported triggers 


Event Name | Description
-- | --
Posts (by user) | User creates a new post.
Post deletes (by user) | User deletes an existing post.
@mentions (of user) | User is mentioned in a post.
Replies (to or from user) | User replies to a post or receives a reply
from another user.
Retweets (by user or of user) | User retweets a post or someone retweets
the user's post.
Quote Tweets (by user or of user) | User quote tweets a post or someone
quote tweets the user's post.
Retweets of Quoted Tweets (by user or of user) | Retweets of quote
tweets by the user or of the user.
Likes (by user or of user) | User likes a post or someone likes the
user's post.
Follows (by user or of user) | User follows another user or another user
follows the user.
Unfollows (by user) | User unfollows another user.
Blocks (by user) | User blocks another user.
Unblocks (by user) | User unblocks a previously blocked user.
Mutes (by user) | User mutes another user.
Unmutes (by user) | User unmutes a previously muted user.
Direct Messages sent (by user) | User sends direct messages to other
users.
Direct Messages received (by user) | User receives direct messages from
other users.
Typing indicators (to user) | Indicators showing when someone is typing
a message to the user.
Read receipts (to user) | Indicators showing when the user has read a
message.
Subscription revokes (by user) | User revokes a subscription to a
service or content.

---------

Co-authored-by: Nicholas Tindle <nicholas.tindle@agpt.co>
Co-authored-by: Nicholas Tindle <nicktindle@outlook.com>
2025-01-08 19:47:00 +00:00
Bently
e4d8502729 fix(blocks): improve handling of plain text in send web request block (#9219)
### Changes 🏗️
This is to improve how we deal with plain text in the send web request
block.

-	Plain text stays as plain text (regardless of JSON toggle)
-	Valid JSON with JSON toggle enabled sends as JSON
-	JSON-like data with JSON toggle disabled sends as form data
2025-01-08 12:18:42 +00:00
Abhimanyu Yadav
43a79d063f feat(platform) : Add api key generation frontend (#9212)
Allow users to create API keys for the AutoGPT platform. The backend is
already set up, and here I’ve added the frontend for it.

### Changes
1. Fix the `response-model` of the API keys endpoints.  
2. Add a new page `/store/api_keys`.  
3. Add an `APIKeySection` component to create, delete, and view all your
API keys.

<img width="1512" alt="Screenshot 2025-01-07 at 3 59 25 PM"
src="https://github.com/user-attachments/assets/ea4e9d35-eb92-4e10-a4fb-1fc51dfe11bb"
/>
2025-01-08 11:13:08 +00:00
Abhimanyu Yadav
7ec9830b02 fix(platform): Add custom fonts and update layout styles (#9195)
- resolve #9187 
### Changes 🏗️

Add support for `Inter`, `Poppins`, `Geist-Mono`, `Geist-Neue`, and
`Neue` in `layout.tsx` and `tailwind.config.ts`.

<img width="844" alt="Screenshot 2025-01-06 at 10 59 35 AM"
src="https://github.com/user-attachments/assets/5e93e8a3-cda1-4d01-ba5d-7027a8c1dea7"
/>

---------

Co-authored-by: Aarushi <50577581+aarushik93@users.noreply.github.com>
2025-01-08 09:44:35 +00:00
Aarushi
b558ccae0b feat(blocks/nvidia): Add Nvidia deepfake detection block (#9213)
Adding a block to allow users to detect deepfakes in their workflows. 
This block takes in an image as input and returns the probability of it
being a deepfake as well as the bounding boxes around the image.

### Changes 🏗️

- Added NvidiaDeepfakeDetectBlock
- Added the ability to upload images on the frontend
- Added the ability to render base64 encoded images on the frontend
<img width="1001" alt="Screenshot 2025-01-07 at 2 16 42 PM"
src="https://github.com/user-attachments/assets/c3d090f3-3981-4235-a66b-f8e2a3920a4d"
/>

### Checklist 📋

#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [ ] ...

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>

---------

Co-authored-by: Nicholas Tindle <nicholas.tindle@agpt.co>
2025-01-07 22:41:28 +00:00
Nicholas Tindle
4115f65223 Fix Provider name enum being used instead of value (#9216)
<!-- Clearly explain the need for these changes: -->

Webhooks are broken

### Changes 🏗️
Swaps the way we fill webhooks into strings
<!-- Concisely describe all of the changes made in this pull request:
-->

### Checklist 📋

#### For code changes:
- [x] I have clearly listed my changes in the PR description
- [x] I have made a test plan
- [x] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [x] Manually test creating a webhook with Github and Compass
2025-01-07 20:18:43 +00:00
dependabot[bot]
7defba8d24 chore(frontend/deps-dev): bump the development-dependencies group in /autogpt_platform/frontend with 4 updates (#9207)
Bumps the development-dependencies group in /autogpt_platform/frontend
with 4 updates:
[@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node),
[chromatic](https://github.com/chromaui/chromatic-cli),
[concurrently](https://github.com/open-cli-tools/concurrently) and
[eslint-plugin-storybook](https://github.com/storybookjs/eslint-plugin-storybook).

Updates `@types/node` from 22.10.2 to 22.10.5
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node">compare
view</a></li>
</ul>
</details>
<br />

Updates `chromatic` from 11.20.2 to 11.22.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/chromaui/chromatic-cli/releases">chromatic's
releases</a>.</em></p>
<blockquote>
<h2>v11.22.0</h2>
<h4>🚀 Enhancement</h4>
<ul>
<li>Bail on preview file changes <a
href="https://redirect.github.com/chromaui/chromatic-cli/pull/1133">#1133</a>
(<a href="https://github.com/codykaup"><code>@​codykaup</code></a>)</li>
</ul>
<h4>Authors: 1</h4>
<ul>
<li>Cody Kaup (<a
href="https://github.com/codykaup"><code>@​codykaup</code></a>)</li>
</ul>
<h2>v11.21.0</h2>
<h4>🚀 Enhancement</h4>
<ul>
<li>Set <code>storybookUrl</code> action output on rebuild early exit <a
href="https://redirect.github.com/chromaui/chromatic-cli/pull/1134">#1134</a>
(<a href="https://github.com/jmhobbs"><code>@​jmhobbs</code></a>)</li>
<li>Upload coverage reports to codecov <a
href="https://redirect.github.com/chromaui/chromatic-cli/pull/1132">#1132</a>
(<a
href="https://github.com/paulelliott"><code>@​paulelliott</code></a>)</li>
</ul>
<h4>Authors: 2</h4>
<ul>
<li>John Hobbs (<a
href="https://github.com/jmhobbs"><code>@​jmhobbs</code></a>)</li>
<li>Paul Elliott (<a
href="https://github.com/paulelliott"><code>@​paulelliott</code></a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/chromaui/chromatic-cli/blob/main/CHANGELOG.md">chromatic's
changelog</a>.</em></p>
<blockquote>
<h1>v11.22.0 (Fri Jan 03 2025)</h1>
<h4>🚀 Enhancement</h4>
<ul>
<li>Bail on preview file changes <a
href="https://redirect.github.com/chromaui/chromatic-cli/pull/1133">#1133</a>
(<a href="https://github.com/codykaup"><code>@​codykaup</code></a>)</li>
</ul>
<h4>Authors: 1</h4>
<ul>
<li>Cody Kaup (<a
href="https://github.com/codykaup"><code>@​codykaup</code></a>)</li>
</ul>
<hr />
<h1>v11.21.0 (Fri Jan 03 2025)</h1>
<h4>🚀 Enhancement</h4>
<ul>
<li>Set <code>storybookUrl</code> action output on rebuild early exit <a
href="https://redirect.github.com/chromaui/chromatic-cli/pull/1134">#1134</a>
(<a href="https://github.com/jmhobbs"><code>@​jmhobbs</code></a>)</li>
<li>Upload coverage reports to codecov <a
href="https://redirect.github.com/chromaui/chromatic-cli/pull/1132">#1132</a>
(<a
href="https://github.com/paulelliott"><code>@​paulelliott</code></a>)</li>
</ul>
<h4>Authors: 2</h4>
<ul>
<li>John Hobbs (<a
href="https://github.com/jmhobbs"><code>@​jmhobbs</code></a>)</li>
<li>Paul Elliott (<a
href="https://github.com/paulelliott"><code>@​paulelliott</code></a>)</li>
</ul>
<hr />
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="8f27f8b046"><code>8f27f8b</code></a>
Bump version to: 11.22.0 [skip ci]</li>
<li><a
href="0c209609f3"><code>0c20960</code></a>
Update CHANGELOG.md [skip ci]</li>
<li><a
href="43a9b94828"><code>43a9b94</code></a>
Merge pull request <a
href="https://redirect.github.com/chromaui/chromatic-cli/issues/1133">#1133</a>
from chromaui/cody/cap-2599-turbosnap-exit-on-storyb...</li>
<li><a
href="730a7aa0d3"><code>730a7aa</code></a>
Bump version to: 11.21.0 [skip ci]</li>
<li><a
href="0afebf6ad9"><code>0afebf6</code></a>
Update CHANGELOG.md [skip ci]</li>
<li><a
href="f729a2a4ee"><code>f729a2a</code></a>
Merge pull request <a
href="https://redirect.github.com/chromaui/chromatic-cli/issues/1134">#1134</a>
from chromaui/jmhobbs/cap-2317-chromauiaction-skippi...</li>
<li><a
href="05bcf30274"><code>05bcf30</code></a>
Set storybookUrl action output on rebuild abort</li>
<li><a
href="300222ff7f"><code>300222f</code></a>
Bail on preview file changes</li>
<li><a
href="9dbaef7d89"><code>9dbaef7</code></a>
Merge pull request <a
href="https://redirect.github.com/chromaui/chromatic-cli/issues/1132">#1132</a>
from chromaui/paulelliott/set-up-codecov</li>
<li><a
href="851574b606"><code>851574b</code></a>
Run lint-and-test workflow on pushes to main</li>
<li>Additional commits viewable in <a
href="https://github.com/chromaui/chromatic-cli/compare/v11.20.2...v11.22.0">compare
view</a></li>
</ul>
</details>
<br />

Updates `concurrently` from 9.1.1 to 9.1.2
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/open-cli-tools/concurrently/releases">concurrently's
releases</a>.</em></p>
<blockquote>
<h2>v9.1.2</h2>
<h2>What's Changed</h2>
<ul>
<li>Add ability to have custom logger by <a
href="https://github.com/mwood23"><code>@​mwood23</code></a> in <a
href="https://redirect.github.com/open-cli-tools/concurrently/pull/522">open-cli-tools/concurrently#522</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/mwood23"><code>@​mwood23</code></a> made
their first contribution in <a
href="https://redirect.github.com/open-cli-tools/concurrently/pull/522">open-cli-tools/concurrently#522</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/open-cli-tools/concurrently/compare/v9.1.1...v9.1.2">https://github.com/open-cli-tools/concurrently/compare/v9.1.1...v9.1.2</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="7f3efb201b"><code>7f3efb2</code></a>
9.1.2</li>
<li><a
href="36eccae46c"><code>36eccae</code></a>
Add ability to have custom logger (<a
href="https://redirect.github.com/open-cli-tools/concurrently/issues/522">#522</a>)</li>
<li>See full diff in <a
href="https://github.com/open-cli-tools/concurrently/compare/v9.1.1...v9.1.2">compare
view</a></li>
</ul>
</details>
<br />

Updates `eslint-plugin-storybook` from 0.11.1 to 0.11.2
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/storybookjs/eslint-plugin-storybook/releases">eslint-plugin-storybook's
releases</a>.</em></p>
<blockquote>
<h2>v0.11.2</h2>
<h4>🐛 Bug Fix</h4>
<ul>
<li>fix(peer-deps): update eslint version range to <code>&gt;=8</code>
<a
href="https://redirect.github.com/storybookjs/eslint-plugin-storybook/pull/186">#186</a>
(<a href="https://github.com/zacowan"><code>@​zacowan</code></a> <a
href="https://github.com/yannbf"><code>@​yannbf</code></a>)</li>
</ul>
<h4>Authors: 2</h4>
<ul>
<li>Yann Braga (<a
href="https://github.com/yannbf"><code>@​yannbf</code></a>)</li>
<li>Zachary Cowan (<a
href="https://github.com/zacowan"><code>@​zacowan</code></a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/storybookjs/eslint-plugin-storybook/blob/main/CHANGELOG.md">eslint-plugin-storybook's
changelog</a>.</em></p>
<blockquote>
<h1>v0.11.2 (Thu Jan 02 2025)</h1>
<h4>🐛 Bug Fix</h4>
<ul>
<li>fix(peer-deps): update eslint version range to <code>&gt;=8</code>
<a
href="https://redirect.github.com/storybookjs/eslint-plugin-storybook/pull/186">#186</a>
(<a href="https://github.com/zacowan"><code>@​zacowan</code></a> <a
href="https://github.com/yannbf"><code>@​yannbf</code></a>)</li>
</ul>
<h4>Authors: 2</h4>
<ul>
<li>Yann Braga (<a
href="https://github.com/yannbf"><code>@​yannbf</code></a>)</li>
<li>Zachary Cowan (<a
href="https://github.com/zacowan"><code>@​zacowan</code></a>)</li>
</ul>
<hr />
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="d8acf1fbc4"><code>d8acf1f</code></a>
Bump version to: 0.11.2 [skip ci]</li>
<li><a
href="6ff93f31ac"><code>6ff93f3</code></a>
Update CHANGELOG.md [skip ci]</li>
<li><a
href="633e59828f"><code>633e598</code></a>
Merge pull request <a
href="https://redirect.github.com/storybookjs/eslint-plugin-storybook/issues/186">#186</a>
from zacowan/zacowan-patch-1</li>
<li><a
href="9351188fc3"><code>9351188</code></a>
docs: add compatibility table</li>
<li><a
href="6906363c56"><code>6906363</code></a>
fix(deps): use accurate eslint peer</li>
<li>See full diff in <a
href="https://github.com/storybookjs/eslint-plugin-storybook/compare/v0.11.1...v0.11.2">compare
view</a></li>
</ul>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-07 18:42:51 +00:00
dependabot[bot]
f5afdcc650 chore(frontend/deps): bump the production-dependencies group across 1 directory with 11 updates (#9214)
Bumps the production-dependencies group with 11 updates in the
/autogpt_platform/frontend directory:

| Package | From | To |
| --- | --- | --- |
| [@hookform/resolvers](https://github.com/react-hook-form/resolvers) |
`3.9.1` | `3.10.0` |
|
[@next/third-parties](https://github.com/vercel/next.js/tree/HEAD/packages/third-parties)
| `15.1.0` | `15.1.3` |
| [@sentry/nextjs](https://github.com/getsentry/sentry-javascript) |
`8.45.1` | `8.48.0` |
| [framer-motion](https://github.com/motiondivision/motion) | `11.15.0`
| `11.16.0` |
|
[lucide-react](https://github.com/lucide-icons/lucide/tree/HEAD/packages/lucide-react)
| `0.468.0` | `0.469.0` |
| [react-day-picker](https://github.com/gpbl/react-day-picker) | `9.4.4`
| `9.5.0` |
| [react-hook-form](https://github.com/react-hook-form/react-hook-form)
| `7.54.1` | `7.54.2` |
| [react-markdown](https://github.com/remarkjs/react-markdown) | `9.0.1`
| `9.0.3` |
| [react-modal](https://github.com/reactjs/react-modal) | `3.16.1` |
`3.16.3` |
| [tailwind-merge](https://github.com/dcastil/tailwind-merge) | `2.5.5`
| `2.6.0` |
| [uuid](https://github.com/uuidjs/uuid) | `11.0.3` | `11.0.4` |


Updates `@hookform/resolvers` from 3.9.1 to 3.10.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/react-hook-form/resolvers/releases"><code>@​hookform/resolvers</code>'s
releases</a>.</em></p>
<blockquote>
<h2>v3.10.0</h2>
<h1><a
href="https://github.com/react-hook-form/resolvers/compare/v3.9.1...v3.10.0">3.10.0</a>
(2025-01-06)</h1>
<h3>Features</h3>
<ul>
<li>update to effect 3.10 (<a
href="https://redirect.github.com/react-hook-form/resolvers/issues/729">#729</a>)
(<a
href="10aca41229">10aca41</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="10aca41229"><code>10aca41</code></a>
feat: update to effect 3.10 (<a
href="https://redirect.github.com/react-hook-form/resolvers/issues/729">#729</a>)</li>
<li><a
href="e523dde4d9"><code>e523dde</code></a>
chore: update to effet 3.10 (<a
href="https://redirect.github.com/react-hook-form/resolvers/issues/720">#720</a>)</li>
<li>See full diff in <a
href="https://github.com/react-hook-form/resolvers/compare/v3.9.1...v3.10.0">compare
view</a></li>
</ul>
</details>
<br />

Updates `@next/third-parties` from 15.1.0 to 15.1.3
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/vercel/next.js/releases"><code>@​next/third-parties</code>'s
releases</a>.</em></p>
<blockquote>
<h2>v15.1.3</h2>
<blockquote>
<p>[!NOTE]<br />
This release is backporting bug fixes. It does <strong>not</strong>
include all pending features/changes on canary.</p>
</blockquote>
<h3>Core Changes</h3>
<ul>
<li>Retry manifest file loading only in dev mode: <a
href="https://github.com/vercel/next.js/tree/HEAD/packages/third-parties/issues/73900">#73900</a></li>
<li>Use shared worker for lint &amp; typecheck steps: <a
href="https://github.com/vercel/next.js/tree/HEAD/packages/third-parties/issues/74154">#74154</a></li>
</ul>
<h3>Credits</h3>
<p>Huge thanks to <a
href="https://github.com/unstubbable"><code>@​unstubbable</code></a> and
<a href="https://github.com/ztanner"><code>@​ztanner</code></a> for
helping!</p>
<h2>v15.1.2</h2>
<blockquote>
<p>[!NOTE]<br />
This release is backporting bug fixes. It does <strong>not</strong>
include all pending features/changes on canary.</p>
</blockquote>
<h3>Core Changes</h3>
<ul>
<li>Update React from 7283a213-20241206 to 65e06cb7-20241218: <a
href="https://redirect.github.com/vercel/next.js/pull/74117">vercel/next.js#74117</a></li>
</ul>
<h3>Credits</h3>
<p>Huge thanks to <a
href="https://github.com/ztanner"><code>@​ztanner</code></a> for
helping!</p>
<h2>v15.1.1</h2>
<blockquote>
<p>[!NOTE]<br />
This release is backporting bug fixes. It does <strong>not</strong>
include all pending features/changes on canary.</p>
</blockquote>
<h3>Core Changes</h3>
<ul>
<li>fix(turbo): sassOptions silenceDeprecations was not overwritten with
user options: <a
href="https://redirect.github.com/vercel/next.js/pull/73937">vercel/next.js#73937</a></li>
<li>refactor collectAppPageSegments: <a
href="https://redirect.github.com/vercel/next.js/pull/73908">vercel/next.js#73908</a></li>
</ul>
<h3>Credits</h3>
<p>Huge thanks to <a
href="https://github.com/devjiwonchoi"><code>@​devjiwonchoi</code></a>
and <a href="https://github.com/ztanner"><code>@​ztanner</code></a> for
helping!</p>
<h2>v15.1.1-canary.26</h2>
<h3>Core Changes</h3>
<ul>
<li>Upgrade React from <code>518d06d2-20241219</code> to
<code>3b009b4c-20250102</code>: <a
href="https://github.com/vercel/next.js/tree/HEAD/packages/third-parties/issues/74492">#74492</a></li>
<li>fix: add node internals stack frames to ignored list: <a
href="https://github.com/vercel/next.js/tree/HEAD/packages/third-parties/issues/73698">#73698</a></li>
<li>chore: break calls to forEach into for loops: <a
href="https://github.com/vercel/next.js/tree/HEAD/packages/third-parties/issues/74523">#74523</a></li>
<li>[DevOverlay] Add error message: <a
href="https://github.com/vercel/next.js/tree/HEAD/packages/third-parties/issues/74541">#74541</a></li>
<li>[DevOverlay] Add error type label: <a
href="https://github.com/vercel/next.js/tree/HEAD/packages/third-parties/issues/74543">#74543</a></li>
<li>feat: connect error rating buttons to telemetry API: <a
href="https://github.com/vercel/next.js/tree/HEAD/packages/third-parties/issues/74496">#74496</a></li>
<li>[metadata] Move metadata rendering adjacent to page component: <a
href="https://github.com/vercel/next.js/tree/HEAD/packages/third-parties/issues/74262">#74262</a></li>
<li>Delete set-cache-busting-search-param.test.ts: <a
href="https://github.com/vercel/next.js/tree/HEAD/packages/third-parties/issues/74561">#74561</a></li>
<li>fix: enhance a11y, prevent double firing in error rating: <a
href="https://github.com/vercel/next.js/tree/HEAD/packages/third-parties/issues/74563">#74563</a></li>
<li>fix: add aria-hidden to error overlay voting icons: <a
href="https://github.com/vercel/next.js/tree/HEAD/packages/third-parties/issues/74568">#74568</a></li>
</ul>
<h3>Misc Changes</h3>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="4cbaaa118d"><code>4cbaaa1</code></a>
v15.1.3</li>
<li><a
href="df392a1b97"><code>df392a1</code></a>
v15.1.2</li>
<li><a
href="4384c6834a"><code>4384c68</code></a>
v15.1.1</li>
<li>See full diff in <a
href="https://github.com/vercel/next.js/commits/v15.1.3/packages/third-parties">compare
view</a></li>
</ul>
</details>
<br />

Updates `@sentry/nextjs` from 8.45.1 to 8.48.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/getsentry/sentry-javascript/releases"><code>@​sentry/nextjs</code>'s
releases</a>.</em></p>
<blockquote>
<h2>8.48.0</h2>
<h3>Deprecations</h3>
<ul>
<li>
<p><strong>feat(v8/core): Deprecate <code>getDomElement</code> method
(<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/14799">#14799</a>)</strong></p>
<p>Deprecates <code>getDomElement</code>. There is no replacement.</p>
</li>
</ul>
<h3>Other changes</h3>
<ul>
<li>fix(nestjs/v8): Use correct main/module path in package.json (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/14791">#14791</a>)</li>
<li>fix(v8/core): Use consistent <code>continueTrace</code>
implementation in core (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/14819">#14819</a>)</li>
<li>fix(v8/node): Correctly resolve debug IDs for ANR events with custom
appRoot (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/14823">#14823</a>)</li>
<li>fix(v8/node): Ensure <code>NODE_OPTIONS</code> is not passed to
worker threads (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/14825">#14825</a>)</li>
<li>fix(v8/angular): Fall back to element <code>tagName</code> when name
is not provided to <code>TraceDirective</code> (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/14828">#14828</a>)</li>
<li>fix(aws-lambda): Remove version suffix from lambda layer (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/14843">#14843</a>)</li>
<li>fix(v8/node): Ensure express requests are properly handled (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/14851">#14851</a>)</li>
<li>feat(v8/node): Add <code>openTelemetrySpanProcessors</code> option
(<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/14853">#14853</a>)</li>
<li>fix(v8/react): Use <code>Set</code> as the <code>allRoutes</code>
container. (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/14878">#14878</a>)
(<a
href="https://redirect.github.com/getsentry/sentry-javascript/issues/14884">#14884</a>)</li>
<li>fix(v8/react): Improve handling of routes nested under
path=&quot;/&quot; (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/14897">#14897</a>)</li>
<li>feat(v8/core): Add <code>normalizedRequest</code> to
<code>samplingContext</code> (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/14903">#14903</a>)</li>
<li>fix(v8/feedback): Avoid lazy loading code for
<code>syncFeedbackIntegration</code> (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/14918">#14918</a>)</li>
</ul>
<p>Work in this release was contributed by <a
href="https://github.com/arturovt"><code>@​arturovt</code></a>. Thank
you for your contribution!</p>
<h2>Bundle size 📦</h2>
<table>
<thead>
<tr>
<th>Path</th>
<th>Size</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>@​sentry/browser</code></td>
<td>23.29 KB</td>
</tr>
<tr>
<td><code>@​sentry/browser</code> - with treeshaking flags</td>
<td>21.96 KB</td>
</tr>
<tr>
<td><code>@​sentry/browser</code> (incl. Tracing)</td>
<td>35.85 KB</td>
</tr>
<tr>
<td><code>@​sentry/browser</code> (incl. Tracing, Replay)</td>
<td>73.09 KB</td>
</tr>
<tr>
<td><code>@​sentry/browser</code> (incl. Tracing, Replay) - with
treeshaking flags</td>
<td>63.48 KB</td>
</tr>
<tr>
<td><code>@​sentry/browser</code> (incl. Tracing, Replay with
Canvas)</td>
<td>77.4 KB</td>
</tr>
<tr>
<td><code>@​sentry/browser</code> (incl. Tracing, Replay, Feedback)</td>
<td>89.34 KB</td>
</tr>
<tr>
<td><code>@​sentry/browser</code> (incl. Feedback)</td>
<td>39.5 KB</td>
</tr>
<tr>
<td><code>@​sentry/browser</code> (incl. sendFeedback)</td>
<td>27.89 KB</td>
</tr>
<tr>
<td><code>@​sentry/browser</code> (incl. FeedbackAsync)</td>
<td>32.69 KB</td>
</tr>
<tr>
<td><code>@​sentry/react</code></td>
<td>25.96 KB</td>
</tr>
<tr>
<td><code>@​sentry/react</code> (incl. Tracing)</td>
<td>38.66 KB</td>
</tr>
<tr>
<td><code>@​sentry/vue</code></td>
<td>27.56 KB</td>
</tr>
<tr>
<td><code>@​sentry/vue</code> (incl. Tracing)</td>
<td>37.69 KB</td>
</tr>
<tr>
<td><code>@​sentry/svelte</code></td>
<td>23.45 KB</td>
</tr>
<tr>
<td>CDN Bundle</td>
<td>24.49 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing)</td>
<td>37.56 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay)</td>
<td>72.75 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay, Feedback)</td>
<td>78.11 KB</td>
</tr>
<tr>
<td>CDN Bundle - uncompressed</td>
<td>71.93 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing) - uncompressed</td>
<td>111.42 KB</td>
</tr>
<tr>
<td>CDN Bundle (incl. Tracing, Replay) - uncompressed</td>
<td>225.5 KB</td>
</tr>
</tbody>
</table>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/getsentry/sentry-javascript/blob/8.48.0/CHANGELOG.md"><code>@​sentry/nextjs</code>'s
changelog</a>.</em></p>
<blockquote>
<h2>8.48.0</h2>
<h3>Deprecations</h3>
<ul>
<li>
<p><strong>feat(v8/core): Deprecate <code>getDomElement</code> method
(<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/14799">#14799</a>)</strong></p>
<p>Deprecates <code>getDomElement</code>. There is no replacement.</p>
</li>
</ul>
<h3>Other changes</h3>
<ul>
<li>fix(nestjs/v8): Use correct main/module path in package.json (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/14791">#14791</a>)</li>
<li>fix(v8/core): Use consistent <code>continueTrace</code>
implementation in core (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/14819">#14819</a>)</li>
<li>fix(v8/node): Correctly resolve debug IDs for ANR events with custom
appRoot (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/14823">#14823</a>)</li>
<li>fix(v8/node): Ensure <code>NODE_OPTIONS</code> is not passed to
worker threads (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/14825">#14825</a>)</li>
<li>fix(v8/angular): Fall back to element <code>tagName</code> when name
is not provided to <code>TraceDirective</code> (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/14828">#14828</a>)</li>
<li>fix(aws-lambda): Remove version suffix from lambda layer (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/14843">#14843</a>)</li>
<li>fix(v8/node): Ensure express requests are properly handled (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/14851">#14851</a>)</li>
<li>feat(v8/node): Add <code>openTelemetrySpanProcessors</code> option
(<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/14853">#14853</a>)</li>
<li>fix(v8/react): Use <code>Set</code> as the <code>allRoutes</code>
container. (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/14878">#14878</a>)
(<a
href="https://redirect.github.com/getsentry/sentry-javascript/issues/14884">#14884</a>)</li>
<li>fix(v8/react): Improve handling of routes nested under
path=&quot;/&quot; (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/14897">#14897</a>)</li>
<li>feat(v8/core): Add <code>normalizedRequest</code> to
<code>samplingContext</code> (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/14903">#14903</a>)</li>
<li>fix(v8/feedback): Avoid lazy loading code for
<code>syncFeedbackIntegration</code> (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/14918">#14918</a>)</li>
</ul>
<p>Work in this release was contributed by <a
href="https://github.com/arturovt"><code>@​arturovt</code></a>. Thank
you for your contribution!</p>
<h2>8.47.0</h2>
<ul>
<li>feat(v8/core): Add <code>updateSpanName</code> helper function (<a
href="https://redirect.github.com/getsentry/sentry-javascript/issues/14736">#14736</a>)</li>
<li>feat(v8/node): Do not overwrite prisma <code>db.system</code> in
newer Prisma versions (<a
href="https://redirect.github.com/getsentry/sentry-javascript/issues/14772">#14772</a>)</li>
<li>feat(v8/node/deps): Bump <code>@​prisma/instrumentation</code> from
5.19.1 to 5.22.0 (<a
href="https://redirect.github.com/getsentry/sentry-javascript/issues/14755">#14755</a>)</li>
<li>feat(v8/replay): Mask srcdoc iframe contents per default (<a
href="https://redirect.github.com/getsentry/sentry-javascript/issues/14779">#14779</a>)</li>
<li>ref(v8/nextjs): Fix typo in source maps deletion warning (<a
href="https://redirect.github.com/getsentry/sentry-javascript/issues/14776">#14776</a>)</li>
</ul>
<p>Work in this release was contributed by <a
href="https://github.com/aloisklink"><code>@​aloisklink</code></a> and
<a href="https://github.com/benjick"><code>@​benjick</code></a>. Thank
you for your contributions!</p>
<h2>8.46.0</h2>
<ul>
<li>feat: Allow capture of more than 1 ANR event [v8] (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/14713">#14713</a>)</li>
<li>feat(node): Detect Railway release name [v8] (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/14714">#14714</a>)</li>
<li>fix: Normalise ANR debug image file paths if appRoot was supplied
[v8] (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/14709">#14709</a>)</li>
<li>fix(nuxt): Remove build config from tsconfig (<a
href="https://redirect.github.com/getsentry/sentry-javascript/pull/14737">#14737</a>)</li>
</ul>
<p>Work in this release was contributed by <a
href="https://github.com/conor-ob"><code>@​conor-ob</code></a>. Thank
you for your contribution!</p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="405ceb4a4d"><code>405ceb4</code></a>
release: 8.48.0</li>
<li><a
href="8e2ed6f82a"><code>8e2ed6f</code></a>
meta(changelog): Update changelog for 8.48.0 (<a
href="https://redirect.github.com/getsentry/sentry-javascript/issues/14919">#14919</a>)</li>
<li><a
href="8b03e0b421"><code>8b03e0b</code></a>
fix(v8/feedback): Avoid lazy loading code for
<code>syncFeedbackIntegration</code> (<a
href="https://redirect.github.com/getsentry/sentry-javascript/issues/14918">#14918</a>)</li>
<li><a
href="77cabfbc33"><code>77cabfb</code></a>
fix(v8/react): Use <code>Set</code> as the <code>allRoutes</code>
container. (<a
href="https://redirect.github.com/getsentry/sentry-javascript/issues/14878">#14878</a>)
(<a
href="https://redirect.github.com/getsentry/sentry-javascript/issues/14884">#14884</a>)</li>
<li><a
href="6fa3797ddb"><code>6fa3797</code></a>
feat(v8/core): Add <code>normalizedRequest</code> to
<code>samplingContext</code> (<a
href="https://redirect.github.com/getsentry/sentry-javascript/issues/14903">#14903</a>)</li>
<li><a
href="845b7aa2e0"><code>845b7aa</code></a>
fix(v8/react): Improve handling of routes nested under
path=&quot;/&quot; (<a
href="https://redirect.github.com/getsentry/sentry-javascript/issues/14897">#14897</a>)</li>
<li><a
href="dbd3296580"><code>dbd3296</code></a>
feat(v8/node): Add <code>openTelemetrySpanProcessors</code> option (<a
href="https://redirect.github.com/getsentry/sentry-javascript/issues/14853">#14853</a>)</li>
<li><a
href="960dd9be89"><code>960dd9b</code></a>
fix(v8/node): Ensure express requests are properly handled (<a
href="https://redirect.github.com/getsentry/sentry-javascript/issues/14851">#14851</a>)</li>
<li><a
href="576a1ad0f2"><code>576a1ad</code></a>
fix(v8/core): Use consistent <code>continueTrace</code> implementation
in core (<a
href="https://redirect.github.com/getsentry/sentry-javascript/issues/14819">#14819</a>)</li>
<li><a
href="75ca8b9c5a"><code>75ca8b9</code></a>
meta(changelog): Update changelog for 8.48.0 (<a
href="https://redirect.github.com/getsentry/sentry-javascript/issues/14844">#14844</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/getsentry/sentry-javascript/compare/8.45.1...8.48.0">compare
view</a></li>
</ul>
</details>
<br />

Updates `framer-motion` from 11.15.0 to 11.16.0
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/motiondivision/motion/blob/main/CHANGELOG.md">framer-motion's
changelog</a>.</em></p>
<blockquote>
<h2>[11.16.0] 2024-01-06</h2>
<h3>Added</h3>
<ul>
<li>Added <code>view()</code> alpha to early access.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="0d6f15819d"><code>0d6f158</code></a>
v11.16.0</li>
<li><a
href="60b365926c"><code>60b3659</code></a>
Updating changelog</li>
<li><a
href="d22113827f"><code>d221138</code></a>
Feature/view function (<a
href="https://redirect.github.com/motiondivision/motion/issues/2970">#2970</a>)</li>
<li><a
href="8ca78c00b6"><code>8ca78c0</code></a>
Updating readmes</li>
<li><a
href="ecd97f7dce"><code>ecd97f7</code></a>
Updating readme</li>
<li>See full diff in <a
href="https://github.com/motiondivision/motion/compare/v11.15.0...v11.16.0">compare
view</a></li>
</ul>
</details>
<br />

Updates `lucide-react` from 0.468.0 to 0.469.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/lucide-icons/lucide/releases">lucide-react's
releases</a>.</em></p>
<blockquote>
<h2>New icons 0.469.0</h2>
<h2>Modified Icons 🔨</h2>
<ul>
<li><code>snowflake</code> (<a
href="https://github.com/lucide-icons/lucide/tree/HEAD/packages/lucide-react/issues/2610">#2610</a>)
by <a
href="https://github.com/karsa-mistmere"><code>@​karsa-mistmere</code></a></li>
<li><code>sun-snow</code> (<a
href="https://github.com/lucide-icons/lucide/tree/HEAD/packages/lucide-react/issues/2610">#2610</a>)
by <a
href="https://github.com/karsa-mistmere"><code>@​karsa-mistmere</code></a></li>
<li><code>thermometer-snowflake</code> (<a
href="https://github.com/lucide-icons/lucide/tree/HEAD/packages/lucide-react/issues/2610">#2610</a>)
by <a
href="https://github.com/karsa-mistmere"><code>@​karsa-mistmere</code></a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="970fc3d4be"><code>970fc3d</code></a>
fix(lucide-react): support React 19 (<a
href="https://github.com/lucide-icons/lucide/tree/HEAD/packages/lucide-react/issues/2666">#2666</a>)</li>
<li>See full diff in <a
href="https://github.com/lucide-icons/lucide/commits/0.469.0/packages/lucide-react">compare
view</a></li>
</ul>
</details>
<br />

Updates `react-day-picker` from 9.4.4 to 9.5.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/gpbl/react-day-picker/releases">react-day-picker's
releases</a>.</em></p>
<blockquote>
<h2>v9.5.0</h2>
<p>This release adds full support for the <a
href="https://daypicker.dev/docs/localization#persian-calendar">Persian
calendar</a> and a new <code>numerals</code> prop to <a
href="https://daypicker.dev/docs/translation#numeral-systems">set the
numbering system</a>.</p>
<h3>Breaking Change: Dropdown Formatters</h3>
<p>The <code>formatMonthDropdown</code> and
<code>formatYearDropdown</code> now receive a <code>Date</code> (instead
of a <code>number</code>) as first argument.</p>
<pre lang="diff"><code>&lt;DayPicker formatters={{ 
- formatMonthDropdown: (month) =&gt; format(new Date(month),
&quot;mmmm&quot;) }}
+ formatMonthDropdown: (date) =&gt; format(date, &quot;mmmm&quot;) }}
/&gt;
- formatYearDropdown: (year) =&gt; format(new Date(year),
&quot;yyyy&quot;) }}
+ formatYearDropdown: (date) =&gt; format(date, &quot;yyyy&quot;) }}
/&gt;
/&gt;
</code></pre>
<h3>Persian Calendar</h3>
<p>Persian Calendar get fulls support in DayPicker and replaces the
previous &quot;Jalali Calendar&quot;.</p>
<p>If you were using DayPicker from
<code>react-day-picker/jalali</code>, change your imports to
<code>react-day-picker/persian</code>:</p>
<pre lang="diff"><code>- import { DayPicker } from
`react-day-picker/jalali`;
+ import { DayPicker } from  `react-day-picker/persian`;
</code></pre>
<p>See the <a
href="https://daypicker.dev/docs/localization#persian-calendar">Persian
calendar</a> documentation for more details about using Persian calendar
in DayPicker.</p>
<h2>What's Changed</h2>
<ul>
<li>feat: add Persian calendar support by <a
href="https://github.com/gpbl"><code>@​gpbl</code></a> in <a
href="https://redirect.github.com/gpbl/react-day-picker/pull/2645">gpbl/react-day-picker#2645</a></li>
<li>feat: add new <code>numerals</code> prop by <a
href="https://github.com/gpbl"><code>@​gpbl</code></a> in <a
href="https://redirect.github.com/gpbl/react-day-picker/pull/2647">gpbl/react-day-picker#2647</a></li>
<li>feat: add <code>today</code>, <code>newDate</code>,
<code>timeZone</code> to the <code>DateLib</code> class by <a
href="https://github.com/gpbl"><code>@​gpbl</code></a> in <a
href="https://redirect.github.com/gpbl/react-day-picker/pull/2642">gpbl/react-day-picker#2642</a></li>
<li>feat: remove <code>startMonth</code>/<code>endMonth</code>
constraints when caption layout is <code>dropdown-months</code> by <a
href="https://github.com/rodgobbi"><code>@​rodgobbi</code></a> in <a
href="https://redirect.github.com/gpbl/react-day-picker/pull/2648">gpbl/react-day-picker#2648</a></li>
<li>build: add <code>date-fns-jalali</code> to the package dependencies
by <a href="https://github.com/gpbl"><code>@​gpbl</code></a> in <a
href="https://redirect.github.com/gpbl/react-day-picker/pull/2640">gpbl/react-day-picker#2640</a></li>
<li>fix(breaking): dropdown formatters to use <code>dateLib</code>
format by <a href="https://github.com/gpbl"><code>@​gpbl</code></a> in
<a
href="https://redirect.github.com/gpbl/react-day-picker/pull/2644">gpbl/react-day-picker#2644</a></li>
<li>fix(jalali): incorrect Jalali month names when using dropdown
layouts by <a href="https://github.com/gpbl"><code>@​gpbl</code></a> in
<a
href="https://redirect.github.com/gpbl/react-day-picker/pull/2645">gpbl/react-day-picker#2645</a></li>
<li>fix(chore): always use <code>Date</code> constructor from
<code>dateLib</code> by <a
href="https://github.com/gpbl"><code>@​gpbl</code></a> in <a
href="https://redirect.github.com/gpbl/react-day-picker/pull/2636">gpbl/react-day-picker#2636</a></li>
<li>fix(chore): use <code>dateLib</code> for getting days/months/years
from a <code>Date</code> by <a
href="https://github.com/gpbl"><code>@​gpbl</code></a> in <a
href="https://redirect.github.com/gpbl/react-day-picker/pull/2643">gpbl/react-day-picker#2643</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/gpbl/react-day-picker/compare/v9.4.4...v9.5.0">https://github.com/gpbl/react-day-picker/compare/v9.4.4...v9.5.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="a06052e71b"><code>a06052e</code></a>
fix(website): Persian test</li>
<li><a
href="aa0cacb04e"><code>aa0cacb</code></a>
fix(website): Persian formatted</li>
<li><a
href="e65d776f51"><code>e65d776</code></a>
website: update docs for Persian calendar</li>
<li><a
href="15280b7b81"><code>15280b7</code></a>
chore(persian): use <code>arabext</code> numerals as default</li>
<li><a
href="56c7acbaf1"><code>56c7acb</code></a>
chore: update tests after <a
href="https://redirect.github.com/gpbl/react-day-picker/issues/2648">#2648</a>
(<a
href="https://redirect.github.com/gpbl/react-day-picker/issues/2650">#2650</a>)</li>
<li><a
href="bcd5215000"><code>bcd5215</code></a>
feat: remove <code>startMonth</code> and <code>endMonth</code> default
constraints when `dropdown-m...</li>
<li><a
href="1026b2ca28"><code>1026b2c</code></a>
website: playground updates</li>
<li><a
href="d09e2acdc1"><code>d09e2ac</code></a>
feat: add new <code>numerals</code> prop (<a
href="https://redirect.github.com/gpbl/react-day-picker/issues/2647">#2647</a>)</li>
<li><a
href="8a67562252"><code>8a67562</code></a>
website: fix type in ShadowDomWrapper</li>
<li><a
href="5fabec63a4"><code>5fabec6</code></a>
build(website): disable typedoc watch</li>
<li>Additional commits viewable in <a
href="https://github.com/gpbl/react-day-picker/compare/v9.4.4...v9.5.0">compare
view</a></li>
</ul>
</details>
<br />

Updates `react-hook-form` from 7.54.1 to 7.54.2
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/react-hook-form/react-hook-form/releases">react-hook-form's
releases</a>.</em></p>
<blockquote>
<h2>Version 7.54.2</h2>
<p>⚛️ fix <a
href="https://redirect.github.com/react-hook-form/react-hook-form/issues/12478">#12478</a>
issue should unregister input with controller (<a
href="https://redirect.github.com/react-hook-form/react-hook-form/issues/12480">#12480</a>)
 close <a
href="https://redirect.github.com/react-hook-form/react-hook-form/issues/12443">#12443</a>
track disabled fields and only omit data on submit (<a
href="https://redirect.github.com/react-hook-form/react-hook-form/issues/12491">#12491</a>)
⚛️ upgrade e2e automation app to react 19 (<a
href="https://redirect.github.com/react-hook-form/react-hook-form/issues/12482">#12482</a>)
🧪 test(useWatch): destructure setValue from useForm</p>
<p>Thanks very much, <a
href="https://github.com/marcalexiei"><code>@​marcalexiei</code></a> for
your contribution to the documentation!</p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="ba87b7809e"><code>ba87b78</code></a>
7.54.2</li>
<li><a
href="c3d1756733"><code>c3d1756</code></a>
 close <a
href="https://redirect.github.com/react-hook-form/react-hook-form/issues/12443">#12443</a>
track disabled fields and only omit data on submit (<a
href="https://redirect.github.com/react-hook-form/react-hook-form/issues/12491">#12491</a>)</li>
<li><a
href="5a961592fe"><code>5a96159</code></a>
⚛️ upgrade e2e automation app to react 19 (<a
href="https://redirect.github.com/react-hook-form/react-hook-form/issues/12482">#12482</a>)</li>
<li><a
href="4ea65b372e"><code>4ea65b3</code></a>
⚛️ fix <a
href="https://redirect.github.com/react-hook-form/react-hook-form/issues/12478">#12478</a>
issue should unregister input with controller (<a
href="https://redirect.github.com/react-hook-form/react-hook-form/issues/12480">#12480</a>)</li>
<li><a
href="f37465d135"><code>f37465d</code></a>
❤️ thank you very much Workleap for sponsoring the project!</li>
<li><a
href="506fa04d44"><code>506fa04</code></a>
🧪 test(useWatch): destructure setValue from useForm</li>
<li>See full diff in <a
href="https://github.com/react-hook-form/react-hook-form/compare/v7.54.1...v7.54.2">compare
view</a></li>
</ul>
</details>
<br />

Updates `react-markdown` from 9.0.1 to 9.0.3
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/remarkjs/react-markdown/releases">react-markdown's
releases</a>.</em></p>
<blockquote>
<h2>9.0.3</h2>
<p>(same as 9.0.2 but now with d.ts files)</p>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/remarkjs/react-markdown/compare/9.0.2...9.0.3">https://github.com/remarkjs/react-markdown/compare/9.0.2...9.0.3</a></p>
<h2>9.0.2</h2>
<h4>Types</h4>
<ul>
<li>b151a90 Fix types for React 19
by <a
href="https://github.com/remcohaszing"><code>@​remcohaszing</code></a>
in <a
href="https://redirect.github.com/remarkjs/react-markdown/pull/879">remarkjs/react-markdown#879</a></li>
<li>6962af7 Add declaration maps</li>
<li>aa5933b Refactor to use <code>@import</code> to import types
by <a
href="https://github.com/remcohaszing"><code>@​remcohaszing</code></a>
in <a
href="https://redirect.github.com/remarkjs/react-markdown/pull/836">remarkjs/react-markdown#836</a></li>
</ul>
<h4>Miscellaneous</h4>
<ul>
<li>9eb589e Fix typo in changelog
by <a
href="https://github.com/NicholasWilsonDEV"><code>@​NicholasWilsonDEV</code></a>
in <a
href="https://redirect.github.com/remarkjs/react-markdown/pull/874">remarkjs/react-markdown#874</a></li>
<li>515bf19 Fix typo
by <a href="https://github.com/deep-lyra"><code>@​deep-lyra</code></a>
in <a
href="https://redirect.github.com/remarkjs/react-markdown/pull/868">remarkjs/react-markdown#868</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/remarkjs/react-markdown/compare/9.0.1...9.0.2">https://github.com/remarkjs/react-markdown/compare/9.0.1...9.0.2</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="aed001070a"><code>aed0010</code></a>
9.0.3</li>
<li><a
href="40c097eb6f"><code>40c097e</code></a>
9.0.2</li>
<li><a
href="2c6ffe8f93"><code>2c6ffe8</code></a>
Refactor <code>.gitignore</code></li>
<li><a
href="b664ac4459"><code>b664ac4</code></a>
Update Actions</li>
<li><a
href="e68655127b"><code>e686551</code></a>
Update dev-dependencies</li>
<li><a
href="b151a9028f"><code>b151a90</code></a>
Fix types for React 19</li>
<li><a
href="27d3949b31"><code>27d3949</code></a>
Separate all typedefs into their own JSDoc blocks (<a
href="https://redirect.github.com/remarkjs/react-markdown/issues/878">#878</a>)</li>
<li><a
href="9eb589e828"><code>9eb589e</code></a>
Fix typo in changelog</li>
<li><a
href="515bf190a0"><code>515bf19</code></a>
Fix typo</li>
<li><a
href="a7ca8edfd6"><code>a7ca8ed</code></a>
Refactor <code>.editorconfig</code></li>
<li>Additional commits viewable in <a
href="https://github.com/remarkjs/react-markdown/compare/9.0.1...9.0.3">compare
view</a></li>
</ul>
</details>
<br />

Updates `react-modal` from 3.16.1 to 3.16.3
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/reactjs/react-modal/blob/master/CHANGELOG.md">react-modal's
changelog</a>.</em></p>
<blockquote>
<h2>3.16.3 - Tue, 17 Dec 2024 10:38:34 UTC</h2>
<ul>
<li><a
href="https://github.com/reactjs/react-modal/commit/a5c0cf4">a5c0cf4</a>
removing restriction on node engines.</li>
</ul>
<h2>3.16.2 - Tue, 17 Dec 2024 09:11:34 UTC</h2>
<ul>
<li><a
href="https://github.com/reactjs/react-modal/commit/b91c724">b91c724</a>
updade react and react-dom peer dependencies.</li>
<li><a
href="https://github.com/reactjs/react-modal/commit/a275399">a275399</a>
simplify PR template.</li>
<li><a
href="https://github.com/reactjs/react-modal/commit/588f26b">588f26b</a>
contributing requirements now just need a corresponding issue... on
GitHub board</li>
<li><a
href="https://github.com/reactjs/react-modal/commit/449398d">449398d</a>
remove discussion note from readme.</li>
<li><a
href="https://github.com/reactjs/react-modal/commit/e4841d6">e4841d6</a>
chore: update shouldCloseOnOverlayClick doc</li>
<li><a
href="https://github.com/reactjs/react-modal/commit/6724a04">6724a04</a>
Fix tests</li>
<li><a
href="https://github.com/reactjs/react-modal/commit/7c1d947">7c1d947</a>
Fix badge</li>
<li><a
href="https://github.com/reactjs/react-modal/commit/96a81be">96a81be</a>
Comment the ellipsis in code blocks in docs/index.md</li>
<li><a
href="https://github.com/reactjs/react-modal/commit/aff8b91">aff8b91</a>
[added] add nodejs version restriction to package.json</li>
<li><a
href="https://github.com/reactjs/react-modal/commit/321966e">321966e</a>
[changed] change Miscellaneous related nodejs version text</li>
<li><a
href="https://github.com/reactjs/react-modal/commit/8dc2347">8dc2347</a>
[added] add Miscellaneous section to the contributions.md file</li>
<li><a
href="https://github.com/reactjs/react-modal/commit/f9bc6a0">f9bc6a0</a>
[fixed] strict matching for tabbable nodes</li>
<li><a
href="https://github.com/reactjs/react-modal/commit/e7c4a63">e7c4a63</a>
downgrade node version on github action.</li>
<li><a
href="https://github.com/reactjs/react-modal/commit/1a8f562">1a8f562</a>
running tests on github actions</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="7a2a63c91c"><code>7a2a63c</code></a>
Release v3.16.3.</li>
<li><a
href="a5c0cf414d"><code>a5c0cf4</code></a>
removing restriction on node engines.</li>
<li><a
href="8f683027f8"><code>8f68302</code></a>
Release v3.16.2.</li>
<li><a
href="b91c7245b7"><code>b91c724</code></a>
updade react and react-dom peer dependencies.</li>
<li><a
href="a275399059"><code>a275399</code></a>
simplify PR template.</li>
<li><a
href="588f26b060"><code>588f26b</code></a>
contributing requirements now just need a corresponding issue...</li>
<li><a
href="449398da1e"><code>449398d</code></a>
remove discussion note from readme.</li>
<li><a
href="e4841d66d1"><code>e4841d6</code></a>
chore: update shouldCloseOnOverlayClick doc</li>
<li><a
href="6724a049c1"><code>6724a04</code></a>
Fix tests</li>
<li><a
href="7c1d947226"><code>7c1d947</code></a>
Fix badge</li>
<li>Additional commits viewable in <a
href="https://github.com/reactjs/react-modal/compare/v3.16.1...v3.16.3">compare
view</a></li>
</ul>
</details>
<br />

Updates `tailwind-merge` from 2.5.5 to 2.6.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/dcastil/tailwind-merge/releases">tailwind-merge's
releases</a>.</em></p>
<blockquote>
<h2>v2.6.0</h2>
<h3>New Features</h3>
<ul>
<li>Export ConfigExtension type from package by <a
href="https://github.com/dcastil"><code>@​dcastil</code></a> in <a
href="https://redirect.github.com/dcastil/tailwind-merge/pull/505">dcastil/tailwind-merge#505</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/dcastil/tailwind-merge/compare/v2.5.5...v2.6.0">https://github.com/dcastil/tailwind-merge/compare/v2.5.5...v2.6.0</a></p>
<p>Thanks to <a
href="https://github.com/brandonmcconnell"><code>@​brandonmcconnell</code></a>,
<a href="https://github.com/manavm1990"><code>@​manavm1990</code></a>,
<a href="https://github.com/langy"><code>@​langy</code></a>, <a
href="https://github.com/jamesreaco"><code>@​jamesreaco</code></a>, <a
href="https://github.com/roboflow"><code>@​roboflow</code></a>, <a
href="https://github.com/syntaxfm"><code>@​syntaxfm</code></a>, <a
href="https://github.com/getsentry"><code>@​getsentry</code></a>, <a
href="https://github.com/codecov"><code>@​codecov</code></a>, <a
href="https://github.com/sourcegraph"><code>@​sourcegraph</code></a>, a
private sponsor and more via <a
href="https://github.com/thnxdev"><code>@​thnxdev</code></a> for
sponsoring tailwind-merge! ❤️</p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="1a92c358e0"><code>1a92c35</code></a>
v2.6.0</li>
<li><a
href="64803754e7"><code>6480375</code></a>
add changelog for v2.6.0</li>
<li><a
href="7bb2dc0e02"><code>7bb2dc0</code></a>
Merge pull request <a
href="https://redirect.github.com/dcastil/tailwind-merge/issues/509">#509</a>
from dcastil/renovate/rollup-plugin-node-resolve-16.x</li>
<li><a
href="19eb0a1476"><code>19eb0a1</code></a>
chore(deps): update dependency <code>@​rollup/plugin-node-resolve</code>
to v16</li>
<li><a
href="d6f10146e3"><code>d6f1014</code></a>
Merge pull request <a
href="https://redirect.github.com/dcastil/tailwind-merge/issues/508">#508</a>
from dcastil/renovate/codspeed-vitest-plugin-4.x</li>
<li><a
href="d039e296dd"><code>d039e29</code></a>
chore(deps): update dependency <code>@​codspeed/vitest-plugin</code> to
v4</li>
<li><a
href="4aac490b6f"><code>4aac490</code></a>
Merge pull request <a
href="https://redirect.github.com/dcastil/tailwind-merge/issues/507">#507</a>
from dcastil/renovate/migrate-config</li>
<li><a
href="433e53208a"><code>433e532</code></a>
chore(config): migrate config .github/renovate.json</li>
<li><a
href="31da3f22d7"><code>31da3f2</code></a>
fix unsupported import assertion</li>
<li><a
href="34078eee52"><code>34078ee</code></a>
Merge pull request <a
href="https://redirect.github.com/dcastil/tailwind-merge/issues/506">#506</a>
from dcastil/other/upgrade-github-workflows-to-node-22</li>
<li>Additional commits viewable in <a
href="https://github.com/dcastil/tailwind-merge/compare/v2.5.5...v2.6.0">compare
view</a></li>
</ul>
</details>
<br />

Updates `uuid` from 11.0.3 to 11.0.4
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/uuidjs/uuid/releases">uuid's
releases</a>.</em></p>
<blockquote>
<h2>v11.0.4</h2>
<h2><a
href="https://github.com/uuidjs/uuid/compare/v11.0.3...v11.0.4">11.0.4</a>
(2025-01-05)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>docs:</strong> insure -&gt; ensure (<a
href="https://redirect.github.com/uuidjs/uuid/issues/843">#843</a>) (<a
href="d2a61e154d">d2a61e1</a>)</li>
<li>exclude tests from published package (<a
href="https://redirect.github.com/uuidjs/uuid/issues/840">#840</a>) (<a
href="f992ff4780">f992ff4</a>)</li>
<li>Test for invalid byte array sizes and ranges in <code>v1()</code>,
<code>v4()</code>, and <code>v7()</code> (<a
href="https://redirect.github.com/uuidjs/uuid/issues/845">#845</a>) (<a
href="e0ee90051e">e0ee900</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/uuidjs/uuid/blob/main/CHANGELOG.md">uuid's
changelog</a>.</em></p>
<blockquote>
<h2><a
href="https://github.com/uuidjs/uuid/compare/v11.0.3...v11.0.4">11.0.4</a>
(2025-01-05)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>docs:</strong> insure -&gt; ensure (<a
href="https://redirect.github.com/uuidjs/uuid/issues/843">#843</a>) (<a
href="d2a61e154d">d2a61e1</a>)</li>
<li>exclude tests from published package (<a
href="https://redirect.github.com/uuidjs/uuid/issues/840">#840</a>) (<a
href="f992ff4780">f992ff4</a>)</li>
<li>Test for invalid byte array sizes and ranges in <code>v1()</code>,
<code>v4()</code>, and <code>v7()</code> (<a
href="https://redirect.github.com/uuidjs/uuid/issues/845">#845</a>) (<a
href="e0ee90051e">e0ee900</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="050cd5b9df"><code>050cd5b</code></a>
chore(main): release 11.0.4 (<a
href="https://redirect.github.com/uuidjs/uuid/issues/842">#842</a>)</li>
<li><a
href="e0ee90051e"><code>e0ee900</code></a>
fix: Test for invalid byte array sizes and ranges in <code>v1()</code>,
<code>v4()</code>, and `v7(...</li>
<li><a
href="6e83b3ae83"><code>6e83b3a</code></a>
chore: update deps (<a
href="https://redirect.github.com/uuidjs/uuid/issues/848">#848</a>)</li>
<li><a
href="5f58b43aa4"><code>5f58b43</code></a>
docs: Ensure link to getrandomvalues-not-supported is maintained (<a
href="https://redirect.github.com/uuidjs/uuid/issues/844">#844</a>)</li>
<li><a
href="d2a61e154d"><code>d2a61e1</code></a>
fix(docs): insure -&gt; ensure (<a
href="https://redirect.github.com/uuidjs/uuid/issues/843">#843</a>)</li>
<li><a
href="f992ff4780"><code>f992ff4</code></a>
fix: exclude tests from published package (<a
href="https://redirect.github.com/uuidjs/uuid/issues/840">#840</a>)</li>
<li><a
href="59df7092c7"><code>59df709</code></a>
docs: add notes on platform support (<a
href="https://redirect.github.com/uuidjs/uuid/issues/838">#838</a>)</li>
<li>See full diff in <a
href="https://github.com/uuidjs/uuid/compare/v11.0.3...v11.0.4">compare
view</a></li>
</ul>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-07 18:42:25 +00:00
Swifty
0b9c0c9f12 refactor(marketplace): Delete Old marketplace code (#9164)
Needs to be coordinated with Infra PR
https://github.com/Significant-Gravitas/AutoGPT_cloud_infrastructure/pull/20

DO NOT MERGE WITHOUT SYNCING BOTH CHANGES

### Changes 🏗️

- Delete marketplace
2025-01-07 10:02:21 +00:00
dependabot[bot]
7e80401083 chore(libs/deps-dev): bump ruff from 0.8.3 to 0.8.6 in /autogpt_platform/autogpt_libs in the development-dependencies group across 1 directory (#9202)
Bumps the development-dependencies group with 1 update in the
/autogpt_platform/autogpt_libs directory:
[ruff](https://github.com/astral-sh/ruff).

Updates `ruff` from 0.8.3 to 0.8.6
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/astral-sh/ruff/releases">ruff's
releases</a>.</em></p>
<blockquote>
<h2>0.8.6</h2>
<h2>Release Notes</h2>
<h3>Preview features</h3>
<ul>
<li>[<code>format</code>]: Preserve multiline implicit concatenated
strings in docstring positions (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15126">#15126</a>)</li>
<li>[<code>ruff</code>] Add rule to detect empty literal in deque call
(<code>RUF025</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15104">#15104</a>)</li>
<li>[<code>ruff</code>] Avoid reporting when <code>ndigits</code> is
possibly negative (<code>RUF057</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15234">#15234</a>)</li>
</ul>
<h3>Rule changes</h3>
<ul>
<li>[<code>flake8-todos</code>] remove issue code length restriction
(<code>TD003</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15175">#15175</a>)</li>
<li>[<code>pyflakes</code>] Ignore errors in <code>@no_type_check</code>
string annotations (<code>F722</code>, <code>F821</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15215">#15215</a>)</li>
</ul>
<h3>CLI</h3>
<ul>
<li>Show errors for attempted fixes only when passed
<code>--verbose</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15237">#15237</a>)</li>
</ul>
<h3>Bug fixes</h3>
<ul>
<li>[<code>ruff</code>] Avoid syntax error when removing int over
multiple lines (<code>RUF046</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15230">#15230</a>)</li>
<li>[<code>pyupgrade</code>] Revert &quot;Add all PEP-585 names to
<code>UP006</code> rule&quot; (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15250">#15250</a>)</li>
</ul>
<h2>Contributors</h2>
<ul>
<li><a
href="https://github.com/AlexWaygood"><code>@​AlexWaygood</code></a></li>
<li><a
href="https://github.com/InSyncWithFoo"><code>@​InSyncWithFoo</code></a></li>
<li><a href="https://github.com/Lee-W"><code>@​Lee-W</code></a></li>
<li><a
href="https://github.com/MichaReiser"><code>@​MichaReiser</code></a></li>
<li><a
href="https://github.com/augustelalande"><code>@​augustelalande</code></a></li>
<li><a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a></li>
<li><a
href="https://github.com/dcreager"><code>@​dcreager</code></a></li>
<li><a href="https://github.com/dylwil3"><code>@​dylwil3</code></a></li>
<li><a
href="https://github.com/mdbernard"><code>@​mdbernard</code></a></li>
<li><a href="https://github.com/sharkdp"><code>@​sharkdp</code></a></li>
<li><a
href="https://github.com/w0nder1ng"><code>@​w0nder1ng</code></a></li>
</ul>
<h2>Install ruff 0.8.6</h2>
<h3>Install prebuilt binaries via shell script</h3>
<pre lang="sh"><code>curl --proto '=https' --tlsv1.2 -LsSf
https://github.com/astral-sh/ruff/releases/download/0.8.6/ruff-installer.sh
| sh
</code></pre>
<h3>Install prebuilt binaries via powershell script</h3>
<pre lang="sh"><code>powershell -ExecutionPolicy ByPass -c &quot;irm
https://github.com/astral-sh/ruff/releases/download/0.8.6/ruff-installer.ps1
| iex&quot;
</code></pre>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md">ruff's
changelog</a>.</em></p>
<blockquote>
<h2>0.8.6</h2>
<h3>Preview features</h3>
<ul>
<li>[<code>format</code>]: Preserve multiline implicit concatenated
strings in docstring positions (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15126">#15126</a>)</li>
<li>[<code>ruff</code>] Add rule to detect empty literal in deque call
(<code>RUF025</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15104">#15104</a>)</li>
<li>[<code>ruff</code>] Avoid reporting when <code>ndigits</code> is
possibly negative (<code>RUF057</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15234">#15234</a>)</li>
</ul>
<h3>Rule changes</h3>
<ul>
<li>[<code>flake8-todos</code>] remove issue code length restriction
(<code>TD003</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15175">#15175</a>)</li>
<li>[<code>pyflakes</code>] Ignore errors in <code>@no_type_check</code>
string annotations (<code>F722</code>, <code>F821</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15215">#15215</a>)</li>
</ul>
<h3>CLI</h3>
<ul>
<li>Show errors for attempted fixes only when passed
<code>--verbose</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15237">#15237</a>)</li>
</ul>
<h3>Bug fixes</h3>
<ul>
<li>[<code>ruff</code>] Avoid syntax error when removing int over
multiple lines (<code>RUF046</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15230">#15230</a>)</li>
<li>[<code>pyupgrade</code>] Revert &quot;Add all PEP-585 names to
<code>UP006</code> rule&quot; (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15250">#15250</a>)</li>
</ul>
<h2>0.8.5</h2>
<h3>Preview features</h3>
<ul>
<li>[<code>airflow</code>] Extend names moved from core to provider
(<code>AIR303</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15145">#15145</a>,
<a
href="https://redirect.github.com/astral-sh/ruff/pull/15159">#15159</a>,
<a
href="https://redirect.github.com/astral-sh/ruff/pull/15196">#15196</a>,
<a
href="https://redirect.github.com/astral-sh/ruff/pull/15216">#15216</a>)</li>
<li>[<code>airflow</code>] Extend rule to check class attributes,
methods, arguments (<code>AIR302</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15054">#15054</a>,
<a
href="https://redirect.github.com/astral-sh/ruff/pull/15083">#15083</a>)</li>
<li>[<code>fastapi</code>] Update <code>FAST002</code> to check
keyword-only arguments (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15119">#15119</a>)</li>
<li>[<code>flake8-type-checking</code>] Disable <code>TC006</code> and
<code>TC007</code> in stub files (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15179">#15179</a>)</li>
<li>[<code>pylint</code>] Detect nested methods correctly
(<code>PLW1641</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15032">#15032</a>)</li>
<li>[<code>ruff</code>] Detect more strict-integer expressions
(<code>RUF046</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14833">#14833</a>)</li>
<li>[<code>ruff</code>] Implement <code>falsy-dict-get-fallback</code>
(<code>RUF056</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15160">#15160</a>)</li>
<li>[<code>ruff</code>] Implement <code>unnecessary-round</code>
(<code>RUF057</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14828">#14828</a>)</li>
</ul>
<h3>Rule changes</h3>
<ul>
<li>Visit PEP 764 inline <code>TypedDict</code> keys as
non-type-expressions (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15073">#15073</a>)</li>
<li>[<code>flake8-comprehensions</code>] Skip <code>C416</code> if
comprehension contains unpacking (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14909">#14909</a>)</li>
<li>[<code>flake8-pie</code>] Allow <code>cast(SomeType, ...)</code>
(<code>PIE796</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15141">#15141</a>)</li>
<li>[<code>flake8-simplify</code>] More precise inference for
dictionaries (<code>SIM300</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15164">#15164</a>)</li>
<li>[<code>flake8-use-pathlib</code>] Catch redundant joins in
<code>PTH201</code> and avoid syntax errors (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15177">#15177</a>)</li>
<li>[<code>pycodestyle</code>] Preserve original value format
(<code>E731</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15097">#15097</a>)</li>
<li>[<code>pydocstyle</code>] Split on first whitespace character
(<code>D403</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15082">#15082</a>)</li>
<li>[<code>pyupgrade</code>] Add all PEP-585 names to <code>UP006</code>
rule (<a
href="https://redirect.github.com/astral-sh/ruff/pull/5454">#5454</a>)</li>
</ul>
<h3>Configuration</h3>
<ul>
<li>[<code>flake8-type-checking</code>] Improve flexibility of
<code>runtime-evaluated-decorators</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15204">#15204</a>)</li>
<li>[<code>pydocstyle</code>] Add setting to ignore missing
documentation for <code>*args</code> and <code>**kwargs</code>
parameters (<code>D417</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15210">#15210</a>)</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="6b907c1305"><code>6b907c1</code></a>
Ruff 0.8.6 (<a
href="https://redirect.github.com/astral-sh/ruff/issues/15253">#15253</a>)</li>
<li><a
href="f319531632"><code>f319531</code></a>
Make unreachable a test rule for now (<a
href="https://redirect.github.com/astral-sh/ruff/issues/15252">#15252</a>)</li>
<li><a
href="e4d9fe036a"><code>e4d9fe0</code></a>
Revert &quot;Add all PEP-585 names to UP006 rule&quot; (<a
href="https://redirect.github.com/astral-sh/ruff/issues/15250">#15250</a>)</li>
<li><a
href="baf0d660eb"><code>baf0d66</code></a>
Update salsa (<a
href="https://redirect.github.com/astral-sh/ruff/issues/15243">#15243</a>)</li>
<li><a
href="bde8ecddca"><code>bde8ecd</code></a>
[red-knot] Remove unneeded branch in
<code>Type::is_equivalent_to()</code> (<a
href="https://redirect.github.com/astral-sh/ruff/issues/15242">#15242</a>)</li>
<li><a
href="842f882ef0"><code>842f882</code></a>
[<code>ruff</code>] Avoid reporting when <code>ndigits</code> is
possibly negative (<code>RUF057</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/issues/15234">#15234</a>)</li>
<li><a
href="75015b0ed9"><code>75015b0</code></a>
Attribute panics to the mdtests that cause them (<a
href="https://redirect.github.com/astral-sh/ruff/issues/15241">#15241</a>)</li>
<li><a
href="706d87f239"><code>706d87f</code></a>
Show errors for attempted fixes only when passed <code>--verbose</code>
(<a
href="https://redirect.github.com/astral-sh/ruff/issues/15237">#15237</a>)</li>
<li><a
href="0837cdd931"><code>0837cdd</code></a>
[<code>RUF</code>] Add rule to detect empty literal in deque call
(<code>RUF025</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/issues/15104">#15104</a>)</li>
<li><a
href="0dbfa8d0e0"><code>0dbfa8d</code></a>
TD003: remove issue code length restriction (<a
href="https://redirect.github.com/astral-sh/ruff/issues/15175">#15175</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/astral-sh/ruff/compare/0.8.3...0.8.6">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=ruff&package-manager=pip&previous-version=0.8.3&new-version=0.8.6)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Nicholas Tindle <nicholas.tindle@agpt.co>
Co-authored-by: Swifty <craigswift13@gmail.com>
2025-01-07 07:56:41 +00:00
Reinier van der Leer
96fae5a5c8 fix(backend): Fix intermittent failure of test_agent_execution (#9210)
- Fixed race condition in `create_graph` to preserve node order
- Resolves #9123
2025-01-07 03:42:33 +00:00
Reinier van der Leer
7a9a771718 fix(backend): Fix webhook ingress URL generation (#9209)
The enum's string *representation* was being inserted in the URL instead
of its string *value*.

Before:
`/api/integrations/ProviderName.GITHUB/webhooks/686db48c-e70d-4340-acf9-ccd0338fddc4/ingress`

After:
`/api/integrations/github/webhooks/686db48c-e70d-4340-acf9-ccd0338fddc4/ingress`

---------

Co-authored-by: Nicholas Tindle <nicholas.tindle@agpt.co>
2025-01-06 23:45:35 +00:00
Reinier van der Leer
c3caa111e4 feat(backend/executor): Add TERMINATED execution status (#9185)
- Resolves #9182

Formerly known as `FAILED` with error message `TERMINATED`.

### Changes 🏗️

- Add `TERMINATED` to `AgentExecutionStatus` enum in DB schema (and its
mirror in the front end)
- Update executor to give terminated node and graph executions status
`TERMINATED` instead of `FAILED`/`COMPLETED`
- Add `TERMINATED` case to status checks referencing
`AgentExecutionStatus`

### Checklist 📋

#### For code changes:
- [x] I have clearly listed my changes in the PR description
- [x] I have made a test plan
- [x] I have tested my changes according to the test plan:
  - Start and forcefully stop a graph execution

---------

Co-authored-by: Zamil Majdy <zamil.majdy@agpt.co>
2025-01-06 22:59:49 +00:00
Reinier van der Leer
081c4a6df2 dx: Fix isort pre-commit hooks
Since upgrading to Poetry v2.0.0 the -C flag has been renamed to -P
2025-01-07 00:02:39 +01:00
Reinier van der Leer
d638c1f484 Fix Poetry v2.0.0 compatibility (#9197)
Make all changes necessary to make everything work with Poetry v2.0.0.

- Resolves #9196

## Changes
- Removed `--no-update` flag from `poetry lock` command in codebase
- Removed extra path arguments from `poetry -C [path] run [command]`
occurrences
- Regenerated all lock files in hierarchical order
- Added workaround for Poetry bug where `packages.[i].format` is now
suddenly required

Additionally:
- Fixed up .dockerignore
  - Fixes .venv being erroneously copied over from local
  - Fixes build context bloat (300MB -> 2.5MB)
- Fixed warnings about entrypoint script not being installed in docker
builds

### Relevant (breaking) changes in v2.0.0
- `--no-update` flag no longer exists for `poetry lock` as it has become
default behavior
- The `-C` option now actually changes the directory, so any path
arguments in `poetry run` commands can/must be removed
- Poetry v2.0.0 uses the new v2.1 lock file spec, so all lock files have
to be regenerated to avoid false-positive lock file updates and checks
on future PRs
- **BUG:** when specifying `poetry.tool.packages`, `format` is required
now
  - python-poetry/poetry#9961

Full Poetry v2.0.0 release notes and change log:
https://python-poetry.org/blog/announcing-poetry-2.0.0
2025-01-06 23:34:49 +01:00
Abhimanyu Yadav
0872da1969 fix(store) : Download agent from store if user is not logged in (#9121)
- resolves - #9120 

### Changes 

- Added a new endpoint to download agent files as JSON, allowing users
to retrieve agent data by store listing version ID and version number.
- Introduced a new `get_agent` function in the database module to fetch
agent details and prepare the graph data for download.
- Enhanced the frontend `AgentInfo` component to include a download
button, which triggers the download of the agent file.
- Integrated loading state and user feedback via toast notifications
during the download process.
- Updated the API client to support the new download functionality.

### Demo video 



https://github.com/user-attachments/assets/6744a753-297f-4ccc-abde-f56ca24ed2d5

### Example Json

```json
{
  "id": "14378095-4cc5-41ea-975e-bd0bce010bea",
  "version": 1,
  "is_active": true,
  "is_template": false,
  "name": "something",
  "description": "1",
  "nodes": [
    {
      "id": "6914efa0-e4fa-4ce8-802c-d5577cf061b6",
      "block_id": "aeb08fc1-2fc1-4141-bc8e-f758f183a822",
      "input_default": {},
      "metadata": {
        "position": {
          "x": 756,
          "y": 452.5
        }
      },
      "input_links": [],
      "output_links": [],
      "webhook_id": null,
      "graph_id": "14378095-4cc5-41ea-975e-bd0bce010bea",
      "graph_version": 1,
      "webhook": null
    }
  ],
  "links": [],
  "input_schema": {
    "type": "object",
    "properties": {},
    "required": []
  },
  "output_schema": {
    "type": "object",
    "properties": {},
    "required": []
  }
}
```

---------

Co-authored-by: SwiftyOS <craigswift13@gmail.com>
2025-01-03 17:21:15 +00:00
Reinier van der Leer
1375a0fdbc feat(platform): Support multiple credentials inputs on blocks (#8932)
- Resolves #8930
- Depends on #8725

### Changes 🏗️

- feat(platform): Support multiple credentials inputs on blocks

Aside from `credentials`, fields within the name pattern `*_credentials`
are now also supported!

- Update docs with info on multi credentials support

### Checklist 📋

#### For code changes:
- [x] I have clearly listed my changes in the PR description
- [x] I have made a test plan
- [x] I have tested my changes according to the test plan:
  - [x] Ask @aarushik93 to test
2025-01-03 15:18:57 +00:00
Bently
84af37a27a refactor(blocks): Move some GitHub blocks to correct file (#9180)
This moves my recently added blocks: ``GithubCreateFileBlock``,
``GithubUpdateFileBlock``, ``GithubCreateRepositoryBlock`` and
``GithubListStargazersBlock`` to the correct file ``github/repo.py`` as
i placed them in the wrong file originally
2025-01-03 15:02:53 +00:00
Zamil Majdy
8f1a065976 fix(frontend): Make input layout & padding consistent (#9170)
There are a few hardcoded margins and padding in the block input layout,
causing the input to sometimes overflow or be used inconsistently.


![image](https://github.com/user-attachments/assets/8a9b8e0d-04fd-4660-94d3-5dfe69cbc77d)


### Changes 🏗️

* Make padding consistent between left & right, top & bottom.
* Remove hard-coded margins.
* Match the hardcode negative margin for the right node handle to the
left node handle.
* Make the input box take the full width.

### Checklist 📋

#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [ ] ...

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>
2025-01-03 10:59:06 +00:00
dependabot[bot]
e7689a1eb7 chore(market/deps-dev): bump the development-dependencies group across 1 directory with 3 updates (#9165)
Bumps the development-dependencies group with 3 updates in the
/autogpt_platform/market directory:
[pytest-asyncio](https://github.com/pytest-dev/pytest-asyncio),
[ruff](https://github.com/astral-sh/ruff) and
[pyright](https://github.com/RobertCraigie/pyright-python).

Updates `pytest-asyncio` from 0.25.0 to 0.25.1
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/pytest-dev/pytest-asyncio/releases">pytest-asyncio's
releases</a>.</em></p>
<blockquote>
<h2>pytest-asyncio 0.25.1</h2>
<ul>
<li>Fixes an issue that caused a broken event loop when a
function-scoped test was executed in between two tests with wider loop
scope <a
href="https://redirect.github.com/pytest-dev/pytest-asyncio/issues/950">#950</a></li>
<li>Improves test collection speed in auto mode <a
href="https://redirect.github.com/pytest-dev/pytest-asyncio/pull/1020">#1020</a></li>
<li>Corrects the warning that is emitted upon redefining the event_loop
fixture</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="623ab74b80"><code>623ab74</code></a>
docs: Prepare release of v0.25.1.</li>
<li><a
href="c236550e73"><code>c236550</code></a>
docs: Fix broken link to the pytest.mark.asyncio reference.</li>
<li><a
href="41c645b3b7"><code>41c645b</code></a>
fix: Correct warning message when redefining the event_loop
fixture.</li>
<li><a
href="2fd10f8243"><code>2fd10f8</code></a>
docs: Clarify deprecation of event_loop fixture.</li>
<li><a
href="a4e82ab25b"><code>a4e82ab</code></a>
docs: Added changelog entry for <a
href="https://redirect.github.com/pytest-dev/pytest-asyncio/issues/1020">#1020</a>.</li>
<li><a
href="04f90445e1"><code>04f9044</code></a>
refactor: Replace the &quot;__original_fixture_loop&quot; magic
attribute with the more...</li>
<li><a
href="dafef6c65b"><code>dafef6c</code></a>
refactor: Extracted a function to mark an event loop as created by
pytest-asy...</li>
<li><a
href="0c931b7eab"><code>0c931b7</code></a>
refactor: Extracted function to check if a loop was created by
pytest-asyncio.</li>
<li><a
href="0642dcd27b"><code>0642dcd</code></a>
fix: Fix broken event loop when a function-scoped test is in between two
wide...</li>
<li><a
href="050a5f81c9"><code>050a5f8</code></a>
[pre-commit.ci] pre-commit autoupdate</li>
<li>Additional commits viewable in <a
href="https://github.com/pytest-dev/pytest-asyncio/compare/v0.25.0...v0.25.1">compare
view</a></li>
</ul>
</details>
<br />

Updates `ruff` from 0.8.3 to 0.8.4
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/astral-sh/ruff/releases">ruff's
releases</a>.</em></p>
<blockquote>
<h2>0.8.4</h2>
<h2>Release Notes</h2>
<h3>Preview features</h3>
<ul>
<li>[<code>airflow</code>] Extend <code>AIR302</code> with additional
functions and classes (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15015">#15015</a>)</li>
<li>[<code>airflow</code>] Implement <code>moved-to-provider-in-3</code>
for modules that has been moved to Airflow providers
(<code>AIR303</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14764">#14764</a>)</li>
<li>[<code>flake8-use-pathlib</code>] Extend check for invalid path
suffix to include the case <code>&quot;.&quot;</code>
(<code>PTH210</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14902">#14902</a>)</li>
<li>[<code>perflint</code>] Fix panic in <code>PERF401</code> when list
variable is after the <code>for</code> loop (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14971">#14971</a>)</li>
<li>[<code>perflint</code>] Simplify finding the loop target in
<code>PERF401</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15025">#15025</a>)</li>
<li>[<code>pylint</code>] Preserve original value format
(<code>PLR6104</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14978">#14978</a>)</li>
<li>[<code>ruff</code>] Avoid false positives for <code>RUF027</code>
for typing context bindings (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15037">#15037</a>)</li>
<li>[<code>ruff</code>] Check for ambiguous pattern passed to
<code>pytest.raises()</code> (<code>RUF043</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14966">#14966</a>)</li>
</ul>
<h3>Rule changes</h3>
<ul>
<li>[<code>flake8-bandit</code>] Check <code>S105</code> for annotated
assignment (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15059">#15059</a>)</li>
<li>[<code>flake8-pyi</code>] More autofixes for
<code>redundant-none-literal</code> (<code>PYI061</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14872">#14872</a>)</li>
<li>[<code>pydocstyle</code>] Skip leading whitespace for
<code>D403</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14963">#14963</a>)</li>
<li>[<code>ruff</code>] Skip <code>SQLModel</code> base classes for
<code>mutable-class-default</code> (<code>RUF012</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14949">#14949</a>)</li>
</ul>
<h3>Bug</h3>
<ul>
<li>[<code>perflint</code>] Parenthesize walrus expressions in autofix
for <code>manual-list-comprehension</code> (<code>PERF401</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15050">#15050</a>)</li>
</ul>
<h3>Server</h3>
<ul>
<li>Check diagnostic refresh support from client capability which
enables dynamic configuration for various editors (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15014">#15014</a>)</li>
</ul>
<h2>Contributors</h2>
<ul>
<li><a
href="https://github.com/AlexWaygood"><code>@​AlexWaygood</code></a></li>
<li><a
href="https://github.com/Daverball"><code>@​Daverball</code></a></li>
<li><a
href="https://github.com/DimitriPapadopoulos"><code>@​DimitriPapadopoulos</code></a></li>
<li><a
href="https://github.com/InSyncWithFoo"><code>@​InSyncWithFoo</code></a></li>
<li><a href="https://github.com/Lee-W"><code>@​Lee-W</code></a></li>
<li><a
href="https://github.com/MichaReiser"><code>@​MichaReiser</code></a></li>
<li><a href="https://github.com/TheBits"><code>@​TheBits</code></a></li>
<li><a
href="https://github.com/cake-monotone"><code>@​cake-monotone</code></a></li>
<li><a href="https://github.com/carljm"><code>@​carljm</code></a></li>
<li><a
href="https://github.com/dcreager"><code>@​dcreager</code></a></li>
<li><a
href="https://github.com/dhruvmanila"><code>@​dhruvmanila</code></a></li>
<li><a href="https://github.com/dylwil3"><code>@​dylwil3</code></a></li>
<li><a
href="https://github.com/github-actions"><code>@​github-actions</code></a></li>
<li><a
href="https://github.com/kiran-4444"><code>@​kiran-4444</code></a></li>
<li><a
href="https://github.com/krishnan-chandra"><code>@​krishnan-chandra</code></a></li>
<li><a
href="https://github.com/rchen152"><code>@​rchen152</code></a></li>
<li><a
href="https://github.com/renovate"><code>@​renovate</code></a></li>
<li><a href="https://github.com/sharkdp"><code>@​sharkdp</code></a></li>
<li><a
href="https://github.com/tarasmatsyk"><code>@​tarasmatsyk</code></a></li>
<li><a
href="https://github.com/w0nder1ng"><code>@​w0nder1ng</code></a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md">ruff's
changelog</a>.</em></p>
<blockquote>
<h2>0.8.4</h2>
<h3>Preview features</h3>
<ul>
<li>[<code>airflow</code>] Extend <code>AIR302</code> with additional
functions and classes (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15015">#15015</a>)</li>
<li>[<code>airflow</code>] Implement <code>moved-to-provider-in-3</code>
for modules that has been moved to Airflow providers
(<code>AIR303</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14764">#14764</a>)</li>
<li>[<code>flake8-use-pathlib</code>] Extend check for invalid path
suffix to include the case <code>&quot;.&quot;</code>
(<code>PTH210</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14902">#14902</a>)</li>
<li>[<code>perflint</code>] Fix panic in <code>PERF401</code> when list
variable is after the <code>for</code> loop (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14971">#14971</a>)</li>
<li>[<code>perflint</code>] Simplify finding the loop target in
<code>PERF401</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15025">#15025</a>)</li>
<li>[<code>pylint</code>] Preserve original value format
(<code>PLR6104</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14978">#14978</a>)</li>
<li>[<code>ruff</code>] Avoid false positives for <code>RUF027</code>
for typing context bindings (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15037">#15037</a>)</li>
<li>[<code>ruff</code>] Check for ambiguous pattern passed to
<code>pytest.raises()</code> (<code>RUF043</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14966">#14966</a>)</li>
</ul>
<h3>Rule changes</h3>
<ul>
<li>[<code>flake8-bandit</code>] Check <code>S105</code> for annotated
assignment (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15059">#15059</a>)</li>
<li>[<code>flake8-pyi</code>] More autofixes for
<code>redundant-none-literal</code> (<code>PYI061</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14872">#14872</a>)</li>
<li>[<code>pydocstyle</code>] Skip leading whitespace for
<code>D403</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14963">#14963</a>)</li>
<li>[<code>ruff</code>] Skip <code>SQLModel</code> base classes for
<code>mutable-class-default</code> (<code>RUF012</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/14949">#14949</a>)</li>
</ul>
<h3>Bug</h3>
<ul>
<li>[<code>perflint</code>] Parenthesize walrus expressions in autofix
for <code>manual-list-comprehension</code> (<code>PERF401</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15050">#15050</a>)</li>
</ul>
<h3>Server</h3>
<ul>
<li>Check diagnostic refresh support from client capability which
enables dynamic configuration for various editors (<a
href="https://redirect.github.com/astral-sh/ruff/pull/15014">#15014</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="3bb0dac235"><code>3bb0dac</code></a>
Bump version to 0.8.4 (<a
href="https://redirect.github.com/astral-sh/ruff/issues/15064">#15064</a>)</li>
<li><a
href="40cba5dc8a"><code>40cba5d</code></a>
[red-knot] Cleanup various <code>todo_type!()</code> messages (<a
href="https://redirect.github.com/astral-sh/ruff/issues/15063">#15063</a>)</li>
<li><a
href="596d80cc8e"><code>596d80c</code></a>
[<code>perflint</code>] Parenthesize walrus expressions in autofix for
`manual-list-comp...</li>
<li><a
href="d8b9a366c8"><code>d8b9a36</code></a>
Disable actionlint hook by default when running pre-commit locally (<a
href="https://redirect.github.com/astral-sh/ruff/issues/15061">#15061</a>)</li>
<li><a
href="85e71ba91a"><code>85e71ba</code></a>
[<code>flake8-bandit</code>] Check <code>S105</code> for annotated
assignment (<a
href="https://redirect.github.com/astral-sh/ruff/issues/15059">#15059</a>)</li>
<li><a
href="2802cbde29"><code>2802cbd</code></a>
Don't special-case class instances in unary expression inference (<a
href="https://redirect.github.com/astral-sh/ruff/issues/15045">#15045</a>)</li>
<li><a
href="ed2bce6ebb"><code>ed2bce6</code></a>
[red-knot] Report invalid exceptions (<a
href="https://redirect.github.com/astral-sh/ruff/issues/15042">#15042</a>)</li>
<li><a
href="f0012df686"><code>f0012df</code></a>
Fix typos in <code>RUF043.py</code> (<a
href="https://redirect.github.com/astral-sh/ruff/issues/15044">#15044</a>)</li>
<li><a
href="0fc4e8f795"><code>0fc4e8f</code></a>
Introduce <code>InferContext</code> (<a
href="https://redirect.github.com/astral-sh/ruff/issues/14956">#14956</a>)</li>
<li><a
href="ac81c72bf3"><code>ac81c72</code></a>
[<code>ruff</code>] Ambiguous pattern passed to
<code>pytest.raises()</code> (<code>RUF043</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/issues/14966">#14966</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/astral-sh/ruff/compare/0.8.3...0.8.4">compare
view</a></li>
</ul>
</details>
<br />

Updates `pyright` from 1.1.390 to 1.1.391
<details>
<summary>Commits</summary>
<ul>
<li><a
href="3356df1d40"><code>3356df1</code></a>
[pyright updated to 1.1.391] Update Version (<a
href="https://redirect.github.com/RobertCraigie/pyright-python/issues/327">#327</a>)</li>
<li>See full diff in <a
href="https://github.com/RobertCraigie/pyright-python/compare/v1.1.390...v1.1.391">compare
view</a></li>
</ul>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-03 09:49:36 +00:00
Bently
fe8393a82f feat(blocks): Add github list stargazers block (#9172)
This adds a list stargazers block, its using
https://docs.github.com/en/rest/activity/starring?apiVersion=2022-11-28#list-stargazers


![image](https://github.com/user-attachments/assets/0fe87a97-ebea-40c2-818d-28f6555ae91c)
2025-01-03 09:48:51 +00:00
Reinier van der Leer
fa98827fd1 fix(backend): Fix validation of hostname-less URLs (#9171)
Previously, `http://` would be converted to `http://http` and pass the
no-hostname check that way. It eventually fails validation, but only at
hostname lookup which times out -> takes very long.

### Changes 🏗️

- Fix URL canonicalization logic
- Merge `_canonicalize_url` into `validate_url`

### Checklist 📋

#### For code changes:
- [x] I have clearly listed my changes in the PR description
- [x] I have made a test plan
- [x] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [x] CI
2025-01-03 09:48:30 +00:00
dependabot[bot]
d7d69f397f chore(frontend/deps-dev): bump the development-dependencies group across 1 directory with 5 updates (#9150)
Bumps the development-dependencies group with 5 updates in the
/autogpt_platform/frontend directory:

| Package | From | To |
| --- | --- | --- |
|
[@chromatic-com/storybook](https://github.com/chromaui/addon-visual-tests)
| `3.2.2` | `3.2.3` |
| [@storybook/test-runner](https://github.com/storybookjs/test-runner) |
`0.20.1` | `0.21.0` |
| [concurrently](https://github.com/open-cli-tools/concurrently) |
`9.1.0` | `9.1.1` |
|
[eslint-config-next](https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next)
| `15.1.0` | `15.1.3` |
| [tailwindcss](https://github.com/tailwindlabs/tailwindcss) | `3.4.16`
| `3.4.17` |


Updates `@chromatic-com/storybook` from 3.2.2 to 3.2.3
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/chromaui/addon-visual-tests/releases"><code>@​chromatic-com/storybook</code>'s
releases</a>.</em></p>
<blockquote>
<h2>v3.2.3</h2>
<h4>🐛 Bug Fix</h4>
<ul>
<li>Fix reading <code>status</code> of <code>undefined</code> in urql's
<code>didAuthError</code> handler <a
href="https://redirect.github.com/chromaui/addon-visual-tests/pull/349">#349</a>
(<a
href="https://github.com/ghengeveld"><code>@​ghengeveld</code></a>)</li>
<li>Add steps to link for local testing <a
href="https://redirect.github.com/chromaui/addon-visual-tests/pull/347">#347</a>
(<a href="https://github.com/codykaup"><code>@​codykaup</code></a>)</li>
</ul>
<h4>Authors: 2</h4>
<ul>
<li>Cody Kaup (<a
href="https://github.com/codykaup"><code>@​codykaup</code></a>)</li>
<li>Gert Hengeveld (<a
href="https://github.com/ghengeveld"><code>@​ghengeveld</code></a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/chromaui/addon-visual-tests/blob/main/CHANGELOG.md"><code>@​chromatic-com/storybook</code>'s
changelog</a>.</em></p>
<blockquote>
<h1>v3.2.3 (Thu Dec 19 2024)</h1>
<h4>🐛 Bug Fix</h4>
<ul>
<li>Fix reading <code>status</code> of <code>undefined</code> in urql's
<code>didAuthError</code> handler <a
href="https://redirect.github.com/chromaui/addon-visual-tests/pull/349">#349</a>
(<a
href="https://github.com/ghengeveld"><code>@​ghengeveld</code></a>)</li>
<li>Add steps to link for local testing <a
href="https://redirect.github.com/chromaui/addon-visual-tests/pull/347">#347</a>
(<a href="https://github.com/codykaup"><code>@​codykaup</code></a>)</li>
</ul>
<h4>Authors: 2</h4>
<ul>
<li>Cody Kaup (<a
href="https://github.com/codykaup"><code>@​codykaup</code></a>)</li>
<li>Gert Hengeveld (<a
href="https://github.com/ghengeveld"><code>@​ghengeveld</code></a>)</li>
</ul>
<hr />
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="871413fd8a"><code>871413f</code></a>
Bump version to: 3.2.3 [skip ci]</li>
<li><a
href="a29f901536"><code>a29f901</code></a>
Update CHANGELOG.md [skip ci]</li>
<li><a
href="982f9cba43"><code>982f9cb</code></a>
Merge pull request <a
href="https://redirect.github.com/chromaui/addon-visual-tests/issues/349">#349</a>
from chromaui/fix-auth-error-handler</li>
<li><a
href="35f989a26b"><code>35f989a</code></a>
Request is optional on error object</li>
<li><a
href="ec0a952a47"><code>ec0a952</code></a>
Merge pull request <a
href="https://redirect.github.com/chromaui/addon-visual-tests/issues/347">#347</a>
from chromaui/cody/cap-2346-write-up-doc-on-how-to-se...</li>
<li><a
href="43ef127485"><code>43ef127</code></a>
Add steps to link for local testing</li>
<li>See full diff in <a
href="https://github.com/chromaui/addon-visual-tests/compare/v3.2.2...v3.2.3">compare
view</a></li>
</ul>
</details>
<br />

Updates `@storybook/test-runner` from 0.20.1 to 0.21.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/storybookjs/test-runner/releases"><code>@​storybook/test-runner</code>'s
releases</a>.</em></p>
<blockquote>
<h2>v0.21.0</h2>
<h4>🚀 Enhancement</h4>
<ul>
<li>Release 0.21.0 <a
href="https://redirect.github.com/storybookjs/test-runner/pull/527">#527</a>
(<a href="https://github.com/kaelig"><code>@​kaelig</code></a> <a
href="https://github.com/guspan-tanadi"><code>@​guspan-tanadi</code></a>
<a href="https://github.com/yannbf"><code>@​yannbf</code></a>)</li>
<li>Feature: Add --listTests flag from Jest <a
href="https://redirect.github.com/storybookjs/test-runner/pull/521">#521</a>
(<a href="https://github.com/kaelig"><code>@​kaelig</code></a>)</li>
</ul>
<h4>🐛 Bug Fix</h4>
<ul>
<li>style(README): highlight Markdown Note section <a
href="https://redirect.github.com/storybookjs/test-runner/pull/523">#523</a>
(<a
href="https://github.com/guspan-tanadi"><code>@​guspan-tanadi</code></a>)</li>
<li>Fix: Handle RSC errors <a
href="https://redirect.github.com/storybookjs/test-runner/pull/526">#526</a>
(<a href="https://github.com/yannbf"><code>@​yannbf</code></a>)</li>
</ul>
<h4>Authors: 3</h4>
<ul>
<li>Guspan Tanadi (<a
href="https://github.com/guspan-tanadi"><code>@​guspan-tanadi</code></a>)</li>
<li>Kaelig Deloumeau-Prigent (<a
href="https://github.com/kaelig"><code>@​kaelig</code></a>)</li>
<li>Yann Braga (<a
href="https://github.com/yannbf"><code>@​yannbf</code></a>)</li>
</ul>
<h2>v0.21.0-next.1</h2>
<h4>🐛 Bug Fix</h4>
<ul>
<li>Fix: Handle RSC errors <a
href="https://redirect.github.com/storybookjs/test-runner/pull/526">#526</a>
(<a href="https://github.com/yannbf"><code>@​yannbf</code></a>)</li>
</ul>
<h4>Authors: 1</h4>
<ul>
<li>Yann Braga (<a
href="https://github.com/yannbf"><code>@​yannbf</code></a>)</li>
</ul>
<h2>v0.21.0-next.0</h2>
<h4>🚀 Enhancement</h4>
<ul>
<li>Feature: Add --listTests flag from Jest <a
href="https://redirect.github.com/storybookjs/test-runner/pull/521">#521</a>
(<a href="https://github.com/kaelig"><code>@​kaelig</code></a>)</li>
</ul>
<h4>Authors: 1</h4>
<ul>
<li>Kaelig Deloumeau-Prigent (<a
href="https://github.com/kaelig"><code>@​kaelig</code></a>)</li>
</ul>
<h2>v0.20.2-next.0</h2>
<h4>🐛 Bug Fix</h4>
<ul>
<li>Fix postVisit hook issue <a
href="https://redirect.github.com/storybookjs/test-runner/pull/519">#519</a>
(<a href="https://github.com/yannbf"><code>@​yannbf</code></a>)</li>
</ul>
<h4>Authors: 1</h4>
<ul>
<li>Yann Braga (<a
href="https://github.com/yannbf"><code>@​yannbf</code></a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/storybookjs/test-runner/blob/v0.21.0/CHANGELOG.md"><code>@​storybook/test-runner</code>'s
changelog</a>.</em></p>
<blockquote>
<h1>v0.21.0 (Fri Dec 20 2024)</h1>
<h4>🚀 Enhancement</h4>
<ul>
<li>Release 0.21.0 <a
href="https://redirect.github.com/storybookjs/test-runner/pull/527">#527</a>
(<a href="https://github.com/kaelig"><code>@​kaelig</code></a> <a
href="https://github.com/guspan-tanadi"><code>@​guspan-tanadi</code></a>
<a href="https://github.com/yannbf"><code>@​yannbf</code></a>)</li>
<li>Feature: Add --listTests flag from Jest <a
href="https://redirect.github.com/storybookjs/test-runner/pull/521">#521</a>
(<a href="https://github.com/kaelig"><code>@​kaelig</code></a>)</li>
</ul>
<h4>🐛 Bug Fix</h4>
<ul>
<li>style(README): highlight Markdown Note section <a
href="https://redirect.github.com/storybookjs/test-runner/pull/523">#523</a>
(<a
href="https://github.com/guspan-tanadi"><code>@​guspan-tanadi</code></a>)</li>
<li>Fix: Handle RSC errors <a
href="https://redirect.github.com/storybookjs/test-runner/pull/526">#526</a>
(<a href="https://github.com/yannbf"><code>@​yannbf</code></a>)</li>
</ul>
<h4>Authors: 3</h4>
<ul>
<li>Guspan Tanadi (<a
href="https://github.com/guspan-tanadi"><code>@​guspan-tanadi</code></a>)</li>
<li>Kaelig Deloumeau-Prigent (<a
href="https://github.com/kaelig"><code>@​kaelig</code></a>)</li>
<li>Yann Braga (<a
href="https://github.com/yannbf"><code>@​yannbf</code></a>)</li>
</ul>
<hr />
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="301bdaed74"><code>301bdae</code></a>
Bump version to: 0.21.0 [skip ci]</li>
<li><a
href="e51456ee77"><code>e51456e</code></a>
Update CHANGELOG.md [skip ci]</li>
<li><a
href="f09c9258ac"><code>f09c925</code></a>
Merge pull request <a
href="https://redirect.github.com/storybookjs/test-runner/issues/527">#527</a>
from storybookjs/release/v0.21.0</li>
<li><a
href="5cd46e3655"><code>5cd46e3</code></a>
Merge branch 'main' into release/v0.21.0</li>
<li><a
href="30d892498f"><code>30d8924</code></a>
Merge pull request <a
href="https://redirect.github.com/storybookjs/test-runner/issues/523">#523</a>
from guspan-tanadi/notehighlight</li>
<li><a
href="9cb0ec2308"><code>9cb0ec2</code></a>
Merge pull request <a
href="https://redirect.github.com/storybookjs/test-runner/issues/526">#526</a>
from storybookjs/fix-rsc-error-handling</li>
<li><a
href="b21c854545"><code>b21c854</code></a>
Merge pull request <a
href="https://redirect.github.com/storybookjs/test-runner/issues/521">#521</a>
from kaelig/add-listTests</li>
<li><a
href="b7a6bca7ce"><code>b7a6bca</code></a>
handle RSC errors</li>
<li><a
href="36573a00b7"><code>36573a0</code></a>
style(README): highlight Markdown Note section</li>
<li><a
href="740607eb10"><code>740607e</code></a>
Add listTests flag from Jest</li>
<li>See full diff in <a
href="https://github.com/storybookjs/test-runner/compare/v0.20.1...v0.21.0">compare
view</a></li>
</ul>
</details>
<br />

Updates `concurrently` from 9.1.0 to 9.1.1
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/open-cli-tools/concurrently/releases">concurrently's
releases</a>.</em></p>
<blockquote>
<h2>v9.1.1</h2>
<h2>What's Changed</h2>
<ul>
<li>fix: support Deno's JSON with comments configuration by <a
href="https://github.com/mahtaran"><code>@​mahtaran</code></a> in <a
href="https://redirect.github.com/open-cli-tools/concurrently/pull/523">open-cli-tools/concurrently#523</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/open-cli-tools/concurrently/compare/v9.1.0...v9.1.1">https://github.com/open-cli-tools/concurrently/compare/v9.1.0...v9.1.1</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="6cafc606a3"><code>6cafc60</code></a>
9.1.1</li>
<li><a
href="80fceda02e"><code>80fceda</code></a>
fix: support Deno's JSON with comments (<a
href="https://redirect.github.com/open-cli-tools/concurrently/issues/523">#523</a>)</li>
<li><a
href="8d3f9761bf"><code>8d3f976</code></a>
docs: fix inconsistencies in passthrough args page</li>
<li>See full diff in <a
href="https://github.com/open-cli-tools/concurrently/compare/v9.1.0...v9.1.1">compare
view</a></li>
</ul>
</details>
<br />

Updates `eslint-config-next` from 15.1.0 to 15.1.3
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/vercel/next.js/releases">eslint-config-next's
releases</a>.</em></p>
<blockquote>
<h2>v15.1.3</h2>
<blockquote>
<p>[!NOTE]<br />
This release is backporting bug fixes. It does <strong>not</strong>
include all pending features/changes on canary.</p>
</blockquote>
<h3>Core Changes</h3>
<ul>
<li>Retry manifest file loading only in dev mode: <a
href="https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next/issues/73900">#73900</a></li>
<li>Use shared worker for lint &amp; typecheck steps: <a
href="https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next/issues/74154">#74154</a></li>
</ul>
<h3>Credits</h3>
<p>Huge thanks to <a
href="https://github.com/unstubbable"><code>@​unstubbable</code></a> and
<a href="https://github.com/ztanner"><code>@​ztanner</code></a> for
helping!</p>
<h2>v15.1.2</h2>
<blockquote>
<p>[!NOTE]<br />
This release is backporting bug fixes. It does <strong>not</strong>
include all pending features/changes on canary.</p>
</blockquote>
<h3>Core Changes</h3>
<ul>
<li>Update React from 7283a213-20241206 to 65e06cb7-20241218: <a
href="https://redirect.github.com/vercel/next.js/pull/74117">vercel/next.js#74117</a></li>
</ul>
<h3>Credits</h3>
<p>Huge thanks to <a
href="https://github.com/ztanner"><code>@​ztanner</code></a> for
helping!</p>
<h2>v15.1.1</h2>
<blockquote>
<p>[!NOTE]<br />
This release is backporting bug fixes. It does <strong>not</strong>
include all pending features/changes on canary.</p>
</blockquote>
<h3>Core Changes</h3>
<ul>
<li>fix(turbo): sassOptions silenceDeprecations was not overwritten with
user options: <a
href="https://redirect.github.com/vercel/next.js/pull/73937">vercel/next.js#73937</a></li>
<li>refactor collectAppPageSegments: <a
href="https://redirect.github.com/vercel/next.js/pull/73908">vercel/next.js#73908</a></li>
</ul>
<h3>Credits</h3>
<p>Huge thanks to <a
href="https://github.com/devjiwonchoi"><code>@​devjiwonchoi</code></a>
and <a href="https://github.com/ztanner"><code>@​ztanner</code></a> for
helping!</p>
<h2>v15.1.1-canary.23</h2>
<h3>Misc Changes</h3>
<ul>
<li>docs: remove catch-all for opengraph-image: <a
href="https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next/issues/74338">#74338</a></li>
</ul>
<h3>Credits</h3>
<p>Huge thanks to <a
href="https://github.com/leerob"><code>@​leerob</code></a> for
helping!</p>
<h2>v15.1.1-canary.22</h2>
<h3>Misc Changes</h3>
<ul>
<li>Fix typo in generateViewport docs: <a
href="https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next/issues/74288">#74288</a></li>
</ul>
<h3>Credits</h3>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="4cbaaa118d"><code>4cbaaa1</code></a>
v15.1.3</li>
<li><a
href="df392a1b97"><code>df392a1</code></a>
v15.1.2</li>
<li><a
href="4384c6834a"><code>4384c68</code></a>
v15.1.1</li>
<li>See full diff in <a
href="https://github.com/vercel/next.js/commits/v15.1.3/packages/eslint-config-next">compare
view</a></li>
</ul>
</details>
<br />

Updates `tailwindcss` from 3.4.16 to 3.4.17
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/tailwindlabs/tailwindcss/releases">tailwindcss's
releases</a>.</em></p>
<blockquote>
<h2>v3.4.17</h2>
<h3>Fixed</h3>
<ul>
<li>Work around Node v22.12+ issue (<a
href="https://redirect.github.com/tailwindlabs/tailwindcss/pull/15421">#15421</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/tailwindlabs/tailwindcss/blob/v3.4.17/CHANGELOG.md">tailwindcss's
changelog</a>.</em></p>
<blockquote>
<h2>[3.4.17] - 2024-12-17</h2>
<h3>Fixed</h3>
<ul>
<li>Work around Node v22.12+ issue (<a
href="https://redirect.github.com/tailwindlabs/tailwindcss/pull/15421">#15421</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="4f9f603e12"><code>4f9f603</code></a>
Fix error</li>
<li><a
href="02faa1529e"><code>02faa15</code></a>
v3.4.17</li>
<li><a
href="e268b2aa96"><code>e268b2a</code></a>
Update changelog</li>
<li><a
href="0a836f76bb"><code>0a836f7</code></a>
Work around issue with Node 22 and Jiti (<a
href="https://redirect.github.com/tailwindlabs/tailwindcss/issues/15421">#15421</a>)</li>
<li>See full diff in <a
href="https://github.com/tailwindlabs/tailwindcss/compare/v3.4.16...v3.4.17">compare
view</a></li>
</ul>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-02 14:46:55 +00:00
Bently
858dc7adc3 feat(blocks): Add github create repo block (#9169)
This adds a new block, Github Create Repository Block
(GithubCreateRepositoryBlock) which lets you create a new github repo.

i have used this to make these repos so i know it works 

https://github.com/Bentlybro/discord-whisper-transcriber
https://github.com/Bentlybro/PyAGI-Framework
https://github.com/Bentlybro/FlaskNotes


![image](https://github.com/user-attachments/assets/17127839-7dc9-4b8a-bc60-8b55cb02fde9)
2025-01-02 14:46:14 +00:00
Bently
745aae4aec feat(blocks): Add github create file block (#9144)
This adds 2 blocks, a Github Create File Block (GithubCreateFileBlock)
and Github Update File Block (GithubUpdateFileBlock)

These allow you to create files and update files on github, i used it to
make all the files that are on my repo here
https://github.com/Bentlybro/AGPT-Testing/commits/main/


![image](https://github.com/user-attachments/assets/ba97b30f-fd32-470d-a5ff-90042f0d9b75)

![image](https://github.com/user-attachments/assets/11d0ecca-f597-4b2b-9df4-cd81fe5a3ca9)

---------

Co-authored-by: Swifty <craigswift13@gmail.com>
2025-01-02 09:23:55 +00:00
SwiftyOS
5959c0d303 Revert "remove marketplace"
This reverts commit 480c4773bf.
2025-01-02 10:28:29 +01:00
SwiftyOS
480c4773bf remove marketplace 2025-01-02 10:28:15 +01:00
Zamil Majdy
1ce1918967 fix(platform): Fields with default value are not set to advanced by default (#9128)
https://github.com/Significant-Gravitas/AutoGPT/issues/8739 causes input
fields that are supposed to be an advanced field end up being a
mandatory field:


![image](https://github.com/user-attachments/assets/1cb41a79-fe85-4012-91b8-861bd5f9a0ca)

*See the retry count field here.

### Changes 🏗️

Set the `advanced` field on each input field, and set the default value
using this logic:
* If it has a default value, set it to True.
* otherwise, False.

### Checklist 📋

#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [ ] ...

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>

---------

Co-authored-by: Swifty <craigswift13@gmail.com>
2024-12-31 16:19:23 +00:00
Zamil Majdy
314b04eaba feat(backend): Make scheduler DB connection pool configurable & prevent connection overflow (#9149)
max_overflow parameter description:
```
    :param max_overflow=10: the number of connections to allow in
        connection pool "overflow", that is connections that can be
        opened above and beyond the pool_size setting, which defaults
        to five. this is only used with :class:`~sqlalchemy.pool.QueuePool`.
```

### Changes 🏗️

* Prevent additional db connections from being created in addition to
the pool size for the scheduler.
* Make the pool size configurable.

### Checklist 📋

#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [ ] ...

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>

Co-authored-by: Swifty <craigswift13@gmail.com>
2024-12-31 16:19:15 +00:00
Zamil Majdy
26214e1b2c fix(backend): Prevent HTTP requests access to internal IPV6 addresses for Agent Blocks (#9157)
Addresses:
https://github.com/Significant-Gravitas/AutoGPT/security/advisories/GHSA-4c8v-hwxc-2356

Currently, no IPv6 is used by default on this system. However, the lack
of block HTTP access prevention to internal systems with IPv6 could be a
potential SSRF.

### Changes 🏗️

Prevent internal IPv6 address access on HTTP request blocks.

### Checklist 📋

#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [ ] ...

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>
2024-12-31 16:18:57 +00:00
Zamil Majdy
10fc7d2114 fix(backend): Remove croniter (#9130)
Croniter is unused, and it will be deprecated soon.

### Changes 🏗️

Remove croniter.

### Checklist 📋

#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [ ] ...

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>

Co-authored-by: Swifty <craigswift13@gmail.com>
2024-12-31 15:24:29 +00:00
Zamil Majdy
ea01c8038b fix(frontend): Fix broken block UI layout (#9132)
https://github.com/Significant-Gravitas/AutoGPT/pull/9097/files#diff-ef176e50a6a65af5df2182626ea868ce77b76de447c816fb4f80fb4d376c3049R7-R41
introduced styling changes to block UI layout which causes the block
layout broken:


![image](https://github.com/user-attachments/assets/0d3d6e61-1acc-440c-9c7b-8cc473b457ea)

This PR minimally reverts the styling change.

### Changes 🏗️

Minimal CSS revert to make the block UI layout back to normal.

### Checklist 📋

#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [ ] ...

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>
2024-12-31 09:13:47 +01:00
Zamil Majdy
a646e60d2f fix(backend): Added locking status check before releasing to avoid releasing timing out lock (#9135)
Exception:
```
nid:ce829f66-14b0-4bd3-b748-791e46666cb6|-] Failed node execution ce829f66-14b0-4bd3-b748-791e46666cb6: Cannot release an unlocked lock {}\u001b[0m",
Traceback (most recent call last):\n  File \"/app/autogpt_platform/backend/backend/integrations/creds_manager.py\", line 145, in _locked\n    yield\n  File \"/app/autogpt_platform/backend/backend/integrations/creds_manager.py\", line 115, in acquire\n    lock = self._acquire_lock(user_id, credentials_id)",
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^",
  File \"/app/autogpt_platform/backend/backend/integrations/creds_manager.py\", line 139, in _acquire_lock",
    return self._locks.acquire(key)",
           ^^^^^^^^^^^^^^^^^^^^^^^^",
  File \"/app/autogpt_platform/autogpt_libs/autogpt_libs/utils/synchronize.py\", line 44, in acquire",
    lock.acquire()",
  File \"/usr/local/lib/python3.11/site-packages/redis/lock.py\", line 218, in acquire",
    mod_time.sleep(sleep)",
  File \"/app/autogpt_platform/backend/backend/executor/manager.py\", line 471, in <lambda>",
    signal.SIGTERM, lambda _, __: cls.on_node_executor_sigterm()",
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^",
  File \"/app/autogpt_platform/backend/backend/executor/manager.py\", line 498, in on_node_executor_sigterm",
    sys.exit(0)",
SystemExit: 0",
During handling of the above exception, another exception occurred:",
Traceback (most recent call last):\n  File \"/app/autogpt_platform/backend/backend/executor/manager.py\", line 539, in _on_node_execution\n    for execution in execute_node(\n  File \"/app/autogpt_platform/backend/backend/executor/manager.py\", line 175, in execute_node\n    credentials, creds_lock = creds_manager.acquire(user_id, credentials_meta.id)",
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^",
  File \"/app/autogpt_platform/backend/backend/integrations/creds_manager.py\", line 114, in acquire",
    with self._locked(user_id, credentials_id, \"!time_sensitive\"):",
  File \"/usr/local/lib/python3.11/contextlib.py\", line 158, in __exit__",
    self.gen.throw(typ, value, traceback)",
  File \"/app/autogpt_platform/backend/backend/integrations/creds_manager.py\", line 147, in _locked",
    lock.release()",
  File \"/usr/local/lib/python3.11/site-packages/redis/lock.py\", line 254, in release",
    raise LockError(\"Cannot release an unlocked lock\", lock_name=self.name)",
redis.exceptions.LockError: Cannot release an unlocked lock",
```

### Changes 🏗️

```
try:
   lock.acquire()
   ...
finally:
   lock.release()
```

pattern can cause an error where the lock is already released due to
timeout.

The scope of the change is to manually check the lock status before
releasing.


### Checklist 📋

#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [ ] ...

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>
2024-12-31 08:48:04 +01:00
Krzysztof Czerwinski
15af2f410b refactor(frontend): Auth pages update (#9124)
There are UX and design issues with current auth pages; `login`,
`signup` and `reset_password` (including change password).

### Changes 🏗️


![auth](https://github.com/user-attachments/assets/56dfbae3-5c12-4324-a29a-846d091d9501)
*Missing `s` on the login's password error is fixed.

Important changes in bold.

#### All auth pages
- **Split `/login` into `/signup`**
- UI Redesign that adheres to Figma designs
- General code cleanup and improvements
- Fix feedback: it's now shown when needed and clear (e.g. "~~String~~
Password must be...")
- All action functions use `Sentry.withServerActionInstrumentation`
- `PasswordInput` "eye button" shows password only when mouse button is
hold and doesn't capture tab

#### Login page
- **Removed agree to terms checkbox** (it's only on signup now)
- Move provider login function to `actions.ts`

#### Signup page
- **Requires to type password twice**
- Shows waitlist information on *any* database error

#### Reset password page
- **Password update requires to type password twice**
- **When request to send email is processed then the feedback is:
Password reset email sent if user exists. Please check your email.**
- Email sent feedback is black, error is red
- Move send email and update password functions to `actions.ts`
- Disable button when email is sent

#### Other
- Update zod schema objects and move them to `types/auth`
- Move `components/PasswordInput.tsx` to `/components/auth`
- Make common UI elements separate components in `components/auth`
- Update `yarn.lock` (supabase packages)
- Remove redundant letter in `client.ts`
- Don't log error when user auth is missing in `useSupabase`; user is
simply not logged in

### Checklist 📋

#### For code changes:
- [x] I have clearly listed my changes in the PR description
- [x] I have made a test plan
- [x] I have tested my changes according to the test plan:
  - [x] Form feedback:
    - [x] Login works
    - [x] Signup works
    - [x] Reset email works
    - [x] Change password works
  - [x] Login works
  - [x] Signup works
  - [x] Reset email is sent
  - [x] Reset email logs user in and redirects to `/reset_password`
  - [x] Change password works
  - [x] Logout works
  - [x] All links across auth pages work

Note: OAuth login providers are disabled and so untested.

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>

---------

Co-authored-by: Zamil Majdy <zamil.majdy@agpt.co>
2024-12-30 18:23:02 +00:00
Swifty
763284e3a3 fix(platform): minor fixes (#9147)
### Changes 🏗️

- Redirect to the marketplace.
- Ensure that the store agent uses agent graph data instead of store
listing data.
- Don’t export agent input values.
- URL sanitization: We can’t open an agent if it has a colon in its
name.
- Show all top agents.

### Checklist 📋

#### For code changes:
- [ ] I have clearly listed my changes in the PR description
- [ ] I have made a test plan
- [ ] I have tested my changes according to the test plan:
  <!-- Put your test plan here: -->
  - [ ] ...

<details>
  <summary>Example test plan</summary>
  
  - [ ] Create from scratch and execute an agent with at least 3 blocks
- [ ] Import an agent from file upload, and confirm it executes
correctly
  - [ ] Upload agent to marketplace
- [ ] Import an agent from marketplace and confirm it executes correctly
  - [ ] Edit an agent from monitor, and confirm it executes correctly
</details>

#### For configuration changes:
- [ ] `.env.example` is updated or already compatible with my changes
- [ ] `docker-compose.yml` is updated or already compatible with my
changes
- [ ] I have included a list of my configuration changes in the PR
description (under **Changes**)

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>

---------

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2024-12-30 16:04:35 +01:00
211 changed files with 10986 additions and 6883 deletions

View File

@@ -1,40 +1,61 @@
# Ignore everything by default, selectively add things to context
classic/run
*
# AutoGPT
# Platform - Libs
!autogpt_platform/autogpt_libs/autogpt_libs/
!autogpt_platform/autogpt_libs/pyproject.toml
!autogpt_platform/autogpt_libs/poetry.lock
!autogpt_platform/autogpt_libs/README.md
# Platform - Backend
!autogpt_platform/backend/backend/
!autogpt_platform/backend/migrations/
!autogpt_platform/backend/schema.prisma
!autogpt_platform/backend/pyproject.toml
!autogpt_platform/backend/poetry.lock
!autogpt_platform/backend/README.md
# Platform - Market
!autogpt_platform/market/market/
!autogpt_platform/market/scripts.py
!autogpt_platform/market/schema.prisma
!autogpt_platform/market/pyproject.toml
!autogpt_platform/market/poetry.lock
!autogpt_platform/market/README.md
# Platform - Frontend
!autogpt_platform/frontend/src/
!autogpt_platform/frontend/public/
!autogpt_platform/frontend/package.json
!autogpt_platform/frontend/yarn.lock
!autogpt_platform/frontend/tsconfig.json
!autogpt_platform/frontend/README.md
## config
!autogpt_platform/frontend/*.config.*
!autogpt_platform/frontend/.env.*
# Classic - AutoGPT
!classic/original_autogpt/autogpt/
!classic/original_autogpt/pyproject.toml
!classic/original_autogpt/poetry.lock
!classic/original_autogpt/README.md
!classic/original_autogpt/tests/
# Benchmark
# Classic - Benchmark
!classic/benchmark/agbenchmark/
!classic/benchmark/pyproject.toml
!classic/benchmark/poetry.lock
!classic/benchmark/README.md
# Forge
# Classic - Forge
!classic/forge/
!classic/forge/pyproject.toml
!classic/forge/poetry.lock
!classic/forge/README.md
# Frontend
# Classic - Frontend
!classic/frontend/build/web/
# Platform
!autogpt_platform/
# Explicitly re-ignore some folders
.*
**/__pycache__
autogpt_platform/frontend/.next/
autogpt_platform/frontend/node_modules
autogpt_platform/frontend/.env.example
autogpt_platform/frontend/.env.local
autogpt_platform/backend/.env
autogpt_platform/backend/.venv/
autogpt_platform/market/.env

View File

@@ -89,28 +89,6 @@ updates:
- "minor"
- "patch"
# market (Poetry project)
- package-ecosystem: "pip"
directory: "autogpt_platform/market"
schedule:
interval: "weekly"
open-pull-requests-limit: 10
target-branch: "dev"
commit-message:
prefix: "chore(market/deps)"
prefix-development: "chore(market/deps-dev)"
groups:
production-dependencies:
dependency-type: "production"
update-types:
- "minor"
- "patch"
development-dependencies:
dependency-type: "development"
update-types:
- "minor"
- "patch"
# GitHub Actions
- package-ecosystem: "github-actions"

View File

@@ -35,12 +35,6 @@ jobs:
env:
DATABASE_URL: ${{ secrets.BACKEND_DATABASE_URL }}
- name: Run Market Migrations
working-directory: ./autogpt_platform/market
run: |
python -m prisma migrate deploy
env:
DATABASE_URL: ${{ secrets.MARKET_DATABASE_URL }}
trigger:
needs: migrate

View File

@@ -37,13 +37,6 @@ jobs:
env:
DATABASE_URL: ${{ secrets.BACKEND_DATABASE_URL }}
- name: Run Market Migrations
working-directory: ./autogpt_platform/market
run: |
python -m prisma migrate deploy
env:
DATABASE_URL: ${{ secrets.MARKET_DATABASE_URL }}
trigger:
needs: migrate
runs-on: ubuntu-latest

View File

@@ -81,7 +81,7 @@ jobs:
- name: Check poetry.lock
run: |
poetry lock --no-update
poetry lock
if ! git diff --quiet poetry.lock; then
echo "Error: poetry.lock not up to date."

View File

@@ -88,6 +88,11 @@ jobs:
run: |
yarn test --project=${{ matrix.browser }}
- name: Print Docker Compose logs in debug mode
if: runner.debug
run: |
docker compose -f ../docker-compose.yml logs
- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:

View File

@@ -1,126 +0,0 @@
name: AutoGPT Platform - Backend CI
on:
push:
branches: [master, dev, ci-test*]
paths:
- ".github/workflows/platform-market-ci.yml"
- "autogpt_platform/market/**"
pull_request:
branches: [master, dev, release-*]
paths:
- ".github/workflows/platform-market-ci.yml"
- "autogpt_platform/market/**"
merge_group:
concurrency:
group: ${{ format('backend-ci-{0}', github.head_ref && format('{0}-{1}', github.event_name, github.event.pull_request.number) || github.sha) }}
cancel-in-progress: ${{ startsWith(github.event_name, 'pull_request') }}
defaults:
run:
shell: bash
working-directory: autogpt_platform/market
jobs:
test:
permissions:
contents: read
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
python-version: ["3.10"]
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Setup Supabase
uses: supabase/setup-cli@v1
with:
version: latest
- id: get_date
name: Get date
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
- name: Set up Python dependency cache
uses: actions/cache@v4
with:
path: ~/.cache/pypoetry
key: poetry-${{ runner.os }}-${{ hashFiles('autogpt_platform/market/poetry.lock') }}
- name: Install Poetry (Unix)
run: |
curl -sSL https://install.python-poetry.org | python3 -
if [ "${{ runner.os }}" = "macOS" ]; then
PATH="$HOME/.local/bin:$PATH"
echo "$HOME/.local/bin" >> $GITHUB_PATH
fi
- name: Install Python dependencies
run: poetry install
- name: Generate Prisma Client
run: poetry run prisma generate
- id: supabase
name: Start Supabase
working-directory: .
run: |
supabase init
supabase start --exclude postgres-meta,realtime,storage-api,imgproxy,inbucket,studio,edge-runtime,logflare,vector,supavisor
supabase status -o env | sed 's/="/=/; s/"$//' >> $GITHUB_OUTPUT
# outputs:
# DB_URL, API_URL, GRAPHQL_URL, ANON_KEY, SERVICE_ROLE_KEY, JWT_SECRET
- name: Run Database Migrations
run: poetry run prisma migrate dev --name updates
env:
DATABASE_URL: ${{ steps.supabase.outputs.DB_URL }}
- id: lint
name: Run Linter
run: poetry run lint
# Tests comment out because they do not work with prisma mock, nor have they been updated since they were created
# - name: Run pytest with coverage
# run: |
# if [[ "${{ runner.debug }}" == "1" ]]; then
# poetry run pytest -s -vv -o log_cli=true -o log_cli_level=DEBUG test
# else
# poetry run pytest -s -vv test
# fi
# if: success() || (failure() && steps.lint.outcome == 'failure')
# env:
# LOG_LEVEL: ${{ runner.debug && 'DEBUG' || 'INFO' }}
# DATABASE_URL: ${{ steps.supabase.outputs.DB_URL }}
# SUPABASE_URL: ${{ steps.supabase.outputs.API_URL }}
# SUPABASE_SERVICE_ROLE_KEY: ${{ steps.supabase.outputs.SERVICE_ROLE_KEY }}
# SUPABASE_JWT_SECRET: ${{ steps.supabase.outputs.JWT_SECRET }}
# REDIS_HOST: 'localhost'
# REDIS_PORT: '6379'
# REDIS_PASSWORD: 'testpassword'
env:
CI: true
PLAIN_OUTPUT: True
RUN_ENV: local
PORT: 8080
# - name: Upload coverage reports to Codecov
# uses: codecov/codecov-action@v4
# with:
# token: ${{ secrets.CODECOV_TOKEN }}
# flags: backend,${{ runner.os }}

View File

@@ -110,7 +110,7 @@ repos:
- id: isort
name: Lint (isort) - AutoGPT Platform - Backend
alias: isort-platform-backend
entry: poetry -C autogpt_platform/backend run isort -p backend
entry: poetry -P autogpt_platform/backend run isort -p backend
files: ^autogpt_platform/backend/
types: [file, python]
language: system
@@ -118,7 +118,7 @@ repos:
- id: isort
name: Lint (isort) - Classic - AutoGPT
alias: isort-classic-autogpt
entry: poetry -C classic/original_autogpt run isort -p autogpt
entry: poetry -P classic/original_autogpt run isort -p autogpt
files: ^classic/original_autogpt/
types: [file, python]
language: system
@@ -126,7 +126,7 @@ repos:
- id: isort
name: Lint (isort) - Classic - Forge
alias: isort-classic-forge
entry: poetry -C classic/forge run isort -p forge
entry: poetry -P classic/forge run isort -p forge
files: ^classic/forge/
types: [file, python]
language: system
@@ -134,7 +134,7 @@ repos:
- id: isort
name: Lint (isort) - Classic - Benchmark
alias: isort-classic-benchmark
entry: poetry -C classic/benchmark run isort -p agbenchmark
entry: poetry -P classic/benchmark run isort -p agbenchmark
files: ^classic/benchmark/
types: [file, python]
language: system
@@ -178,7 +178,6 @@ repos:
name: Typecheck - AutoGPT Platform - Backend
alias: pyright-platform-backend
entry: poetry -C autogpt_platform/backend run pyright
args: [-p, autogpt_platform/backend, autogpt_platform/backend]
# include forge source (since it's a path dependency) but exclude *_test.py files:
files: ^autogpt_platform/(backend/((backend|test)/|(\w+\.py|poetry\.lock)$)|autogpt_libs/(autogpt_libs/.*(?<!_test)\.py|poetry\.lock)$)
types: [file]
@@ -189,7 +188,6 @@ repos:
name: Typecheck - AutoGPT Platform - Libs
alias: pyright-platform-libs
entry: poetry -C autogpt_platform/autogpt_libs run pyright
args: [-p, autogpt_platform/autogpt_libs, autogpt_platform/autogpt_libs]
files: ^autogpt_platform/autogpt_libs/(autogpt_libs/|poetry\.lock$)
types: [file]
language: system
@@ -199,7 +197,6 @@ repos:
name: Typecheck - Classic - AutoGPT
alias: pyright-classic-autogpt
entry: poetry -C classic/original_autogpt run pyright
args: [-p, classic/original_autogpt, classic/original_autogpt]
# include forge source (since it's a path dependency) but exclude *_test.py files:
files: ^(classic/original_autogpt/((autogpt|scripts|tests)/|poetry\.lock$)|classic/forge/(forge/.*(?<!_test)\.py|poetry\.lock)$)
types: [file]
@@ -210,7 +207,6 @@ repos:
name: Typecheck - Classic - Forge
alias: pyright-classic-forge
entry: poetry -C classic/forge run pyright
args: [-p, classic/forge, classic/forge]
files: ^classic/forge/(forge/|poetry\.lock$)
types: [file]
language: system
@@ -220,7 +216,6 @@ repos:
name: Typecheck - Classic - Benchmark
alias: pyright-classic-benchmark
entry: poetry -C classic/benchmark run pyright
args: [-p, classic/benchmark, classic/benchmark]
files: ^classic/benchmark/(agbenchmark/|tests/|poetry\.lock$)
types: [file]
language: system

View File

@@ -31,7 +31,8 @@ class RedisKeyedMutex:
try:
yield
finally:
lock.release()
if lock.locked():
lock.release()
def acquire(self, key: Any) -> "RedisLock":
"""Acquires and returns a lock with the given key"""
@@ -45,7 +46,7 @@ class RedisKeyedMutex:
return lock
def release(self, key: Any):
if lock := self.locks.get(key):
if (lock := self.locks.get(key)) and lock.locked() and lock.owned():
lock.release()
def release_all_locks(self):

View File

@@ -1415,29 +1415,29 @@ pyasn1 = ">=0.1.3"
[[package]]
name = "ruff"
version = "0.8.3"
version = "0.8.6"
description = "An extremely fast Python linter and code formatter, written in Rust."
optional = false
python-versions = ">=3.7"
files = [
{file = "ruff-0.8.3-py3-none-linux_armv6l.whl", hash = "sha256:8d5d273ffffff0acd3db5bf626d4b131aa5a5ada1276126231c4174543ce20d6"},
{file = "ruff-0.8.3-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:e4d66a21de39f15c9757d00c50c8cdd20ac84f55684ca56def7891a025d7e939"},
{file = "ruff-0.8.3-py3-none-macosx_11_0_arm64.whl", hash = "sha256:c356e770811858bd20832af696ff6c7e884701115094f427b64b25093d6d932d"},
{file = "ruff-0.8.3-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9c0a60a825e3e177116c84009d5ebaa90cf40dfab56e1358d1df4e29a9a14b13"},
{file = "ruff-0.8.3-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:75fb782f4db39501210ac093c79c3de581d306624575eddd7e4e13747e61ba18"},
{file = "ruff-0.8.3-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7f26bc76a133ecb09a38b7868737eded6941b70a6d34ef53a4027e83913b6502"},
{file = "ruff-0.8.3-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:01b14b2f72a37390c1b13477c1c02d53184f728be2f3ffc3ace5b44e9e87b90d"},
{file = "ruff-0.8.3-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:53babd6e63e31f4e96ec95ea0d962298f9f0d9cc5990a1bbb023a6baf2503a82"},
{file = "ruff-0.8.3-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1ae441ce4cf925b7f363d33cd6570c51435972d697e3e58928973994e56e1452"},
{file = "ruff-0.8.3-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d7c65bc0cadce32255e93c57d57ecc2cca23149edd52714c0c5d6fa11ec328cd"},
{file = "ruff-0.8.3-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:5be450bb18f23f0edc5a4e5585c17a56ba88920d598f04a06bd9fd76d324cb20"},
{file = "ruff-0.8.3-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:8faeae3827eaa77f5721f09b9472a18c749139c891dbc17f45e72d8f2ca1f8fc"},
{file = "ruff-0.8.3-py3-none-musllinux_1_2_i686.whl", hash = "sha256:db503486e1cf074b9808403991663e4277f5c664d3fe237ee0d994d1305bb060"},
{file = "ruff-0.8.3-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:6567be9fb62fbd7a099209257fef4ad2c3153b60579818b31a23c886ed4147ea"},
{file = "ruff-0.8.3-py3-none-win32.whl", hash = "sha256:19048f2f878f3ee4583fc6cb23fb636e48c2635e30fb2022b3a1cd293402f964"},
{file = "ruff-0.8.3-py3-none-win_amd64.whl", hash = "sha256:f7df94f57d7418fa7c3ffb650757e0c2b96cf2501a0b192c18e4fb5571dfada9"},
{file = "ruff-0.8.3-py3-none-win_arm64.whl", hash = "sha256:fe2756edf68ea79707c8d68b78ca9a58ed9af22e430430491ee03e718b5e4936"},
{file = "ruff-0.8.3.tar.gz", hash = "sha256:5e7558304353b84279042fc584a4f4cb8a07ae79b2bf3da1a7551d960b5626d3"},
{file = "ruff-0.8.6-py3-none-linux_armv6l.whl", hash = "sha256:defed167955d42c68b407e8f2e6f56ba52520e790aba4ca707a9c88619e580e3"},
{file = "ruff-0.8.6-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:54799ca3d67ae5e0b7a7ac234baa657a9c1784b48ec954a094da7c206e0365b1"},
{file = "ruff-0.8.6-py3-none-macosx_11_0_arm64.whl", hash = "sha256:e88b8f6d901477c41559ba540beeb5a671e14cd29ebd5683903572f4b40a9807"},
{file = "ruff-0.8.6-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0509e8da430228236a18a677fcdb0c1f102dd26d5520f71f79b094963322ed25"},
{file = "ruff-0.8.6-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:91a7ddb221779871cf226100e677b5ea38c2d54e9e2c8ed847450ebbdf99b32d"},
{file = "ruff-0.8.6-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:248b1fb3f739d01d528cc50b35ee9c4812aa58cc5935998e776bf8ed5b251e75"},
{file = "ruff-0.8.6-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:bc3c083c50390cf69e7e1b5a5a7303898966be973664ec0c4a4acea82c1d4315"},
{file = "ruff-0.8.6-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:52d587092ab8df308635762386f45f4638badb0866355b2b86760f6d3c076188"},
{file = "ruff-0.8.6-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:61323159cf21bc3897674e5adb27cd9e7700bab6b84de40d7be28c3d46dc67cf"},
{file = "ruff-0.8.6-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7ae4478b1471fc0c44ed52a6fb787e641a2ac58b1c1f91763bafbc2faddc5117"},
{file = "ruff-0.8.6-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:0c000a471d519b3e6cfc9c6680025d923b4ca140ce3e4612d1a2ef58e11f11fe"},
{file = "ruff-0.8.6-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:9257aa841e9e8d9b727423086f0fa9a86b6b420fbf4bf9e1465d1250ce8e4d8d"},
{file = "ruff-0.8.6-py3-none-musllinux_1_2_i686.whl", hash = "sha256:45a56f61b24682f6f6709636949ae8cc82ae229d8d773b4c76c09ec83964a95a"},
{file = "ruff-0.8.6-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:496dd38a53aa173481a7d8866bcd6451bd934d06976a2505028a50583e001b76"},
{file = "ruff-0.8.6-py3-none-win32.whl", hash = "sha256:e169ea1b9eae61c99b257dc83b9ee6c76f89042752cb2d83486a7d6e48e8f764"},
{file = "ruff-0.8.6-py3-none-win_amd64.whl", hash = "sha256:f1d70bef3d16fdc897ee290d7d20da3cbe4e26349f62e8a0274e7a3f4ce7a905"},
{file = "ruff-0.8.6-py3-none-win_arm64.whl", hash = "sha256:7d7fc2377a04b6e04ffe588caad613d0c460eb2ecba4c0ccbbfe2bc973cbc162"},
{file = "ruff-0.8.6.tar.gz", hash = "sha256:dcad24b81b62650b0eb8814f576fc65cfee8674772a6e24c9b747911801eeaa5"},
]
[[package]]
@@ -1852,4 +1852,4 @@ type = ["pytest-mypy"]
[metadata]
lock-version = "2.0"
python-versions = ">=3.10,<4.0"
content-hash = "13a36d3be675cab4a3eb2e6a62a1b08df779bded4c7b9164d8be300dc08748d0"
content-hash = "bf1b0125759dadb1369fff05ffba64fea3e82b9b7a43d0068e1c80974a4ebc1c"

View File

@@ -21,7 +21,7 @@ supabase = "^2.10.0"
[tool.poetry.group.dev.dependencies]
redis = "^5.2.1"
ruff = "^0.8.3"
ruff = "^0.8.6"
[build-system]
requires = ["poetry-core"]

View File

@@ -58,7 +58,17 @@ GITHUB_CLIENT_SECRET=
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
# Twitter/X OAuth App server credentials - https://developer.x.com/en/products/x-api
# Twitter (X) OAuth 2.0 with PKCE Configuration
# 1. Create a Twitter Developer Account:
# - Visit https://developer.x.com/en and sign up
# 2. Set up your application:
# - Navigate to Developer Portal > Projects > Create Project
# - Add a new app to your project
# 3. Configure app settings:
# - App Permissions: Read + Write + Direct Messages
# - App Type: Web App, Automated App or Bot
# - OAuth 2.0 Callback URL: http://localhost:3000/auth/integrations/oauth_callback
# - Save your Client ID and Client Secret below
TWITTER_CLIENT_ID=
TWITTER_CLIENT_SECRET=
@@ -111,6 +121,18 @@ REPLICATE_API_KEY=
# Ideogram
IDEOGRAM_API_KEY=
# Fal
FAL_API_KEY=
# Exa
EXA_API_KEY=
# E2B
E2B_API_KEY=
# Nvidia
NVIDIA_API_KEY=
# Logging Configuration
LOG_LEVEL=INFO
ENABLE_CLOUD_LOGGING=false

View File

@@ -17,12 +17,11 @@ RUN apt-get install -y libz-dev
RUN apt-get install -y libssl-dev
RUN apt-get install -y postgresql-client
ENV POETRY_VERSION=1.8.3
ENV POETRY_HOME=/opt/poetry
ENV POETRY_NO_INTERACTION=1
ENV POETRY_VIRTUALENVS_CREATE=false
ENV PATH=/opt/poetry/bin:$PATH
# Upgrade pip and setuptools to fix security vulnerabilities
RUN pip3 install --upgrade pip setuptools
@@ -32,25 +31,21 @@ RUN pip3 install poetry
COPY autogpt_platform/autogpt_libs /app/autogpt_platform/autogpt_libs
COPY autogpt_platform/backend/poetry.lock autogpt_platform/backend/pyproject.toml /app/autogpt_platform/backend/
WORKDIR /app/autogpt_platform/backend
RUN poetry config virtualenvs.create false \
&& poetry install --no-interaction --no-ansi
RUN poetry install --no-ansi --no-root
# Generate Prisma client
COPY autogpt_platform/backend/schema.prisma ./
RUN poetry config virtualenvs.create false \
&& poetry run prisma generate
RUN poetry run prisma generate
FROM python:3.11.10-slim-bookworm AS server_dependencies
WORKDIR /app
ENV POETRY_VERSION=1.8.3
ENV POETRY_HOME=/opt/poetry
ENV POETRY_NO_INTERACTION=1
ENV POETRY_VIRTUALENVS_CREATE=false
ENV POETRY_HOME=/opt/poetry \
POETRY_NO_INTERACTION=1 \
POETRY_VIRTUALENVS_CREATE=false
ENV PATH=/opt/poetry/bin:$PATH
# Upgrade pip and setuptools to fix security vulnerabilities
RUN pip3 install --upgrade pip setuptools
@@ -76,6 +71,7 @@ WORKDIR /app/autogpt_platform/backend
FROM server_dependencies AS server
COPY autogpt_platform/backend /app/autogpt_platform/backend
RUN poetry install --no-ansi --only-root
ENV DATABASE_URL=""
ENV PORT=8000

View File

@@ -76,7 +76,11 @@ class AgentExecutorBlock(Block):
)
if not event.node_id:
if event.status in [ExecutionStatus.COMPLETED, ExecutionStatus.FAILED]:
if event.status in [
ExecutionStatus.COMPLETED,
ExecutionStatus.TERMINATED,
ExecutionStatus.FAILED,
]:
logger.info(f"Execution {log_id} ended with status {event.status}")
break
else:

View File

@@ -241,7 +241,7 @@ class AgentOutputBlock(Block):
advanced=True,
)
format: str = SchemaField(
description="The format string to be used to format the recorded_value.",
description="The format string to be used to format the recorded_value. Use Jinja2 syntax.",
default="",
advanced=True,
)

View File

@@ -699,3 +699,420 @@ class GithubDeleteBranchBlock(Block):
input_data.branch,
)
yield "status", status
class GithubCreateFileBlock(Block):
class Input(BlockSchema):
credentials: GithubCredentialsInput = GithubCredentialsField("repo")
repo_url: str = SchemaField(
description="URL of the GitHub repository",
placeholder="https://github.com/owner/repo",
)
file_path: str = SchemaField(
description="Path where the file should be created",
placeholder="path/to/file.txt",
)
content: str = SchemaField(
description="Content to write to the file",
placeholder="File content here",
)
branch: str = SchemaField(
description="Branch where the file should be created",
default="main",
)
commit_message: str = SchemaField(
description="Message for the commit",
default="Create new file",
)
class Output(BlockSchema):
url: str = SchemaField(description="URL of the created file")
sha: str = SchemaField(description="SHA of the commit")
error: str = SchemaField(
description="Error message if the file creation failed"
)
def __init__(self):
super().__init__(
id="8fd132ac-b917-428a-8159-d62893e8a3fe",
description="This block creates a new file in a GitHub repository.",
categories={BlockCategory.DEVELOPER_TOOLS},
input_schema=GithubCreateFileBlock.Input,
output_schema=GithubCreateFileBlock.Output,
test_input={
"repo_url": "https://github.com/owner/repo",
"file_path": "test/file.txt",
"content": "Test content",
"branch": "main",
"commit_message": "Create test file",
"credentials": TEST_CREDENTIALS_INPUT,
},
test_credentials=TEST_CREDENTIALS,
test_output=[
("url", "https://github.com/owner/repo/blob/main/test/file.txt"),
("sha", "abc123"),
],
test_mock={
"create_file": lambda *args, **kwargs: (
"https://github.com/owner/repo/blob/main/test/file.txt",
"abc123",
)
},
)
@staticmethod
def create_file(
credentials: GithubCredentials,
repo_url: str,
file_path: str,
content: str,
branch: str,
commit_message: str,
) -> tuple[str, str]:
api = get_api(credentials)
# Convert content to base64
content_bytes = content.encode("utf-8")
content_base64 = base64.b64encode(content_bytes).decode("utf-8")
# Create the file using the GitHub API
contents_url = f"{repo_url}/contents/{file_path}"
data = {
"message": commit_message,
"content": content_base64,
"branch": branch,
}
response = api.put(contents_url, json=data)
result = response.json()
return result["content"]["html_url"], result["commit"]["sha"]
def run(
self,
input_data: Input,
*,
credentials: GithubCredentials,
**kwargs,
) -> BlockOutput:
try:
url, sha = self.create_file(
credentials,
input_data.repo_url,
input_data.file_path,
input_data.content,
input_data.branch,
input_data.commit_message,
)
yield "url", url
yield "sha", sha
except Exception as e:
yield "error", str(e)
class GithubUpdateFileBlock(Block):
class Input(BlockSchema):
credentials: GithubCredentialsInput = GithubCredentialsField("repo")
repo_url: str = SchemaField(
description="URL of the GitHub repository",
placeholder="https://github.com/owner/repo",
)
file_path: str = SchemaField(
description="Path to the file to update",
placeholder="path/to/file.txt",
)
content: str = SchemaField(
description="New content for the file",
placeholder="Updated content here",
)
branch: str = SchemaField(
description="Branch containing the file",
default="main",
)
commit_message: str = SchemaField(
description="Message for the commit",
default="Update file",
)
class Output(BlockSchema):
url: str = SchemaField(description="URL of the updated file")
sha: str = SchemaField(description="SHA of the commit")
error: str = SchemaField(description="Error message if the file update failed")
def __init__(self):
super().__init__(
id="30be12a4-57cb-4aa4-baf5-fcc68d136076",
description="This block updates an existing file in a GitHub repository.",
categories={BlockCategory.DEVELOPER_TOOLS},
input_schema=GithubUpdateFileBlock.Input,
output_schema=GithubUpdateFileBlock.Output,
test_input={
"repo_url": "https://github.com/owner/repo",
"file_path": "test/file.txt",
"content": "Updated content",
"branch": "main",
"commit_message": "Update test file",
"credentials": TEST_CREDENTIALS_INPUT,
},
test_credentials=TEST_CREDENTIALS,
test_output=[
("url", "https://github.com/owner/repo/blob/main/test/file.txt"),
("sha", "def456"),
],
test_mock={
"update_file": lambda *args, **kwargs: (
"https://github.com/owner/repo/blob/main/test/file.txt",
"def456",
)
},
)
@staticmethod
def update_file(
credentials: GithubCredentials,
repo_url: str,
file_path: str,
content: str,
branch: str,
commit_message: str,
) -> tuple[str, str]:
api = get_api(credentials)
# First get the current file to get its SHA
contents_url = f"{repo_url}/contents/{file_path}"
params = {"ref": branch}
response = api.get(contents_url, params=params)
current_file = response.json()
# Convert new content to base64
content_bytes = content.encode("utf-8")
content_base64 = base64.b64encode(content_bytes).decode("utf-8")
# Update the file
data = {
"message": commit_message,
"content": content_base64,
"sha": current_file["sha"],
"branch": branch,
}
response = api.put(contents_url, json=data)
result = response.json()
return result["content"]["html_url"], result["commit"]["sha"]
def run(
self,
input_data: Input,
*,
credentials: GithubCredentials,
**kwargs,
) -> BlockOutput:
try:
url, sha = self.update_file(
credentials,
input_data.repo_url,
input_data.file_path,
input_data.content,
input_data.branch,
input_data.commit_message,
)
yield "url", url
yield "sha", sha
except Exception as e:
yield "error", str(e)
class GithubCreateRepositoryBlock(Block):
class Input(BlockSchema):
credentials: GithubCredentialsInput = GithubCredentialsField("repo")
name: str = SchemaField(
description="Name of the repository to create",
placeholder="my-new-repo",
)
description: str = SchemaField(
description="Description of the repository",
placeholder="A description of the repository",
default="",
)
private: bool = SchemaField(
description="Whether the repository should be private",
default=False,
)
auto_init: bool = SchemaField(
description="Whether to initialize the repository with a README",
default=True,
)
gitignore_template: str = SchemaField(
description="Git ignore template to use (e.g., Python, Node, Java)",
default="",
)
class Output(BlockSchema):
url: str = SchemaField(description="URL of the created repository")
clone_url: str = SchemaField(description="Git clone URL of the repository")
error: str = SchemaField(
description="Error message if the repository creation failed"
)
def __init__(self):
super().__init__(
id="029ec3b8-1cfd-46d3-b6aa-28e4a706efd1",
description="This block creates a new GitHub repository.",
categories={BlockCategory.DEVELOPER_TOOLS},
input_schema=GithubCreateRepositoryBlock.Input,
output_schema=GithubCreateRepositoryBlock.Output,
test_input={
"name": "test-repo",
"description": "A test repository",
"private": False,
"auto_init": True,
"gitignore_template": "Python",
"credentials": TEST_CREDENTIALS_INPUT,
},
test_credentials=TEST_CREDENTIALS,
test_output=[
("url", "https://github.com/owner/test-repo"),
("clone_url", "https://github.com/owner/test-repo.git"),
],
test_mock={
"create_repository": lambda *args, **kwargs: (
"https://github.com/owner/test-repo",
"https://github.com/owner/test-repo.git",
)
},
)
@staticmethod
def create_repository(
credentials: GithubCredentials,
name: str,
description: str,
private: bool,
auto_init: bool,
gitignore_template: str,
) -> tuple[str, str]:
api = get_api(credentials, convert_urls=False) # Disable URL conversion
data = {
"name": name,
"description": description,
"private": private,
"auto_init": auto_init,
}
if gitignore_template:
data["gitignore_template"] = gitignore_template
# Create repository using the user endpoint
response = api.post("https://api.github.com/user/repos", json=data)
result = response.json()
return result["html_url"], result["clone_url"]
def run(
self,
input_data: Input,
*,
credentials: GithubCredentials,
**kwargs,
) -> BlockOutput:
try:
url, clone_url = self.create_repository(
credentials,
input_data.name,
input_data.description,
input_data.private,
input_data.auto_init,
input_data.gitignore_template,
)
yield "url", url
yield "clone_url", clone_url
except Exception as e:
yield "error", str(e)
class GithubListStargazersBlock(Block):
class Input(BlockSchema):
credentials: GithubCredentialsInput = GithubCredentialsField("repo")
repo_url: str = SchemaField(
description="URL of the GitHub repository",
placeholder="https://github.com/owner/repo",
)
class Output(BlockSchema):
class StargazerItem(TypedDict):
username: str
url: str
stargazer: StargazerItem = SchemaField(
title="Stargazer",
description="Stargazers with their username and profile URL",
)
error: str = SchemaField(
description="Error message if listing stargazers failed"
)
def __init__(self):
super().__init__(
id="a4b9c2d1-e5f6-4g7h-8i9j-0k1l2m3n4o5p", # Generated unique UUID
description="This block lists all users who have starred a specified GitHub repository.",
categories={BlockCategory.DEVELOPER_TOOLS},
input_schema=GithubListStargazersBlock.Input,
output_schema=GithubListStargazersBlock.Output,
test_input={
"repo_url": "https://github.com/owner/repo",
"credentials": TEST_CREDENTIALS_INPUT,
},
test_credentials=TEST_CREDENTIALS,
test_output=[
(
"stargazer",
{
"username": "octocat",
"url": "https://github.com/octocat",
},
)
],
test_mock={
"list_stargazers": lambda *args, **kwargs: [
{
"username": "octocat",
"url": "https://github.com/octocat",
}
]
},
)
@staticmethod
def list_stargazers(
credentials: GithubCredentials, repo_url: str
) -> list[Output.StargazerItem]:
api = get_api(credentials)
# Add /stargazers to the repo URL to get stargazers endpoint
stargazers_url = f"{repo_url}/stargazers"
# Set accept header to get starred_at timestamp
headers = {"Accept": "application/vnd.github.star+json"}
response = api.get(stargazers_url, headers=headers)
data = response.json()
stargazers: list[GithubListStargazersBlock.Output.StargazerItem] = [
{
"username": stargazer["login"],
"url": stargazer["html_url"],
}
for stargazer in data
]
return stargazers
def run(
self,
input_data: Input,
*,
credentials: GithubCredentials,
**kwargs,
) -> BlockOutput:
try:
stargazers = self.list_stargazers(
credentials,
input_data.repo_url,
)
yield from (("stargazer", stargazer) for stargazer in stargazers)
except Exception as e:
yield "error", str(e)

View File

@@ -56,15 +56,24 @@ class SendWebRequestBlock(Block):
)
def run(self, input_data: Input, **kwargs) -> BlockOutput:
if isinstance(input_data.body, str):
input_data.body = json.loads(input_data.body)
body = input_data.body
if input_data.json_format:
if isinstance(body, str):
try:
# Try to parse as JSON first
body = json.loads(body)
except json.JSONDecodeError:
# If it's not valid JSON and just plain text,
# we should send it as plain text instead
input_data.json_format = False
response = requests.request(
input_data.method.value,
input_data.url,
headers=input_data.headers,
json=input_data.body if input_data.json_format else None,
data=input_data.body if not input_data.json_format else None,
json=body if input_data.json_format else None,
data=body if not input_data.json_format else None,
)
result = response.json() if input_data.json_format else response.text

View File

@@ -26,8 +26,10 @@ from backend.data.model import (
)
from backend.util import json
from backend.util.settings import BehaveAs, Settings
from backend.util.text import TextFormatter
logger = logging.getLogger(__name__)
fmt = TextFormatter()
LLMProviderName = Literal[
ProviderName.ANTHROPIC,
@@ -109,6 +111,7 @@ class LlmModel(str, Enum, metaclass=LlmModelMeta):
LLAMA3_1_70B = "llama-3.1-70b-versatile"
LLAMA3_1_8B = "llama-3.1-8b-instant"
# Ollama models
OLLAMA_LLAMA3_2 = "llama3.2"
OLLAMA_LLAMA3_8B = "llama3"
OLLAMA_LLAMA3_405B = "llama3.1:405b"
OLLAMA_DOLPHIN = "dolphin-mistral:latest"
@@ -163,6 +166,7 @@ MODEL_METADATA = {
# Limited to 16k during preview
LlmModel.LLAMA3_1_70B: ModelMetadata("groq", 131072),
LlmModel.LLAMA3_1_8B: ModelMetadata("groq", 131072),
LlmModel.OLLAMA_LLAMA3_2: ModelMetadata("ollama", 8192),
LlmModel.OLLAMA_LLAMA3_8B: ModelMetadata("ollama", 8192),
LlmModel.OLLAMA_LLAMA3_405B: ModelMetadata("ollama", 8192),
LlmModel.OLLAMA_DOLPHIN: ModelMetadata("ollama", 32768),
@@ -234,7 +238,9 @@ class AIStructuredResponseGeneratorBlock(Block):
description="Number of times to retry the LLM call if the response does not match the expected format.",
)
prompt_values: dict[str, str] = SchemaField(
advanced=False, default={}, description="Values used to fill in the prompt."
advanced=False,
default={},
description="Values used to fill in the prompt. The values can be used in the prompt by putting them in a double curly braces, e.g. {{variable_name}}.",
)
max_tokens: int | None = SchemaField(
advanced=True,
@@ -448,8 +454,8 @@ class AIStructuredResponseGeneratorBlock(Block):
values = input_data.prompt_values
if values:
input_data.prompt = input_data.prompt.format(**values)
input_data.sys_prompt = input_data.sys_prompt.format(**values)
input_data.prompt = fmt.format_string(input_data.prompt, values)
input_data.sys_prompt = fmt.format_string(input_data.sys_prompt, values)
if input_data.sys_prompt:
prompt.append({"role": "system", "content": input_data.sys_prompt})
@@ -576,7 +582,9 @@ class AITextGeneratorBlock(Block):
description="Number of times to retry the LLM call if the response does not match the expected format.",
)
prompt_values: dict[str, str] = SchemaField(
advanced=False, default={}, description="Values used to fill in the prompt."
advanced=False,
default={},
description="Values used to fill in the prompt. The values can be used in the prompt by putting them in a double curly braces, e.g. {{variable_name}}.",
)
ollama_host: str = SchemaField(
advanced=True,

View File

@@ -0,0 +1,32 @@
from typing import Literal
from pydantic import SecretStr
from backend.data.model import APIKeyCredentials, CredentialsField, CredentialsMetaInput
from backend.integrations.providers import ProviderName
NvidiaCredentials = APIKeyCredentials
NvidiaCredentialsInput = CredentialsMetaInput[
Literal[ProviderName.NVIDIA],
Literal["api_key"],
]
TEST_CREDENTIALS = APIKeyCredentials(
id="01234567-89ab-cdef-0123-456789abcdef",
provider="nvidia",
api_key=SecretStr("mock-nvidia-api-key"),
title="Mock Nvidia API key",
expires_at=None,
)
TEST_CREDENTIALS_INPUT = {
"provider": TEST_CREDENTIALS.provider,
"id": TEST_CREDENTIALS.id,
"type": TEST_CREDENTIALS.type,
"title": TEST_CREDENTIALS.title,
}
def NvidiaCredentialsField() -> NvidiaCredentialsInput:
"""Creates an Nvidia credentials input on a block."""
return CredentialsField(description="The Nvidia integration requires an API Key.")

View File

@@ -0,0 +1,90 @@
from backend.blocks.nvidia._auth import (
NvidiaCredentials,
NvidiaCredentialsField,
NvidiaCredentialsInput,
)
from backend.data.block import Block, BlockCategory, BlockOutput, BlockSchema
from backend.data.model import SchemaField
from backend.util.request import requests
class NvidiaDeepfakeDetectBlock(Block):
class Input(BlockSchema):
credentials: NvidiaCredentialsInput = NvidiaCredentialsField()
image_base64: str = SchemaField(
description="Image to analyze for deepfakes", image_upload=True
)
return_image: bool = SchemaField(
description="Whether to return the processed image with markings",
default=False,
)
class Output(BlockSchema):
status: str = SchemaField(
description="Detection status (SUCCESS, ERROR, CONTENT_FILTERED)",
default="",
)
image: str = SchemaField(
description="Processed image with detection markings (if return_image=True)",
default="",
image_output=True,
)
is_deepfake: float = SchemaField(
description="Probability that the image is a deepfake (0-1)",
default=0.0,
)
def __init__(self):
super().__init__(
id="8c7d0d67-e79c-44f6-92a1-c2600c8aac7f",
description="Detects potential deepfakes in images using Nvidia's AI API",
categories={BlockCategory.SAFETY},
input_schema=NvidiaDeepfakeDetectBlock.Input,
output_schema=NvidiaDeepfakeDetectBlock.Output,
)
def run(
self, input_data: Input, *, credentials: NvidiaCredentials, **kwargs
) -> BlockOutput:
url = "https://ai.api.nvidia.com/v1/cv/hive/deepfake-image-detection"
headers = {
"accept": "application/json",
"content-type": "application/json",
"Authorization": f"Bearer {credentials.api_key.get_secret_value()}",
}
image_data = f"data:image/jpeg;base64,{input_data.image_base64}"
payload = {
"input": [image_data],
"return_image": input_data.return_image,
}
try:
response = requests.post(url, headers=headers, json=payload)
response.raise_for_status()
data = response.json()
result = data.get("data", [{}])[0]
# Get deepfake probability from first bounding box if any
deepfake_prob = 0.0
if result.get("bounding_boxes"):
deepfake_prob = result["bounding_boxes"][0].get("is_deepfake", 0.0)
yield "status", result.get("status", "ERROR")
yield "is_deepfake", deepfake_prob
if input_data.return_image:
image_data = result.get("image", "")
output_data = f"data:image/jpeg;base64,{image_data}"
yield "image", output_data
else:
yield "image", ""
except Exception as e:
yield "error", str(e)
yield "status", "ERROR"
yield "is_deepfake", 0.0
yield "image", ""

View File

@@ -141,10 +141,10 @@ class ExtractTextInformationBlock(Block):
class FillTextTemplateBlock(Block):
class Input(BlockSchema):
values: dict[str, Any] = SchemaField(
description="Values (dict) to be used in format"
description="Values (dict) to be used in format. These values can be used by putting them in double curly braces in the format template. e.g. {{value_name}}.",
)
format: str = SchemaField(
description="Template to format the text using `values`"
description="Template to format the text using `values`. Use Jinja2 syntax."
)
class Output(BlockSchema):
@@ -160,7 +160,7 @@ class FillTextTemplateBlock(Block):
test_input=[
{
"values": {"name": "Alice", "hello": "Hello", "world": "World!"},
"format": "{hello}, {world} {{name}}",
"format": "{{hello}}, {{ world }} {{name}}",
},
{
"values": {"list": ["Hello", " World!"]},

View File

@@ -342,7 +342,7 @@ class TweetPostBuilder:
def __init__(self):
self.params: Dict[str, Any] = {"user_auth": False}
def add_text(self, text: str):
def add_text(self, text: str | None):
if text:
self.params["text"] = text
return self

View File

@@ -118,9 +118,10 @@ class TwitterGetListBlock(Block):
meta = {}
owner_id = ""
owner_username = ""
included = {}
included = IncludesSerializer.serialize(response.includes)
data_dict = ResponseDataSerializer.serialize_dict(response.data)
if response.includes:
included = IncludesSerializer.serialize(response.includes)
if "users" in included:
owner_id = str(included["users"][0]["id"])
@@ -130,6 +131,7 @@ class TwitterGetListBlock(Block):
meta = response.meta
if response.data:
data_dict = ResponseDataSerializer.serialize_dict(response.data)
return data_dict, included, meta, owner_id, owner_username
raise Exception("List not found")
@@ -185,7 +187,7 @@ class TwitterGetOwnedListsBlock(Block):
required=True,
)
max_results: int = SchemaField(
max_results: int | None = SchemaField(
description="Maximum number of results per page (1-100)",
placeholder="Enter max results (default 100)",
advanced=True,
@@ -250,7 +252,7 @@ class TwitterGetOwnedListsBlock(Block):
def get_owned_lists(
credentials: TwitterCredentials,
user_id: str,
max_results: int,
max_results: int | None,
pagination_token: str | None,
expansions: ListExpansionsFilter | None,
user_fields: TweetUserFieldsFilter | None,
@@ -281,6 +283,7 @@ class TwitterGetOwnedListsBlock(Block):
response = cast(Response, client.get_owned_lists(**params))
meta = {}
included = {}
list_ids = []
list_names = []
next_token = None
@@ -289,16 +292,21 @@ class TwitterGetOwnedListsBlock(Block):
meta = response.meta
next_token = meta.get("next_token")
included = IncludesSerializer.serialize(response.includes)
data = ResponseDataSerializer.serialize_list(response.data)
if response.includes:
included = IncludesSerializer.serialize(response.includes)
if response.data:
list_ids = [str(item.id) for item in response.data]
list_names = [item.name for item in response.data]
data = ResponseDataSerializer.serialize_list(response.data)
list_ids = [
str(item.id) for item in response.data if hasattr(item, "id")
]
list_names = [
item.name for item in response.data if hasattr(item, "name")
]
return data, included, meta, list_ids, list_names, next_token
raise Exception("Lists not found")
raise Exception("User have no owned list")
except tweepy.TweepyException:
raise

View File

@@ -198,7 +198,7 @@ class TwitterGetListMembersBlock(Block):
required=True,
)
max_results: int = SchemaField(
max_results: int | None = SchemaField(
description="Maximum number of results per page (1-100)",
placeholder="Enter max results",
default=10,
@@ -274,7 +274,7 @@ class TwitterGetListMembersBlock(Block):
def get_list_members(
credentials: TwitterCredentials,
list_id: str,
max_results: int,
max_results: int | None,
pagination_token: str | None,
expansions: UserExpansionsFilter | None,
tweet_fields: TweetFieldsFilter | None,
@@ -305,6 +305,7 @@ class TwitterGetListMembersBlock(Block):
response = cast(Response, client.get_list_members(**params))
meta = {}
included = {}
next_token = None
user_ids = []
usernames = []
@@ -313,10 +314,11 @@ class TwitterGetListMembersBlock(Block):
meta = response.meta
next_token = meta.get("next_token")
included = IncludesSerializer.serialize(response.includes)
data = ResponseDataSerializer.serialize_list(response.data)
if response.includes:
included = IncludesSerializer.serialize(response.includes)
if response.data:
data = ResponseDataSerializer.serialize_list(response.data)
user_ids = [str(user.id) for user in response.data]
usernames = [user.username for user in response.data]
return user_ids, usernames, data, included, meta, next_token
@@ -377,7 +379,7 @@ class TwitterGetListMembershipsBlock(Block):
required=True,
)
max_results: int = SchemaField(
max_results: int | None = SchemaField(
description="Maximum number of results per page (1-100)",
placeholder="Enter max results",
advanced=True,
@@ -438,7 +440,7 @@ class TwitterGetListMembershipsBlock(Block):
def get_list_memberships(
credentials: TwitterCredentials,
user_id: str,
max_results: int,
max_results: int | None,
pagination_token: str | None,
expansions: ListExpansionsFilter | None,
user_fields: TweetUserFieldsFilter | None,
@@ -469,6 +471,7 @@ class TwitterGetListMembershipsBlock(Block):
response = cast(Response, client.get_list_memberships(**params))
meta = {}
included = {}
next_token = None
list_ids = []
@@ -476,10 +479,11 @@ class TwitterGetListMembershipsBlock(Block):
meta = response.meta
next_token = meta.get("next_token")
included = IncludesSerializer.serialize(response.includes)
data = ResponseDataSerializer.serialize_list(response.data)
if response.includes:
included = IncludesSerializer.serialize(response.includes)
if response.data:
data = ResponseDataSerializer.serialize_list(response.data)
list_ids = [str(lst.id) for lst in response.data]
return data, included, meta, list_ids, next_token

View File

@@ -45,7 +45,7 @@ class TwitterGetListTweetsBlock(Block):
required=True,
)
max_results: int = SchemaField(
max_results: int | None = SchemaField(
description="Maximum number of results per page (1-100)",
placeholder="Enter max results",
default=10,
@@ -116,7 +116,7 @@ class TwitterGetListTweetsBlock(Block):
def get_list_tweets(
credentials: TwitterCredentials,
list_id: str,
max_results: int,
max_results: int | None,
pagination_token: str | None,
expansions: ExpansionFilter | None,
media_fields: TweetMediaFieldsFilter | None,
@@ -153,6 +153,7 @@ class TwitterGetListTweetsBlock(Block):
response = cast(Response, client.get_list_tweets(**params))
meta = {}
included = {}
tweet_ids = []
texts = []
next_token = None
@@ -161,10 +162,11 @@ class TwitterGetListTweetsBlock(Block):
meta = response.meta
next_token = meta.get("next_token")
included = IncludesSerializer.serialize(response.includes)
data = ResponseDataSerializer.serialize_list(response.data)
if response.includes:
included = IncludesSerializer.serialize(response.includes)
if response.data:
data = ResponseDataSerializer.serialize_list(response.data)
tweet_ids = [str(item.id) for item in response.data]
texts = [item.text for item in response.data]

View File

@@ -94,14 +94,14 @@ class TwitterUpdateListBlock(Block):
advanced=False,
)
name: str = SchemaField(
name: str | None = SchemaField(
description="New name for the List",
placeholder="Enter list name",
default="",
advanced=False,
)
description: str = SchemaField(
description: str | None = SchemaField(
description="New description for the List",
placeholder="Enter list description",
default="",
@@ -133,7 +133,10 @@ class TwitterUpdateListBlock(Block):
@staticmethod
def update_list(
credentials: TwitterCredentials, list_id: str, name: str, description: str
credentials: TwitterCredentials,
list_id: str,
name: str | None,
description: str | None,
):
try:
client = tweepy.Client(
@@ -162,10 +165,7 @@ class TwitterUpdateListBlock(Block):
) -> BlockOutput:
try:
success = self.update_list(
credentials,
input_data.list_id,
input_data.name,
input_data.description,
credentials, input_data.list_id, input_data.name, input_data.description
)
yield "success", success
@@ -190,7 +190,7 @@ class TwitterCreateListBlock(Block):
default="",
)
description: str = SchemaField(
description: str | None = SchemaField(
description="Description of the List",
placeholder="Enter list description",
advanced=False,
@@ -231,7 +231,10 @@ class TwitterCreateListBlock(Block):
@staticmethod
def create_list(
credentials: TwitterCredentials, name: str, description: str, private: bool
credentials: TwitterCredentials,
name: str,
description: str | None,
private: bool,
):
try:
client = tweepy.Client(

View File

@@ -234,16 +234,18 @@ class TwitterGetPinnedListsBlock(Block):
response = cast(Response, client.get_pinned_lists(**params))
meta = {}
included = {}
list_ids = []
list_names = []
if response.meta:
meta = response.meta
included = IncludesSerializer.serialize(response.includes)
data = ResponseDataSerializer.serialize_list(response.data)
if response.includes:
included = IncludesSerializer.serialize(response.includes)
if response.data:
data = ResponseDataSerializer.serialize_list(response.data)
list_ids = [str(item.id) for item in response.data]
list_names = [item.name for item in response.data]
return data, included, meta, list_ids, list_names

View File

@@ -42,7 +42,7 @@ class TwitterSearchSpacesBlock(Block):
placeholder="Enter search query",
)
max_results: int = SchemaField(
max_results: int | None = SchemaField(
description="Maximum number of results to return (1-100)",
placeholder="Enter max results",
default=10,
@@ -111,7 +111,7 @@ class TwitterSearchSpacesBlock(Block):
def search_spaces(
credentials: TwitterCredentials,
query: str,
max_results: int,
max_results: int | None,
state: SpaceStatesFilter,
expansions: SpaceExpansionsFilter | None,
space_fields: SpaceFieldsFilter | None,
@@ -145,9 +145,9 @@ class TwitterSearchSpacesBlock(Block):
data = ResponseDataSerializer.serialize_list(response.data)
if response.data:
ids = [str(space["id"]) for space in response.data]
titles = [space["title"] for space in data]
host_ids = [space["host_ids"] for space in data]
ids = [str(space["id"]) for space in response.data if "id" in space]
titles = [space["title"] for space in data if "title" in space]
host_ids = [space["host_ids"] for space in data if "host_ids" in space]
return data, included, meta, ids, titles, host_ids, next_token

View File

@@ -1,6 +1,7 @@
from typing import cast
from typing import Literal, Union, cast
import tweepy
from pydantic import BaseModel
from tweepy.client import Response
from backend.blocks.twitter._auth import (
@@ -38,6 +39,26 @@ from backend.data.block import Block, BlockCategory, BlockOutput, BlockSchema
from backend.data.model import SchemaField
class SpaceList(BaseModel):
discriminator: Literal["space_list"]
space_ids: list[str] = SchemaField(
description="List of Space IDs to lookup (up to 100)",
placeholder="Enter Space IDs",
default=[],
advanced=False,
)
class UserList(BaseModel):
discriminator: Literal["user_list"]
user_ids: list[str] = SchemaField(
description="List of user IDs to lookup their Spaces (up to 100)",
placeholder="Enter user IDs",
default=[],
advanced=False,
)
class TwitterGetSpacesBlock(Block):
"""
Gets information about multiple Twitter Spaces specified by Space IDs or creator user IDs
@@ -48,17 +69,9 @@ class TwitterGetSpacesBlock(Block):
["spaces.read", "users.read", "offline.access"]
)
space_ids: list[str] = SchemaField(
description="List of Space IDs to lookup (up to 100)",
placeholder="Enter Space IDs",
default=[],
advanced=False,
)
user_ids: list[str] = SchemaField(
description="List of user IDs to lookup their Spaces (up to 100)",
placeholder="Enter user IDs",
default=[],
identifier: Union[SpaceList, UserList] = SchemaField(
discriminator="discriminator",
description="Choose whether to lookup spaces by their IDs or by creator user IDs",
advanced=False,
)
@@ -82,8 +95,10 @@ class TwitterGetSpacesBlock(Block):
input_schema=TwitterGetSpacesBlock.Input,
output_schema=TwitterGetSpacesBlock.Output,
test_input={
"space_ids": ["1DXxyRYNejbKM"],
"user_ids": [],
"identifier": {
"discriminator": "space_list",
"space_ids": ["1DXxyRYNejbKM"],
},
"credentials": TEST_CREDENTIALS_INPUT,
"expansions": None,
"space_fields": None,
@@ -123,8 +138,7 @@ class TwitterGetSpacesBlock(Block):
@staticmethod
def get_spaces(
credentials: TwitterCredentials,
space_ids: list[str],
user_ids: list[str],
identifier: Union[SpaceList, UserList],
expansions: SpaceExpansionsFilter | None,
space_fields: SpaceFieldsFilter | None,
user_fields: TweetUserFieldsFilter | None,
@@ -135,8 +149,12 @@ class TwitterGetSpacesBlock(Block):
)
params = {
"ids": None if space_ids == [] else space_ids,
"user_ids": None if user_ids == [] else user_ids,
"ids": (
identifier.space_ids if isinstance(identifier, SpaceList) else None
),
"user_ids": (
identifier.user_ids if isinstance(identifier, UserList) else None
),
}
params = (
@@ -156,8 +174,8 @@ class TwitterGetSpacesBlock(Block):
if response.data:
data = ResponseDataSerializer.serialize_list(response.data)
ids = [space["id"] for space in data]
titles = [space["title"] for space in data]
ids = [space["id"] for space in data if "id" in space]
titles = [space["title"] for space in data if "title" in space]
return data, included, ids, titles
@@ -176,8 +194,7 @@ class TwitterGetSpacesBlock(Block):
try:
data, included, ids, titles = self.get_spaces(
credentials,
input_data.space_ids,
input_data.user_ids,
input_data.identifier,
input_data.expansions,
input_data.space_fields,
input_data.user_fields,
@@ -340,9 +357,14 @@ class TwitterGetSpaceByIdBlock(Block):
# Common outputs
if space_data:
yield "id", space_data.get("id")
yield "title", space_data.get("title")
yield "host_ids", space_data.get("host_ids")
if "id" in space_data:
yield "id", space_data.get("id")
if "title" in space_data:
yield "title", space_data.get("title")
if "host_ids" in space_data:
yield "host_ids", space_data.get("host_ids")
if space_data:
yield "data", space_data

View File

@@ -107,7 +107,7 @@ class TwitterGetBookmarkedTweetsBlock(Block):
["tweet.read", "bookmark.read", "users.read", "offline.access"]
)
max_results: int = SchemaField(
max_results: int | None = SchemaField(
description="Maximum number of results to return (1-100)",
placeholder="Enter max results",
default=10,
@@ -183,7 +183,7 @@ class TwitterGetBookmarkedTweetsBlock(Block):
@staticmethod
def get_bookmarked_tweets(
credentials: TwitterCredentials,
max_results: int,
max_results: int | None,
pagination_token: str | None,
expansions: ExpansionFilter | None,
media_fields: TweetMediaFieldsFilter | None,

View File

@@ -119,7 +119,7 @@ class TwitterGetLikingUsersBlock(Block):
description="ID of the tweet to get liking users for",
placeholder="Enter tweet ID",
)
max_results: int = SchemaField(
max_results: int | None = SchemaField(
description="Maximum number of results to return (1-100)",
placeholder="Enter max results",
default=10,
@@ -190,7 +190,7 @@ class TwitterGetLikingUsersBlock(Block):
def get_liking_users(
credentials: TwitterCredentials,
tweet_id: str,
max_results: int,
max_results: int | None,
pagination_token: str | None,
expansions: UserExpansionsFilter | None,
tweet_fields: TweetFieldsFilter | None,
@@ -293,7 +293,7 @@ class TwitterGetLikedTweetsBlock(Block):
description="ID of the user to get liked tweets for",
placeholder="Enter user ID",
)
max_results: int = SchemaField(
max_results: int | None = SchemaField(
description="Maximum number of results to return (5-100)",
placeholder="100",
default=10,
@@ -384,7 +384,7 @@ class TwitterGetLikedTweetsBlock(Block):
def get_liked_tweets(
credentials: TwitterCredentials,
user_id: str,
max_results: int,
max_results: int | None,
pagination_token: str | None,
expansions: ExpansionFilter | None,
media_fields: TweetMediaFieldsFilter | None,

View File

@@ -1,7 +1,8 @@
from datetime import datetime
from typing import cast
from typing import List, Literal, Optional, Union, cast
import tweepy
from pydantic import BaseModel
from tweepy.client import Response
from backend.blocks.twitter._auth import (
@@ -37,6 +38,33 @@ from backend.data.block import Block, BlockCategory, BlockOutput, BlockSchema
from backend.data.model import SchemaField
class Media(BaseModel):
discriminator: Literal["media"]
media_ids: Optional[List[str]] = None
media_tagged_user_ids: Optional[List[str]] = None
class DeepLink(BaseModel):
discriminator: Literal["deep_link"]
direct_message_deep_link: Optional[str] = None
class Poll(BaseModel):
discriminator: Literal["poll"]
poll_options: Optional[List[str]] = None
poll_duration_minutes: Optional[int] = None
class Place(BaseModel):
discriminator: Literal["place"]
place_id: Optional[str] = None
class Quote(BaseModel):
discriminator: Literal["quote"]
quote_tweet_id: Optional[str] = None
class TwitterPostTweetBlock(Block):
"""
Create a tweet on Twitter with the option to include one additional element such as a media, quote, or deep link.
@@ -47,72 +75,36 @@ class TwitterPostTweetBlock(Block):
["tweet.read", "tweet.write", "users.read", "offline.access"]
)
tweet_text: str = SchemaField(
description="Text of the tweet to post [It's Optional if you want to add media, quote, or deep link]",
tweet_text: str | None = SchemaField(
description="Text of the tweet to post",
placeholder="Enter your tweet",
default=None,
advanced=False,
default="",
)
media_ids: list = SchemaField(
description="List of media IDs to attach to the tweet, [ex - 1455952740635586573]",
placeholder="Enter media IDs",
default=[],
)
media_tagged_user_ids: list = SchemaField(
description="List of user IDs to tag in media, [ex - 1455952740635586573]",
placeholder="Enter media tagged user IDs",
default=[],
)
direct_message_deep_link: str = SchemaField(
description="Link directly to a Direct Message conversation with an account [ex - https://twitter.com/messages/compose?recipient_id={your_id}]",
placeholder="Enter direct message deep link",
default="",
)
poll_options: list = SchemaField(
description="List of poll options",
placeholder="Enter poll options",
default=[],
)
poll_duration_minutes: int = SchemaField(
description="Duration of the poll in minutes",
placeholder="Enter poll duration in minutes",
default=0,
)
for_super_followers_only: bool = SchemaField(
description="Tweet exclusively for Super Followers",
placeholder="Enter for super followers only",
advanced=True,
default=False,
)
place_id: str = SchemaField(
description="Adds optional location information to a tweet if geo settings are enabled in your profile.",
placeholder="Enter place ID",
default="",
)
quote_tweet_id: str = SchemaField(
description="Link to the Tweet being quoted, [ex- 1455953449422516226]",
attachment: Union[Media, DeepLink, Poll, Place, Quote] | None = SchemaField(
discriminator="discriminator",
description="Additional tweet data (media, deep link, poll, place or quote)",
advanced=True,
placeholder="Enter quote tweet ID",
default="",
)
exclude_reply_user_ids: list = SchemaField(
description="User IDs to exclude from reply Tweet thread. [ex - 6253282] ",
exclude_reply_user_ids: Optional[List[str]] = SchemaField(
description="User IDs to exclude from reply Tweet thread. [ex - 6253282]",
placeholder="Enter user IDs to exclude",
advanced=True,
default=[],
default=None,
)
in_reply_to_tweet_id: str = SchemaField(
in_reply_to_tweet_id: Optional[str] = SchemaField(
description="Tweet ID being replied to. Please note that in_reply_to_tweet_id needs to be in the request if exclude_reply_user_ids is present",
default="",
default=None,
placeholder="Enter in reply to tweet ID",
advanced=True,
)
@@ -141,12 +133,11 @@ class TwitterPostTweetBlock(Block):
test_input={
"tweet_text": "This is a test tweet.",
"credentials": TEST_CREDENTIALS_INPUT,
"direct_message_deep_link": "",
"attachment": {
"discriminator": "deep_link",
"direct_message_deep_link": "https://twitter.com/messages/compose",
},
"for_super_followers_only": False,
"place_id": "",
"media_ids": [],
"media_tagged_user_ids": [],
"quote_tweet_id": "",
"exclude_reply_user_ids": [],
"in_reply_to_tweet_id": "",
},
@@ -163,20 +154,14 @@ class TwitterPostTweetBlock(Block):
},
)
@staticmethod
def post_tweet(
self,
credentials: TwitterCredentials,
input_txt: str,
media_ids: list,
media_tagged_user_ids: list,
direct_message_deep_link: str,
input_txt: str | None,
attachment: Union[Media, DeepLink, Poll, Place, Quote] | None,
for_super_followers_only: bool,
place_id: str,
poll_options: list,
poll_duration_minutes: int,
quote_tweet_id: str,
exclude_reply_user_ids: list,
in_reply_to_tweet_id: str,
exclude_reply_user_ids: Optional[List[str]],
in_reply_to_tweet_id: Optional[str],
reply_settings: TweetReplySettingsFilter,
):
try:
@@ -187,20 +172,29 @@ class TwitterPostTweetBlock(Block):
params = (
TweetPostBuilder()
.add_text(input_txt)
.add_media(media_ids, media_tagged_user_ids)
.add_deep_link(direct_message_deep_link)
.add_super_followers(for_super_followers_only)
.add_poll_options(poll_options)
.add_poll_duration(poll_duration_minutes)
.add_place(place_id)
.add_quote(quote_tweet_id)
.add_reply_settings(
exclude_reply_user_ids, in_reply_to_tweet_id, reply_settings
exclude_reply_user_ids or [],
in_reply_to_tweet_id or "",
reply_settings,
)
.build()
)
tweet = cast(Response, client.create_tweet(**params))
if isinstance(attachment, Media):
params.add_media(
attachment.media_ids or [], attachment.media_tagged_user_ids or []
)
elif isinstance(attachment, DeepLink):
params.add_deep_link(attachment.direct_message_deep_link or "")
elif isinstance(attachment, Poll):
params.add_poll_options(attachment.poll_options or [])
params.add_poll_duration(attachment.poll_duration_minutes or 0)
elif isinstance(attachment, Place):
params.add_place(attachment.place_id or "")
elif isinstance(attachment, Quote):
params.add_quote(attachment.quote_tweet_id or "")
tweet = cast(Response, client.create_tweet(**params.build()))
if not tweet.data:
raise Exception("Failed to create tweet")
@@ -225,14 +219,8 @@ class TwitterPostTweetBlock(Block):
tweet_id, tweet_url = self.post_tweet(
credentials,
input_data.tweet_text,
input_data.media_ids,
input_data.media_tagged_user_ids,
input_data.direct_message_deep_link,
input_data.attachment,
input_data.for_super_followers_only,
input_data.place_id,
input_data.poll_options,
input_data.poll_duration_minutes,
input_data.quote_tweet_id,
input_data.exclude_reply_user_ids,
input_data.in_reply_to_tweet_id,
input_data.reply_settings,

View File

@@ -45,16 +45,14 @@ class TwitterGetQuoteTweetsBlock(Block):
placeholder="Enter tweet ID",
)
max_results: int = SchemaField(
max_results: int | None = SchemaField(
description="Number of results to return (max 100)",
default=10,
advanced=True,
)
exclude: TweetExcludesFilter | None = SchemaField(
description="Types of tweets to exclude",
advanced=True,
default=None
description="Types of tweets to exclude", advanced=True, default=None
)
pagination_token: str | None = SchemaField(
@@ -125,7 +123,7 @@ class TwitterGetQuoteTweetsBlock(Block):
def get_quote_tweets(
credentials: TwitterCredentials,
tweet_id: str,
max_results: int,
max_results: int | None,
exclude: TweetExcludesFilter | None,
pagination_token: str | None,
expansions: ExpansionFilter | None,

View File

@@ -191,7 +191,7 @@ class TwitterGetRetweetersBlock(Block):
placeholder="Enter tweet ID",
)
max_results: int = SchemaField(
max_results: int | None = SchemaField(
description="Maximum number of results per page (1-100)",
default=10,
placeholder="Enter max results",
@@ -270,7 +270,7 @@ class TwitterGetRetweetersBlock(Block):
def get_retweeters(
credentials: TwitterCredentials,
tweet_id: str,
max_results: int,
max_results: int | None,
pagination_token: str | None,
expansions: UserExpansionsFilter | None,
tweet_fields: TweetFieldsFilter | None,

View File

@@ -49,7 +49,7 @@ class TwitterGetUserMentionsBlock(Block):
placeholder="Enter user ID",
)
max_results: int = SchemaField(
max_results: int | None = SchemaField(
description="Number of tweets to retrieve (5-100)",
default=10,
advanced=True,
@@ -143,7 +143,7 @@ class TwitterGetUserMentionsBlock(Block):
def get_mentions(
credentials: TwitterCredentials,
user_id: str,
max_results: int,
max_results: int | None,
start_time: datetime | None,
end_time: datetime | None,
since_id: str | None,
@@ -290,7 +290,7 @@ class TwitterGetHomeTimelineBlock(Block):
["tweet.read", "users.read", "offline.access"]
)
max_results: int = SchemaField(
max_results: int | None = SchemaField(
description="Number of tweets to retrieve (5-100)",
default=10,
advanced=True,
@@ -376,7 +376,7 @@ class TwitterGetHomeTimelineBlock(Block):
@staticmethod
def get_timeline(
credentials: TwitterCredentials,
max_results: int,
max_results: int | None,
start_time: datetime | None,
end_time: datetime | None,
since_id: str | None,
@@ -526,7 +526,7 @@ class TwitterGetUserTweetsBlock(Block):
placeholder="Enter user ID",
)
max_results: int = SchemaField(
max_results: int | None = SchemaField(
description="Number of tweets to retrieve (5-100)",
default=10,
advanced=True,
@@ -620,7 +620,7 @@ class TwitterGetUserTweetsBlock(Block):
def get_user_tweets(
credentials: TwitterCredentials,
user_id: str,
max_results: int,
max_results: int | None,
start_time: datetime | None,
end_time: datetime | None,
since_id: str | None,

View File

@@ -25,7 +25,7 @@ from backend.data.model import SchemaField
class TwitterUnblockUserBlock(Block):
"""
Unblock a specific user on Twitter
Unblock a specific user on Twitter. The request succeeds with no action when the user sends a request to a user they're not blocking or have already unblocked.
"""
class Input(BlockSchema):
@@ -98,7 +98,7 @@ class TwitterGetBlockedUsersBlock(Block):
["users.read", "offline.access", "block.read"]
)
max_results: int = SchemaField(
max_results: int | None = SchemaField(
description="Maximum number of results to return (1-1000, default 100)",
placeholder="Enter max results",
default=10,
@@ -156,7 +156,7 @@ class TwitterGetBlockedUsersBlock(Block):
@staticmethod
def get_blocked_users(
credentials: TwitterCredentials,
max_results: int,
max_results: int | None,
pagination_token: str | None,
expansions: UserExpansionsFilter | None,
tweet_fields: TweetFieldsFilter | None,

View File

@@ -28,7 +28,8 @@ from backend.data.model import SchemaField
class TwitterUnfollowUserBlock(Block):
"""
Allows a user to unfollow another user specified by target user ID
Allows a user to unfollow another user specified by target user ID.
The request succeeds with no action when the authenticated user sends a request to a user they're not following or have already unfollowed.
"""
class Input(BlockSchema):
@@ -96,7 +97,10 @@ class TwitterUnfollowUserBlock(Block):
class TwitterFollowUserBlock(Block):
"""
Allows a user to follow another user specified by target user ID
Allows a user to follow another user specified by target user ID. If the target user does not have public Tweets,
this endpoint will send a follow request. The request succeeds with no action when the authenticated user sends a
request to a user they're already following, or if they're sending a follower request to a user that does not have
public Tweets.
"""
class Input(BlockSchema):
@@ -175,7 +179,7 @@ class TwitterGetFollowersBlock(Block):
placeholder="Enter target user ID",
)
max_results: int = SchemaField(
max_results: int | None = SchemaField(
description="Maximum number of results to return (1-1000, default 100)",
placeholder="Enter max results",
default=10,
@@ -240,7 +244,7 @@ class TwitterGetFollowersBlock(Block):
def get_followers(
credentials: TwitterCredentials,
target_user_id: str,
max_results: int,
max_results: int | None,
pagination_token: str | None,
expansions: UserExpansionsFilter | None,
tweet_fields: TweetFieldsFilter | None,
@@ -348,7 +352,7 @@ class TwitterGetFollowingBlock(Block):
placeholder="Enter target user ID",
)
max_results: int = SchemaField(
max_results: int | None = SchemaField(
description="Maximum number of results to return (1-1000, default 100)",
placeholder="Enter max results",
default=10,
@@ -413,7 +417,7 @@ class TwitterGetFollowingBlock(Block):
def get_following(
credentials: TwitterCredentials,
target_user_id: str,
max_results: int,
max_results: int | None,
pagination_token: str | None,
expansions: UserExpansionsFilter | None,
tweet_fields: TweetFieldsFilter | None,

View File

@@ -28,7 +28,8 @@ from backend.data.model import SchemaField
class TwitterUnmuteUserBlock(Block):
"""
Allows a user to unmute another user specified by target user ID
Allows a user to unmute another user specified by target user ID.
The request succeeds with no action when the user sends a request to a user they're not muting or have already unmuted.
"""
class Input(BlockSchema):
@@ -104,7 +105,7 @@ class TwitterGetMutedUsersBlock(Block):
["users.read", "offline.access"]
)
max_results: int = SchemaField(
max_results: int | None = SchemaField(
description="The maximum number of results to be returned per page (1-1000). Default is 100.",
placeholder="Enter max results",
default=10,
@@ -176,7 +177,7 @@ class TwitterGetMutedUsersBlock(Block):
@staticmethod
def get_muted_users(
credentials: TwitterCredentials,
max_results: int,
max_results: int | None,
pagination_token: str | None,
expansions: UserExpansionsFilter | None,
tweet_fields: TweetFieldsFilter | None,

View File

@@ -1,6 +1,7 @@
from typing import cast
from typing import Literal, Union, cast
import tweepy
from pydantic import BaseModel
from tweepy.client import Response
from backend.blocks.twitter._auth import (
@@ -26,6 +27,18 @@ from backend.data.block import Block, BlockCategory, BlockOutput, BlockSchema
from backend.data.model import SchemaField
class UserId(BaseModel):
discriminator: Literal["user_id"]
user_id: str = SchemaField(description="The ID of the user to lookup", default="")
class Username(BaseModel):
discriminator: Literal["username"]
username: str = SchemaField(
description="The Twitter username (handle) of the user", default=""
)
class TwitterGetUserBlock(Block):
"""
Gets information about a single Twitter user specified by ID or username
@@ -36,17 +49,9 @@ class TwitterGetUserBlock(Block):
["users.read", "offline.access"]
)
user_id: str = SchemaField(
description="The ID of the user to lookup",
placeholder="Enter user ID",
default="",
advanced=False,
)
username: str = SchemaField(
description="The Twitter username (handle) of the user",
placeholder="Enter username",
default="",
identifier: Union[UserId, Username] = SchemaField(
discriminator="discriminator",
description="Choose whether to identify the user by their unique Twitter ID or by their username",
advanced=False,
)
@@ -71,8 +76,7 @@ class TwitterGetUserBlock(Block):
input_schema=TwitterGetUserBlock.Input,
output_schema=TwitterGetUserBlock.Output,
test_input={
"user_id": "",
"username": "twitter",
"identifier": {"discriminator": "username", "username": "twitter"},
"credentials": TEST_CREDENTIALS_INPUT,
"expansions": None,
"tweet_fields": None,
@@ -114,8 +118,7 @@ class TwitterGetUserBlock(Block):
@staticmethod
def get_user(
credentials: TwitterCredentials,
user_id: str,
username: str,
identifier: Union[UserId, Username],
expansions: UserExpansionsFilter | None,
tweet_fields: TweetFieldsFilter | None,
user_fields: TweetUserFieldsFilter | None,
@@ -126,8 +129,10 @@ class TwitterGetUserBlock(Block):
)
params = {
"id": None if not user_id else user_id,
"username": None if not username else username,
"id": identifier.user_id if isinstance(identifier, UserId) else None,
"username": (
identifier.username if isinstance(identifier, Username) else None
),
"user_auth": False,
}
@@ -171,8 +176,7 @@ class TwitterGetUserBlock(Block):
try:
data, included, username, id, name = self.get_user(
credentials,
input_data.user_id,
input_data.username,
input_data.identifier,
input_data.expansions,
input_data.tweet_fields,
input_data.user_fields,
@@ -191,6 +195,26 @@ class TwitterGetUserBlock(Block):
yield "error", handle_tweepy_exception(e)
class UserIdList(BaseModel):
discriminator: Literal["user_id_list"]
user_ids: list[str] = SchemaField(
description="List of user IDs to lookup (max 100)",
placeholder="Enter user IDs",
default=[],
advanced=False,
)
class UsernameList(BaseModel):
discriminator: Literal["username_list"]
usernames: list[str] = SchemaField(
description="List of Twitter usernames/handles to lookup (max 100)",
placeholder="Enter usernames",
default=[],
advanced=False,
)
class TwitterGetUsersBlock(Block):
"""
Gets information about multiple Twitter users specified by IDs or usernames
@@ -201,17 +225,9 @@ class TwitterGetUsersBlock(Block):
["users.read", "offline.access"]
)
user_ids: list[str] = SchemaField(
description="List of user IDs to lookup (max 100)",
placeholder="Enter user IDs",
default=[],
advanced=False,
)
usernames: list[str] = SchemaField(
description="List of Twitter usernames/handles to lookup (max 100)",
placeholder="Enter usernames",
default=[],
identifier: Union[UserIdList, UsernameList] = SchemaField(
discriminator="discriminator",
description="Choose whether to identify users by their unique Twitter IDs or by their usernames",
advanced=False,
)
@@ -236,8 +252,10 @@ class TwitterGetUsersBlock(Block):
input_schema=TwitterGetUsersBlock.Input,
output_schema=TwitterGetUsersBlock.Output,
test_input={
"user_ids": [],
"usernames": ["twitter", "twitterdev"],
"identifier": {
"discriminator": "username_list",
"usernames": ["twitter", "twitterdev"],
},
"credentials": TEST_CREDENTIALS_INPUT,
"expansions": None,
"tweet_fields": None,
@@ -281,8 +299,7 @@ class TwitterGetUsersBlock(Block):
@staticmethod
def get_users(
credentials: TwitterCredentials,
user_ids: list[str],
usernames: list[str],
identifier: Union[UserIdList, UsernameList],
expansions: UserExpansionsFilter | None,
tweet_fields: TweetFieldsFilter | None,
user_fields: TweetUserFieldsFilter | None,
@@ -293,8 +310,16 @@ class TwitterGetUsersBlock(Block):
)
params = {
"ids": None if not user_ids else user_ids,
"usernames": None if not usernames else usernames,
"ids": (
",".join(identifier.user_ids)
if isinstance(identifier, UserIdList)
else None
),
"usernames": (
",".join(identifier.usernames)
if isinstance(identifier, UsernameList)
else None
),
"user_auth": False,
}
@@ -339,8 +364,7 @@ class TwitterGetUsersBlock(Block):
try:
data, included, usernames, ids, names = self.get_users(
credentials,
input_data.user_ids,
input_data.usernames,
input_data.identifier,
input_data.expansions,
input_data.tweet_fields,
input_data.user_fields,

View File

@@ -22,10 +22,10 @@ from backend.util import json
from backend.util.settings import Config
from .model import (
CREDENTIALS_FIELD_NAME,
ContributorDetails,
Credentials,
CredentialsMetaInput,
is_credentials_field_name,
)
app_config = Config()
@@ -61,6 +61,9 @@ class BlockCategory(Enum):
HARDWARE = "Block that interacts with hardware."
AGENT = "Block that interacts with other agents."
CRM = "Block that interacts with CRM services."
SAFETY = (
"Block that provides AI safety mechanisms such as detecting harmful content"
)
def dict(self) -> dict[str, str]:
return {"category": self.name, "description": self.value}
@@ -97,11 +100,6 @@ class BlockSchema(BaseModel):
cls.cached_jsonschema = cast(dict[str, Any], ref_to_dict(model))
# Set default properties values
for field in cls.cached_jsonschema.get("properties", {}).values():
if isinstance(field, dict) and "advanced" not in field:
field["advanced"] = True
return cls.cached_jsonschema
@classmethod
@@ -143,17 +141,38 @@ class BlockSchema(BaseModel):
@classmethod
def __pydantic_init_subclass__(cls, **kwargs):
"""Validates the schema definition. Rules:
- Only one `CredentialsMetaInput` field may be present.
- This field MUST be called `credentials`.
- A field that is called `credentials` MUST be a `CredentialsMetaInput`.
- Fields with annotation `CredentialsMetaInput` MUST be
named `credentials` or `*_credentials`
- Fields named `credentials` or `*_credentials` MUST be
of type `CredentialsMetaInput`
"""
super().__pydantic_init_subclass__(**kwargs)
# Reset cached JSON schema to prevent inheriting it from parent class
cls.cached_jsonschema = {}
credentials_fields = [
field_name
credentials_fields = cls.get_credentials_fields()
for field_name in cls.get_fields():
if is_credentials_field_name(field_name):
if field_name not in credentials_fields:
raise TypeError(
f"Credentials field '{field_name}' on {cls.__qualname__} "
f"is not of type {CredentialsMetaInput.__name__}"
)
credentials_fields[field_name].validate_credentials_field_schema(cls)
elif field_name in credentials_fields:
raise KeyError(
f"Credentials field '{field_name}' on {cls.__qualname__} "
"has invalid name: must be 'credentials' or *_credentials"
)
@classmethod
def get_credentials_fields(cls) -> dict[str, type[CredentialsMetaInput]]:
return {
field_name: info.annotation
for field_name, info in cls.model_fields.items()
if (
inspect.isclass(info.annotation)
@@ -162,32 +181,7 @@ class BlockSchema(BaseModel):
CredentialsMetaInput,
)
)
]
if len(credentials_fields) > 1:
raise ValueError(
f"{cls.__qualname__} can only have one CredentialsMetaInput field"
)
elif (
len(credentials_fields) == 1
and credentials_fields[0] != CREDENTIALS_FIELD_NAME
):
raise ValueError(
f"CredentialsMetaInput field on {cls.__qualname__} "
"must be named 'credentials'"
)
elif (
len(credentials_fields) == 0
and CREDENTIALS_FIELD_NAME in cls.model_fields.keys()
):
raise TypeError(
f"Field 'credentials' on {cls.__qualname__} "
f"must be of type {CredentialsMetaInput.__name__}"
)
if credentials_field := cls.model_fields.get(CREDENTIALS_FIELD_NAME):
credentials_input_type = cast(
CredentialsMetaInput, credentials_field.annotation
)
credentials_input_type.validate_credentials_field_schema(cls)
}
BlockSchemaInputType = TypeVar("BlockSchemaInputType", bound=BlockSchema)
@@ -260,7 +254,7 @@ class Block(ABC, Generic[BlockSchemaInputType, BlockSchemaOutputType]):
test_input: BlockInput | list[BlockInput] | None = None,
test_output: BlockData | list[BlockData] | None = None,
test_mock: dict[str, Any] | None = None,
test_credentials: Optional[Credentials] = None,
test_credentials: Optional[Credentials | dict[str, Credentials]] = None,
disabled: bool = False,
static_output: bool = False,
block_type: BlockType = BlockType.STANDARD,
@@ -302,10 +296,16 @@ class Block(ABC, Generic[BlockSchemaInputType, BlockSchemaOutputType]):
if self.webhook_config:
if isinstance(self.webhook_config, BlockWebhookConfig):
# Enforce presence of credentials field on auto-setup webhook blocks
if CREDENTIALS_FIELD_NAME not in self.input_schema.model_fields:
if not (cred_fields := self.input_schema.get_credentials_fields()):
raise TypeError(
"credentials field is required on auto-setup webhook blocks"
)
# Disallow multiple credentials inputs on webhook blocks
elif len(cred_fields) > 1:
raise ValueError(
"Multiple credentials inputs not supported on webhook blocks"
)
self.block_type = BlockType.WEBHOOK
else:
self.block_type = BlockType.WEBHOOK_MANUAL

View File

@@ -51,6 +51,7 @@ MODEL_COST: dict[LlmModel, int] = {
LlmModel.LLAMA3_1_405B: 1,
LlmModel.LLAMA3_1_70B: 1,
LlmModel.LLAMA3_1_8B: 1,
LlmModel.OLLAMA_LLAMA3_2: 1,
LlmModel.OLLAMA_LLAMA3_8B: 1,
LlmModel.OLLAMA_LLAMA3_405B: 1,
LlmModel.OLLAMA_DOLPHIN: 1,

View File

@@ -270,9 +270,9 @@ async def update_graph_execution_start_time(graph_exec_id: str):
async def update_graph_execution_stats(
graph_exec_id: str,
status: ExecutionStatus,
stats: dict[str, Any],
) -> ExecutionResult:
status = ExecutionStatus.FAILED if stats.get("error") else ExecutionStatus.COMPLETED
res = await AgentGraphExecution.prisma().update(
where={"id": graph_exec_id},
data={

View File

@@ -193,7 +193,8 @@ class Graph(BaseDbModel):
"properties": {
p.name: {
"secret": p.secret,
"advanced": p.advanced,
# Default value has to be set for advanced fields.
"advanced": p.advanced and p.value is not None,
"title": p.title or p.name,
**({"description": p.description} if p.description else {}),
**({"default": p.value} if p.value is not None else {}),
@@ -423,6 +424,26 @@ class GraphModel(Graph):
result[key] = value
return result
def clean_graph(self):
blocks = [block() for block in get_blocks().values()]
input_blocks = [
node
for node in self.nodes
if next(
(
b
for b in blocks
if b.id == node.block_id and b.block_type == BlockType.INPUT
),
None,
)
]
for node in self.nodes:
if any(input_block.id == node.id for input_block in input_blocks):
node.input_default["value"] = ""
# --------------------- CRUD functions --------------------- #
@@ -608,25 +629,20 @@ async def __create_graph(tx, graph: Graph, user_id: str):
"isTemplate": graph.is_template,
"isActive": graph.is_active,
"userId": user_id,
"AgentNodes": {
"create": [
{
"id": node.id,
"agentBlockId": node.block_id,
"constantInput": json.dumps(node.input_default),
"metadata": json.dumps(node.metadata),
}
for node in graph.nodes
]
},
}
)
await asyncio.gather(
*[
AgentNode.prisma(tx).create(
{
"id": node.id,
"agentBlockId": node.block_id,
"agentGraphId": graph.id,
"agentGraphVersion": graph.version,
"constantInput": json.dumps(node.input_default),
"metadata": json.dumps(node.metadata),
}
)
for node in graph.nodes
]
)
await asyncio.gather(
*[
AgentNodeLink.prisma(tx).create(

View File

@@ -35,7 +35,7 @@ class Webhook(BaseDbModel):
@computed_field
@property
def url(self) -> str:
return webhook_ingress_url(self.provider.value, self.id)
return webhook_ingress_url(self.provider, self.id)
@staticmethod
def from_db(webhook: IntegrationWebhook):

View File

@@ -134,13 +134,20 @@ def SchemaField(
title: Optional[str] = None,
description: Optional[str] = None,
placeholder: Optional[str] = None,
advanced: Optional[bool] = False,
advanced: Optional[bool] = None,
secret: bool = False,
exclude: bool = False,
hidden: Optional[bool] = None,
depends_on: list[str] | None = None,
image_upload: Optional[bool] = None,
image_output: Optional[bool] = None,
**kwargs,
) -> T:
if default is PydanticUndefined and default_factory is None:
advanced = False
elif advanced is None:
advanced = True
json_extra = {
k: v
for k, v in {
@@ -149,6 +156,8 @@ def SchemaField(
"advanced": advanced,
"hidden": hidden,
"depends_on": depends_on,
"image_upload": image_upload,
"image_output": image_output,
}.items()
if v is not None
}
@@ -241,7 +250,8 @@ CP = TypeVar("CP", bound=ProviderName)
CT = TypeVar("CT", bound=CredentialsType)
CREDENTIALS_FIELD_NAME = "credentials"
def is_credentials_field_name(field_name: str) -> bool:
return field_name == "credentials" or field_name.endswith("_credentials")
class CredentialsMetaInput(BaseModel, Generic[CP, CT]):
@@ -250,21 +260,21 @@ class CredentialsMetaInput(BaseModel, Generic[CP, CT]):
provider: CP
type: CT
@staticmethod
def _add_json_schema_extra(schema, cls: CredentialsMetaInput):
schema["credentials_provider"] = get_args(
cls.model_fields["provider"].annotation
)
schema["credentials_types"] = get_args(cls.model_fields["type"].annotation)
@classmethod
def allowed_providers(cls) -> tuple[ProviderName, ...]:
return get_args(cls.model_fields["provider"].annotation)
model_config = ConfigDict(
json_schema_extra=_add_json_schema_extra, # type: ignore
)
@classmethod
def allowed_cred_types(cls) -> tuple[CredentialsType, ...]:
return get_args(cls.model_fields["type"].annotation)
@classmethod
def validate_credentials_field_schema(cls, model: type["BlockSchema"]):
"""Validates the schema of a `credentials` field"""
field_schema = model.jsonschema()["properties"][CREDENTIALS_FIELD_NAME]
"""Validates the schema of a credentials input field"""
field_name = next(
name for name, type in model.get_credentials_fields().items() if type is cls
)
field_schema = model.jsonschema()["properties"][field_name]
try:
schema_extra = _CredentialsFieldSchemaExtra[CP, CT].model_validate(
field_schema
@@ -278,11 +288,20 @@ class CredentialsMetaInput(BaseModel, Generic[CP, CT]):
f"{field_schema}"
) from e
if (
len(schema_extra.credentials_provider) > 1
and not schema_extra.discriminator
):
raise TypeError("Multi-provider CredentialsField requires discriminator!")
if len(cls.allowed_providers()) > 1 and not schema_extra.discriminator:
raise TypeError(
f"Multi-provider CredentialsField '{field_name}' "
"requires discriminator!"
)
@staticmethod
def _add_json_schema_extra(schema, cls: CredentialsMetaInput):
schema["credentials_provider"] = cls.allowed_providers()
schema["credentials_types"] = cls.allowed_cred_types()
model_config = ConfigDict(
json_schema_extra=_add_json_schema_extra, # type: ignore
)
class _CredentialsFieldSchemaExtra(BaseModel, Generic[CP, CT]):

View File

@@ -10,7 +10,6 @@ from contextlib import contextmanager
from multiprocessing.pool import AsyncResult, Pool
from typing import TYPE_CHECKING, Any, Generator, TypeVar, cast
from pydantic import BaseModel
from redis.lock import Lock as RedisLock
if TYPE_CHECKING:
@@ -20,7 +19,14 @@ from autogpt_libs.utils.cache import thread_cached
from backend.blocks.agent import AgentExecutorBlock
from backend.data import redis
from backend.data.block import Block, BlockData, BlockInput, BlockType, get_block
from backend.data.block import (
Block,
BlockData,
BlockInput,
BlockSchema,
BlockType,
get_block,
)
from backend.data.execution import (
ExecutionQueue,
ExecutionResult,
@@ -31,7 +37,6 @@ from backend.data.execution import (
parse_execution_output,
)
from backend.data.graph import GraphModel, Link, Node
from backend.data.model import CREDENTIALS_FIELD_NAME, CredentialsMetaInput
from backend.integrations.creds_manager import IntegrationCredentialsManager
from backend.util import json
from backend.util.decorator import error_logged, time_measured
@@ -170,10 +175,11 @@ def execute_node(
# one (running) block at a time; simultaneous execution of blocks using same
# credentials is not supported.
creds_lock = None
if CREDENTIALS_FIELD_NAME in input_data:
credentials_meta = CredentialsMetaInput(**input_data[CREDENTIALS_FIELD_NAME])
input_model = cast(type[BlockSchema], node_block.input_schema)
for field_name, input_type in input_model.get_credentials_fields().items():
credentials_meta = input_type(**input_data[field_name])
credentials, creds_lock = creds_manager.acquire(user_id, credentials_meta.id)
extra_exec_kwargs["credentials"] = credentials
extra_exec_kwargs[field_name] = credentials
output_size = 0
end_status = ExecutionStatus.COMPLETED
@@ -591,7 +597,7 @@ class Executor:
node_eid="*",
block_name="-",
)
timing_info, (exec_stats, error) = cls._on_graph_execution(
timing_info, (exec_stats, status, error) = cls._on_graph_execution(
graph_exec, cancel, log_metadata
)
exec_stats["walltime"] = timing_info.wall_time
@@ -599,6 +605,7 @@ class Executor:
exec_stats["error"] = str(error) if error else None
result = cls.db_client.update_graph_execution_stats(
graph_exec_id=graph_exec.graph_exec_id,
status=status,
stats=exec_stats,
)
cls.db_client.send_execution_update(result)
@@ -610,11 +617,12 @@ class Executor:
graph_exec: GraphExecutionEntry,
cancel: threading.Event,
log_metadata: LogMetadata,
) -> tuple[dict[str, Any], Exception | None]:
) -> tuple[dict[str, Any], ExecutionStatus, Exception | None]:
"""
Returns:
The execution statistics of the graph execution.
The error that occurred during the execution.
dict: The execution statistics of the graph execution.
ExecutionStatus: The final status of the graph execution.
Exception | None: The error that occurred during the execution, if any.
"""
log_metadata.info(f"Start graph execution {graph_exec.graph_exec_id}")
exec_stats = {
@@ -659,8 +667,7 @@ class Executor:
while not queue.empty():
if cancel.is_set():
error = RuntimeError("Execution is cancelled")
return exec_stats, error
return exec_stats, ExecutionStatus.TERMINATED, error
exec_data = queue.get()
@@ -690,8 +697,7 @@ class Executor:
)
for node_id, execution in list(running_executions.items()):
if cancel.is_set():
error = RuntimeError("Execution is cancelled")
return exec_stats, error
return exec_stats, ExecutionStatus.TERMINATED, error
if not queue.empty():
break # yield to parent loop to execute new queue items
@@ -710,7 +716,12 @@ class Executor:
finished = True
cancel.set()
cancel_thread.join()
return exec_stats, error
return (
exec_stats,
ExecutionStatus.FAILED if error else ExecutionStatus.COMPLETED,
error,
)
class ExecutionManager(AppService):
@@ -876,11 +887,8 @@ class ExecutionManager(AppService):
ExecutionStatus.COMPLETED,
ExecutionStatus.FAILED,
):
self.db_client.upsert_execution_output(
node_exec.node_exec_id, "error", "TERMINATED"
)
exec_update = self.db_client.update_execution_status(
node_exec.node_exec_id, ExecutionStatus.FAILED
node_exec.node_exec_id, ExecutionStatus.TERMINATED
)
self.db_client.send_execution_update(exec_update)
@@ -893,41 +901,39 @@ class ExecutionManager(AppService):
raise ValueError(f"Unknown block {node.block_id} for node #{node.id}")
# Find any fields of type CredentialsMetaInput
model_fields = cast(type[BaseModel], block.input_schema).model_fields
if CREDENTIALS_FIELD_NAME not in model_fields:
credentials_fields = cast(
type[BlockSchema], block.input_schema
).get_credentials_fields()
if not credentials_fields:
continue
field = model_fields[CREDENTIALS_FIELD_NAME]
# The BlockSchema class enforces that a `credentials` field is always a
# `CredentialsMetaInput`, so we can safely assume this here.
credentials_meta_type = cast(CredentialsMetaInput, field.annotation)
credentials_meta = credentials_meta_type.model_validate(
node.input_default[CREDENTIALS_FIELD_NAME]
)
# Fetch the corresponding Credentials and perform sanity checks
credentials = self.credentials_store.get_creds_by_id(
user_id, credentials_meta.id
)
if not credentials:
raise ValueError(
f"Unknown credentials #{credentials_meta.id} "
f"for node #{node.id}"
for field_name, credentials_meta_type in credentials_fields.items():
credentials_meta = credentials_meta_type.model_validate(
node.input_default[field_name]
)
if (
credentials.provider != credentials_meta.provider
or credentials.type != credentials_meta.type
):
logger.warning(
f"Invalid credentials #{credentials.id} for node #{node.id}: "
"type/provider mismatch: "
f"{credentials_meta.type}<>{credentials.type};"
f"{credentials_meta.provider}<>{credentials.provider}"
)
raise ValueError(
f"Invalid credentials #{credentials.id} for node #{node.id}: "
"type/provider mismatch"
# Fetch the corresponding Credentials and perform sanity checks
credentials = self.credentials_store.get_creds_by_id(
user_id, credentials_meta.id
)
if not credentials:
raise ValueError(
f"Unknown credentials #{credentials_meta.id} "
f"for node #{node.id} input '{field_name}'"
)
if (
credentials.provider != credentials_meta.provider
or credentials.type != credentials_meta.type
):
logger.warning(
f"Invalid credentials #{credentials.id} for node #{node.id}: "
"type/provider mismatch: "
f"{credentials_meta.type}<>{credentials.type};"
f"{credentials_meta.provider}<>{credentials.provider}"
)
raise ValueError(
f"Invalid credentials #{credentials.id} for node #{node.id}: "
"type/provider mismatch"
)
# ------- UTILITIES ------- #
@@ -947,7 +953,8 @@ def synchronized(key: str, timeout: int = 60):
lock.acquire()
yield
finally:
lock.release()
if lock.locked():
lock.release()
def llprint(message: str):

View File

@@ -99,6 +99,10 @@ class ExecutionScheduler(AppService):
def get_port(cls) -> int:
return config.execution_scheduler_port
@classmethod
def db_pool_size(cls) -> int:
return config.scheduler_db_pool_size
@property
@thread_cached
def execution_client(self) -> ExecutionManager:
@@ -110,7 +114,11 @@ class ExecutionScheduler(AppService):
self.scheduler = BlockingScheduler(
jobstores={
"default": SQLAlchemyJobStore(
engine=create_engine(db_url),
engine=create_engine(
url=db_url,
pool_size=self.db_pool_size(),
max_overflow=0,
),
metadata=MetaData(schema=db_schema),
)
}

View File

@@ -93,6 +93,34 @@ open_router_credentials = APIKeyCredentials(
title="Use Credits for Open Router",
expires_at=None,
)
fal_credentials = APIKeyCredentials(
id="6c0f5bd0-9008-4638-9d79-4b40b631803e",
provider="fal",
api_key=SecretStr(settings.secrets.fal_api_key),
title="Use Credits for FAL",
expires_at=None,
)
exa_credentials = APIKeyCredentials(
id="96153e04-9c6c-4486-895f-5bb683b1ecec",
provider="exa",
api_key=SecretStr(settings.secrets.exa_api_key),
title="Use Credits for Exa search",
expires_at=None,
)
e2b_credentials = APIKeyCredentials(
id="78d19fd7-4d59-4a16-8277-3ce310acf2b7",
provider="e2b",
api_key=SecretStr(settings.secrets.e2b_api_key),
title="Use Credits for E2B",
expires_at=None,
)
nvidia_credentials = APIKeyCredentials(
id="96b83908-2789-4dec-9968-18f0ece4ceb3",
provider="nvidia",
api_key=SecretStr(settings.secrets.nvidia_api_key),
title="Use Credits for Nvidia",
expires_at=None,
)
DEFAULT_CREDENTIALS = [
@@ -106,6 +134,10 @@ DEFAULT_CREDENTIALS = [
jina_credentials,
unreal_credentials,
open_router_credentials,
fal_credentials,
exa_credentials,
e2b_credentials,
nvidia_credentials,
]
@@ -157,6 +189,14 @@ class IntegrationCredentialsStore:
all_credentials.append(unreal_credentials)
if settings.secrets.open_router_api_key:
all_credentials.append(open_router_credentials)
if settings.secrets.fal_api_key:
all_credentials.append(fal_credentials)
if settings.secrets.exa_api_key:
all_credentials.append(exa_credentials)
if settings.secrets.e2b_api_key:
all_credentials.append(e2b_credentials)
if settings.secrets.nvidia_api_key:
all_credentials.append(nvidia_credentials)
return all_credentials
def get_creds_by_id(self, user_id: str, credentials_id: str) -> Credentials | None:

View File

@@ -92,7 +92,7 @@ class IntegrationCredentialsManager:
fresh_credentials = oauth_handler.refresh_tokens(credentials)
self.store.update_creds(user_id, fresh_credentials)
if _lock:
if _lock and _lock.locked():
_lock.release()
credentials = fresh_credentials
@@ -144,7 +144,8 @@ class IntegrationCredentialsManager:
try:
yield
finally:
lock.release()
if lock.locked():
lock.release()
def release_all_locks(self):
"""Call this on process termination to ensure all locks are released"""

View File

@@ -19,6 +19,7 @@ class ProviderName(str, Enum):
JINA = "jina"
MEDIUM = "medium"
NOTION = "notion"
NVIDIA = "nvidia"
OLLAMA = "ollama"
OPENAI = "openai"
OPENWEATHERMAP = "openweathermap"

View File

@@ -1,9 +1,8 @@
import logging
from typing import TYPE_CHECKING, Callable, Optional, cast
from backend.data.block import BlockWebhookConfig, get_block
from backend.data.block import BlockSchema, BlockWebhookConfig, get_block
from backend.data.graph import set_node_webhook
from backend.data.model import CREDENTIALS_FIELD_NAME
from backend.integrations.webhooks import WEBHOOK_MANAGERS_BY_NAME
if TYPE_CHECKING:
@@ -30,14 +29,28 @@ async def on_graph_activate(
# Compare nodes in new_graph_version with previous_graph_version
updated_nodes = []
for new_node in graph.nodes:
block = get_block(new_node.block_id)
if not block:
raise ValueError(
f"Node #{new_node.id} is instance of unknown block #{new_node.block_id}"
)
block_input_schema = cast(BlockSchema, block.input_schema)
node_credentials = None
if creds_meta := new_node.input_default.get(CREDENTIALS_FIELD_NAME):
node_credentials = get_credentials(creds_meta["id"])
if not node_credentials:
raise ValueError(
f"Node #{new_node.id} updated with non-existent "
f"credentials #{node_credentials}"
if (
# Webhook-triggered blocks are only allowed to have 1 credentials input
(
creds_field_name := next(
iter(block_input_schema.get_credentials_fields()), None
)
)
and (creds_meta := new_node.input_default.get(creds_field_name))
and not (node_credentials := get_credentials(creds_meta["id"]))
):
raise ValueError(
f"Node #{new_node.id} input '{creds_field_name}' updated with "
f"non-existent credentials #{creds_meta['id']}"
)
updated_node = await on_node_activate(
graph.user_id, new_node, credentials=node_credentials
@@ -62,14 +75,28 @@ async def on_graph_deactivate(
"""
updated_nodes = []
for node in graph.nodes:
block = get_block(node.block_id)
if not block:
raise ValueError(
f"Node #{node.id} is instance of unknown block #{node.block_id}"
)
block_input_schema = cast(BlockSchema, block.input_schema)
node_credentials = None
if creds_meta := node.input_default.get(CREDENTIALS_FIELD_NAME):
node_credentials = get_credentials(creds_meta["id"])
if not node_credentials:
logger.error(
f"Node #{node.id} referenced non-existent "
f"credentials #{creds_meta['id']}"
if (
# Webhook-triggered blocks are only allowed to have 1 credentials input
(
creds_field_name := next(
iter(block_input_schema.get_credentials_fields()), None
)
)
and (creds_meta := node.input_default.get(creds_field_name))
and not (node_credentials := get_credentials(creds_meta["id"]))
):
logger.error(
f"Node #{node.id} input '{creds_field_name}' referenced non-existent "
f"credentials #{creds_meta['id']}"
)
updated_node = await on_node_deactivate(node, credentials=node_credentials)
updated_nodes.append(updated_node)
@@ -119,14 +146,17 @@ async def on_node_activate(
else:
resource = "" # not relevant for manual webhooks
needs_credentials = CREDENTIALS_FIELD_NAME in block.input_schema.model_fields
block_input_schema = cast(BlockSchema, block.input_schema)
credentials_field_name = next(iter(block_input_schema.get_credentials_fields()), "")
credentials_meta = (
node.input_default.get(CREDENTIALS_FIELD_NAME) if needs_credentials else None
node.input_default.get(credentials_field_name)
if credentials_field_name
else None
)
event_filter_input_name = block.webhook_config.event_filter_input
has_everything_for_webhook = (
resource is not None
and (credentials_meta or not needs_credentials)
and (credentials_meta or not credentials_field_name)
and (
not event_filter_input_name
or (
@@ -230,7 +260,7 @@ async def on_node_deactivate(
)
await webhooks_manager.prune_webhook_if_dangling(webhook.id, credentials)
if (
CREDENTIALS_FIELD_NAME in block.input_schema.model_fields
cast(BlockSchema, block.input_schema).get_credentials_fields()
and not credentials
):
logger.warning(

View File

@@ -1,11 +1,12 @@
from backend.integrations.providers import ProviderName
from backend.util.settings import Config
app_config = Config()
# TODO: add test to assert this matches the actual API route
def webhook_ingress_url(provider_name: str, webhook_id: str) -> str:
def webhook_ingress_url(provider_name: ProviderName, webhook_id: str) -> str:
return (
f"{app_config.platform_base_url}/api/integrations/{provider_name}"
f"{app_config.platform_base_url}/api/integrations/{provider_name.value}"
f"/webhooks/{webhook_id}/ingress"
)

View File

@@ -541,7 +541,7 @@ def get_execution_schedules(
@v1_router.post(
"/api-keys",
response_model=list[CreateAPIKeyResponse] | dict[str, str],
response_model=CreateAPIKeyResponse,
tags=["api-keys"],
dependencies=[Depends(auth_middleware)],
)
@@ -583,7 +583,7 @@ async def get_api_keys(
@v1_router.get(
"/api-keys/{key_id}",
response_model=list[APIKeyWithoutHash] | dict[str, str],
response_model=APIKeyWithoutHash,
tags=["api-keys"],
dependencies=[Depends(auth_middleware)],
)
@@ -604,7 +604,7 @@ async def get_api_key(
@v1_router.delete(
"/api-keys/{key_id}",
response_model=list[APIKeyWithoutHash] | dict[str, str],
response_model=APIKeyWithoutHash,
tags=["api-keys"],
dependencies=[Depends(auth_middleware)],
)
@@ -626,7 +626,7 @@ async def delete_api_key(
@v1_router.post(
"/api-keys/{key_id}/suspend",
response_model=list[APIKeyWithoutHash] | dict[str, str],
response_model=APIKeyWithoutHash,
tags=["api-keys"],
dependencies=[Depends(auth_middleware)],
)
@@ -648,7 +648,7 @@ async def suspend_key(
@v1_router.put(
"/api-keys/{key_id}/permissions",
response_model=list[APIKeyWithoutHash] | dict[str, str],
response_model=APIKeyWithoutHash,
tags=["api-keys"],
dependencies=[Depends(auth_middleware)],
)

View File

@@ -2,6 +2,7 @@ import autogpt_libs.auth.depends
import autogpt_libs.auth.middleware
import fastapi
import fastapi.testclient
import pytest
import pytest_mock
import backend.server.v2.library.db
@@ -80,6 +81,7 @@ def test_get_library_agents_error(mocker: pytest_mock.MockFixture):
mock_db_call.assert_called_once_with("test-user-id")
@pytest.mark.skip(reason="Mocker Not implemented")
def test_add_agent_to_library_success(mocker: pytest_mock.MockFixture):
mock_db_call = mocker.patch("backend.server.v2.library.db.add_agent_to_library")
mock_db_call.return_value = None
@@ -91,6 +93,7 @@ def test_add_agent_to_library_success(mocker: pytest_mock.MockFixture):
)
@pytest.mark.skip(reason="Mocker Not implemented")
def test_add_agent_to_library_error(mocker: pytest_mock.MockFixture):
mock_db_call = mocker.patch("backend.server.v2.library.db.add_agent_to_library")
mock_db_call.side_effect = Exception("Test error")

View File

@@ -1,14 +1,18 @@
import logging
import random
from datetime import datetime
from typing import Optional
import fastapi
import prisma.enums
import prisma.errors
import prisma.models
import prisma.types
import backend.data.graph
import backend.server.v2.store.exceptions
import backend.server.v2.store.model
from backend.data.graph import GraphModel
logger = logging.getLogger(__name__)
@@ -31,7 +35,7 @@ async def get_store_agents(
sanitized_query = search_query.strip()
if not sanitized_query or len(sanitized_query) > 100: # Reasonable length limit
raise backend.server.v2.store.exceptions.DatabaseError(
"Invalid search query"
f"Invalid search query: len({len(sanitized_query)}) query: {search_query}"
)
# Escape special SQL characters
@@ -449,6 +453,11 @@ async def create_store_submission(
)
try:
# Sanitize slug to only allow letters and hyphens
slug = "".join(
c if c.isalpha() or c == "-" or c.isnumeric() else "" for c in slug
).lower()
# First verify the agent belongs to this user
agent = await prisma.models.AgentGraph.prisma().find_first(
where=prisma.types.AgentGraphWhereInput(
@@ -636,7 +645,12 @@ async def update_or_create_profile(
logger.info(f"Updating profile for user {user_id} data: {profile}")
try:
# Check if profile exists for user
# Sanitize username to only allow letters and hyphens
username = "".join(
c if c.isalpha() or c == "-" or c.isnumeric() else ""
for c in profile.username
).lower()
existing_profile = await prisma.models.Profile.prisma().find_first(
where={"userId": user_id}
)
@@ -651,7 +665,7 @@ async def update_or_create_profile(
data={
"userId": user_id,
"name": profile.name,
"username": profile.username.lower(),
"username": username,
"description": profile.description,
"links": profile.links or [],
"avatarUrl": profile.avatar_url,
@@ -676,7 +690,7 @@ async def update_or_create_profile(
if profile.name is not None:
update_data["name"] = profile.name
if profile.username is not None:
update_data["username"] = profile.username.lower()
update_data["username"] = username
if profile.description is not None:
update_data["description"] = profile.description
if profile.links is not None:
@@ -776,3 +790,45 @@ async def get_my_agents(
raise backend.server.v2.store.exceptions.DatabaseError(
"Failed to fetch my agents"
) from e
async def get_agent(
store_listing_version_id: str, version_id: Optional[int]
) -> GraphModel:
"""Get agent using the version ID and store listing version ID."""
try:
store_listing_version = (
await prisma.models.StoreListingVersion.prisma().find_unique(
where={"id": store_listing_version_id}, include={"Agent": True}
)
)
if not store_listing_version or not store_listing_version.Agent:
raise fastapi.HTTPException(
status_code=404,
detail=f"Store listing version {store_listing_version_id} not found",
)
agent = store_listing_version.Agent
graph = await backend.data.graph.get_graph(
agent.id, agent.version, template=True
)
if not graph:
raise fastapi.HTTPException(
status_code=404, detail=f"Agent {agent.id} not found"
)
graph.version = 1
graph.is_template = False
graph.is_active = True
delattr(graph, "user_id")
return graph
except Exception as e:
logger.error(f"Error getting agent: {str(e)}")
raise backend.server.v2.store.exceptions.DatabaseError(
"Failed to fetch agent"
) from e

View File

@@ -1,4 +1,6 @@
import json
import logging
import tempfile
import typing
import urllib.parse
@@ -6,7 +8,9 @@ import autogpt_libs.auth.depends
import autogpt_libs.auth.middleware
import fastapi
import fastapi.responses
from fastapi.encoders import jsonable_encoder
import backend.data.block
import backend.data.graph
import backend.server.v2.store.db
import backend.server.v2.store.image_gen
@@ -23,12 +27,16 @@ router = fastapi.APIRouter()
##############################################
@router.get("/profile", tags=["store", "private"])
@router.get(
"/profile",
tags=["store", "private"],
response_model=backend.server.v2.store.model.ProfileDetails,
)
async def get_profile(
user_id: typing.Annotated[
str, fastapi.Depends(autogpt_libs.auth.depends.get_user_id)
]
) -> backend.server.v2.store.model.ProfileDetails:
):
"""
Get the profile details for the authenticated user.
"""
@@ -37,20 +45,24 @@ async def get_profile(
return profile
except Exception:
logger.exception("Exception occurred whilst getting user profile")
raise
return fastapi.responses.JSONResponse(
status_code=500,
content={"detail": "An error occurred while retrieving the user profile"},
)
@router.post(
"/profile",
tags=["store", "private"],
dependencies=[fastapi.Depends(autogpt_libs.auth.middleware.auth_middleware)],
response_model=backend.server.v2.store.model.CreatorDetails,
)
async def update_or_create_profile(
profile: backend.server.v2.store.model.Profile,
user_id: typing.Annotated[
str, fastapi.Depends(autogpt_libs.auth.depends.get_user_id)
],
) -> backend.server.v2.store.model.CreatorDetails:
):
"""
Update the store profile for the authenticated user.
@@ -71,7 +83,10 @@ async def update_or_create_profile(
return updated_profile
except Exception:
logger.exception("Exception occurred whilst updating profile")
raise
return fastapi.responses.JSONResponse(
status_code=500,
content={"detail": "An error occurred while updating the user profile"},
)
##############################################
@@ -79,7 +94,11 @@ async def update_or_create_profile(
##############################################
@router.get("/agents", tags=["store", "public"])
@router.get(
"/agents",
tags=["store", "public"],
response_model=backend.server.v2.store.model.StoreAgentsResponse,
)
async def get_agents(
featured: bool = False,
creator: str | None = None,
@@ -88,7 +107,7 @@ async def get_agents(
category: str | None = None,
page: int = 1,
page_size: int = 20,
) -> backend.server.v2.store.model.StoreAgentsResponse:
):
"""
Get a paginated list of agents from the store with optional filtering and sorting.
@@ -138,13 +157,18 @@ async def get_agents(
return agents
except Exception:
logger.exception("Exception occured whilst getting store agents")
raise
return fastapi.responses.JSONResponse(
status_code=500,
content={"detail": "An error occurred while retrieving the store agents"},
)
@router.get("/agents/{username}/{agent_name}", tags=["store", "public"])
async def get_agent(
username: str, agent_name: str
) -> backend.server.v2.store.model.StoreAgentDetails:
@router.get(
"/agents/{username}/{agent_name}",
tags=["store", "public"],
response_model=backend.server.v2.store.model.StoreAgentDetails,
)
async def get_agent(username: str, agent_name: str):
"""
This is only used on the AgentDetails Page
@@ -153,20 +177,26 @@ async def get_agent(
try:
username = urllib.parse.unquote(username).lower()
# URL decode the agent name since it comes from the URL path
agent_name = urllib.parse.unquote(agent_name)
agent_name = urllib.parse.unquote(agent_name).lower()
agent = await backend.server.v2.store.db.get_store_agent_details(
username=username, agent_name=agent_name
)
return agent
except Exception:
logger.exception("Exception occurred whilst getting store agent details")
raise
return fastapi.responses.JSONResponse(
status_code=500,
content={
"detail": "An error occurred while retrieving the store agent details"
},
)
@router.post(
"/agents/{username}/{agent_name}/review",
tags=["store"],
dependencies=[fastapi.Depends(autogpt_libs.auth.middleware.auth_middleware)],
response_model=backend.server.v2.store.model.StoreReview,
)
async def create_review(
username: str,
@@ -175,7 +205,7 @@ async def create_review(
user_id: typing.Annotated[
str, fastapi.Depends(autogpt_libs.auth.depends.get_user_id)
],
) -> backend.server.v2.store.model.StoreReview:
):
"""
Create a review for a store agent.
@@ -202,7 +232,10 @@ async def create_review(
return created_review
except Exception:
logger.exception("Exception occurred whilst creating store review")
raise
return fastapi.responses.JSONResponse(
status_code=500,
content={"detail": "An error occurred while creating the store review"},
)
##############################################
@@ -210,14 +243,18 @@ async def create_review(
##############################################
@router.get("/creators", tags=["store", "public"])
@router.get(
"/creators",
tags=["store", "public"],
response_model=backend.server.v2.store.model.CreatorsResponse,
)
async def get_creators(
featured: bool = False,
search_query: str | None = None,
sorted_by: str | None = None,
page: int = 1,
page_size: int = 20,
) -> backend.server.v2.store.model.CreatorsResponse:
):
"""
This is needed for:
- Home Page Featured Creators
@@ -251,11 +288,20 @@ async def get_creators(
return creators
except Exception:
logger.exception("Exception occurred whilst getting store creators")
raise
return fastapi.responses.JSONResponse(
status_code=500,
content={"detail": "An error occurred while retrieving the store creators"},
)
@router.get("/creator/{username}", tags=["store", "public"])
async def get_creator(username: str) -> backend.server.v2.store.model.CreatorDetails:
@router.get(
"/creator/{username}",
tags=["store", "public"],
response_model=backend.server.v2.store.model.CreatorDetails,
)
async def get_creator(
username: str,
):
"""
Get the details of a creator
- Creator Details Page
@@ -268,7 +314,12 @@ async def get_creator(username: str) -> backend.server.v2.store.model.CreatorDet
return creator
except Exception:
logger.exception("Exception occurred whilst getting creator details")
raise
return fastapi.responses.JSONResponse(
status_code=500,
content={
"detail": "An error occurred while retrieving the creator details"
},
)
############################################
@@ -278,31 +329,36 @@ async def get_creator(username: str) -> backend.server.v2.store.model.CreatorDet
"/myagents",
tags=["store", "private"],
dependencies=[fastapi.Depends(autogpt_libs.auth.middleware.auth_middleware)],
response_model=backend.server.v2.store.model.MyAgentsResponse,
)
async def get_my_agents(
user_id: typing.Annotated[
str, fastapi.Depends(autogpt_libs.auth.depends.get_user_id)
]
) -> backend.server.v2.store.model.MyAgentsResponse:
):
try:
agents = await backend.server.v2.store.db.get_my_agents(user_id)
return agents
except Exception:
logger.exception("Exception occurred whilst getting my agents")
raise
return fastapi.responses.JSONResponse(
status_code=500,
content={"detail": "An error occurred while retrieving the my agents"},
)
@router.delete(
"/submissions/{submission_id}",
tags=["store", "private"],
dependencies=[fastapi.Depends(autogpt_libs.auth.middleware.auth_middleware)],
response_model=bool,
)
async def delete_submission(
user_id: typing.Annotated[
str, fastapi.Depends(autogpt_libs.auth.depends.get_user_id)
],
submission_id: str,
) -> bool:
):
"""
Delete a store listing submission.
@@ -321,13 +377,17 @@ async def delete_submission(
return result
except Exception:
logger.exception("Exception occurred whilst deleting store submission")
raise
return fastapi.responses.JSONResponse(
status_code=500,
content={"detail": "An error occurred while deleting the store submission"},
)
@router.get(
"/submissions",
tags=["store", "private"],
dependencies=[fastapi.Depends(autogpt_libs.auth.middleware.auth_middleware)],
response_model=backend.server.v2.store.model.StoreSubmissionsResponse,
)
async def get_submissions(
user_id: typing.Annotated[
@@ -335,7 +395,7 @@ async def get_submissions(
],
page: int = 1,
page_size: int = 20,
) -> backend.server.v2.store.model.StoreSubmissionsResponse:
):
"""
Get a paginated list of store submissions for the authenticated user.
@@ -368,20 +428,26 @@ async def get_submissions(
return listings
except Exception:
logger.exception("Exception occurred whilst getting store submissions")
raise
return fastapi.responses.JSONResponse(
status_code=500,
content={
"detail": "An error occurred while retrieving the store submissions"
},
)
@router.post(
"/submissions",
tags=["store", "private"],
dependencies=[fastapi.Depends(autogpt_libs.auth.middleware.auth_middleware)],
response_model=backend.server.v2.store.model.StoreSubmission,
)
async def create_submission(
submission_request: backend.server.v2.store.model.StoreSubmissionRequest,
user_id: typing.Annotated[
str, fastapi.Depends(autogpt_libs.auth.depends.get_user_id)
],
) -> backend.server.v2.store.model.StoreSubmission:
):
"""
Create a new store listing submission.
@@ -411,7 +477,10 @@ async def create_submission(
return submission
except Exception:
logger.exception("Exception occurred whilst creating store submission")
raise
return fastapi.responses.JSONResponse(
status_code=500,
content={"detail": "An error occurred while creating the store submission"},
)
@router.post(
@@ -424,7 +493,7 @@ async def upload_submission_media(
user_id: typing.Annotated[
str, fastapi.Depends(autogpt_libs.auth.depends.get_user_id)
],
) -> str:
):
"""
Upload media (images/videos) for a store listing submission.
@@ -443,10 +512,11 @@ async def upload_submission_media(
user_id=user_id, file=file
)
return media_url
except Exception as e:
except Exception:
logger.exception("Exception occurred whilst uploading submission media")
raise fastapi.HTTPException(
status_code=500, detail=f"Failed to upload media file: {str(e)}"
return fastapi.responses.JSONResponse(
status_code=500,
content={"detail": "An error occurred while uploading the media file"},
)
@@ -503,8 +573,72 @@ async def generate_image(
)
return fastapi.responses.JSONResponse(content={"image_url": image_url})
except Exception as e:
except Exception:
logger.exception("Exception occurred whilst generating submission image")
raise fastapi.HTTPException(
status_code=500, detail=f"Failed to generate image: {str(e)}"
return fastapi.responses.JSONResponse(
status_code=500,
content={"detail": "An error occurred while generating the image"},
)
@router.get(
"/download/agents/{store_listing_version_id}",
tags=["store", "public"],
)
async def download_agent_file(
store_listing_version_id: str = fastapi.Path(
..., description="The ID of the agent to download"
),
version: typing.Optional[int] = fastapi.Query(
None, description="Specific version of the agent"
),
) -> fastapi.responses.FileResponse:
"""
Download the agent file by streaming its content.
Args:
agent_id (str): The ID of the agent to download.
version (Optional[int]): Specific version of the agent to download.
Returns:
StreamingResponse: A streaming response containing the agent's graph data.
Raises:
HTTPException: If the agent is not found or an unexpected error occurs.
"""
graph_data = await backend.server.v2.store.db.get_agent(
store_listing_version_id=store_listing_version_id, version_id=version
)
graph_data.clean_graph()
graph_date_dict = jsonable_encoder(graph_data)
def remove_credentials(obj):
if obj and isinstance(obj, dict):
if "credentials" in obj:
del obj["credentials"]
if "creds" in obj:
del obj["creds"]
for value in obj.values():
remove_credentials(value)
elif isinstance(obj, list):
for item in obj:
remove_credentials(item)
return obj
graph_date_dict = remove_credentials(graph_date_dict)
file_name = f"agent_{store_listing_version_id}_v{version or 'latest'}.json"
# Sending graph as a stream (similar to marketplace v1)
with tempfile.NamedTemporaryFile(
mode="w", suffix=".json", delete=False
) as tmp_file:
tmp_file.write(json.dumps(graph_date_dict))
tmp_file.flush()
return fastapi.responses.FileResponse(
tmp_file.name, filename=file_name, media_type="application/json"
)

View File

@@ -38,7 +38,7 @@ def create_test_graph() -> graph.Graph:
graph.Node(
block_id=FillTextTemplateBlock().id,
input_default={
"format": "{a}, {b}{c}",
"format": "{{a}}, {{b}}{{c}}",
"values_#_c": "!!!",
},
),

View File

@@ -12,6 +12,7 @@ from backend.util.settings import Config
# List of IP networks to block
BLOCKED_IP_NETWORKS = [
# --8<-- [start:BLOCKED_IP_NETWORKS]
# IPv4 Ranges
ipaddress.ip_network("0.0.0.0/8"), # "This" Network
ipaddress.ip_network("10.0.0.0/8"), # Private-Use
ipaddress.ip_network("127.0.0.0/8"), # Loopback
@@ -20,6 +21,11 @@ BLOCKED_IP_NETWORKS = [
ipaddress.ip_network("192.168.0.0/16"), # Private-Use
ipaddress.ip_network("224.0.0.0/4"), # Multicast
ipaddress.ip_network("240.0.0.0/4"), # Reserved for Future Use
# IPv6 Ranges
ipaddress.ip_network("::1/128"), # Loopback
ipaddress.ip_network("fc00::/7"), # Unique local addresses (ULA)
ipaddress.ip_network("fe80::/10"), # Link-local
ipaddress.ip_network("ff00::/8"), # Multicast
# --8<-- [end:BLOCKED_IP_NETWORKS]
]
@@ -27,18 +33,6 @@ ALLOWED_SCHEMES = ["http", "https"]
HOSTNAME_REGEX = re.compile(r"^[A-Za-z0-9.-]+$") # Basic DNS-safe hostname pattern
def _canonicalize_url(url: str) -> str:
# Strip spaces and trailing slashes
url = url.strip().strip("/")
# Ensure the URL starts with http:// or https://
if not url.startswith(("http://", "https://")):
url = "http://" + url
# Replace backslashes with forward slashes to avoid parsing ambiguities
url = url.replace("\\", "/")
return url
def _is_ip_blocked(ip: str) -> bool:
"""
Checks if the IP address is in a blocked network.
@@ -49,11 +43,16 @@ def _is_ip_blocked(ip: str) -> bool:
def validate_url(url: str, trusted_origins: list[str]) -> str:
"""
Validates the URL to prevent SSRF attacks by ensuring it does not point to a private
or untrusted IP address, unless whitelisted.
Validates the URL to prevent SSRF attacks by ensuring it does not point
to a private, link-local, or otherwise blocked IP address unless
the hostname is explicitly trusted.
"""
url = _canonicalize_url(url)
# Canonicalize URL
url = url.strip("/ ").replace("\\", "/")
parsed = urlparse(url)
if not parsed.scheme:
url = f"http://{url}"
parsed = urlparse(url)
# Check scheme
if parsed.scheme not in ALLOWED_SCHEMES:
@@ -61,7 +60,7 @@ def validate_url(url: str, trusted_origins: list[str]) -> str:
f"Scheme '{parsed.scheme}' is not allowed. Only HTTP/HTTPS are supported."
)
# Validate and IDNA encode the hostname
# Validate and IDNA encode hostname
if not parsed.hostname:
raise ValueError("Invalid URL: No hostname found.")
@@ -75,11 +74,11 @@ def validate_url(url: str, trusted_origins: list[str]) -> str:
if not HOSTNAME_REGEX.match(ascii_hostname):
raise ValueError("Hostname contains invalid characters.")
# Rebuild the URL with the normalized, IDNA-encoded hostname
# Rebuild URL with IDNA-encoded hostname
parsed = parsed._replace(netloc=ascii_hostname)
url = str(urlunparse(parsed))
# Check if hostname is a trusted origin (exact match)
# If hostname is trusted, skip IP-based checks
if ascii_hostname in trusted_origins:
return url
@@ -92,11 +91,12 @@ def validate_url(url: str, trusted_origins: list[str]) -> str:
if not ip_addresses:
raise ValueError(f"No IP addresses found for {ascii_hostname}")
# Check if any resolved IP address falls into blocked ranges
for ip in ip_addresses:
if _is_ip_blocked(ip):
# Block any IP address that belongs to a blocked range
for ip_str in ip_addresses:
if _is_ip_blocked(ip_str):
raise ValueError(
f"Access to private IP address {ip} for hostname {ascii_hostname} is not allowed."
f"Access to blocked or private IP address {ip_str} "
f"for hostname {ascii_hostname} is not allowed."
)
return url
@@ -104,7 +104,9 @@ def validate_url(url: str, trusted_origins: list[str]) -> str:
class Requests:
"""
A wrapper around the requests library that validates URLs before making requests.
A wrapper around the requests library that validates URLs before
making requests, preventing SSRF by blocking private networks and
other disallowed address spaces.
"""
def __init__(
@@ -128,13 +130,16 @@ class Requests:
def request(
self, method, url, headers=None, allow_redirects=False, *args, **kwargs
) -> req.Response:
# Merge any extra headers
if self.extra_headers is not None:
headers = {**(headers or {}), **self.extra_headers}
# Validate the URL (with optional extra validator)
url = validate_url(url, self.trusted_origins)
if self.extra_url_validator is not None:
url = self.extra_url_validator(url)
# Perform the request
response = req.request(
method,
url,

View File

@@ -153,6 +153,11 @@ class Config(UpdateTrackingModel["Config"], BaseSettings):
description="The name of the Google Cloud Storage bucket for media files",
)
scheduler_db_pool_size: int = Field(
default=3,
description="The pool size for the scheduler database connection pool",
)
@field_validator("platform_base_url", "frontend_base_url")
@classmethod
def validate_platform_base_url(cls, v: str, info: ValidationInfo) -> str:
@@ -299,7 +304,10 @@ class Secrets(UpdateTrackingModel["Secrets"], BaseSettings):
jina_api_key: str = Field(default="", description="Jina API Key")
unreal_speech_api_key: str = Field(default="", description="Unreal Speech API Key")
fal_key: str = Field(default="", description="FAL API key")
fal_api_key: str = Field(default="", description="FAL API key")
exa_api_key: str = Field(default="", description="Exa API key")
e2b_api_key: str = Field(default="", description="E2B API key")
nvidia_api_key: str = Field(default="", description="Nvidia API key")
# Add more secret fields as needed

View File

@@ -1,11 +1,11 @@
import logging
import time
from typing import Sequence
from typing import Sequence, cast
from backend.data import db
from backend.data.block import Block, initialize_blocks
from backend.data.block import Block, BlockSchema, initialize_blocks
from backend.data.execution import ExecutionResult, ExecutionStatus
from backend.data.model import CREDENTIALS_FIELD_NAME
from backend.data.model import _BaseCredentials
from backend.data.user import create_default_user
from backend.executor import DatabaseManager, ExecutionManager, ExecutionScheduler
from backend.server.rest_api import AgentServer
@@ -65,6 +65,9 @@ async def wait_execution(
if status == ExecutionStatus.FAILED:
log.info("Execution failed")
raise Exception("Execution failed")
if status == ExecutionStatus.TERMINATED:
log.info("Execution terminated")
raise Exception("Execution terminated")
return status == ExecutionStatus.COMPLETED
# Wait for the executions to complete
@@ -100,14 +103,22 @@ def execute_block_test(block: Block):
else:
log.info(f"{prefix} mock {mock_name} not found in block")
# Populate credentials argument(s)
extra_exec_kwargs = {}
if CREDENTIALS_FIELD_NAME in block.input_schema.model_fields:
if not block.test_credentials:
raise ValueError(
f"{prefix} requires credentials but has no test_credentials"
)
extra_exec_kwargs[CREDENTIALS_FIELD_NAME] = block.test_credentials
input_model = cast(type[BlockSchema], block.input_schema)
credentials_input_fields = input_model.get_credentials_fields()
if len(credentials_input_fields) == 1 and isinstance(
block.test_credentials, _BaseCredentials
):
field_name = next(iter(credentials_input_fields))
extra_exec_kwargs[field_name] = block.test_credentials
elif credentials_input_fields and block.test_credentials:
if not isinstance(block.test_credentials, dict):
raise TypeError(f"Block {block.name} has no usable test credentials")
else:
for field_name in credentials_input_fields:
if field_name in block.test_credentials:
extra_exec_kwargs[field_name] = block.test_credentials[field_name]
for input_data in block.test_input:
log.info(f"{prefix} in: {input_data}")

View File

@@ -1,5 +1,3 @@
import re
from jinja2 import BaseLoader
from jinja2.sandbox import SandboxedEnvironment
@@ -15,8 +13,5 @@ class TextFormatter:
self.env.globals.clear()
def format_string(self, template_str: str, values=None, **kwargs) -> str:
# For python.format compatibility: replace all {...} with {{..}}.
# But avoid replacing {{...}} to {{{...}}}.
template_str = re.sub(r"(?<!{){[ a-zA-Z0-9_]+}", r"{\g<0>}", template_str)
template = self.env.from_string(template_str)
return template.render(values or {}, **kwargs)

View File

@@ -0,0 +1,50 @@
BEGIN;
DROP VIEW IF EXISTS "StoreAgent";
CREATE VIEW "StoreAgent" AS
WITH ReviewStats AS (
SELECT sl."id" AS "storeListingId",
COUNT(sr.id) AS review_count,
AVG(CAST(sr.score AS DECIMAL)) AS avg_rating
FROM "StoreListing" sl
JOIN "StoreListingVersion" slv ON slv."storeListingId" = sl."id"
JOIN "StoreListingReview" sr ON sr."storeListingVersionId" = slv.id
WHERE sl."isDeleted" = FALSE
GROUP BY sl."id"
),
AgentRuns AS (
SELECT "agentGraphId", COUNT(*) AS run_count
FROM "AgentGraphExecution"
GROUP BY "agentGraphId"
)
SELECT
sl.id AS listing_id,
slv.id AS "storeListingVersionId",
slv."createdAt" AS updated_at,
slv.slug,
slv.name AS agent_name,
slv."videoUrl" AS agent_video,
COALESCE(slv."imageUrls", ARRAY[]::TEXT[]) AS agent_image,
slv."isFeatured" AS featured,
p.username AS creator_username,
p."avatarUrl" AS creator_avatar,
slv."subHeading" AS sub_heading,
slv.description,
slv.categories,
COALESCE(ar.run_count, 0) AS runs,
CAST(COALESCE(rs.avg_rating, 0.0) AS DOUBLE PRECISION) AS rating,
ARRAY_AGG(DISTINCT CAST(slv.version AS TEXT)) AS versions
FROM "StoreListing" sl
JOIN "AgentGraph" a ON sl."agentId" = a.id AND sl."agentVersion" = a."version"
LEFT JOIN "Profile" p ON sl."owningUserId" = p."userId"
LEFT JOIN "StoreListingVersion" slv ON slv."storeListingId" = sl.id
LEFT JOIN ReviewStats rs ON sl.id = rs."storeListingId"
LEFT JOIN AgentRuns ar ON a.id = ar."agentGraphId"
WHERE sl."isDeleted" = FALSE
AND sl."isApproved" = TRUE
GROUP BY sl.id, slv.id, slv.slug, slv."createdAt", slv.name, slv."videoUrl", slv."imageUrls", slv."isFeatured",
p.username, p."avatarUrl", slv."subHeading", slv.description, slv.categories,
ar.run_count, rs.avg_rating;
COMMIT;

View File

@@ -0,0 +1,2 @@
-- Add "TERMINATED" to execution status enum type
ALTER TYPE "AgentExecutionStatus" ADD VALUE 'TERMINATED';

View File

@@ -0,0 +1,86 @@
/*
Warnings:
- You are about replace a single brace string input format for the following blocks:
- AgentOutputBlock
- FillTextTemplateBlock
- AITextGeneratorBlock
- AIStructuredResponseGeneratorBlock
with a double brace format.
- This migration can be slow for a large updated AgentNode tables.
*/
BEGIN;
SET LOCAL statement_timeout = '10min';
WITH to_update AS (
SELECT
"id",
"agentBlockId",
"constantInput"::jsonb AS j
FROM "AgentNode"
WHERE
"agentBlockId" IN (
'363ae599-353e-4804-937e-b2ee3cef3da4', -- AgentOutputBlock
'db7d8f02-2f44-4c55-ab7a-eae0941f0c30', -- FillTextTemplateBlock
'1f292d4a-41a4-4977-9684-7c8d560b9f91', -- AITextGeneratorBlock
'ed55ac19-356e-4243-a6cb-bc599e9b716f' -- AIStructuredResponseGeneratorBlock
)
AND (
"constantInput"::jsonb->>'format' ~ '(?<!\{)\{\s*([a-zA-Z_][a-zA-Z0-9_]*)\s*\}(?!\})'
OR "constantInput"::jsonb->>'prompt' ~ '(?<!\{)\{\s*([a-zA-Z_][a-zA-Z0-9_]*)\s*\}(?!\})'
OR "constantInput"::jsonb->>'sys_prompt' ~ '(?<!\{)\{\s*([a-zA-Z_][a-zA-Z0-9_]*)\s*\}(?!\})'
)
),
updated_rows AS (
SELECT
"id",
"agentBlockId",
(
j
-- Update "format" if it has a single-brace placeholder
|| CASE WHEN j->>'format' ~ '(?<!\{)\{\s*([a-zA-Z_][a-zA-Z0-9_]*)\s*\}(?!\})'
THEN jsonb_build_object(
'format',
regexp_replace(
j->>'format',
'(?<!\{)\{\s*([a-zA-Z_][a-zA-Z0-9_]*)\s*\}(?!\})',
'{{\1}}',
'g'
)
)
ELSE '{}'::jsonb
END
-- Update "prompt" if it has a single-brace placeholder
|| CASE WHEN j->>'prompt' ~ '(?<!\{)\{\s*([a-zA-Z_][a-zA-Z0-9_]*)\s*\}(?!\})'
THEN jsonb_build_object(
'prompt',
regexp_replace(
j->>'prompt',
'(?<!\{)\{\s*([a-zA-Z_][a-zA-Z0-9_]*)\s*\}(?!\})',
'{{\1}}',
'g'
)
)
ELSE '{}'::jsonb
END
-- Update "sys_prompt" if it has a single-brace placeholder
|| CASE WHEN j->>'sys_prompt' ~ '(?<!\{)\{\s*([a-zA-Z_][a-zA-Z0-9_]*)\s*\}(?!\})'
THEN jsonb_build_object(
'sys_prompt',
regexp_replace(
j->>'sys_prompt',
'(?<!\{)\{\s*([a-zA-Z_][a-zA-Z0-9_]*)\s*\}(?!\})',
'{{\1}}',
'g'
)
)
ELSE '{}'::jsonb
END
)::text AS "newConstantInput"
FROM to_update
)
UPDATE "AgentNode" AS an
SET "constantInput" = ur."newConstantInput"
FROM updated_rows ur
WHERE an."id" = ur."id";
COMMIT;

File diff suppressed because it is too large Load Diff

View File

@@ -4,7 +4,7 @@ version = "0.3.4"
description = "A platform for building AI-powered agentic workflows"
authors = ["AutoGPT <info@agpt.co>"]
readme = "README.md"
packages = [{ include = "backend" }]
packages = [{ include = "backend", format = "sdist" }]
[tool.poetry.dependencies]
@@ -14,7 +14,6 @@ anthropic = "^0.40.0"
apscheduler = "^3.11.0"
autogpt-libs = { path = "../autogpt_libs", develop = true }
click = "^8.1.7"
croniter = "^5.0.1"
discord-py = "^2.4.0"
e2b-code-interpreter = "^1.0.1"
fastapi = "^0.115.5"
@@ -40,7 +39,7 @@ python-dotenv = "^1.0.1"
redis = "^5.2.0"
sentry-sdk = "2.19.2"
strenum = "^0.4.9"
supabase = "^2.10.0"
supabase = "2.11.0"
tenacity = "^9.0.0"
tweepy = "^4.14.0"
uvicorn = { extras = ["standard"], version = "^0.34.0" }

View File

@@ -216,6 +216,7 @@ enum AgentExecutionStatus {
QUEUED
RUNNING
COMPLETED
TERMINATED
FAILED
}
@@ -638,4 +639,4 @@ enum APIKeyStatus {
ACTIVE
REVOKED
SUSPENDED
}
}

View File

@@ -90,7 +90,12 @@ async def test_get_input_schema(server: SpinTestServer):
Node(
id="node_0_a",
block_id=input_block,
input_default={"name": "in_key_a", "title": "Key A", "value": "A"},
input_default={
"name": "in_key_a",
"title": "Key A",
"value": "A",
"advanced": True,
},
metadata={"id": "node_0_a"},
),
Node(
@@ -138,8 +143,8 @@ async def test_get_input_schema(server: SpinTestServer):
)
class ExpectedInputSchema(BlockSchema):
in_key_a: Any = SchemaField(title="Key A", default="A", advanced=False)
in_key_b: Any = SchemaField(title="in_key_b", advanced=True)
in_key_a: Any = SchemaField(title="Key A", default="A", advanced=True)
in_key_b: Any = SchemaField(title="in_key_b", advanced=False)
class ExpectedOutputSchema(BlockSchema):
out_key: Any = SchemaField(
@@ -155,3 +160,45 @@ async def test_get_input_schema(server: SpinTestServer):
output_schema = created_graph.output_schema
output_schema["title"] = "ExpectedOutputSchema"
assert output_schema == ExpectedOutputSchema.jsonschema()
@pytest.mark.asyncio(scope="session")
async def test_clean_graph(server: SpinTestServer):
"""
Test the clean_graph function that:
1. Clears input block values
2. Removes credentials from nodes
"""
# Create a graph with input blocks and credentials
graph = Graph(
id="test_clean_graph",
name="Test Clean Graph",
description="Test graph cleaning",
nodes=[
Node(
id="input_node",
block_id=AgentInputBlock().id,
input_default={
"name": "test_input",
"value": "test value",
"description": "Test input description",
},
),
],
links=[],
)
# Create graph and get model
create_graph = CreateGraph(graph=graph)
created_graph = await server.agent_server.test_create_graph(
create_graph, DEFAULT_USER_ID
)
# Clean the graph
created_graph.clean_graph()
# # Verify input block value is cleared
input_node = next(
n for n in created_graph.nodes if n.block_id == AgentInputBlock().id
)
assert input_node.input_default["value"] == ""

View File

@@ -102,7 +102,7 @@ async def assert_sample_graph_executions(
assert exec.graph_exec_id == graph_exec_id
assert exec.output_data == {"output": ["Hello, World!!!"]}
assert exec.input_data == {
"format": "{a}, {b}{c}",
"format": "{{a}}, {{b}}{{c}}",
"values": {"a": "Hello", "b": "World", "c": "!!!"},
"values_#_a": "Hello",
"values_#_b": "World",

View File

@@ -144,51 +144,6 @@ services:
networks:
- app-network
market:
build:
context: ../
dockerfile: autogpt_platform/market/Dockerfile
develop:
watch:
- path: ./
target: autogpt_platform/market/
action: rebuild
depends_on:
db:
condition: service_healthy
market-migrations:
condition: service_completed_successfully
environment:
- SUPABASE_URL=http://kong:8000
- SUPABASE_JWT_SECRET=your-super-secret-jwt-token-with-at-least-32-characters-long
- SUPABASE_ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyAgCiAgICAicm9sZSI6ICJhbm9uIiwKICAgICJpc3MiOiAic3VwYWJhc2UtZGVtbyIsCiAgICAiaWF0IjogMTY0MTc2OTIwMCwKICAgICJleHAiOiAxNzk5NTM1NjAwCn0.dc_X5iR_VP_qT0zsiyj_I_OZ2T9FtRU2BBNWN8Bu4GE
- DATABASE_URL=postgresql://postgres:your-super-secret-and-long-postgres-password@db:5432/postgres?connect_timeout=60&schema=market
- BACKEND_CORS_ALLOW_ORIGINS="http://localhost:3000,http://127.0.0.1:3000"
ports:
- "8015:8015"
networks:
- app-network
market-migrations:
build:
context: ../
dockerfile: autogpt_platform/market/Dockerfile
command: ["sh", "-c", "poetry run prisma migrate deploy"]
develop:
watch:
- path: ./
target: autogpt_platform/market/
action: rebuild
depends_on:
db:
condition: service_healthy
environment:
- SUPABASE_URL=http://kong:8000
- SUPABASE_JWT_SECRET=your-super-secret-jwt-token-with-at-least-32-characters-long
- SUPABASE_ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyAgCiAgICAicm9sZSI6ICJhbm9uIiwKICAgICJpc3MiOiAic3VwYWJhc2UtZGVtbyIsCiAgICAiaWF0IjogMTY0MTc2OTIwMCwKICAgICJleHAiOiAxNzk5NTM1NjAwCn0.dc_X5iR_VP_qT0zsiyj_I_OZ2T9FtRU2BBNWN8Bu4GE
- DATABASE_URL=postgresql://postgres:your-super-secret-and-long-postgres-password@db:5432/postgres?connect_timeout=60&schema=market
networks:
- app-network
# frontend:
# build:
# context: ../

View File

@@ -51,18 +51,6 @@ services:
file: ./docker-compose.platform.yml
service: websocket_server
market:
<<: *agpt-services
extends:
file: ./docker-compose.platform.yml
service: market
market-migrations:
<<: *agpt-services
extends:
file: ./docker-compose.platform.yml
service: market-migrations
# frontend:
# <<: *agpt-services
# extends:

View File

@@ -24,8 +24,8 @@
],
"dependencies": {
"@faker-js/faker": "^9.3.0",
"@hookform/resolvers": "^3.9.1",
"@next/third-parties": "^15.0.4",
"@hookform/resolvers": "^3.10.0",
"@next/third-parties": "^15.1.3",
"@radix-ui/react-alert-dialog": "^1.1.4",
"@radix-ui/react-avatar": "^1.1.1",
"@radix-ui/react-checkbox": "^1.1.2",
@@ -59,29 +59,29 @@
"dotenv": "^16.4.7",
"elliptic": "6.6.1",
"embla-carousel-react": "^8.3.0",
"framer-motion": "^11.15.0",
"framer-motion": "^11.16.0",
"geist": "^1.3.1",
"launchdarkly-react-client-sdk": "^3.6.0",
"lucide-react": "^0.468.0",
"lucide-react": "^0.469.0",
"moment": "^2.30.1",
"next": "^14.2.13",
"next-themes": "^0.4.4",
"react": "^18",
"react-day-picker": "^9.4.4",
"react-day-picker": "^9.5.0",
"react-dom": "^18",
"react-hook-form": "^7.54.0",
"react-hook-form": "^7.54.2",
"react-icons": "^5.4.0",
"react-markdown": "^9.0.1",
"react-modal": "^3.16.1",
"react-markdown": "^9.0.3",
"react-modal": "^3.16.3",
"react-shepherd": "^6.1.6",
"recharts": "^2.14.1",
"tailwind-merge": "^2.5.5",
"tailwind-merge": "^2.6.0",
"tailwindcss-animate": "^1.0.7",
"uuid": "^11.0.3",
"uuid": "^11.0.4",
"zod": "^3.23.8"
},
"devDependencies": {
"@chromatic-com/storybook": "^3.2.2",
"@chromatic-com/storybook": "^3.2.3",
"@playwright/test": "^1.48.2",
"@storybook/addon-a11y": "^8.3.5",
"@storybook/addon-essentials": "^8.4.2",
@@ -92,25 +92,25 @@
"@storybook/nextjs": "^8.4.2",
"@storybook/react": "^8.3.5",
"@storybook/test": "^8.3.5",
"@storybook/test-runner": "^0.20.1",
"@storybook/test-runner": "^0.21.0",
"@types/negotiator": "^0.6.3",
"@types/node": "^22.9.0",
"@types/node": "^22.10.5",
"@types/react": "^18",
"@types/react-dom": "^18",
"@types/react-modal": "^3.16.3",
"axe-playwright": "^2.0.3",
"chromatic": "^11.12.5",
"concurrently": "^9.0.1",
"chromatic": "^11.22.0",
"concurrently": "^9.1.2",
"eslint": "^8",
"eslint-config-next": "15.1.0",
"eslint-plugin-storybook": "^0.11.0",
"eslint-config-next": "15.1.3",
"eslint-plugin-storybook": "^0.11.2",
"msw": "^2.7.0",
"msw-storybook-addon": "^2.0.3",
"postcss": "^8",
"prettier": "^3.3.3",
"prettier-plugin-tailwindcss": "^0.6.9",
"storybook": "^8.4.5",
"tailwindcss": "^3.4.15",
"tailwindcss": "^3.4.17",
"typescript": "^5"
},
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e",

View File

@@ -1,6 +1,6 @@
import React from "react";
import type { Metadata } from "next";
import { Inter } from "next/font/google";
import { Inter, Poppins } from "next/font/google";
import { Providers } from "@/app/providers";
import { cn } from "@/lib/utils";
import { Navbar } from "@/components/agptui/Navbar";
@@ -10,8 +10,16 @@ import TallyPopupSimple from "@/components/TallyPopup";
import { GoogleAnalytics } from "@next/third-parties/google";
import { Toaster } from "@/components/ui/toaster";
import { IconType } from "@/components/ui/icons";
import { GeistSans } from "geist/font/sans";
import { GeistMono } from "geist/font/mono";
const inter = Inter({ subsets: ["latin"] });
// Fonts
const inter = Inter({ subsets: ["latin"], variable: "--font-inter" });
const poppins = Poppins({
subsets: ["latin"],
weight: ["400", "500", "600", "700"],
variable: "--font-poppins",
});
export const metadata: Metadata = {
title: "NextGen AutoGPT",
@@ -24,7 +32,10 @@ export default async function RootLayout({
children: React.ReactNode;
}>) {
return (
<html lang="en">
<html
lang="en"
className={`${GeistSans.variable} ${GeistMono.variable} ${poppins.variable} ${inter.variable}`}
>
<body className={cn("antialiased transition-colors", inter.className)}>
<Providers
attribute="class"

View File

@@ -5,11 +5,7 @@ import { z } from "zod";
import * as Sentry from "@sentry/nextjs";
import getServerSupabase from "@/lib/supabase/getServerSupabase";
import BackendAPI from "@/lib/autogpt-server-api";
const loginFormSchema = z.object({
email: z.string().email().min(2).max(64),
password: z.string().min(6).max(64),
});
import { loginFormSchema, LoginProvider } from "@/types/auth";
export async function logout() {
return await Sentry.withServerActionInstrumentation(
@@ -25,7 +21,7 @@ export async function logout() {
const { error } = await supabase.auth.signOut();
if (error) {
console.log("Error logging out", error);
console.error("Error logging out", error);
return error.message;
}
@@ -47,18 +43,13 @@ export async function login(values: z.infer<typeof loginFormSchema>) {
// We are sure that the values are of the correct type because zod validates the form
const { data, error } = await supabase.auth.signInWithPassword(values);
await api.createUser();
if (error) {
console.log("Error logging in", error);
if (error.status == 400) {
// Hence User is not present
redirect("/login");
}
console.error("Error logging in", error);
return error.message;
}
await api.createUser();
if (data.session) {
await supabase.auth.setSession(data.session);
}
@@ -68,38 +59,34 @@ export async function login(values: z.infer<typeof loginFormSchema>) {
});
}
export async function signup(values: z.infer<typeof loginFormSchema>) {
"use server";
export async function providerLogin(provider: LoginProvider) {
return await Sentry.withServerActionInstrumentation(
"signup",
"providerLogin",
{},
async () => {
const supabase = getServerSupabase();
const api = new BackendAPI();
if (!supabase) {
redirect("/error");
}
// We are sure that the values are of the correct type because zod validates the form
const { data, error } = await supabase.auth.signUp(values);
const { error } = await supabase!.auth.signInWithOAuth({
provider: provider,
options: {
redirectTo:
process.env.AUTH_CALLBACK_URL ??
`http://localhost:3000/auth/callback`,
},
});
if (error) {
console.log("Error signing up", error);
if (error.message.includes("P0001")) {
return "Please join our waitlist for your turn: https://agpt.co/waitlist";
}
if (error.code?.includes("user_already_exists")) {
redirect("/login");
}
console.error("Error logging in", error);
return error.message;
}
if (data.session) {
await supabase.auth.setSession(data.session);
}
console.log("Signed up");
revalidatePath("/", "layout");
redirect("/store/profile");
await api.createUser();
console.log("Logged in");
},
);
}

View File

@@ -1,10 +1,8 @@
"use client";
import { login, signup } from "./actions";
import { Button } from "@/components/ui/button";
import { login, providerLogin } from "./actions";
import {
Form,
FormControl,
FormDescription,
FormField,
FormItem,
FormLabel,
@@ -14,40 +12,69 @@ import { useForm } from "react-hook-form";
import { Input } from "@/components/ui/input";
import { z } from "zod";
import { zodResolver } from "@hookform/resolvers/zod";
import { PasswordInput } from "@/components/PasswordInput";
import { FaGoogle, FaGithub, FaDiscord, FaSpinner } from "react-icons/fa";
import { useState } from "react";
import { useCallback, useState } from "react";
import { useRouter } from "next/navigation";
import Link from "next/link";
import { Checkbox } from "@/components/ui/checkbox";
import useSupabase from "@/hooks/useSupabase";
import Spinner from "@/components/Spinner";
import { useBackendAPI } from "@/lib/autogpt-server-api/context";
const loginFormSchema = z.object({
email: z.string().email().min(2).max(64),
password: z.string().min(6).max(64),
agreeToTerms: z.boolean().refine((value) => value === true, {
message: "You must agree to the Terms of Use and Privacy Policy",
}),
});
import {
AuthCard,
AuthHeader,
AuthButton,
AuthFeedback,
AuthBottomText,
PasswordInput,
} from "@/components/auth";
import { loginFormSchema } from "@/types/auth";
export default function LoginPage() {
const { supabase, user, isUserLoading } = useSupabase();
const [feedback, setFeedback] = useState<string | null>(null);
const router = useRouter();
const [isLoading, setIsLoading] = useState(false);
const api = useBackendAPI();
const form = useForm<z.infer<typeof loginFormSchema>>({
resolver: zodResolver(loginFormSchema),
defaultValues: {
email: "",
password: "",
agreeToTerms: false,
},
});
// TODO: uncomment when we enable social login
// const onProviderLogin = useCallback(async (
// provider: LoginProvider,
// ) => {
// setIsLoading(true);
// const error = await providerLogin(provider);
// setIsLoading(false);
// if (error) {
// setFeedback(error);
// return;
// }
// setFeedback(null);
// }, [supabase]);
const onLogin = useCallback(
async (data: z.infer<typeof loginFormSchema>) => {
setIsLoading(true);
if (!(await form.trigger())) {
setIsLoading(false);
return;
}
const error = await login(data);
setIsLoading(false);
if (error) {
setFeedback(error);
return;
}
setFeedback(null);
},
[form],
);
if (user) {
console.debug("User exists, redirecting to /");
router.push("/");
@@ -65,179 +92,60 @@ export default function LoginPage() {
);
}
async function handleSignInWithProvider(
provider: "google" | "github" | "discord",
) {
const { data, error } = await supabase!.auth.signInWithOAuth({
provider: provider,
options: {
redirectTo:
process.env.AUTH_CALLBACK_URL ??
`http://localhost:3000/auth/callback`,
},
});
await api.createUser();
if (!error) {
setFeedback(null);
return;
}
setFeedback(error.message);
}
const onLogin = async (data: z.infer<typeof loginFormSchema>) => {
setIsLoading(true);
const error = await login(data);
setIsLoading(false);
if (error) {
setFeedback(error);
return;
}
setFeedback(null);
};
return (
<div className="flex h-[80vh] items-center justify-center">
<div className="w-full max-w-md space-y-6 rounded-lg p-8 shadow-md">
<h1 className="text-lg font-medium">Log in to your Account </h1>
{/* <div className="mb-6 space-y-2">
<Button
className="w-full"
onClick={() => handleSignInWithProvider("google")}
variant="outline"
type="button"
disabled={isLoading}
<AuthCard>
<AuthHeader>Login to your account</AuthHeader>
<Form {...form}>
<form onSubmit={form.handleSubmit(onLogin)}>
<FormField
control={form.control}
name="email"
render={({ field }) => (
<FormItem className="mb-6">
<FormLabel>Email</FormLabel>
<FormControl>
<Input placeholder="m@example.com" {...field} />
</FormControl>
<FormMessage />
</FormItem>
)}
/>
<FormField
control={form.control}
name="password"
render={({ field }) => (
<FormItem className="mb-6">
<FormLabel className="flex w-full items-center justify-between">
<span>Password</span>
<Link
href="/reset_password"
className="text-sm font-normal leading-normal text-black underline"
>
Forgot your password?
</Link>
</FormLabel>
<FormControl>
<PasswordInput {...field} />
</FormControl>
<FormMessage />
</FormItem>
)}
/>
<AuthButton
onClick={() => onLogin(form.getValues())}
isLoading={isLoading}
type="submit"
>
<FaGoogle className="mr-2 h-4 w-4" />
Sign in with Google
</Button>
<Button
className="w-full"
onClick={() => handleSignInWithProvider("github")}
variant="outline"
type="button"
disabled={isLoading}
>
<FaGithub className="mr-2 h-4 w-4" />
Sign in with GitHub
</Button>
<Button
className="w-full"
onClick={() => handleSignInWithProvider("discord")}
variant="outline"
type="button"
disabled={isLoading}
>
<FaDiscord className="mr-2 h-4 w-4" />
Sign in with Discord
</Button>
</div> */}
<Form {...form}>
<form onSubmit={form.handleSubmit(onLogin)}>
<FormField
control={form.control}
name="email"
render={({ field }) => (
<FormItem className="mb-4">
<FormLabel>Email</FormLabel>
<FormControl>
<Input placeholder="user@email.com" {...field} />
</FormControl>
<FormMessage />
</FormItem>
)}
/>
<FormField
control={form.control}
name="password"
render={({ field }) => (
<FormItem>
<FormLabel>Password</FormLabel>
<FormControl>
<PasswordInput placeholder="password" {...field} />
</FormControl>
<FormDescription>
Password needs to be at least 6 characters long
</FormDescription>
<FormMessage />
</FormItem>
)}
/>
<FormField
control={form.control}
name="agreeToTerms"
render={({ field }) => (
<FormItem className="mt-4 flex flex-row items-start space-x-3 space-y-0">
<FormControl>
<Checkbox
checked={field.value}
onCheckedChange={field.onChange}
/>
</FormControl>
<div className="space-y-1 leading-none">
<FormLabel>
I agree to the{" "}
<Link
href="https://auto-gpt.notion.site/Terms-of-Use-11400ef5bece80d0b087d7831c5fd6bf"
className="underline"
>
Terms of Use
</Link>{" "}
and{" "}
<Link
href="https://www.notion.so/auto-gpt/Privacy-Policy-ab11c9c20dbd4de1a15dcffe84d77984"
className="underline"
>
Privacy Policy
</Link>
</FormLabel>
<FormMessage />
</div>
</FormItem>
)}
/>
<div className="mb-6 mt-8 flex w-full space-x-4">
<Button
className="flex w-full justify-center"
type="submit"
disabled={isLoading}
onClick={async () => {
setIsLoading(true);
const values = form.getValues();
const result = await login(values);
if (result) {
setFeedback(result);
}
setIsLoading(false);
}}
>
{isLoading ? <FaSpinner className="animate-spin" /> : "Log in"}
</Button>
<Button
className="flex w-full justify-center"
type="button"
disabled={isLoading}
onClick={async () => {
setIsLoading(true);
const values = form.getValues();
const result = await signup(values);
if (result) {
setFeedback(result);
}
setIsLoading(false);
}}
>
{isLoading ? <FaSpinner className="animate-spin" /> : "Sign up"}
</Button>
</div>
</form>
<p className="text-sm text-red-500">{feedback}</p>
</Form>
<Link href="/reset_password" className="text-sm">
Forgot your password?
</Link>
</div>
</div>
Login
</AuthButton>
</form>
<AuthFeedback message={feedback} isError={true} />
</Form>
<AuthBottomText
text="Don't have an account?"
linkText="Sign up"
href="/signup"
/>
</AuthCard>
);
}

View File

@@ -0,0 +1,7 @@
"use client";
import { redirect } from "next/navigation";
export default function Page() {
redirect("/store");
}

View File

@@ -0,0 +1,60 @@
"use server";
import getServerSupabase from "@/lib/supabase/getServerSupabase";
import { redirect } from "next/navigation";
import * as Sentry from "@sentry/nextjs";
import { headers } from "next/headers";
export async function sendResetEmail(email: string) {
return await Sentry.withServerActionInstrumentation(
"sendResetEmail",
{},
async () => {
const supabase = getServerSupabase();
const headersList = headers();
const host = headersList.get("host");
const protocol =
process.env.NODE_ENV === "development" ? "http" : "https";
const origin = `${protocol}://${host}`;
if (!supabase) {
redirect("/error");
}
const { error } = await supabase.auth.resetPasswordForEmail(email, {
redirectTo: `${origin}/reset_password`,
});
if (error) {
console.error("Error sending reset email", error);
return error.message;
}
console.log("Reset email sent");
redirect("/reset_password");
},
);
}
export async function changePassword(password: string) {
return await Sentry.withServerActionInstrumentation(
"changePassword",
{},
async () => {
const supabase = getServerSupabase();
if (!supabase) {
redirect("/error");
}
const { error } = await supabase.auth.updateUser({ password });
if (error) {
console.error("Error changing password", error);
return error.message;
}
await supabase.auth.signOut();
redirect("/login");
},
);
}

View File

@@ -1,8 +1,15 @@
"use client";
import { Button } from "@/components/ui/button";
import {
AuthCard,
AuthHeader,
AuthButton,
AuthFeedback,
PasswordInput,
} from "@/components/auth";
import {
Form,
FormControl,
FormDescription,
FormField,
FormItem,
FormLabel,
@@ -10,54 +17,87 @@ import {
} from "@/components/ui/form";
import { Input } from "@/components/ui/input";
import useSupabase from "@/hooks/useSupabase";
import { sendEmailFormSchema, changePasswordFormSchema } from "@/types/auth";
import { zodResolver } from "@hookform/resolvers/zod";
import { useRouter } from "next/navigation";
import { useState } from "react";
import { useCallback, useState } from "react";
import { useForm } from "react-hook-form";
import { FaSpinner } from "react-icons/fa";
import { z } from "zod";
const emailFormSchema = z.object({
email: z.string().email().min(2).max(64),
});
const resetPasswordFormSchema = z
.object({
password: z.string().min(6).max(64),
confirmPassword: z.string().min(6).max(64),
})
.refine((data) => data.password === data.confirmPassword, {
message: "Passwords don't match",
path: ["confirmPassword"],
});
import { changePassword, sendResetEmail } from "./actions";
import Spinner from "@/components/Spinner";
export default function ResetPasswordPage() {
const { supabase, user, isUserLoading } = useSupabase();
const router = useRouter();
const [isLoading, setIsLoading] = useState(false);
const [feedback, setFeedback] = useState<string | null>(null);
const [isError, setIsError] = useState(false);
const [disabled, setDisabled] = useState(false);
const emailForm = useForm<z.infer<typeof emailFormSchema>>({
resolver: zodResolver(emailFormSchema),
const sendEmailForm = useForm<z.infer<typeof sendEmailFormSchema>>({
resolver: zodResolver(sendEmailFormSchema),
defaultValues: {
email: "",
},
});
const resetPasswordForm = useForm<z.infer<typeof resetPasswordFormSchema>>({
resolver: zodResolver(resetPasswordFormSchema),
const changePasswordForm = useForm<z.infer<typeof changePasswordFormSchema>>({
resolver: zodResolver(changePasswordFormSchema),
defaultValues: {
password: "",
confirmPassword: "",
},
});
const onSendEmail = useCallback(
async (data: z.infer<typeof sendEmailFormSchema>) => {
setIsLoading(true);
setFeedback(null);
if (!(await sendEmailForm.trigger())) {
setIsLoading(false);
return;
}
const error = await sendResetEmail(data.email);
setIsLoading(false);
if (error) {
setFeedback(error);
setIsError(true);
return;
}
setDisabled(true);
setFeedback(
"Password reset email sent if user exists. Please check your email.",
);
setIsError(false);
},
[sendEmailForm],
);
const onChangePassword = useCallback(
async (data: z.infer<typeof changePasswordFormSchema>) => {
setIsLoading(true);
setFeedback(null);
if (!(await changePasswordForm.trigger())) {
setIsLoading(false);
return;
}
const error = await changePassword(data.password);
setIsLoading(false);
if (error) {
setFeedback(error);
setIsError(true);
return;
}
setFeedback("Password changed successfully. Redirecting to login.");
setIsError(false);
},
[changePasswordForm],
);
if (isUserLoading) {
return (
<div className="flex h-[80vh] items-center justify-center">
<FaSpinner className="mr-2 h-16 w-16 animate-spin" />
</div>
);
return <Spinner />;
}
if (!supabase) {
@@ -68,147 +108,79 @@ export default function ResetPasswordPage() {
);
}
async function onSendEmail(d: z.infer<typeof emailFormSchema>) {
setIsLoading(true);
setFeedback(null);
if (!(await emailForm.trigger())) {
setIsLoading(false);
return;
}
const { data, error } = await supabase!.auth.resetPasswordForEmail(
d.email,
{
redirectTo: `${window.location.origin}/reset_password`,
},
);
if (error) {
setFeedback(error.message);
setIsLoading(false);
return;
}
setFeedback("Password reset email sent. Please check your email.");
setIsLoading(false);
}
async function onResetPassword(d: z.infer<typeof resetPasswordFormSchema>) {
setIsLoading(true);
setFeedback(null);
if (!(await resetPasswordForm.trigger())) {
setIsLoading(false);
return;
}
const { data, error } = await supabase!.auth.updateUser({
password: d.password,
});
if (error) {
setFeedback(error.message);
setIsLoading(false);
return;
}
await supabase!.auth.signOut();
router.push("/login");
}
return (
<div className="flex h-full flex-col items-center justify-center">
<div className="w-full max-w-md">
<h1 className="text-center text-3xl font-bold">Reset Password</h1>
{user ? (
<form
onSubmit={resetPasswordForm.handleSubmit(onResetPassword)}
className="mt-6 space-y-6"
>
<Form {...resetPasswordForm}>
<FormField
control={resetPasswordForm.control}
name="password"
render={({ field }) => (
<FormItem className="mb-4">
<FormLabel>Password</FormLabel>
<FormControl>
<Input
type="password"
placeholder="password"
{...field}
/>
</FormControl>
<FormMessage />
</FormItem>
)}
/>
<FormField
control={resetPasswordForm.control}
name="confirmPassword"
render={({ field }) => (
<FormItem className="mb">
<FormLabel>Confirm Password</FormLabel>
<FormControl>
<Input
type="password"
placeholder="password"
{...field}
/>
</FormControl>
<FormMessage />
</FormItem>
)}
/>
<Button
type="submit"
className="w-full"
disabled={isLoading}
onClick={() => onResetPassword(resetPasswordForm.getValues())}
>
{isLoading ? <FaSpinner className="mr-2 animate-spin" /> : null}
Reset Password
</Button>
</Form>
</form>
) : (
<form
onSubmit={emailForm.handleSubmit(onSendEmail)}
className="mt-6 space-y-6"
>
<Form {...emailForm}>
<FormField
control={emailForm.control}
name="email"
render={({ field }) => (
<FormItem className="mb-4">
<FormLabel>Email</FormLabel>
<FormControl>
<Input placeholder="user@email.com" {...field} />
</FormControl>
<FormMessage />
</FormItem>
)}
/>
<Button
type="submit"
className="w-full"
disabled={isLoading}
onClick={() => onSendEmail(emailForm.getValues())}
>
{isLoading ? <FaSpinner className="mr-2 animate-spin" /> : null}
Send Reset Email
</Button>
{feedback ? (
<div className="text-center text-sm text-red-500">
{feedback}
</div>
) : null}
</Form>
</form>
)}
</div>
</div>
<AuthCard>
<AuthHeader>Reset Password</AuthHeader>
{user ? (
<form onSubmit={changePasswordForm.handleSubmit(onChangePassword)}>
<Form {...changePasswordForm}>
<FormField
control={changePasswordForm.control}
name="password"
render={({ field }) => (
<FormItem className="mb-6">
<FormLabel>Password</FormLabel>
<FormControl>
<PasswordInput {...field} />
</FormControl>
<FormMessage />
</FormItem>
)}
/>
<FormField
control={changePasswordForm.control}
name="confirmPassword"
render={({ field }) => (
<FormItem className="mb-6">
<FormLabel>Confirm Password</FormLabel>
<FormControl>
<PasswordInput {...field} />
</FormControl>
<FormDescription className="text-sm font-normal leading-tight text-slate-500">
Password needs to be at least 6 characters long
</FormDescription>
<FormMessage />
</FormItem>
)}
/>
<AuthButton
onClick={() => onChangePassword(changePasswordForm.getValues())}
isLoading={isLoading}
type="submit"
>
Update password
</AuthButton>
<AuthFeedback message={feedback} isError={isError} />
</Form>
</form>
) : (
<form onSubmit={sendEmailForm.handleSubmit(onSendEmail)}>
<Form {...sendEmailForm}>
<FormField
control={sendEmailForm.control}
name="email"
render={({ field }) => (
<FormItem className="mb-6">
<FormLabel>Email</FormLabel>
<FormControl>
<Input placeholder="m@example.com" {...field} />
</FormControl>
<FormMessage />
</FormItem>
)}
/>
<AuthButton
onClick={() => onSendEmail(sendEmailForm.getValues())}
isLoading={isLoading}
disabled={disabled}
type="submit"
>
Send reset email
</AuthButton>
<AuthFeedback message={feedback} isError={isError} />
</Form>
</form>
)}
</AuthCard>
);
}

View File

@@ -0,0 +1,44 @@
"use server";
import { revalidatePath } from "next/cache";
import { redirect } from "next/navigation";
import { z } from "zod";
import * as Sentry from "@sentry/nextjs";
import getServerSupabase from "@/lib/supabase/getServerSupabase";
import { signupFormSchema } from "@/types/auth";
export async function signup(values: z.infer<typeof signupFormSchema>) {
"use server";
return await Sentry.withServerActionInstrumentation(
"signup",
{},
async () => {
const supabase = getServerSupabase();
if (!supabase) {
redirect("/error");
}
// We are sure that the values are of the correct type because zod validates the form
const { data, error } = await supabase.auth.signUp(values);
if (error) {
console.error("Error signing up", error);
// FIXME: supabase doesn't return the correct error message for this case
if (error.message.includes("P0001")) {
return "Please join our waitlist for your turn: https://agpt.co/waitlist";
}
if (error.code?.includes("user_already_exists")) {
redirect("/login");
}
return error.message;
}
if (data.session) {
await supabase.auth.setSession(data.session);
}
console.log("Signed up");
revalidatePath("/", "layout");
redirect("/store/profile");
},
);
}

View File

@@ -0,0 +1,219 @@
"use client";
import { signup } from "./actions";
import {
Form,
FormControl,
FormDescription,
FormField,
FormItem,
FormLabel,
FormMessage,
} from "@/components/ui/form";
import { useForm } from "react-hook-form";
import { Input } from "@/components/ui/input";
import { z } from "zod";
import { zodResolver } from "@hookform/resolvers/zod";
import { useCallback, useState } from "react";
import { useRouter } from "next/navigation";
import Link from "next/link";
import { Checkbox } from "@/components/ui/checkbox";
import useSupabase from "@/hooks/useSupabase";
import Spinner from "@/components/Spinner";
import {
AuthCard,
AuthHeader,
AuthButton,
AuthFeedback,
AuthBottomText,
PasswordInput,
} from "@/components/auth";
import { signupFormSchema } from "@/types/auth";
export default function SignupPage() {
const { supabase, user, isUserLoading } = useSupabase();
const [feedback, setFeedback] = useState<string | null>(null);
const router = useRouter();
const [isLoading, setIsLoading] = useState(false);
const [showWaitlistPrompt, setShowWaitlistPrompt] = useState(false);
const form = useForm<z.infer<typeof signupFormSchema>>({
resolver: zodResolver(signupFormSchema),
defaultValues: {
email: "",
password: "",
confirmPassword: "",
agreeToTerms: false,
},
});
const onSignup = useCallback(
async (data: z.infer<typeof signupFormSchema>) => {
setIsLoading(true);
if (!(await form.trigger())) {
setIsLoading(false);
return;
}
const error = await signup(data);
setIsLoading(false);
if (error) {
setShowWaitlistPrompt(true);
return;
}
setFeedback(null);
},
[form],
);
if (user) {
console.debug("User exists, redirecting to /");
router.push("/");
}
if (isUserLoading || user) {
return <Spinner />;
}
if (!supabase) {
return (
<div>
User accounts are disabled because Supabase client is unavailable
</div>
);
}
return (
<AuthCard>
<AuthHeader>Create a new account</AuthHeader>
<Form {...form}>
<form onSubmit={form.handleSubmit(onSignup)}>
<FormField
control={form.control}
name="email"
render={({ field }) => (
<FormItem className="mb-6">
<FormLabel>Email</FormLabel>
<FormControl>
<Input placeholder="m@example.com" {...field} />
</FormControl>
<FormMessage />
</FormItem>
)}
/>
<FormField
control={form.control}
name="password"
render={({ field }) => (
<FormItem className="mb-6">
<FormLabel>Password</FormLabel>
<FormControl>
<PasswordInput {...field} />
</FormControl>
<FormMessage />
</FormItem>
)}
/>
<FormField
control={form.control}
name="confirmPassword"
render={({ field }) => (
<FormItem className="mb-4">
<FormLabel>Confirm Password</FormLabel>
<FormControl>
<PasswordInput {...field} />
</FormControl>
<FormDescription className="text-sm font-normal leading-tight text-slate-500">
Password needs to be at least 6 characters long
</FormDescription>
<FormMessage />
</FormItem>
)}
/>
<AuthButton
onClick={() => onSignup(form.getValues())}
isLoading={isLoading}
type="submit"
>
Sign up
</AuthButton>
<FormField
control={form.control}
name="agreeToTerms"
render={({ field }) => (
<FormItem className="mt-6 flex flex-row items-start -space-y-1 space-x-2">
<FormControl>
<Checkbox
checked={field.value}
onCheckedChange={field.onChange}
/>
</FormControl>
<div className="">
<FormLabel>
<span className="mr-1 text-sm font-normal leading-normal text-slate-950">
I agree to the
</span>
<Link
href="https://auto-gpt.notion.site/Terms-of-Use-11400ef5bece80d0b087d7831c5fd6bf"
className="text-sm font-normal leading-normal text-slate-950 underline"
>
Terms of Use
</Link>
<span className="mx-1 text-sm font-normal leading-normal text-slate-950">
and
</span>
<Link
href="https://www.notion.so/auto-gpt/Privacy-Policy-ab11c9c20dbd4de1a15dcffe84d77984"
className="text-sm font-normal leading-normal text-slate-950 underline"
>
Privacy Policy
</Link>
</FormLabel>
<FormMessage />
</div>
</FormItem>
)}
/>
</form>
<AuthFeedback message={feedback} isError={true} />
</Form>
{showWaitlistPrompt && (
<div>
<span className="mr-1 text-sm font-normal leading-normal text-red-500">
The provided email may not be allowed to sign up.
</span>
<br />
<span className="mx-1 text-sm font-normal leading-normal text-slate-950">
- AutoGPT Platform is currently in closed beta. You can join
</span>
<Link
href="https://agpt.co/waitlist"
className="text-sm font-normal leading-normal text-slate-950 underline"
>
the waitlist here.
</Link>
<br />
<span className="mx-1 text-sm font-normal leading-normal text-slate-950">
- Make sure you use the same email address you used to sign up for
the waitlist.
</span>
<br />
<span className="mx-1 text-sm font-normal leading-normal text-slate-950">
- You can self host the platform, visit our
</span>
<Link
href="https://agpt.co/waitlist"
className="text-sm font-normal leading-normal text-slate-950 underline"
>
GitHub repository.
</Link>
</div>
)}
<AuthBottomText
text="Already a member?"
linkText="Log in"
href="/login"
/>
</AuthCard>
);
}

View File

@@ -0,0 +1,11 @@
import { APIKeysSection } from "@/components/agptui/composite/APIKeySection";
const ApiKeysPage = () => {
return (
<div className="w-full pr-4 pt-24 md:pt-0">
<APIKeysSection />
</div>
);
};
export default ApiKeysPage;

View File

@@ -8,6 +8,7 @@ export default function Layout({ children }: { children: React.ReactNode }) {
{ text: "Creator Dashboard", href: "/store/dashboard" },
{ text: "Agent dashboard", href: "/store/agent-dashboard" },
{ text: "Integrations", href: "/store/integrations" },
{ text: "API Keys", href: "/store/api_keys" },
{ text: "Profile", href: "/store/profile" },
{ text: "Settings", href: "/store/settings" },
],
@@ -17,7 +18,7 @@ export default function Layout({ children }: { children: React.ReactNode }) {
return (
<div className="flex min-h-screen w-screen max-w-[1360px] flex-col lg:flex-row">
<Sidebar linkGroups={sidebarLinkGroups} />
<div className="pl-4">{children}</div>
<div className="flex-1 pl-4">{children}</div>
</div>
);
}

View File

@@ -40,7 +40,8 @@ export default async function Page({
const agent = await api.getStoreAgent(creator_lower, params.slug);
const otherAgents = await api.getStoreAgents({ creator: creator_lower });
const similarAgents = await api.getStoreAgents({
search_query: agent.categories[0],
// We are using slug as we know its has been sanitized and is not null
search_query: agent.slug.replace(/-/g, " "),
});
const breadcrumbs = [

View File

@@ -245,6 +245,7 @@ export function CustomNode({
].includes(nodeType) &&
// No input connection handles for credentials
propKey !== "credentials" &&
!propKey.endsWith("_credentials") &&
// For OUTPUT blocks, only show the 'value' (hides 'name') input connection handle
!(nodeType == BlockUIType.OUTPUT && propKey == "name");
const isConnected = isInputHandleConnected(propKey);
@@ -252,7 +253,13 @@ export function CustomNode({
!isHidden &&
(isRequired || isAdvancedOpen || isConnected || !isAdvanced) && (
<div key={propKey} data-id={`input-handle-${propKey}`}>
{isConnectable ? (
{isConnectable &&
!(
"oneOf" in propSchema &&
propSchema.oneOf &&
"discriminator" in propSchema &&
propSchema.discriminator
) ? (
<NodeHandle
keyName={propKey}
isConnected={isConnected}
@@ -261,7 +268,8 @@ export function CustomNode({
side="left"
/>
) : (
propKey != "credentials" && (
propKey !== "credentials" &&
!propKey.endsWith("_credentials") && (
<div className="flex gap-1">
<span className="text-m green mb-0 text-gray-900 dark:text-gray-100">
{propSchema.title || beautifyString(propKey)}
@@ -726,13 +734,10 @@ export function CustomNode({
</div>
{/* Body */}
<div className="ml-5 mt-6 rounded-b-xl">
<div className="mx-5 my-6 rounded-b-xl">
{/* Input Handles */}
{data.uiType !== BlockUIType.NOTE ? (
<div
className="flex w-fit items-start justify-between"
data-id="input-handles"
>
<div data-id="input-handles">
<div>
{data.uiType === BlockUIType.WEBHOOK_MANUAL &&
(data.webhook ? (
@@ -781,7 +786,6 @@ export function CustomNode({
<Switch
onCheckedChange={toggleAdvancedSettings}
checked={isAdvancedOpen}
className="mr-5"
/>
</div>
</>
@@ -790,7 +794,7 @@ export function CustomNode({
{data.uiType !== BlockUIType.NOTE && (
<>
<LineSeparator />
<div className="flex items-start justify-end rounded-b-xl pb-2 pr-2 pt-6">
<div className="flex items-start justify-end rounded-b-xl pt-6">
<div className="flex-none">
{data.outputSchema &&
generateOutputHandles(data.outputSchema, data.uiType)}
@@ -850,8 +854,10 @@ export function CustomNode({
data.status === "COMPLETED",
"border-yellow-600 bg-yellow-600 text-white":
data.status === "RUNNING",
"border-red-600 bg-red-600 text-white":
data.status === "FAILED",
"border-red-600 bg-red-600 text-white": [
"FAILED",
"TERMINATED",
].includes(data.status || ""),
"border-blue-600 bg-blue-600 text-white":
data.status === "QUEUED",
"border-gray-600 bg-gray-600 font-black":

View File

@@ -82,7 +82,7 @@ const NodeHandle: FC<HandleProps> = ({
data-testid={`output-handle-${keyName}`}
position={Position.Right}
id={keyName}
className="group -mr-[26px]"
className="group -mr-[38px]"
>
<div className="pointer-events-none flex items-center">
{label}

View File

@@ -61,7 +61,7 @@ const TallyPopupSimple = () => {
<Button
variant="default"
onClick={resetTutorial}
className="font-inter mb-0 h-14 w-28 rounded-2xl bg-[rgba(65,65,64,1)] text-left text-lg font-medium leading-6"
className="mb-0 h-14 w-28 rounded-2xl bg-[rgba(65,65,64,1)] text-left font-inter text-lg font-medium leading-6"
>
Tutorial
</Button>

View File

@@ -6,6 +6,10 @@ import { Separator } from "@/components/ui/separator";
import BackendAPI from "@/lib/autogpt-server-api";
import { useRouter } from "next/navigation";
import Link from "next/link";
import { useToast } from "@/components/ui/use-toast";
import useSupabase from "@/hooks/useSupabase";
import { DownloadIcon, LoaderIcon } from "lucide-react";
interface AgentInfoProps {
name: string;
creator: string;
@@ -32,8 +36,11 @@ export const AgentInfo: React.FC<AgentInfoProps> = ({
storeListingVersionId,
}) => {
const router = useRouter();
const api = React.useMemo(() => new BackendAPI(), []);
const { user } = useSupabase();
const { toast } = useToast();
const [downloading, setDownloading] = React.useState(false);
const handleAddToLibrary = async () => {
try {
@@ -45,6 +52,46 @@ export const AgentInfo: React.FC<AgentInfoProps> = ({
}
};
const handleDownloadToLibrary = async () => {
const downloadAgent = async (): Promise<void> => {
setDownloading(true);
try {
const file = await api.downloadStoreAgent(storeListingVersionId);
// Similar to Marketplace v1
const jsonData = JSON.stringify(file, null, 2);
// Create a Blob from the file content
const blob = new Blob([jsonData], { type: "application/json" });
// Create a temporary URL for the Blob
const url = window.URL.createObjectURL(blob);
// Create a temporary anchor element
const a = document.createElement("a");
a.href = url;
a.download = `agent_${storeListingVersionId}.json`; // Set the filename
// Append the anchor to the body, click it, and remove it
document.body.appendChild(a);
a.click();
document.body.removeChild(a);
// Revoke the temporary URL
window.URL.revokeObjectURL(url);
toast({
title: "Download Complete",
description: "Your agent has been successfully downloaded.",
});
} catch (error) {
console.error(`Error downloading agent:`, error);
throw error;
}
};
await downloadAgent();
setDownloading(false);
};
return (
<div className="w-full max-w-[396px] px-4 sm:px-6 lg:w-[396px] lg:px-0">
{/* Title */}
@@ -72,15 +119,36 @@ export const AgentInfo: React.FC<AgentInfoProps> = ({
{/* Run Agent Button */}
<div className="mb-4 w-full lg:mb-[60px]">
<button
onClick={handleAddToLibrary}
className="inline-flex w-full items-center justify-center gap-2 rounded-[38px] bg-violet-600 px-4 py-3 transition-colors hover:bg-violet-700 sm:w-auto sm:gap-2.5 sm:px-5 sm:py-3.5 lg:px-6 lg:py-4"
>
<IconPlay className="h-5 w-5 text-white sm:h-5 sm:w-5 lg:h-6 lg:w-6" />
<span className="font-poppins text-base font-medium text-neutral-50 sm:text-lg">
Add To Library
</span>
</button>
{user ? (
<button
onClick={handleAddToLibrary}
className="inline-flex w-full items-center justify-center gap-2 rounded-[38px] bg-violet-600 px-4 py-3 transition-colors hover:bg-violet-700 sm:w-auto sm:gap-2.5 sm:px-5 sm:py-3.5 lg:px-6 lg:py-4"
>
<IconPlay className="h-5 w-5 text-white sm:h-5 sm:w-5 lg:h-6 lg:w-6" />
<span className="font-poppins text-base font-medium text-neutral-50 sm:text-lg">
Add To Library
</span>
</button>
) : (
<button
onClick={handleDownloadToLibrary}
className={`inline-flex w-full items-center justify-center gap-2 rounded-[38px] px-4 py-3 transition-colors sm:w-auto sm:gap-2.5 sm:px-5 sm:py-3.5 lg:px-6 lg:py-4 ${
downloading
? "bg-neutral-400"
: "bg-violet-600 hover:bg-violet-700"
}`}
disabled={downloading}
>
{downloading ? (
<LoaderIcon className="h-5 w-5 animate-spin text-white sm:h-5 sm:w-5 lg:h-6 lg:w-6" />
) : (
<DownloadIcon className="h-5 w-5 text-white sm:h-5 sm:w-5 lg:h-6 lg:w-6" />
)}
<span className="font-poppins text-base font-medium text-neutral-50 sm:text-lg">
{downloading ? "Downloading..." : "Download Agent as File"}
</span>
</button>
)}
</div>
{/* Rating and Runs */}

View File

@@ -2,7 +2,7 @@ import * as React from "react";
import Link from "next/link";
import { Button } from "./Button";
import { Sheet, SheetContent, SheetTrigger } from "@/components/ui/sheet";
import { Menu } from "lucide-react";
import { KeyIcon, Menu } from "lucide-react";
import {
IconDashboardLayout,
IconIntegrations,
@@ -58,6 +58,15 @@ export const Sidebar: React.FC<SidebarProps> = ({ linkGroups }) => {
Integrations
</div>
</Link>
<Link
href="/store/api_keys"
className="inline-flex w-full items-center gap-2.5 rounded-xl px-3 py-3 text-neutral-800 hover:bg-neutral-800 hover:text-white dark:text-neutral-200 dark:hover:bg-neutral-700 dark:hover:text-white"
>
<KeyIcon className="h-6 w-6" />
<div className="p-ui-medium text-base font-medium leading-normal">
API Keys
</div>
</Link>
<Link
href="/store/profile"
className="inline-flex w-full items-center gap-2.5 rounded-xl px-3 py-3 text-neutral-800 hover:bg-neutral-800 hover:text-white dark:text-neutral-200 dark:hover:bg-neutral-700 dark:hover:text-white"
@@ -102,6 +111,15 @@ export const Sidebar: React.FC<SidebarProps> = ({ linkGroups }) => {
Integrations
</div>
</Link>
<Link
href="/store/api_keys"
className="inline-flex w-full items-center gap-2.5 rounded-xl px-3 py-3 text-neutral-800 hover:bg-neutral-800 hover:text-white dark:text-neutral-200 dark:hover:bg-neutral-700 dark:hover:text-white"
>
<KeyIcon className="h-6 w-6" strokeWidth={1} />
<div className="p-ui-medium text-base font-medium leading-normal">
API Keys
</div>
</Link>
<Link
href="/store/profile"
className="inline-flex w-full items-center gap-2.5 rounded-xl px-3 py-3 text-neutral-800 hover:bg-neutral-800 hover:text-white dark:text-neutral-200 dark:hover:bg-neutral-700 dark:hover:text-white"

View File

@@ -0,0 +1,296 @@
"use client";
import { useState, useEffect } from "react";
import { APIKey, APIKeyPermission } from "@/lib/autogpt-server-api/types";
import { LuCopy } from "react-icons/lu";
import { Loader2, MoreVertical } from "lucide-react";
import { useBackendAPI } from "@/lib/autogpt-server-api/context";
import { useToast } from "@/components/ui/use-toast";
import {
Card,
CardContent,
CardDescription,
CardHeader,
CardTitle,
} from "@/components/ui/card";
import {
Dialog,
DialogContent,
DialogDescription,
DialogFooter,
DialogHeader,
DialogTitle,
DialogTrigger,
} from "@/components/ui/dialog";
import { Button } from "@/components/ui/button";
import { Label } from "@/components/ui/label";
import { Input } from "@/components/ui/input";
import { Checkbox } from "@/components/ui/checkbox";
import {
Table,
TableBody,
TableCell,
TableHead,
TableHeader,
TableRow,
} from "@/components/ui/table";
import { Badge } from "@/components/ui/badge";
import {
DropdownMenu,
DropdownMenuContent,
DropdownMenuItem,
DropdownMenuTrigger,
} from "@/components/ui/dropdown-menu";
export function APIKeysSection() {
const [apiKeys, setApiKeys] = useState<APIKey[]>([]);
const [isLoading, setIsLoading] = useState(true);
const [isCreateOpen, setIsCreateOpen] = useState(false);
const [isKeyDialogOpen, setIsKeyDialogOpen] = useState(false);
const [newKeyName, setNewKeyName] = useState("");
const [newKeyDescription, setNewKeyDescription] = useState("");
const [newApiKey, setNewApiKey] = useState("");
const [selectedPermissions, setSelectedPermissions] = useState<
APIKeyPermission[]
>([]);
const { toast } = useToast();
const api = useBackendAPI();
useEffect(() => {
loadAPIKeys();
}, []);
const loadAPIKeys = async () => {
setIsLoading(true);
try {
const keys = await api.listAPIKeys();
setApiKeys(keys.filter((key) => key.status === "ACTIVE"));
} finally {
setIsLoading(false);
}
};
const handleCreateKey = async () => {
try {
const response = await api.createAPIKey(
newKeyName,
selectedPermissions,
newKeyDescription,
);
setNewApiKey(response.plain_text_key);
setIsCreateOpen(false);
setIsKeyDialogOpen(true);
loadAPIKeys();
} catch (error) {
toast({
title: "Error",
description: "Failed to create AutoGPT Platform API key",
variant: "destructive",
});
}
};
const handleCopyKey = () => {
navigator.clipboard.writeText(newApiKey);
toast({
title: "Copied",
description: "AutoGPT Platform API key copied to clipboard",
});
};
const handleRevokeKey = async (keyId: string) => {
try {
await api.revokeAPIKey(keyId);
toast({
title: "Success",
description: "AutoGPT Platform API key revoked successfully",
});
loadAPIKeys();
} catch (error) {
toast({
title: "Error",
description: "Failed to revoke AutoGPT Platform API key",
variant: "destructive",
});
}
};
return (
<Card>
<CardHeader>
<CardTitle>AutoGPT Platform API Keys</CardTitle>
<CardDescription>
Manage your AutoGPT Platform API keys for programmatic access
</CardDescription>
</CardHeader>
<CardContent>
<div className="mb-4 flex justify-end">
<Dialog open={isCreateOpen} onOpenChange={setIsCreateOpen}>
<DialogTrigger asChild>
<Button>Create Key</Button>
</DialogTrigger>
<DialogContent>
<DialogHeader>
<DialogTitle>Create New API Key</DialogTitle>
<DialogDescription>
Create a new AutoGPT Platform API key
</DialogDescription>
</DialogHeader>
<div className="grid gap-4 py-4">
<div className="grid gap-2">
<Label htmlFor="name">Name</Label>
<Input
id="name"
value={newKeyName}
onChange={(e) => setNewKeyName(e.target.value)}
placeholder="My AutoGPT Platform API Key"
/>
</div>
<div className="grid gap-2">
<Label htmlFor="description">Description (Optional)</Label>
<Input
id="description"
value={newKeyDescription}
onChange={(e) => setNewKeyDescription(e.target.value)}
placeholder="Used for..."
/>
</div>
<div className="grid gap-2">
<Label>Permissions</Label>
{Object.values(APIKeyPermission).map((permission) => (
<div
className="flex items-center space-x-2"
key={permission}
>
<Checkbox
id={permission}
checked={selectedPermissions.includes(permission)}
onCheckedChange={(checked) => {
setSelectedPermissions(
checked
? [...selectedPermissions, permission]
: selectedPermissions.filter(
(p) => p !== permission,
),
);
}}
/>
<Label htmlFor={permission}>{permission}</Label>
</div>
))}
</div>
</div>
<DialogFooter>
<Button
variant="outline"
onClick={() => setIsCreateOpen(false)}
>
Cancel
</Button>
<Button onClick={handleCreateKey}>Create</Button>
</DialogFooter>
</DialogContent>
</Dialog>
<Dialog open={isKeyDialogOpen} onOpenChange={setIsKeyDialogOpen}>
<DialogContent>
<DialogHeader>
<DialogTitle>AutoGPT Platform API Key Created</DialogTitle>
<DialogDescription>
Please copy your AutoGPT API key now. You won&apos;t be able
to see it again!
</DialogDescription>
</DialogHeader>
<div className="flex items-center space-x-2">
<code className="flex-1 rounded-md bg-secondary p-2 text-sm">
{newApiKey}
</code>
<Button size="icon" variant="outline" onClick={handleCopyKey}>
<LuCopy className="h-4 w-4" />
</Button>
</div>
<DialogFooter>
<Button onClick={() => setIsKeyDialogOpen(false)}>Close</Button>
</DialogFooter>
</DialogContent>
</Dialog>
</div>
{isLoading ? (
<div className="flex justify-center p-4">
<Loader2 className="h-6 w-6 animate-spin" />
</div>
) : (
apiKeys.length > 0 && (
<Table>
<TableHeader>
<TableRow>
<TableHead>Name</TableHead>
<TableHead>API Key</TableHead>
<TableHead>Status</TableHead>
<TableHead>Created</TableHead>
<TableHead>Last Used</TableHead>
<TableHead></TableHead>
</TableRow>
</TableHeader>
<TableBody>
{apiKeys.map((key) => (
<TableRow key={key.id}>
<TableCell>{key.name}</TableCell>
<TableCell>
<div className="rounded-md border p-1 px-2 text-xs">
{`${key.prefix}******************${key.postfix}`}
</div>
</TableCell>
<TableCell>
<Badge
variant={
key.status === "ACTIVE" ? "default" : "destructive"
}
className={
key.status === "ACTIVE"
? "border-green-600 bg-green-100 text-green-800"
: "border-red-600 bg-red-100 text-red-800"
}
>
{key.status}
</Badge>
</TableCell>
<TableCell>
{new Date(key.created_at).toLocaleDateString()}
</TableCell>
<TableCell>
{key.last_used_at
? new Date(key.last_used_at).toLocaleDateString()
: "Never"}
</TableCell>
<TableCell>
<DropdownMenu>
<DropdownMenuTrigger asChild>
<Button variant="ghost" size="sm">
<MoreVertical className="h-4 w-4" />
</Button>
</DropdownMenuTrigger>
<DropdownMenuContent align="end">
<DropdownMenuItem
className="text-destructive"
onClick={() => handleRevokeKey(key.id)}
>
Revoke
</DropdownMenuItem>
</DropdownMenuContent>
</DropdownMenu>
</TableCell>
</TableRow>
))}
</TableBody>
</Table>
)
)}
</CardContent>
</Card>
);
}

View File

@@ -34,8 +34,8 @@ export const AgentsSection: React.FC<AgentsSectionProps> = ({
}) => {
const router = useRouter();
// Take only the first 9 agents
const displayedAgents = allAgents.slice(0, 9);
// TODO: Update this when we have pagination
const displayedAgents = allAgents;
const handleCardClick = (creator: string, slug: string) => {
router.push(

View File

@@ -6,9 +6,11 @@ import {
Carousel,
CarouselContent,
CarouselItem,
CarouselPrevious,
CarouselNext,
CarouselIndicator,
} from "@/components/ui/carousel";
import { useCallback, useState } from "react";
import { IconLeftArrow, IconRightArrow } from "@/components/ui/icons";
import { useRouter } from "next/navigation";
const BACKGROUND_COLORS = [
@@ -63,27 +65,24 @@ export const FeaturedSection: React.FC<FeaturedSectionProps> = ({
return (
<div className="flex w-full flex-col items-center justify-center">
<div className="w-full">
<h2 className="font-poppins mb-8 text-2xl font-semibold leading-7 text-neutral-800 dark:text-neutral-200">
<div className="w-[99vw]">
<h2 className="font-poppins mx-auto mb-8 max-w-[1360px] px-4 text-2xl font-semibold leading-7 text-neutral-800 dark:text-neutral-200">
Featured agents
</h2>
<div>
<div className="w-[99vw] pb-[60px]">
<Carousel
className="mx-auto pb-10"
opts={{
loop: true,
startIndex: currentSlide,
duration: 500,
align: "start",
align: "center",
containScroll: "trimSnaps",
}}
className="w-full overflow-x-hidden"
>
<CarouselContent className="transition-transform duration-500">
<CarouselContent className="ml-[calc(50vw-690px)]">
{featuredAgents.map((agent, index) => (
<CarouselItem
key={index}
className="max-w-[460px] flex-[0_0_auto] pr-8"
className="max-w-[460px] flex-[0_0_auto]"
>
<FeaturedStoreCard
agentName={agent.agent_name}
@@ -99,37 +98,13 @@ export const FeaturedSection: React.FC<FeaturedSectionProps> = ({
</CarouselItem>
))}
</CarouselContent>
<div className="relative mx-auto w-full max-w-[1360px] pl-4">
<CarouselIndicator />
<CarouselPrevious afterClick={handlePrevSlide} />
<CarouselNext afterClick={handleNextSlide} />
</div>
</Carousel>
</div>
<div className="mt-8 flex w-full items-center justify-between">
<div className="flex h-3 items-center gap-2">
{featuredAgents.map((_, index) => (
<div
key={index}
className={`${
currentSlide === index
? "h-3 w-[52px] rounded-[39px] bg-neutral-800 transition-all duration-500 dark:bg-neutral-200"
: "h-3 w-3 rounded-full bg-neutral-300 transition-all duration-500 dark:bg-neutral-600"
}`}
/>
))}
</div>
<div className="mb-[60px] flex items-center gap-3">
<button
onClick={handlePrevSlide}
className="mb:h-12 mb:w-12 flex h-10 w-10 items-center justify-center rounded-full border border-neutral-400 bg-white dark:border-neutral-600 dark:bg-neutral-800"
>
<IconLeftArrow className="h-8 w-8 text-neutral-800 dark:text-neutral-200" />
</button>
<button
onClick={handleNextSlide}
className="mb:h-12 mb:w-12 flex h-10 w-10 items-center justify-center rounded-full border border-neutral-900 bg-white dark:border-neutral-600 dark:bg-neutral-800"
>
<IconRightArrow className="h-8 w-8 text-neutral-800 dark:text-neutral-200" />
</button>
</div>
</div>
</div>
</div>
);

View File

@@ -0,0 +1,37 @@
import { cn } from "@/lib/utils";
import Link from "next/link";
interface Props {
className?: string;
text: string;
linkText?: string;
href?: string;
}
export default function AuthBottomText({
className = "",
text,
linkText,
href = "",
}: Props) {
return (
<div
className={cn(
className,
"mt-8 inline-flex w-full items-center justify-center",
)}
>
<span className="text-sm font-medium leading-normal text-slate-950">
{text}
</span>
{linkText && (
<Link
href={href}
className="ml-1 text-sm font-medium leading-normal text-slate-950 underline"
>
{linkText}
</Link>
)}
</div>
);
}

View File

@@ -0,0 +1,36 @@
import { ReactNode } from "react";
import { Button } from "../ui/button";
import { FaSpinner } from "react-icons/fa";
interface Props {
children?: ReactNode;
onClick: () => void;
isLoading?: boolean;
disabled?: boolean;
type?: "button" | "submit" | "reset";
}
export default function AuthButton({
children,
onClick,
isLoading = false,
disabled = false,
type = "button",
}: Props) {
return (
<Button
className="mt-2 w-full self-stretch rounded-md bg-slate-900 px-4 py-2"
type={type}
disabled={isLoading || disabled}
onClick={onClick}
>
{isLoading ? (
<FaSpinner className="animate-spin" />
) : (
<div className="text-sm font-medium leading-normal text-slate-50">
{children}
</div>
)}
</Button>
);
}

View File

@@ -0,0 +1,15 @@
import { ReactNode } from "react";
interface Props {
children: ReactNode;
}
export default function AuthCard({ children }: Props) {
return (
<div className="flex h-[80vh] w-[32rem] items-center justify-center">
<div className="w-full max-w-md rounded-lg bg-white p-6 shadow-md">
{children}
</div>
</div>
);
}

View File

@@ -0,0 +1,16 @@
interface Props {
message?: string | null;
isError?: boolean;
}
export default function AuthFeedback({ message = "", isError = false }: Props) {
return (
<div className="mt-4 text-center text-sm font-medium leading-normal">
{isError ? (
<div className="text-red-500">{message}</div>
) : (
<div className="text-slate-950">{message}</div>
)}
</div>
);
}

View File

@@ -0,0 +1,13 @@
import { ReactNode } from "react";
interface Props {
children: ReactNode;
}
export default function AuthHeader({ children }: Props) {
return (
<div className="mb-8 text-2xl font-semibold leading-normal text-slate-950">
{children}
</div>
);
}

View File

@@ -16,6 +16,7 @@ const PasswordInput = forwardRef<HTMLInputElement, InputProps>(
type={showPassword ? "text" : "password"}
className={cn("hide-password-toggle pr-10", className)}
ref={ref}
title="password"
{...props}
/>
<Button
@@ -23,8 +24,11 @@ const PasswordInput = forwardRef<HTMLInputElement, InputProps>(
variant="ghost"
size="sm"
className="absolute right-0 top-0 h-full px-3 py-2 hover:bg-transparent"
onClick={() => setShowPassword((prev) => !prev)}
onMouseDown={() => setShowPassword(true)}
onMouseUp={() => setShowPassword(false)}
onMouseLeave={() => setShowPassword(false)}
disabled={disabled}
tabIndex={-1}
>
{showPassword && !disabled ? (
<EyeIcon className="h-4 w-4" aria-hidden="true" />

View File

@@ -0,0 +1,15 @@
import AuthBottomText from "./AuthBottomText";
import AuthButton from "./AuthButton";
import AuthCard from "./AuthCard";
import AuthFeedback from "./AuthFeedback";
import AuthHeader from "./AuthHeader";
import { PasswordInput } from "./PasswordInput";
export {
AuthBottomText,
AuthButton,
AuthCard,
AuthFeedback,
AuthHeader,
PasswordInput,
};

View File

@@ -4,58 +4,22 @@
transition: border-color 0.3s ease-in-out;
}
.custom-node [data-id="input-handles"] {
padding: 0 1.25rem;
margin-bottom: 1rem;
}
.custom-node [data-id="input-handles"],
.custom-node [data-id="input-handles"] > div > div {
margin-bottom: 1rem;
}
.handle-container {
display: flex;
position: relative;
margin-bottom: 0px;
padding: 0.75rem 1.25rem;
min-height: 44px;
height: 100%;
}
.custom-node input:not([type="checkbox"]),
.custom-node textarea,
.custom-node select {
width: calc(100% - 2.5rem);
max-width: 400px;
margin: 0.5rem 1.25rem;
}
.custom-node [data-id^="date-picker"] {
margin: 0.5rem 1.25rem;
width: calc(100% - 2.5rem);
}
.custom-node [data-list-container] {
margin: 0.5rem 1.25rem;
width: calc(100% - 2.5rem);
}
.custom-node [data-add-item] {
margin: 0.5rem 1.25rem;
width: calc(100% - 2.5rem);
padding: 0.5rem;
}
.array-item-container {
.custom-node select,
.custom-node [data-id^="date-picker"],
.custom-node [data-list-container],
.custom-node [data-add-item],
.custom-node [data-content-settings]. .array-item-container {
display: flex;
align-items: center;
margin: 0.5rem 1.25rem;
width: calc(100% - 2.5rem);
}
.custom-node [data-content-settings] {
margin: 0.5rem 1.25rem;
width: calc(100% - 2.5rem);
min-width: calc(100% - 2.5rem);
max-width: 100%;
}
.custom-node .custom-switch {
@@ -68,7 +32,6 @@
.error-message {
color: #d9534f;
font-size: 13px;
margin: 0.25rem 1.25rem;
padding-left: 0.5rem;
}

View File

@@ -1,9 +1,9 @@
/* flow.css or index.css */
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
"Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue",
sans-serif;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto",
"Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans",
"Helvetica Neue", sans-serif;
}
code {

Some files were not shown because too many files have changed in this diff Show More