SDK for TESAIoT Dev Kit
API reference & tutorials (ModusToolbox)
Loading...
Searching...
No Matches
nus_agent.h File Reference
#include <stddef.h>
#include <stdint.h>
#include "vendor/jsmn.h"

Go to the source code of this file.

Functions

size_t nus_agent_buffer_len (void)
 Bytes buffered for the in-flight ask; a telemetry probe, not a synchronisation primitive.
void nus_agent_reset (void)
 Clear the in-flight ask id and the accumulator; no init, no locking, no return.
void nus_agent_note_ask (const char *id)
 Record the in-flight ask id; a NULL or empty id resets the agent. No caller anywhere.
int nus_agent_handle_token (const char *json, const jsmntok_t *toks, int n_toks)
 Append a "delta" to the accumulator; -1 on id mismatch (silently dropped).
int nus_agent_handle_done (const char *json, const jsmntok_t *toks, int n_toks)
 Forward the final text to the CM55 page over IPC and reset; "text" is authoritative.
int nus_agent_handle_tool_call (const char *json, const jsmntok_t *toks, int n_toks)
 Observability only — a short hint-text IPC so the CM55 marquee shows which tool runs.