This took many hours of bonking my head against the wall, but in the end I found that
`multiprocess.Event()` or `multiprocess.Event(ctx=executor._mp_context)`
doesn't work with the `ProcessPoolExecutor`, and instead I had to use
`multiprocess.Manager().Event()`
This adds some overhead, but at least it works. The deadlocking issue occurred for all shared types, e.g. I also tried `Value` and `Array`.
- Add `stop_graph_execution` + route in `AgentServer`
- Add `get_graph_execution` function in `.data.execution`
- Fix return type of `ExecutionManager.add_execution(..)`
- Fix type issue with `@expose` decorator
Update ReactFlow to version 12 and split `Flow.tsx` into `useAgentGraph` hook that takes care of agent state and API calls to the server.
- Update ReactFlow to v12 ([migration guide](https://reactflow.dev/learn/troubleshooting/migrate-to-v12))
- Move `setIsAnyModalOpen` to `FlowContext`
- Make `setHardcodedValues` and `setErrors` functions of `CustomNode` and utilize new `updateNodeData` ReactFlow API
- Fix type errors
- `useAgentGraph` hook
- Take care of all API calls, websocket, agent state and logic
- Make saving and execution async and thus more consistent and reliable
- Save&run requests are state
- Wait for node ids to sync with backend reactively
- Queue execution updates
- Memoize functions using `useCallback`
### Background
Currently, there is no way to construct the output of nodes into a composite data structure (list/dict/object) using the builder UI.
The backend already supports this feature by connecting the output pin to the input pin using these format:
* <pin_name>_$_<list_index> for constructing list
* <pin_name>_#_<dict_key> for constructing dict
* <pin_name>_@_<field_name> for constructing object
The scope of this PR is implementing the UX for this in the builder UI.
### Changes 🏗️
<img width="765" alt="image" src="https://github.com/user-attachments/assets/8fc319a4-1350-410f-98cf-24f2aa2bc34b">
This allows you to add more pins in a key value & list input: `_$_` list constructor & `_#_` dict constructor.
### Background
Boolean without default value is a UX problem. It's currently displayed as a toggle and it has no way to describe the `null` value.
So we need to prevent blocks from introducing a nullable boolean.
### Changes 🏗️
Add explicit check to prevent nullable boolean. Fix existing block field that has nullable boolean.
* talking head
* linting
* remove clip id, not needed
* add more descriptive name
* add min requirement to polling attempts and intervals
* add docs and link to docs
* remove extra space
* force new tab
* fix linting
* add did key to .env.template
### Background
We don't have an ordering guarantee on the node execution.
Let's say we have a node that has to execute different data A, B, and C.
The current implementation limits the execution to 1 execution at a time, but there is no guarantee that A, B, and C will be executed in order.
The initial implementation did not have any restrictions, so it used to be A, B, and C executed in parallel
In the current implementation with the per-node constraint, it's A, B, C are executed serially but with no guarantee of ordering.
The scope of this PR is to guarantee that order.
### Changes 🏗️
Guaranteeing the execution per node ordering by avoiding any re-enqueue mechanism. If there are two executions run in the same node, the first one will be executed and the other will block. The blocking mechanism is indeed sub-optimal, the performance improvement can be done later (a follow-up issue will be added).
* feat(builder): checkbox for tos on login page
* feat(builder): submit agent page
DOES NOT WORK
* feat(builder): basic upload (not working)
* feat(builder): submit page more working but still not
* fix(builder): working categories, not dynamic
* feat(builder, server): enable submissions (auth error)
* fix(lint): linting
* feat(builder): submit page terms of service
* fix(builder): update lockfile
* lint(builder): lint marketplace files
- Add static link/connection support on the frontend and display them as dashed lines
- Remove queueing for static connections - there'll always be only one bead waiting at the end
- Make beads slightly larger and further from the end arrow