feat: initial import (exclude templates and runtime temp files)

This commit is contained in:
237899745
2026-02-27 15:21:15 +08:00
commit 0951732c7a
33 changed files with 11698 additions and 0 deletions

28
app/scripts/smoke_api.sh Executable file
View File

@@ -0,0 +1,28 @@
#!/usr/bin/env bash
set -euo pipefail
BASE_URL="${1:-https://zc.workyai.cn}"
require_ok() {
local json="$1"
if ! printf '%s' "$json" | rg -q '"ok"\s*:\s*true'; then
printf 'Smoke failed: expected ok=true, got: %s\n' "$json" >&2
exit 1
fi
}
config_json="$(curl -fsS "$BASE_URL/api/config")"
require_ok "$config_json"
issues_json="$(curl -fsS "$BASE_URL/api/issues?status=active&limit=5")"
require_ok "$issues_json"
parse_json="$(curl -fsS -X POST "$BASE_URL/api/parse" \
-H 'Content-Type: application/json' \
--data '{"raw_text":"#接龙\n1、营江路揽收现金10万存一年"}')"
require_ok "$parse_json"
history_json="$(curl -fsS "$BASE_URL/api/history/view?limit=5")"
require_ok "$history_json"
echo "Smoke passed: $BASE_URL"