@itradingai/aiwiki 0.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json ADDED
@@ -0,0 +1,44 @@
1
+ {
2
+ "name": "@itradingai/aiwiki",
3
+ "version": "0.2.5",
4
+ "type": "module",
5
+ "description": "Agent-first local knowledge production CLI for a single knowledge base.",
6
+ "license": "MIT",
7
+ "keywords": [
8
+ "aiwiki",
9
+ "agent",
10
+ "knowledge-base",
11
+ "obsidian",
12
+ "dataview"
13
+ ],
14
+ "homepage": "https://maxking.cc/aiwiki",
15
+ "bugs": {
16
+ "url": "https://github.com/iTradingAI/aiwiki/issues"
17
+ },
18
+ "repository": {
19
+ "type": "git",
20
+ "url": "git+https://github.com/iTradingAI/aiwiki.git"
21
+ },
22
+ "files": [
23
+ "dist/src",
24
+ "README.md",
25
+ "docs",
26
+ "skill"
27
+ ],
28
+ "bin": {
29
+ "aiwiki": "dist/src/cli.js"
30
+ },
31
+ "scripts": {
32
+ "build": "tsc -p tsconfig.json",
33
+ "test": "npm run build && node --test \"dist/tests/*.test.js\"",
34
+ "check": "npm run test",
35
+ "prepack": "npm run build"
36
+ },
37
+ "devDependencies": {
38
+ "@types/node": "^22.15.3",
39
+ "typescript": "^5.8.3"
40
+ },
41
+ "engines": {
42
+ "node": ">=20"
43
+ }
44
+ }
package/skill/SKILL.md ADDED
@@ -0,0 +1,87 @@
1
+ ---
2
+ name: aiwiki
3
+ description: Agent-first AIWiki workflow for turning one URL/body into local knowledge production files.
4
+ ---
5
+
6
+ # AIWiki Skill
7
+
8
+ Use this skill when the user asks an Agent to process one URL, article body, or local text file with the `aiwiki` keyword.
9
+
10
+ The host Agent reads the webpage or user-provided body, then passes structured content to the `aiwiki` CLI. The base CLI writes files and does not own webpage fetching stability.
11
+
12
+ ## Agent 对接流程
13
+
14
+ 1. Read the URL, message, attachment, or user-provided body.
15
+ 2. Build an `aiwiki.agent_payload.v1` payload with `source` and `request`.
16
+ 3. Do not include output paths in the payload. The CLI decides where files are written.
17
+ 4. If webpage reading fails, still build a payload with `source.fetch_status` set to `failed` and include `source.fetch_notes`.
18
+ 5. Prefer stdin so the user does not need to save a payload file:
19
+
20
+ ```bash
21
+ aiwiki ingest-agent --stdin
22
+ ```
23
+
24
+ For local files, call:
25
+
26
+ ```bash
27
+ aiwiki ingest-file --file <file>
28
+ ```
29
+
30
+ ## 用户回复
31
+
32
+ After the CLI runs, read the command output and report these fields to the user:
33
+
34
+ - `ingested`: whether readable content was written into the knowledge base.
35
+ - `recorded`: whether AIWiki wrote a run record.
36
+ - `fetch_status`: whether the host Agent supplied readable content.
37
+ - `fit_score` and `fit_level`: lightweight fit feedback for review priority.
38
+ - `summary`: short content summary or fetch-failure note.
39
+ - `run_dir` and `processing_summary`: local result entry points.
40
+ - `source_card`: Obsidian source-card entry when ingestion succeeded.
41
+ - `dashboard` and `review_queue`: Obsidian review database entry points.
42
+
43
+ Recommended reply shape:
44
+
45
+ ```text
46
+ 已加入 Obsidian 审阅队列。
47
+ 契合度:<fit_score> / <fit_level>
48
+ 摘要:<summary>
49
+ 资料卡:<source_card>
50
+ 处理记录:<processing_summary>
51
+ Obsidian 入口:<dashboard>
52
+ 待审队列:<review_queue>
53
+ ```
54
+
55
+ If `fetch_status` is `failed`, say that AIWiki recorded the failure reason but did not ingest readable content.
56
+
57
+ ## Obsidian + Dataview 边界
58
+
59
+ - AIWiki 默认使用中文提示和中文审阅流程。
60
+ - AIWiki 可直接配合 Obsidian 原生 Markdown、Properties、Backlinks、Search 和 Graph View 使用。
61
+ - Dataview 是可选增强,只用于渲染生成的 dashboards。
62
+ - 不要替用户安装 Dataview。
63
+ - 不要编辑 `.obsidian`、`community-plugins.json` 或 Obsidian 插件配置。
64
+ - 如果用户问 Dataview,说明可以在 Obsidian Community plugins 中手动安装并启用,然后打开 `dashboards/AIWiki Home.md`。
65
+
66
+ ## 最小 Payload
67
+
68
+ ```json
69
+ {
70
+ "schema_version": "aiwiki.agent_payload.v1",
71
+ "source": {
72
+ "kind": "url",
73
+ "url": "https://example.com/article",
74
+ "title": "Article title",
75
+ "content_format": "markdown",
76
+ "content": "Article body read by the host Agent.",
77
+ "fetcher": "host-agent",
78
+ "fetch_status": "ok",
79
+ "captured_at": "2026-05-07T10:00:00+08:00"
80
+ },
81
+ "request": {
82
+ "mode": "ingest",
83
+ "outputs": ["source_card", "creative_assets", "topics", "draft_outline", "processing_summary"],
84
+ "language": "zh-CN"
85
+ }
86
+ }
87
+ ```