feat(cli): 错误提示行动 hint + 发布门禁 + 分发收尾 (0.1.7)
- 错误输出附 hint: 404 Invalid tableId / Workflow not found / 路由不存在 / 401 / 403 / 非法选项值 / visibilityFilter 等 9 类模式,JSON 模式含 hint 字段 - prepublishOnly 门禁: build + test + 全命令冒烟(81 用例) - skills/ 移除 evals/(判分标准不随技能分发) + scripts/sync-skills.sh 一键同步 - 冒烟建库固定在 agent-playground 专用空间(生产保护红线)
This commit is contained in:
@@ -40,7 +40,10 @@ smoke() { # smoke <label> <cmd...>
|
||||
j() { python3 -c "import sys,json;d=json.load(sys.stdin);print(eval(sys.argv[1]))" "$1"; }
|
||||
|
||||
# ---------- sandbox ----------
|
||||
SPACE=$(curl -s -H "Authorization: Bearer $TOK" "$EP/api/space" | j "d[0]['id']")
|
||||
SPACE=$(curl -s -H "Authorization: Bearer $TOK" "$EP/api/space" | python3 -c "
|
||||
import sys,json
|
||||
for sp in json.load(sys.stdin):
|
||||
if 'agent-playground' in sp.get('name',''): print(sp['id']); break")
|
||||
BASE=$(curl -s -H "Authorization: Bearer $TOK" -H 'Content-Type: application/json' \
|
||||
-X POST "$EP/api/base" -d "{\"spaceId\":\"$SPACE\",\"name\":\"cli-smoke-$(date +%s)\"}" | j "d['id']")
|
||||
export INKREACH_TEABLE_BASE_ID="$BASE"
|
||||
@@ -171,6 +174,16 @@ fi
|
||||
# ---------- plugin (reads only; register/install need a real bundle) ----------
|
||||
smoke "plugin list" $CLI plugin list
|
||||
smoke "plugin installs" $CLI plugin installs
|
||||
smoke "plugin csp list" $CLI plugin csp list
|
||||
|
||||
# ---------- auth token create/delete (self-cleaning PAT) ----------
|
||||
PATID=$($CLI auth token create --name cli-smoke --json 2>/dev/null | j "d['id']") || PATID=""
|
||||
if [ -n "${PATID:-}" ]; then
|
||||
smoke "auth token create" $CLI auth token list
|
||||
smoke "auth token delete" $CLI auth token delete "$PATID"
|
||||
else
|
||||
echo "warn auth token create returned no id (may need scopes) — check manually"
|
||||
fi
|
||||
|
||||
# ---------- table delete (destructive, scratch only) ----------
|
||||
smoke "table delete" $CLI table delete "$TBL"
|
||||
|
||||
Reference in New Issue
Block a user