refactor: 项目更名 WeKnora → Academy
Build & Publish (dsh-academy) / End-to-end inside dsh (latest, advisory) (push) Skipped
CLI / test (macos-latest / go 1.26) (push) Canceled after 0s
CLI / test (ubuntu-latest / go 1.26) (push) Canceled after 0s
CLI / test (windows-latest / go 1.26) (push) Canceled after 0s
Build and Push Docker Image / build-ui (push) Canceled after 0s
Build and Push Docker Image / build-docreader (push) Canceled after 0s
Build and Push Docker Image / build-sandbox (push) Canceled after 0s
Build and Push Docker Image / build-app (amd64, linux/amd64, ubuntu-latest) (push) Canceled after 0s
Build and Push Docker Image / build-app (arm64, linux/arm64, ubuntu-24.04-arm) (push) Canceled after 0s
Build and Push Docker Image / merge (push) Canceled after 0s
Frontend / Test, type-check, and build (push) Canceled after 0s
Frontend / Docker multi-stage image (push) Canceled after 0s
Build & Publish (mcp-server) / Test (Python 3.10) (push) Canceled after 0s
Build & Publish (mcp-server) / Test (Python 3.11) (push) Canceled after 0s
Build & Publish (mcp-server) / Test (Python 3.12) (push) Canceled after 0s
Build & Publish (mcp-server) / Test (Python 3.13) (push) Canceled after 0s
Build & Publish (mcp-server) / Build sdist + wheel (push) Canceled after 0s
Build & Publish (mcp-server) / Publish to PyPI (push) Canceled after 0s
Anydoc / anydoc parser engine (push) Canceled after 0s
App / Format, vet, test, and build (push) Canceled after 0s
DocReader / Python tests and Go client tests (push) Canceled after 0s
Build & Publish (dsh-academy) / Typecheck, test, pack (push) Canceled after 0s
Build & Publish (dsh-academy) / End-to-end inside dsh (pinned) (push) Canceled after 0s
Build & Publish (dsh-academy) / Publish to npm (push) Canceled after 0s
Go Lint Cache / warm lint cache (.) (push) Canceled after 0s
Go Lint Cache / warm lint cache (cli) (push) Canceled after 0s
Go Lint Cache / warm lint cache (client) (push) Canceled after 0s
Helm / chart (push) Canceled after 0s
Build & Publish (dsh-academy) / End-to-end inside dsh (latest, advisory) (push) Skipped
CLI / test (macos-latest / go 1.26) (push) Canceled after 0s
CLI / test (ubuntu-latest / go 1.26) (push) Canceled after 0s
CLI / test (windows-latest / go 1.26) (push) Canceled after 0s
Build and Push Docker Image / build-ui (push) Canceled after 0s
Build and Push Docker Image / build-docreader (push) Canceled after 0s
Build and Push Docker Image / build-sandbox (push) Canceled after 0s
Build and Push Docker Image / build-app (amd64, linux/amd64, ubuntu-latest) (push) Canceled after 0s
Build and Push Docker Image / build-app (arm64, linux/arm64, ubuntu-24.04-arm) (push) Canceled after 0s
Build and Push Docker Image / merge (push) Canceled after 0s
Frontend / Test, type-check, and build (push) Canceled after 0s
Frontend / Docker multi-stage image (push) Canceled after 0s
Build & Publish (mcp-server) / Test (Python 3.10) (push) Canceled after 0s
Build & Publish (mcp-server) / Test (Python 3.11) (push) Canceled after 0s
Build & Publish (mcp-server) / Test (Python 3.12) (push) Canceled after 0s
Build & Publish (mcp-server) / Test (Python 3.13) (push) Canceled after 0s
Build & Publish (mcp-server) / Build sdist + wheel (push) Canceled after 0s
Build & Publish (mcp-server) / Publish to PyPI (push) Canceled after 0s
Anydoc / anydoc parser engine (push) Canceled after 0s
App / Format, vet, test, and build (push) Canceled after 0s
DocReader / Python tests and Go client tests (push) Canceled after 0s
Build & Publish (dsh-academy) / Typecheck, test, pack (push) Canceled after 0s
Build & Publish (dsh-academy) / End-to-end inside dsh (pinned) (push) Canceled after 0s
Build & Publish (dsh-academy) / Publish to npm (push) Canceled after 0s
Go Lint Cache / warm lint cache (.) (push) Canceled after 0s
Go Lint Cache / warm lint cache (cli) (push) Canceled after 0s
Go Lint Cache / warm lint cache (client) (push) Canceled after 0s
Helm / chart (push) Canceled after 0s
- 全量替换代码/配置/文档中的项目名(保留上游 GitHub 链接、weixin 文档域名、Docker Hub 镜像名) - 重命名 32 个含项目名的文件/目录;Go module 路径改为 academy(含 client/cli 子模块) - docreader proto 描述符采用等长替换,保持序列化字节布局有效 - Dockerfile.app 构建网络修复: browserskill 离线产物通道、PyPI/apt 国内镜像 - 运行验证: go build ✓ docker compose up ✓ 健康检查 ✓
This commit is contained in:
1 parent
9097ee699d
commit
9058149576
3136 files changed
+18018
-18004
No files matched your search
@@ -1,16 +1,16 @@
|
||||
---
|
||||
name: weknora-rag-search
|
||||
description: Use when retrieving from or asking questions against a WeKnora knowledge base via the `weknora` CLI — and especially when unsure whether to use `chat`, `session ask`, or `search chunks` for a given goal.
|
||||
name: academy-rag-search
|
||||
description: Use when retrieving from or asking questions against a Academy knowledge base via the `academy` CLI — and especially when unsure whether to use `chat`, `session ask`, or `search chunks` for a given goal.
|
||||
metadata:
|
||||
tested_against: v0.10
|
||||
---
|
||||
|
||||
# WeKnora — retrieval & RAG queries
|
||||
# Academy — retrieval & RAG queries
|
||||
|
||||
**REQUIRED BACKGROUND:** read the `weknora-shared` skill first (auth, `--kb`
|
||||
**REQUIRED BACKGROUND:** read the `academy-shared` skill first (auth, `--kb`
|
||||
resolution, the JSON envelope, exit codes, streaming/NDJSON output).
|
||||
|
||||
WeKnora gives you several ways to "ask about a knowledge base." Picking the wrong
|
||||
Academy gives you several ways to "ask about a knowledge base." Picking the wrong
|
||||
one wastes turns or returns the wrong shape. Use the decision table.
|
||||
|
||||
## Pick the command by your goal
|
||||
@@ -32,7 +32,7 @@ one wastes turns or returns the wrong shape. Use the decision table.
|
||||
2. **`chat` vs `session ask`.** `chat` = plain KB RAG Q&A. `session ask --agent
|
||||
<id>` = invoke a *configured custom agent* (it may scope its own KBs, call
|
||||
tools, do web search). If the user set up an agent for this, prefer it
|
||||
(`weknora agent list` to find ids); otherwise `chat`.
|
||||
(`academy agent list` to find ids); otherwise `chat`.
|
||||
3. **One-shot vs multi-turn.** Both `chat` and `session ask` return a
|
||||
`data.session_id` in default JSON output. Pass `--session <id>` on the next
|
||||
call to continue the conversation. In NDJSON mode, read it from `init`.
|
||||
@@ -40,9 +40,9 @@ one wastes turns or returns the wrong shape. Use the decision table.
|
||||
## Safety / Gotchas
|
||||
|
||||
- `chat`, `search chunks`, `search docs` need a KB: pass `--kb <id-or-name>`, or
|
||||
set `WEKNORA_KB_ID`, or `weknora link` the directory (resolved in that order).
|
||||
set `ACADEMY_KB_ID`, or `academy link` the directory (resolved in that order).
|
||||
If none resolves it's exit 1 (`local.kb_id_required`); a bad name is exit 1
|
||||
(`local.kb_not_found`). Resolve names with `weknora kb list` / `search kb`.
|
||||
(`local.kb_not_found`). Resolve names with `academy kb list` / `search kb`.
|
||||
(`search kb` / `search sessions` are tenant-wide and take no `--kb`.)
|
||||
- `chat` / `session ask` return one buffered JSON envelope with answer
|
||||
events by default. Add `--reference` for indexed citations and `--verbose`
|
||||
@@ -50,9 +50,9 @@ one wastes turns or returns the wrong shape. Use the decision table.
|
||||
text` for the live human-readable projection.
|
||||
- A stalled stream is not stopped by Ctrl-C (that just drops your local
|
||||
connection; the server keeps generating + billing). Stop it server-side:
|
||||
`weknora session stop <session-id> --message <message-id>` (session_id from
|
||||
`academy session stop <session-id> --message <message-id>` (session_id from
|
||||
`data.session_id`, or from `init` under `--format ndjson`).
|
||||
Re-attach to a stream with `weknora session resume <session-id>
|
||||
Re-attach to a stream with `academy session resume <session-id>
|
||||
--message <message-id>`.
|
||||
- `search chunks --limit` defaults to **8** (tuned for an LLM context window);
|
||||
the `search docs/kb/sessions` lists default to 30. Tune retrieval with
|
||||
@@ -63,14 +63,14 @@ one wastes turns or returns the wrong shape. Use the decision table.
|
||||
|
||||
```bash
|
||||
# raw retrieval to reason over
|
||||
weknora search chunks "retry backoff policy" --kb engineering --limit 12
|
||||
academy search chunks "retry backoff policy" --kb engineering --limit 12
|
||||
|
||||
# grounded answer (human transcript)
|
||||
weknora chat "How do we handle retries?" --kb engineering --format text
|
||||
academy chat "How do we handle retries?" --kb engineering --format text
|
||||
|
||||
# continue the conversation (session id from data.session_id above)
|
||||
weknora chat "And the max attempts?" --kb engineering --session sess_abc
|
||||
academy chat "And the max attempts?" --kb engineering --session sess_abc
|
||||
|
||||
# answer via a custom agent
|
||||
weknora session ask --agent ag_123 "Summarize this quarter's incidents"
|
||||
academy session ask --agent ag_123 "Summarize this quarter's incidents"
|
||||
```
|
||||
+4
-4
@@ -8,8 +8,8 @@ RAG, `session ask` invokes a custom agent.
|
||||
## Commands & flags
|
||||
|
||||
```
|
||||
weknora chat "<query>" --kb <name-or-id> [--session <id>]
|
||||
weknora session ask "<query>" --agent <agent-id> [--session <id>]
|
||||
academy chat "<query>" --kb <name-or-id> [--session <id>]
|
||||
academy session ask "<query>" --agent <agent-id> [--session <id>]
|
||||
```
|
||||
|
||||
- `--kb` (chat) is required name-or-id. `--agent` (session ask) is required.
|
||||
@@ -46,10 +46,10 @@ events through verbatim:
|
||||
|
||||
## Recovery
|
||||
|
||||
- **Stop server-side generation:** `weknora session stop <session-id> --message
|
||||
- **Stop server-side generation:** `academy session stop <session-id> --message
|
||||
<message-id>`. Ctrl-C only closes your local connection — the server keeps
|
||||
generating (and billing) until told to stop.
|
||||
- **Re-attach after a dropped connection:** `weknora session resume
|
||||
- **Re-attach after a dropped connection:** `academy session resume
|
||||
<session-id> --message <message-id>`. The server replays the event log from
|
||||
index 0 then tails new events, so **dedupe by message_id** if you already
|
||||
consumed some events. Buffer TTL is ~1h (redis) or process-lifetime (memory).
|
||||
+2
-2
@@ -6,7 +6,7 @@ for you to reason over; it does NOT synthesize an answer (use `chat` for that).
|
||||
## Command & flags
|
||||
|
||||
```
|
||||
weknora search chunks "<query>" --kb <name-or-id> [flags]
|
||||
academy search chunks "<query>" --kb <name-or-id> [flags]
|
||||
```
|
||||
|
||||
| Flag | Default | Meaning |
|
||||
@@ -36,7 +36,7 @@ then the CLI trims).
|
||||
- `score` is the fused rank; `match_type` indicates which channel(s) hit.
|
||||
- `knowledge_id` / `knowledge_title` attribute the chunk to its source document.
|
||||
- Project just what you need with `--jq`, e.g.
|
||||
`weknora search chunks "q" --kb eng --jq '.data[] | {score,content}'`.
|
||||
`academy search chunks "q" --kb eng --jq '.data[] | {score,content}'`.
|
||||
|
||||
## When to use vs alternatives
|
||||
|
||||
@@ -1,53 +1,53 @@
|
||||
---
|
||||
name: weknora-shared
|
||||
description: Use when driving a WeKnora RAG server through the `weknora` CLI as an agent — authenticating, managing knowledge bases / documents / sessions / agents, running search or chat, or interpreting the CLI's JSON envelopes and exit codes. Read this before any other weknora-* skill.
|
||||
name: academy-shared
|
||||
description: Use when driving a Academy RAG server through the `academy` CLI as an agent — authenticating, managing knowledge bases / documents / sessions / agents, running search or chat, or interpreting the CLI's JSON envelopes and exit codes. Read this before any other academy-* skill.
|
||||
metadata:
|
||||
tested_against: v0.10
|
||||
---
|
||||
|
||||
# WeKnora CLI — shared base
|
||||
# Academy CLI — shared base
|
||||
|
||||
`weknora` is the agent-first CLI for a WeKnora RAG server. Every command prints
|
||||
`academy` is the agent-first CLI for a Academy RAG server. Every command prints
|
||||
a JSON envelope and uses a typed exit code, so you branch on machine-readable
|
||||
output, not prose. Read this skill before any task-specific `weknora-*` skill.
|
||||
output, not prose. Read this skill before any task-specific `academy-*` skill.
|
||||
|
||||
## 1. Authenticate (do this first — order matters)
|
||||
|
||||
**Agents usually skip profiles entirely:** set `WEKNORA_API_KEY` (or
|
||||
`WEKNORA_TOKEN`) + `WEKNORA_HOST` and every command authenticates statelessly and
|
||||
**Agents usually skip profiles entirely:** set `ACADEMY_API_KEY` (or
|
||||
`ACADEMY_TOKEN`) + `ACADEMY_HOST` and every command authenticates statelessly and
|
||||
zero-disk — no `profile add` / `auth login` needed. `auth token` echoes that env
|
||||
credential; `auth status` / `doctor` confirm it. The steps below set up a
|
||||
**persistent named profile** instead (interactive / multi-environment use).
|
||||
|
||||
Authentication is a **two-step sequence**. `weknora auth login` operates on the
|
||||
Authentication is a **two-step sequence**. `academy auth login` operates on the
|
||||
*active profile*, so the profile must exist first:
|
||||
|
||||
```bash
|
||||
# 1. register a connection target and make it active
|
||||
weknora profile add prod --host https://kb.example.com --use
|
||||
academy profile add prod --host https://kb.example.com --use
|
||||
# 2a. API key (agent default — pipe the key on stdin, non-interactive):
|
||||
echo "$WEKNORA_API_KEY" | weknora auth login --with-token
|
||||
echo "$ACADEMY_API_KEY" | academy auth login --with-token
|
||||
# 2b. OR email+password (interactive prompt only — no flags; not for agents)
|
||||
weknora auth login
|
||||
academy auth login
|
||||
|
||||
weknora auth status # verify: who am I, which tenant
|
||||
academy auth status # verify: who am I, which tenant
|
||||
```
|
||||
|
||||
- Target a *non-active* profile for one command with the global `--profile NAME`
|
||||
(e.g. `weknora --profile staging auth refresh`). There is no per-command
|
||||
(e.g. `academy --profile staging auth refresh`). There is no per-command
|
||||
`--name`/`--host` on auth commands.
|
||||
- Get the raw token for scripting with `WEKNORA_TOKEN=$(weknora auth token)`
|
||||
- Get the raw token for scripting with `ACADEMY_TOKEN=$(academy auth token)`
|
||||
(raw token by default; works with an env credential too; `--format json` gives
|
||||
the `{token, mode, profile}` envelope).
|
||||
- `weknora auth logout` clears a profile's stored credentials but **keeps the
|
||||
- `academy auth logout` clears a profile's stored credentials but **keeps the
|
||||
profile registered** (re-auth later with `auth login`); use `profile remove`
|
||||
to delete the profile entirely.
|
||||
- `weknora doctor` runs 4 health checks (reachability, credential, version, storage).
|
||||
- `academy doctor` runs 4 health checks (reachability, credential, version, storage).
|
||||
|
||||
## 2. Selecting a knowledge base (`--kb`)
|
||||
|
||||
`--kb` accepts a **name or a UUID** (resolved server-side). Resolution order:
|
||||
`--kb` flag → `WEKNORA_KB_ID` env → directory link (`weknora link --kb X` binds
|
||||
`--kb` flag → `ACADEMY_KB_ID` env → directory link (`academy link --kb X` binds
|
||||
the cwd) → error. Read/create commands that operate "inside a project" inherit
|
||||
the link; **`search *` and destructive `--all` operations always require an
|
||||
explicit `--kb`** (so an agent never silently hits the wrong corpus).
|
||||
@@ -56,7 +56,7 @@ explicit `--kb`** (so an agent never silently hits the wrong corpus).
|
||||
KB is `retrieval_ready:false` — uploaded docs stay unindexed and `search`/`chat`
|
||||
return nothing until you bind models. Create it ready in one step
|
||||
(`kb create --embedding-model <m> --chat-model <m>`, discover ids with
|
||||
`weknora model list`) or bind after the fact
|
||||
`academy model list`) or bind after the fact
|
||||
(`kb config set <kb> --embedding-model <m> --chat-model <m>`). `kb status` /
|
||||
`kb check` report `retrieval_ready`, and `kb create` hints the fix when it is
|
||||
false — so an unconfigured KB is never silently "healthy".
|
||||
@@ -81,8 +81,8 @@ Default output is `--format json`: a single envelope.
|
||||
pass `--reference` for indexed citations, `--verbose` for execution detail,
|
||||
or `--format ndjson` for raw event lines. `session resume` remains
|
||||
an NDJSON streaming command.
|
||||
- `--jq '<expr>'` filters the envelope (e.g. `weknora kb list --jq '.data[].id'`).
|
||||
- Exception: `weknora auth token` emits the **raw token** by default (it's a
|
||||
- `--jq '<expr>'` filters the envelope (e.g. `academy kb list --jq '.data[].id'`).
|
||||
- Exception: `academy auth token` emits the **raw token** by default (it's a
|
||||
scripting helper); pass `--format json` for the `{token, mode, profile}` envelope.
|
||||
- **Batch / wait caveat:** multi-item commands come in two shapes, but for
|
||||
**both you branch on the exit code, not `ok`**:
|
||||
@@ -102,7 +102,7 @@ Default output is `--format json`: a single envelope.
|
||||
|---|---|---|
|
||||
| 0 | success (incl. `--dry-run`) | proceed |
|
||||
| 1 | `local.*` / unclassified (incl. `local.kb_not_found`) | read `error`, decide retry/abort |
|
||||
| 2 | flag / argument validation (bad/unknown/missing-required flag) | re-check `weknora <cmd> --help` |
|
||||
| 2 | flag / argument validation (bad/unknown/missing-required flag) | re-check `academy <cmd> --help` |
|
||||
| 3 | `auth.*` (missing / expired / forbidden) | re-auth, then retry |
|
||||
| 4 | `resource.not_found` (a server resource id) | verify the id |
|
||||
| 5 | `input.*` (other than confirmation_required) | adjust args, retry |
|
||||
@@ -128,7 +128,7 @@ Destructive commands (`kb/doc/chunk/session/agent delete`, `kb/agent update`,
|
||||
```jsonc
|
||||
{"ok":false,"error":{"type":"input.confirmation_required",
|
||||
"message":"delete knowledge base X requires explicit confirmation: re-run with -y",
|
||||
"retry_argv":["weknora","kb","delete","X","-y"],"risk":{"level":"destructive","action":"kb.delete"}}}
|
||||
"retry_argv":["academy","kb","delete","X","-y"],"risk":{"level":"destructive","action":"kb.delete"}}}
|
||||
```
|
||||
|
||||
**Surface this to the user and get explicit approval. Re-run with `-y` ONLY
|
||||
@@ -146,22 +146,22 @@ it for real — especially before destructive or bulk operations.
|
||||
Mutations return the new resource id in `data.id`. Chain with it:
|
||||
|
||||
```bash
|
||||
KB=$(weknora kb create "Docs" --jq '.data.id' --format json | tr -d '"')
|
||||
weknora doc upload ./manual.pdf --kb "$KB"
|
||||
KB=$(academy kb create "Docs" --jq '.data.id' --format json | tr -d '"')
|
||||
academy doc upload ./manual.pdf --kb "$KB"
|
||||
```
|
||||
|
||||
## 7a. Reliability patterns for long-running agent runs
|
||||
|
||||
### Inspecting prior messages
|
||||
Use `weknora message list --session <sess-id>` to review the message history of a session (e.g., after a stream drops) before deciding whether to re-ask or continue. Use `weknora message search "<query>"` to locate a prior Q&A exchange across all sessions — prefer this over re-running an expensive query when the answer may already exist.
|
||||
Use `academy message list --session <sess-id>` to review the message history of a session (e.g., after a stream drops) before deciding whether to re-ask or continue. Use `academy message search "<query>"` to locate a prior Q&A exchange across all sessions — prefer this over re-running an expensive query when the answer may already exist.
|
||||
|
||||
### Tool-approval unlock
|
||||
An agent run pauses mid-stream on a tool-approval event when the server requires human sign-off before executing a tool call. The pattern:
|
||||
|
||||
1. The stream emits a tool-approval event; capture the `pending_id`.
|
||||
2. **Surface the pending tool call to the user** (show tool name + proposed args). Do not auto-approve.
|
||||
3. After explicit user go-ahead: `weknora session tool-approval resolve <pending-id> -y` to approve, or add `--reject --reason "..."` to reject.
|
||||
4. Resume the answer: `weknora session resume <sess-id> --message <msg-id>`.
|
||||
3. After explicit user go-ahead: `academy session tool-approval resolve <pending-id> -y` to approve, or add `--reject --reason "..."` to reject.
|
||||
4. Resume the answer: `academy session resume <sess-id> --message <msg-id>`.
|
||||
|
||||
`--modified-args '{"key":"val"}'` replaces the tool arguments on approve (non-empty JSON object required). This is an exit-10 interaction — see §5.
|
||||
|
||||
@@ -178,25 +178,25 @@ model configured models list/view/create/update/delete (update rotates key
|
||||
search retrieval chunks / docs / kb / sessions
|
||||
chat one-shot KB RAG Q&A (streaming)
|
||||
api raw HTTP passthrough to any server endpoint (escape hatch)
|
||||
link/unlink bind cwd to a KB mcp serve expose weknora as MCP tools
|
||||
link/unlink bind cwd to a KB mcp serve expose academy as MCP tools
|
||||
```
|
||||
|
||||
**chat vs session ask vs search** — the most common confusion: see the
|
||||
`weknora-rag-search` skill for the decision table. Briefly: `chat` = one-shot
|
||||
`academy-rag-search` skill for the decision table. Briefly: `chat` = one-shot
|
||||
KB Q&A with an LLM; `session ask --agent <id>` = invoke a *custom agent*;
|
||||
`search chunks` = raw hybrid retrieval (no LLM).
|
||||
|
||||
## 9. CLI vs MCP
|
||||
|
||||
For your own scripted control, use the CLI (richer: dry-run, exit-10, all verbs).
|
||||
For an IDE/host agent that speaks MCP, `weknora mcp serve` exposes a curated
|
||||
For an IDE/host agent that speaks MCP, `academy mcp serve` exposes a curated
|
||||
read+chat tool set: `kb_list`, `kb_view`, `doc_list`, `doc_view`, `doc_download`,
|
||||
`search_chunks`, `chunk_list`, `agent_list`, `chat`, `session_ask`. MCP tools
|
||||
take raw ids (no name resolution); resolve names via `kb_list` first.
|
||||
|
||||
## 10. Agent self-help
|
||||
|
||||
Run `weknora <command> --help`. With `WEKNORA_AGENT_HELP=1` set, `--help` emits a
|
||||
Run `academy <command> --help`. With `ACADEMY_AGENT_HELP=1` set, `--help` emits a
|
||||
JSON blob (`used_for` / `required_flags` / `examples`) instead of prose — parse
|
||||
that to learn a command without scraping the human help table.
|
||||
|
||||
@@ -204,8 +204,8 @@ that to learn a command without scraping the human help table.
|
||||
|
||||
| Mistake | Fix |
|
||||
|---|---|
|
||||
| `weknora auth login` before any profile exists | `profile add <n> --host <url> --use` first (§1) |
|
||||
| `academy auth login` before any profile exists | `profile add <n> --host <url> --use` first (§1) |
|
||||
| Passing `--host` or `--name` to `auth login` | `auth login` takes neither — host comes from the profile; use `profile add <n> --host <url> --use`, then `auth login` |
|
||||
| Auto-adding `-y` to clear an exit-10 | Never; get user approval first (§5) |
|
||||
| Need the raw `chat` event stream | pass `--format ndjson`; use `--format text` for a live projected transcript |
|
||||
| `search chunks "q"` → exit 1 `local.kb_id_required` | Pass `--kb <name-or-id>`, set `WEKNORA_KB_ID`, or `weknora link` the dir |
|
||||
| `search chunks "q"` → exit 1 `local.kb_id_required` | Pass `--kb <name-or-id>`, set `ACADEMY_KB_ID`, or `academy link` the dir |
|
||||
+3
-3
@@ -1,5 +1,5 @@
|
||||
// Package skills embeds the bundled Agent Skills into the CLI binary so
|
||||
// `weknora skills install` can write them out without a source checkout
|
||||
// `academy skills install` can write them out without a source checkout
|
||||
// (replacing the manual symlink-from-checkout MVP). The markdown under each
|
||||
// skill dir is the single source of truth — embedding it keeps the shipped
|
||||
// binary and the docs in lockstep (the parity tests guard the command/flag
|
||||
@@ -14,7 +14,7 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
//go:embed all:weknora-shared all:weknora-rag-search
|
||||
//go:embed all:academy-shared all:academy-rag-search
|
||||
var fsys embed.FS
|
||||
|
||||
// Skill is one bundled skill: its directory name, the description parsed from
|
||||
@@ -58,7 +58,7 @@ func List() ([]Skill, error) {
|
||||
}
|
||||
|
||||
// skillFiles returns every file path under a skill dir (relative to the FS
|
||||
// root, e.g. "weknora-shared/SKILL.md"), sorted.
|
||||
// root, e.g. "academy-shared/SKILL.md"), sorted.
|
||||
func skillFiles(dir string) ([]string, error) {
|
||||
var files []string
|
||||
err := fs.WalkDir(fsys, dir, func(p string, d fs.DirEntry, err error) error {
|
||||
|
||||
Reference in new issue
Block a user