tasks read

This commit is contained in:
2026-06-09 11:44:20 +03:00
parent 25b7a6d423
commit 2222261157
9 changed files with 233 additions and 52 deletions

View File

@@ -13,11 +13,11 @@
**Rationale**: Single source of metadata. Auto OpenAI function schema. Old `@assistant_tool``@DEPRECATED`.
**Rejected**: Dual registration (`@assistant_tool` + `StructuredTool`) — redundant.
## 3. Confirmation: `HumanInTheLoopMiddleware`
## 3. Confirmation: `interrupt_before=DANGEROUS_TOOLS`
**Decision**: Second `submit()` with `__resume__` protocol. In-memory pending interrupts in handler.
**Rationale**: Zero REST endpoints. LangChain checkpoint ensures safe resume.
**Rejected**: REST confirmation endpoints + polling — more code, more latency.
**Decision**: LangGraph native `interrupt_before=DANGEROUS_TOOLS` + `Command(resume=...)`. No custom `HumanInTheLoopMiddleware` — LangGraph provides HITL natively via checkpointing and resume. Second `submit()` with `additional_inputs[1]="confirm"/"deny"` triggers resume.
**Rationale**: Zero REST endpoints. LangGraph checkpoint ensures safe resume.
**Rejected**: REST confirmation endpoints + polling — more code, more latency. Custom middleware — LangGraph has native interrupt support.
## 4. History: `RunnableWithMessageHistory`