feat(cli): agent-first WeKnora CLI
The `weknora` command-line client for the WeKnora RAG server. Full command surface: kb / doc / chunk / session / message / agent / model / search / chat / auth / profile / link / api / mcp / skills / config / doctor / schema / exit-codes. Agent-first wire contract: JSON envelope by default, typed error codes mapped to stable exit codes, error.retry_argv / retryable / partial-failure status, global --dry-run preview, the exit-10 confirmation protocol for writes, and control/ANSI/Bidi input hygiene. Stateless env-credential auth (WEKNORA_API_KEY / WEKNORA_TOKEN + WEKNORA_HOST) for headless/CI/agent use. A curated read-only MCP tool surface (`mcp serve`) and embedded Agent Skills (`skills install`). Extensive unit + contract-golden tests and CI.
This commit is contained in:
Executable
+31
@@ -0,0 +1,31 @@
|
||||
#!/usr/bin/env bash
|
||||
# check-skill-wire-vocab.sh — fail if cli/skills/ still references wire
|
||||
# vocabulary that the CLI has renamed or removed. Wire-shape changes must
|
||||
# sweep skills in the same PR (pattern borrowed from larksuite/cli).
|
||||
set -euo pipefail
|
||||
cd "$(dirname "$0")/.."
|
||||
|
||||
# legacy_term:replacement — extend this list in the SAME commit that
|
||||
# renames/removes a flag, command, tool, or error code.
|
||||
BANNED=(
|
||||
"agent_invoke:session_ask (MCP tool renamed in v0.9)"
|
||||
"agent invoke:session ask --agent (moved in v0.9)"
|
||||
"mcp.readonly_mode:removed in v0.9 (never emitted)"
|
||||
"mcp.tool_not_allowed:removed in v0.9 (never emitted)"
|
||||
"mcp.schema_unknown_command:removed in v0.9 (never emitted)"
|
||||
"auth login --host:profile add --host (auth login dropped --host in v0.9)"
|
||||
"auth login --name:profile add <name> (auth login dropped --name in v0.9)"
|
||||
"agent create --kb:agent create --attach-kb (renamed in v0.9)"
|
||||
)
|
||||
|
||||
fail=0
|
||||
for entry in "${BANNED[@]}"; do
|
||||
term="${entry%%:*}"
|
||||
why="${entry#*:}"
|
||||
if hits=$(grep -rn --include='*.md' -F "$term" skills/ 2>/dev/null); then
|
||||
echo "BANNED wire vocab '$term' found (use: $why):"
|
||||
echo "$hits"
|
||||
fail=1
|
||||
fi
|
||||
done
|
||||
exit $fail
|
||||
Reference in New Issue
Block a user