feat: add v2 task control and asynchronous isolated workers

This commit is contained in:
WHC
2026-10-20 14:46:57 +08:00
parent 143dba203b
commit d971cb02b0
26 changed files with 1590 additions and 66 deletions
+3
View File
@@ -130,6 +130,9 @@ void os_set_cancel_flag(volatile int *flag);
volatile int *os_get_cancel_flag(void);
void os_set_run_timeout(int seconds); /* this thread; 0 = default */
int os_get_run_timeout(void);
typedef struct { void (*write)(const char *, size_t, void *); void *userdata; } os_output_observer_t;
void os_set_output_observer(os_output_observer_t *observer);
void os_observe_output(const char *data, size_t n);
/* Long-lived child with pipes on stdin/stdout (MCP servers). stderr goes
* to stderr_path (NULL = discarded). env_add: "KEY=VALUE" entries added to