@biaoo/tiangong-wiki 0.2.0
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/LICENSE +21 -0
- package/README.md +167 -0
- package/README.zh-CN.md +167 -0
- package/SKILL.md +116 -0
- package/agents/openai.yaml +4 -0
- package/assets/config.example.env +18 -0
- package/assets/templates/achievement.md +32 -0
- package/assets/templates/bridge.md +33 -0
- package/assets/templates/concept.md +47 -0
- package/assets/templates/faq.md +31 -0
- package/assets/templates/lesson.md +31 -0
- package/assets/templates/method.md +31 -0
- package/assets/templates/misconception.md +35 -0
- package/assets/templates/person.md +31 -0
- package/assets/templates/research-note.md +34 -0
- package/assets/templates/resume.md +34 -0
- package/assets/templates/source-summary.md +35 -0
- package/assets/vllm/qwen3_5_openai_developer.jinja +182 -0
- package/assets/wiki.config.default.json +193 -0
- package/dist/commands/check-config.js +77 -0
- package/dist/commands/create.js +32 -0
- package/dist/commands/daemon.js +186 -0
- package/dist/commands/dashboard.js +112 -0
- package/dist/commands/doctor.js +22 -0
- package/dist/commands/export-graph.js +28 -0
- package/dist/commands/export-index.js +31 -0
- package/dist/commands/find.js +36 -0
- package/dist/commands/fts.js +32 -0
- package/dist/commands/graph.js +35 -0
- package/dist/commands/init.js +48 -0
- package/dist/commands/lint.js +35 -0
- package/dist/commands/list.js +28 -0
- package/dist/commands/page-info.js +24 -0
- package/dist/commands/search.js +32 -0
- package/dist/commands/setup.js +15 -0
- package/dist/commands/stat.js +20 -0
- package/dist/commands/sync.js +38 -0
- package/dist/commands/template.js +71 -0
- package/dist/commands/type.js +88 -0
- package/dist/commands/vault.js +64 -0
- package/dist/core/agent.js +201 -0
- package/dist/core/cli-env.js +129 -0
- package/dist/core/codex-workflow.js +233 -0
- package/dist/core/config.js +126 -0
- package/dist/core/db.js +292 -0
- package/dist/core/embedding.js +104 -0
- package/dist/core/frontmatter.js +287 -0
- package/dist/core/indexer.js +241 -0
- package/dist/core/onboarding.js +967 -0
- package/dist/core/page-files.js +91 -0
- package/dist/core/paths.js +161 -0
- package/dist/core/presenters.js +23 -0
- package/dist/core/query.js +58 -0
- package/dist/core/runtime.js +20 -0
- package/dist/core/sync.js +235 -0
- package/dist/core/synology.js +412 -0
- package/dist/core/template-evolution.js +38 -0
- package/dist/core/vault-processing.js +742 -0
- package/dist/core/vault.js +594 -0
- package/dist/core/workflow-context.js +188 -0
- package/dist/core/workflow-result.js +162 -0
- package/dist/core/workspace-bootstrap.js +30 -0
- package/dist/core/workspace-skills.js +220 -0
- package/dist/daemon/client.js +147 -0
- package/dist/daemon/server.js +807 -0
- package/dist/daemon/state.js +53 -0
- package/dist/dashboard/assets/index-1FgAUZ28.css +1 -0
- package/dist/dashboard/assets/index-6A0PWT4X.js +154 -0
- package/dist/dashboard/assets/jetbrains-mono-cyrillic-400-normal-BEIGL1Tu.woff2 +0 -0
- package/dist/dashboard/assets/jetbrains-mono-cyrillic-400-normal-ugxPyKxw.woff +0 -0
- package/dist/dashboard/assets/jetbrains-mono-cyrillic-500-normal-DJqRU3vO.woff +0 -0
- package/dist/dashboard/assets/jetbrains-mono-cyrillic-500-normal-DmUKJPL_.woff2 +0 -0
- package/dist/dashboard/assets/jetbrains-mono-cyrillic-700-normal-BWTpRfYl.woff2 +0 -0
- package/dist/dashboard/assets/jetbrains-mono-cyrillic-700-normal-CEoEElIJ.woff +0 -0
- package/dist/dashboard/assets/jetbrains-mono-greek-400-normal-B9oWc5Lo.woff +0 -0
- package/dist/dashboard/assets/jetbrains-mono-greek-400-normal-C190GLew.woff2 +0 -0
- package/dist/dashboard/assets/jetbrains-mono-greek-500-normal-D7SFKleX.woff +0 -0
- package/dist/dashboard/assets/jetbrains-mono-greek-500-normal-JpySY46c.woff2 +0 -0
- package/dist/dashboard/assets/jetbrains-mono-greek-700-normal-C6CZE3T8.woff2 +0 -0
- package/dist/dashboard/assets/jetbrains-mono-greek-700-normal-DEigVDxa.woff +0 -0
- package/dist/dashboard/assets/jetbrains-mono-latin-400-normal-6-qcROiO.woff +0 -0
- package/dist/dashboard/assets/jetbrains-mono-latin-400-normal-V6pRDFza.woff2 +0 -0
- package/dist/dashboard/assets/jetbrains-mono-latin-500-normal-BWZEU5yA.woff2 +0 -0
- package/dist/dashboard/assets/jetbrains-mono-latin-500-normal-CJOVTJB7.woff +0 -0
- package/dist/dashboard/assets/jetbrains-mono-latin-700-normal-BYuf6tUa.woff2 +0 -0
- package/dist/dashboard/assets/jetbrains-mono-latin-700-normal-D3wTyLJW.woff +0 -0
- package/dist/dashboard/assets/jetbrains-mono-latin-ext-400-normal-Bc8Ftmh3.woff2 +0 -0
- package/dist/dashboard/assets/jetbrains-mono-latin-ext-400-normal-fXTG6kC5.woff +0 -0
- package/dist/dashboard/assets/jetbrains-mono-latin-ext-500-normal-Cut-4mMH.woff2 +0 -0
- package/dist/dashboard/assets/jetbrains-mono-latin-ext-500-normal-ckzbgY84.woff +0 -0
- package/dist/dashboard/assets/jetbrains-mono-latin-ext-700-normal-CZipNAKV.woff2 +0 -0
- package/dist/dashboard/assets/jetbrains-mono-latin-ext-700-normal-CxPITLHs.woff +0 -0
- package/dist/dashboard/assets/jetbrains-mono-vietnamese-400-normal-CqNFfHCs.woff +0 -0
- package/dist/dashboard/assets/jetbrains-mono-vietnamese-500-normal-DNRqzVM1.woff +0 -0
- package/dist/dashboard/assets/jetbrains-mono-vietnamese-700-normal-BDLVIk2r.woff +0 -0
- package/dist/dashboard/assets/space-grotesk-latin-400-normal-BnQMeOim.woff +0 -0
- package/dist/dashboard/assets/space-grotesk-latin-400-normal-CJ-V5oYT.woff2 +0 -0
- package/dist/dashboard/assets/space-grotesk-latin-500-normal-CNSSEhBt.woff +0 -0
- package/dist/dashboard/assets/space-grotesk-latin-500-normal-lFbtlQH6.woff2 +0 -0
- package/dist/dashboard/assets/space-grotesk-latin-700-normal-CwsQ-cCU.woff +0 -0
- package/dist/dashboard/assets/space-grotesk-latin-700-normal-RjhwGPKo.woff2 +0 -0
- package/dist/dashboard/assets/space-grotesk-latin-ext-400-normal-CfP_5XZW.woff2 +0 -0
- package/dist/dashboard/assets/space-grotesk-latin-ext-400-normal-DRPE3kg4.woff +0 -0
- package/dist/dashboard/assets/space-grotesk-latin-ext-500-normal-3dgZTiw9.woff +0 -0
- package/dist/dashboard/assets/space-grotesk-latin-ext-500-normal-DUe3BAxM.woff2 +0 -0
- package/dist/dashboard/assets/space-grotesk-latin-ext-700-normal-BQnZhY3m.woff2 +0 -0
- package/dist/dashboard/assets/space-grotesk-latin-ext-700-normal-HVCqSBdx.woff +0 -0
- package/dist/dashboard/assets/space-grotesk-vietnamese-400-normal-B7xT_GF5.woff2 +0 -0
- package/dist/dashboard/assets/space-grotesk-vietnamese-400-normal-BIWiOVfw.woff +0 -0
- package/dist/dashboard/assets/space-grotesk-vietnamese-500-normal-BTqKIpxg.woff +0 -0
- package/dist/dashboard/assets/space-grotesk-vietnamese-500-normal-BmEvtly_.woff2 +0 -0
- package/dist/dashboard/assets/space-grotesk-vietnamese-700-normal-DMty7AZE.woff2 +0 -0
- package/dist/dashboard/assets/space-grotesk-vietnamese-700-normal-Duxec5Rn.woff +0 -0
- package/dist/dashboard/index.html +18 -0
- package/dist/index.js +86 -0
- package/dist/operations/dashboard.js +1231 -0
- package/dist/operations/export.js +110 -0
- package/dist/operations/query.js +649 -0
- package/dist/operations/type-template.js +210 -0
- package/dist/operations/write.js +143 -0
- package/dist/types/config.js +1 -0
- package/dist/types/page.js +1 -0
- package/dist/utils/case.js +22 -0
- package/dist/utils/errors.js +26 -0
- package/dist/utils/fs.js +77 -0
- package/dist/utils/output.js +33 -0
- package/dist/utils/process.js +60 -0
- package/dist/utils/segmenter.js +24 -0
- package/dist/utils/slug.js +10 -0
- package/dist/utils/time.js +24 -0
- package/package.json +64 -0
- package/references/cli-interface.md +312 -0
- package/references/env.md +122 -0
- package/references/template-design-guide.md +271 -0
- package/references/vault-to-wiki-instruction.md +110 -0
- package/references/wiki-maintenance-instruction.md +190 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<meta name="color-scheme" content="dark" />
|
|
7
|
+
<link
|
|
8
|
+
rel="icon"
|
|
9
|
+
href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Crect width='64' height='64' rx='14' fill='%23060912'/%3E%3Cpath d='M14 46L28 18l8 18 8-12 6 22' fill='none' stroke='%2368a8ff' stroke-width='5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Ccircle cx='28' cy='18' r='4' fill='%23f3f6ff'/%3E%3Ccircle cx='44' cy='24' r='4' fill='%23f3f6ff'/%3E%3C/svg%3E"
|
|
10
|
+
/>
|
|
11
|
+
<title>Tiangong Wiki</title>
|
|
12
|
+
<script type="module" crossorigin src="/dashboard/assets/index-6A0PWT4X.js"></script>
|
|
13
|
+
<link rel="stylesheet" crossorigin href="/dashboard/assets/index-1FgAUZ28.css">
|
|
14
|
+
</head>
|
|
15
|
+
<body>
|
|
16
|
+
<div id="app"></div>
|
|
17
|
+
</body>
|
|
18
|
+
</html>
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { Command } from "commander";
|
|
3
|
+
import packageJson from "../package.json" with { type: "json" };
|
|
4
|
+
import { registerCheckConfigCommand } from "./commands/check-config.js";
|
|
5
|
+
import { registerCreateCommand } from "./commands/create.js";
|
|
6
|
+
import { registerDaemonCommand } from "./commands/daemon.js";
|
|
7
|
+
import { registerDashboardCommand } from "./commands/dashboard.js";
|
|
8
|
+
import { registerDoctorCommand } from "./commands/doctor.js";
|
|
9
|
+
import { registerExportGraphCommand } from "./commands/export-graph.js";
|
|
10
|
+
import { registerExportIndexCommand } from "./commands/export-index.js";
|
|
11
|
+
import { registerFindCommand } from "./commands/find.js";
|
|
12
|
+
import { registerFtsCommand } from "./commands/fts.js";
|
|
13
|
+
import { registerGraphCommand } from "./commands/graph.js";
|
|
14
|
+
import { registerInitCommand } from "./commands/init.js";
|
|
15
|
+
import { registerLintCommand } from "./commands/lint.js";
|
|
16
|
+
import { registerListCommand } from "./commands/list.js";
|
|
17
|
+
import { registerPageInfoCommand } from "./commands/page-info.js";
|
|
18
|
+
import { registerSearchCommand } from "./commands/search.js";
|
|
19
|
+
import { registerSetupCommand } from "./commands/setup.js";
|
|
20
|
+
import { registerStatCommand } from "./commands/stat.js";
|
|
21
|
+
import { registerSyncCommand } from "./commands/sync.js";
|
|
22
|
+
import { registerTemplateCommand } from "./commands/template.js";
|
|
23
|
+
import { registerTypeCommand } from "./commands/type.js";
|
|
24
|
+
import { registerVaultCommand } from "./commands/vault.js";
|
|
25
|
+
import { applyCliEnvironment } from "./core/cli-env.js";
|
|
26
|
+
import { loadRuntimeConfig } from "./core/runtime.js";
|
|
27
|
+
import { embedPendingPages } from "./core/sync.js";
|
|
28
|
+
import { processVaultQueueBatch } from "./core/vault-processing.js";
|
|
29
|
+
import { handleCliError, writeJson } from "./utils/output.js";
|
|
30
|
+
function buildProgram() {
|
|
31
|
+
const program = new Command();
|
|
32
|
+
program
|
|
33
|
+
.name("tiangong-wiki")
|
|
34
|
+
.description("Tiangong Wiki — local-first indexing and query CLI")
|
|
35
|
+
.version(packageJson.version)
|
|
36
|
+
.showHelpAfterError();
|
|
37
|
+
let runtimeConfig;
|
|
38
|
+
try {
|
|
39
|
+
runtimeConfig = loadRuntimeConfig(process.env).config;
|
|
40
|
+
}
|
|
41
|
+
catch {
|
|
42
|
+
runtimeConfig = undefined;
|
|
43
|
+
}
|
|
44
|
+
registerSetupCommand(program);
|
|
45
|
+
registerInitCommand(program);
|
|
46
|
+
registerDoctorCommand(program);
|
|
47
|
+
registerSyncCommand(program);
|
|
48
|
+
registerCheckConfigCommand(program);
|
|
49
|
+
registerFindCommand(program, runtimeConfig);
|
|
50
|
+
registerSearchCommand(program);
|
|
51
|
+
registerFtsCommand(program);
|
|
52
|
+
registerGraphCommand(program);
|
|
53
|
+
registerPageInfoCommand(program);
|
|
54
|
+
registerListCommand(program);
|
|
55
|
+
registerStatCommand(program);
|
|
56
|
+
registerCreateCommand(program);
|
|
57
|
+
registerTemplateCommand(program);
|
|
58
|
+
registerTypeCommand(program);
|
|
59
|
+
registerVaultCommand(program);
|
|
60
|
+
registerLintCommand(program);
|
|
61
|
+
registerExportGraphCommand(program);
|
|
62
|
+
registerExportIndexCommand(program);
|
|
63
|
+
registerDaemonCommand(program);
|
|
64
|
+
registerDashboardCommand(program);
|
|
65
|
+
program
|
|
66
|
+
.command("embed-pending", { hidden: true })
|
|
67
|
+
.description("Internal background embedding worker")
|
|
68
|
+
.action(async () => {
|
|
69
|
+
await embedPendingPages(process.env);
|
|
70
|
+
});
|
|
71
|
+
program
|
|
72
|
+
.command("process-vault-queue", { hidden: true })
|
|
73
|
+
.description("Internal background vault queue worker")
|
|
74
|
+
.action(async () => {
|
|
75
|
+
writeJson(await processVaultQueueBatch(process.env));
|
|
76
|
+
});
|
|
77
|
+
return program;
|
|
78
|
+
}
|
|
79
|
+
try {
|
|
80
|
+
applyCliEnvironment(process.env, process.cwd());
|
|
81
|
+
const program = buildProgram();
|
|
82
|
+
await program.parseAsync(process.argv);
|
|
83
|
+
}
|
|
84
|
+
catch (error) {
|
|
85
|
+
handleCliError(error);
|
|
86
|
+
}
|