summaryrefslogtreecommitdiff
path: root/libpanto-c/include/panto.h
diff options
context:
space:
mode:
authort <t@tjp.lol>2026-06-20 10:21:13 -0600
committert <t@tjp.lol>2026-06-22 18:17:44 -0600
commita417727810cc6722b3c82e3c9e9b46982ef40a08 (patch)
tree162e9bbc69b504fc55616c19922bf22c11b2e73b /libpanto-c/include/panto.h
parent81ddb61dcfcc9bc85585f262bf303e1a9da507b0 (diff)
change up libpanto enums
go: explicitly wrap C.PANTO_* constants rather than using `iota` and trying to get the order exactly right.
Diffstat (limited to 'libpanto-c/include/panto.h')
-rw-r--r--libpanto-c/include/panto.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/libpanto-c/include/panto.h b/libpanto-c/include/panto.h
index c79e77c..5457715 100644
--- a/libpanto-c/include/panto.h
+++ b/libpanto-c/include/panto.h
@@ -32,7 +32,7 @@ typedef enum { PANTO_EFFORT_LOW = 0, PANTO_EFFORT_MEDIUM, PANTO_EFFORT_HIGH, PAN
typedef enum { PANTO_ROLE_SYSTEM = 0, PANTO_ROLE_USER, PANTO_ROLE_ASSISTANT } PantoMessageRole;
typedef enum { PANTO_BLOCK_TEXT = 0, PANTO_BLOCK_THINKING, PANTO_BLOCK_TOOL_USE, PANTO_BLOCK_TOOL_RESULT, PANTO_BLOCK_SYSTEM, PANTO_BLOCK_COMPACTION_SUMMARY } PantoContentBlockTag;
typedef enum { PANTO_SYSTEM_APPEND = 0, PANTO_SYSTEM_REPLACE } PantoSystemMode;
-typedef enum { PANTO_EVENT_MESSAGE_START = 0, PANTO_EVENT_BLOCK_START, PANTO_EVENT_TOOL_DETAILS, PANTO_EVENT_CONTENT_DELTA, PANTO_EVENT_BLOCK_COMPLETE, PANTO_EVENT_MESSAGE_COMPLETE, PANTO_EVENT_PROVIDER_RETRY, PANTO_EVENT_TOOL_DISPATCH_START, PANTO_EVENT_TOOL_DISPATCH_COMPLETE, PANTO_EVENT_TURN_COMPLETE } PantoEventTag;
+typedef enum { PANTO_EVENT_MESSAGE_START = 0, PANTO_EVENT_BLOCK_START, PANTO_EVENT_TOOL_DETAILS, PANTO_EVENT_CONTENT_DELTA, PANTO_EVENT_BLOCK_COMPLETE, PANTO_EVENT_MESSAGE_COMPLETE, PANTO_EVENT_PROVIDER_RETRY, PANTO_EVENT_TOOL_DISPATCH_START, PANTO_EVENT_TOOL_DISPATCH_RESULT, PANTO_EVENT_TOOL_DISPATCH_COMPLETE, PANTO_EVENT_TURN_COMPLETE } PantoEventTag;
typedef struct { uint64_t input, output, cache_read, cache_write, reasoning; } PantoUsage;
typedef struct { PantoAPIStyle api_style; PantoSlice base_url; PantoSlice model; PantoReasoningEffort reasoning; PantoThinking thinking; PantoEffort effort; bool has_thinking_budget_tokens; uint32_t thinking_budget_tokens; bool thinking_interleaved; } PantoWireIdentity;
@@ -60,7 +60,7 @@ typedef struct { size_t attempt, max_attempts; uint64_t delay_ms; PantoSlice err
typedef struct { size_t count; } PantoToolDispatchStart;
typedef struct { size_t message_index; } PantoToolDispatchComplete;
-typedef struct { PantoEventTag tag; union { PantoMessageRole message_start; PantoBlockStart block_start; PantoToolDetails tool_details; PantoContentDelta content_delta; PantoBlockComplete block_complete; PantoMessageComplete message_complete; PantoProviderRetry provider_retry; PantoToolDispatchStart tool_dispatch_start; PantoToolDispatchComplete tool_dispatch_complete; } data; } PantoEvent;
+typedef struct { PantoEventTag tag; union { PantoMessageRole message_start; PantoBlockStart block_start; PantoToolDetails tool_details; PantoContentDelta content_delta; PantoBlockComplete block_complete; PantoMessageComplete message_complete; PantoProviderRetry provider_retry; PantoToolDispatchStart tool_dispatch_start; PantoToolDispatchComplete tool_dispatch_result; PantoToolDispatchComplete tool_dispatch_complete; } data; } PantoEvent;
/* One content block of a message being appended. A flattened, borrow-only
* view: every slice points into the in-memory message and is valid only for