Initial CST-Agent: portable Linux/Termux/Windows coding agent.

Vendored sashidown, OpenAI-compatible env (OPENAI_*), and bootstrap scripts.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
WHC
2026-09-07 22:42:32 +08:00
co-authored by Cursor
commit 1f1fcba7ad
75 changed files with 14940 additions and 0 deletions
+32
View File
@@ -0,0 +1,32 @@
#ifndef MD_TABLE_STATS_H
#define MD_TABLE_STATS_H
#include "sashidown.h"
#include <stddef.h>
#include <stdint.h>
#define SASHIDOWN_MAX_COLS 32
/*
* [CST Pending Window Metadata] — lightweight table descriptor for the
* delayed-commitment pending window. Records header/separator/body bounds
* without caching cells; render rescans once after the separator enters
* the confirmation frontier. No per-cell heap; O(1) registers only.
*/
typedef struct {
size_t start; /* header line start */
size_t end; /* first byte after the table */
size_t body_start; /* first body row (after separator) */
int cols; /* column count from header (GFM) */
int body_rows;
int valid;
} table_entry_t;
int table_is_separator_row(const char *line, size_t len);
int table_count_cols(const char *line, size_t len, int *has_pipe);
/* ctx may be NULL (falls back to memchr); when non-NULL reuses line_index. */
int table_try_parse_at(sashidown_ctx_t *ctx, const char *input, size_t len,
size_t pos, table_entry_t *e);
#endif /* MD_TABLE_STATS_H */