feat(notes): add notes (#1898)

* Notes v1

* v2

* Lint

* Consolidate into hook

* Simplify workflow code

* Fix hitl casing

* Don't allow edges in note block and explicitly exclude from executor

* Add hooks

* Consolidate hook

* Consolidate utils checks

* Consolidate dimensions
This commit is contained in:
Siddharth Ganesan
2025-11-11 13:31:14 -08:00
committed by GitHub
parent 7c398e64dc
commit 1cce486442
18 changed files with 621 additions and 148 deletions

View File

@@ -21,6 +21,8 @@ export enum BlockType {
WAIT = 'wait',
NOTE = 'note',
SENTINEL_START = 'sentinel_start',
SENTINEL_END = 'sentinel_end',
}
@@ -31,7 +33,11 @@ export const TRIGGER_BLOCK_TYPES = [
BlockType.TRIGGER,
] as const
export const METADATA_ONLY_BLOCK_TYPES = [BlockType.LOOP, BlockType.PARALLEL] as const
export const METADATA_ONLY_BLOCK_TYPES = [
BlockType.LOOP,
BlockType.PARALLEL,
BlockType.NOTE,
] as const
export type LoopType = 'for' | 'forEach' | 'while' | 'doWhile'
@@ -247,6 +253,14 @@ export function isAgentBlockType(blockType: string | undefined): boolean {
return blockType === BlockType.AGENT
}
export function isAnnotationOnlyBlock(blockType: string | undefined): boolean {
return blockType === BlockType.NOTE
}
export function supportsHandles(blockType: string | undefined): boolean {
return !isAnnotationOnlyBlock(blockType)
}
export function getDefaultTokens() {
return {
prompt: DEFAULTS.TOKENS.PROMPT,