chain-insights 0.3.9 → 0.3.18
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/README.md +49 -52
- package/dist/{active-ByNgjuAg.mjs → active-BQopLul8.mjs} +6 -8
- package/dist/active-BQopLul8.mjs.map +1 -0
- package/dist/{active-BVr55kvW.cjs → active-XWv72R1X.cjs} +4 -12
- package/dist/{app-BxojXjtB.cjs → app-DBrqk_iP.cjs} +12 -28
- package/dist/{app-CRd39JJ8.mjs → app-DXwILI_a.mjs} +13 -28
- package/dist/app-DXwILI_a.mjs.map +1 -0
- package/dist/{artifact-server-CP6LXQ9d.mjs → artifact-server-CcmLBv1j.mjs} +2 -2
- package/dist/{artifact-server-CP6LXQ9d.mjs.map → artifact-server-CcmLBv1j.mjs.map} +1 -1
- package/dist/{artifact-server-XbN16DwU.cjs → artifact-server-v0WgTPFT.cjs} +1 -1
- package/dist/{capabilities-BCvkTkIu.mjs → capabilities-CM72SErE.mjs} +2 -2
- package/dist/{capabilities-BCvkTkIu.mjs.map → capabilities-CM72SErE.mjs.map} +1 -1
- package/dist/{capabilities-DOa6EFO-.cjs → capabilities-DGeF-oHc.cjs} +1 -1
- package/dist/cli.cjs +149 -405
- package/dist/cli.mjs +149 -405
- package/dist/cli.mjs.map +1 -1
- package/dist/{client-Y_zqKqJT.cjs → client-BY-56ojr.cjs} +0 -17
- package/dist/{client-BgmHjBHQ.mjs → client-ytTO0mcZ.mjs} +2 -13
- package/dist/{client-BgmHjBHQ.mjs.map → client-ytTO0mcZ.mjs.map} +1 -1
- package/dist/{config-Drgc2HuF.mjs → config-C6zM8Xir.mjs} +3 -3
- package/dist/{config-Drgc2HuF.mjs.map → config-C6zM8Xir.mjs.map} +1 -1
- package/dist/{config-BwVx19Og.cjs → config-CkW404Cs.cjs} +2 -2
- package/dist/{graph-reports-BDELxmpi.mjs → graph-reports-CEq-Mvx0.mjs} +2 -2
- package/dist/{graph-reports-BDELxmpi.mjs.map → graph-reports-CEq-Mvx0.mjs.map} +1 -1
- package/dist/{graph-reports-B3mkLP8Z.cjs → graph-reports-CkglRtg4.cjs} +1 -1
- package/dist/{html-generator-Bx3UcLTB.cjs → html-generator-BFKafL8y.cjs} +5 -6
- package/dist/{html-generator-AowOmzyi.mjs → html-generator-D4fX71hI.mjs} +6 -6
- package/dist/html-generator-D4fX71hI.mjs.map +1 -0
- package/dist/index.cjs +5 -5
- package/dist/index.d.cts +1 -2
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +1 -2
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +5 -5
- package/dist/{init-CKQ6F07J.mjs → init-BGDvGreX.mjs} +52 -55
- package/dist/init-BGDvGreX.mjs.map +1 -0
- package/dist/{init-Dhw8F23z.cjs → init-Cuw9TznI.cjs} +51 -54
- package/dist/{mcp-endpoint-DHs1cRFH.mjs → mcp-endpoint-QQ5Lbqc2.mjs} +5 -2
- package/dist/mcp-endpoint-QQ5Lbqc2.mjs.map +1 -0
- package/dist/{mcp-endpoint-BaV8h_lq.cjs → mcp-endpoint-cQIZSjkK.cjs} +4 -1
- package/dist/mcp-proxy.cjs +650 -771
- package/dist/mcp-proxy.d.cts.map +1 -1
- package/dist/mcp-proxy.d.mts.map +1 -1
- package/dist/mcp-proxy.mjs +651 -772
- package/dist/mcp-proxy.mjs.map +1 -1
- package/dist/{output-root-BRhzhhXZ.mjs → output-root-BK4pdjyz.mjs} +6 -3
- package/dist/output-root-BK4pdjyz.mjs.map +1 -0
- package/dist/{output-root-YIbl6PwF.cjs → output-root-DI0tzA0X.cjs} +5 -2
- package/dist/{public-tools-BY3PTw6x.cjs → public-tools-BREojpU7.cjs} +1244 -426
- package/dist/{public-tools-CvlZcysd.mjs → public-tools-brHmHGYm.mjs} +1240 -428
- package/dist/public-tools-brHmHGYm.mjs.map +1 -0
- package/dist/{schema-BFEWhzg7.mjs → schema-D_qwaQA5.mjs} +2 -2
- package/dist/{schema-BFEWhzg7.mjs.map → schema-D_qwaQA5.mjs.map} +1 -1
- package/dist/{schema-Vl9yuOFO.cjs → schema-Dr6JXSOF.cjs} +1 -1
- package/dist/{server-BXLX2j_A.mjs → server-BK4bfOiv.mjs} +2 -2
- package/dist/{server-BXLX2j_A.mjs.map → server-BK4bfOiv.mjs.map} +1 -1
- package/dist/{server-BqVdWath.cjs → server-ColyTG1t.cjs} +1 -1
- package/dist/templates/graph.html +1 -1
- package/dist/{tool-visibility-Buq7YdUZ.cjs → tool-visibility--QPgrRE5.cjs} +5 -1
- package/dist/{tool-visibility-BpyZHRBi.mjs → tool-visibility-nr6XqO1F.mjs} +6 -2
- package/dist/tool-visibility-nr6XqO1F.mjs.map +1 -0
- package/dist/viz-BBvY-wXz.cjs +210 -0
- package/dist/viz-D8umSF-t.mjs +199 -0
- package/dist/viz-D8umSF-t.mjs.map +1 -0
- package/docs/architecture.md +4 -3
- package/docs/contributing.md +12 -6
- package/docs/graph-tools.md +93 -68
- package/docs/investigation-workspaces.md +38 -124
- package/docs/mcp-proxy.md +23 -34
- package/package.json +2 -2
- package/skills/chain-insights-address-risk/SKILL.md +92 -0
- package/skills/chain-insights-bittensor-cypher/SKILL.md +2 -22
- package/skills/chain-insights-developer-experience/SKILL.md +8 -28
- package/skills/chain-insights-exposure-analysis/SKILL.md +83 -0
- package/skills/chain-insights-investigation/SKILL.md +59 -211
- package/skills/chain-insights-investigation/agents/openai.yaml +1 -1
- package/skills/chain-insights-investigation/scripts/run-target-uat.sh +37 -55
- package/skills/chain-insights-trace-funds/SKILL.md +14 -14
- package/skills/ci-status/SKILL.md +9 -15
- package/skills/test-chain-insights-graphrag-mcp/SKILL.md +5 -4
- package/skills/test-chain-insights-graphrag-mcp/scripts/run-uat.sh +272 -18
- package/dist/active-ByNgjuAg.mjs.map +0 -1
- package/dist/app-CRd39JJ8.mjs.map +0 -1
- package/dist/canvas-Cn-maEIh.mjs +0 -203
- package/dist/canvas-Cn-maEIh.mjs.map +0 -1
- package/dist/canvas-p-oKCMjc.cjs +0 -251
- package/dist/cases-Bz_9XKEw.cjs +0 -19
- package/dist/cases-TVcAifxu.mjs +0 -16
- package/dist/cases-TVcAifxu.mjs.map +0 -1
- package/dist/data-extractor-B4nHw1wZ.mjs +0 -336
- package/dist/data-extractor-B4nHw1wZ.mjs.map +0 -1
- package/dist/data-extractor-DS4rzy3M.cjs +0 -353
- package/dist/dossier-BXy57V4-.cjs +0 -88
- package/dist/dossier-Bjpcbcxa.mjs +0 -78
- package/dist/dossier-Bjpcbcxa.mjs.map +0 -1
- package/dist/evidence-CvEesemA.cjs +0 -200
- package/dist/evidence-D96PTzOQ.mjs +0 -195
- package/dist/evidence-D96PTzOQ.mjs.map +0 -1
- package/dist/export-CBhcJuZ6.mjs +0 -394
- package/dist/export-CBhcJuZ6.mjs.map +0 -1
- package/dist/export-D4v4-6F4.cjs +0 -394
- package/dist/frontmatter-D0ccQnUM.mjs +0 -26
- package/dist/frontmatter-D0ccQnUM.mjs.map +0 -1
- package/dist/frontmatter-Dvqa5HX6.cjs +0 -35
- package/dist/html-generator-AowOmzyi.mjs.map +0 -1
- package/dist/init-CKQ6F07J.mjs.map +0 -1
- package/dist/mcp-endpoint-DHs1cRFH.mjs.map +0 -1
- package/dist/output-root-BRhzhhXZ.mjs.map +0 -1
- package/dist/parser-BXLAHYnZ.cjs +0 -182
- package/dist/parser-CJfMsOl6.mjs +0 -182
- package/dist/parser-CJfMsOl6.mjs.map +0 -1
- package/dist/public-tools-CvlZcysd.mjs.map +0 -1
- package/dist/resolver-2jXNtWQO.mjs +0 -184
- package/dist/resolver-2jXNtWQO.mjs.map +0 -1
- package/dist/resolver-CZdQwKvh.cjs +0 -186
- package/dist/runner-CVnjpqc-.mjs +0 -149
- package/dist/runner-CVnjpqc-.mjs.map +0 -1
- package/dist/runner-bLy0pTr_.cjs +0 -147
- package/dist/selector-BvXM9jbe.mjs +0 -12
- package/dist/selector-BvXM9jbe.mjs.map +0 -1
- package/dist/selector-Dps_ZFxq.cjs +0 -10
- package/dist/session-BT7VpbAd.cjs +0 -127
- package/dist/session-DROyhebe.mjs +0 -117
- package/dist/session-DROyhebe.mjs.map +0 -1
- package/dist/store-C2B_AssI.mjs +0 -231
- package/dist/store-C2B_AssI.mjs.map +0 -1
- package/dist/store-CQhU8dz8.cjs +0 -242
- package/dist/tool-visibility-BpyZHRBi.mjs.map +0 -1
- package/dist/vault-B2y78Ypu.cjs +0 -560
- package/dist/vault-z35Dohdq.mjs +0 -560
- package/dist/vault-z35Dohdq.mjs.map +0 -1
- package/dist/viz-D1620cBX.cjs +0 -44
- package/dist/viz-DB5XFG1z.mjs +0 -35
- package/dist/viz-DB5XFG1z.mjs.map +0 -1
- package/docs/knowledge-exports.md +0 -204
- package/docs/obsidian-vault.md +0 -130
- package/skills/ci-case/SKILL.md +0 -43
package/dist/viz-DB5XFG1z.mjs
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.mjs";
|
|
2
|
-
import { r as truncateGraph } from "./data-extractor-B4nHw1wZ.mjs";
|
|
3
|
-
import { r as writeVizHtml, t as generateHtml } from "./html-generator-AowOmzyi.mjs";
|
|
4
|
-
import { readFile } from "node:fs/promises";
|
|
5
|
-
//#region src/viz/index.ts
|
|
6
|
-
var viz_exports = /* @__PURE__ */ __exportAll({ generateVisualization: () => generateVisualization });
|
|
7
|
-
async function generateVisualization(opts) {
|
|
8
|
-
let rawData;
|
|
9
|
-
if (opts.dataFile) {
|
|
10
|
-
const content = await readFile(opts.dataFile, "utf-8");
|
|
11
|
-
let parsed;
|
|
12
|
-
try {
|
|
13
|
-
parsed = JSON.parse(content);
|
|
14
|
-
} catch {
|
|
15
|
-
throw new Error("Invalid transaction data. The input file must contain a JSON array of transaction objects with `from`, `to`, and `value` fields.");
|
|
16
|
-
}
|
|
17
|
-
const { extractGraphFromJson } = await import("./data-extractor-B4nHw1wZ.mjs").then((n) => n.t);
|
|
18
|
-
rawData = extractGraphFromJson(parsed);
|
|
19
|
-
} else if (opts.caseId) {
|
|
20
|
-
const { extractGraphFromCase } = await import("./data-extractor-B4nHw1wZ.mjs").then((n) => n.t);
|
|
21
|
-
const extracted = await extractGraphFromCase(opts.caseId);
|
|
22
|
-
if (extracted.nodes.length === 0) throw new Error("No Transaction Data. This case has no evidence with transaction data. Add evidence using `chain-insights evidence add` or provide a JSON file with `chain-insights viz --data <file.json>`.");
|
|
23
|
-
rawData = extracted;
|
|
24
|
-
} else throw new Error("Provide either a case ID or --data <file.json>");
|
|
25
|
-
const data = truncateGraph(rawData);
|
|
26
|
-
const vizId = opts.caseId ? `${opts.caseId}_${Date.now()}` : `adhoc_${Date.now()}`;
|
|
27
|
-
return {
|
|
28
|
-
vizId,
|
|
29
|
-
htmlPath: await writeVizHtml(vizId, generateHtml(data, data.metadata.caseId ? `${data.metadata.caseId} - Money Flow` : "Ad-hoc Visualization"), opts.caseId)
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
//#endregion
|
|
33
|
-
export { viz_exports as n, generateVisualization as t };
|
|
34
|
-
|
|
35
|
-
//# sourceMappingURL=viz-DB5XFG1z.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"viz-DB5XFG1z.mjs","names":[],"sources":["../src/viz/index.ts"],"sourcesContent":["export { GraphData, GraphNode, GraphEdge, EntityType, RiskLevel, truncateGraph } from './graph-model.js'\nexport type { GraphData as GraphDataType, GraphNode as GraphNodeType, GraphEdge as GraphEdgeType } from './graph-model.js'\nexport { generateHtml, writeVizHtml, transformToGraphHtml } from './html-generator.js'\nexport { DataExtractor, extractGraphFromCase, extractGraphFromJson } from './data-extractor.js'\n\nimport { readFile } from 'node:fs/promises'\nimport { truncateGraph } from './graph-model.js'\nimport { generateHtml, writeVizHtml } from './html-generator.js'\n\nexport async function generateVisualization(opts: {\n caseId?: string\n dataFile?: string\n}): Promise<{ vizId: string; htmlPath: string }> {\n let rawData: unknown\n\n if (opts.dataFile) {\n const content = await readFile(opts.dataFile, 'utf-8')\n let parsed: unknown\n try {\n parsed = JSON.parse(content)\n } catch {\n throw new Error('Invalid transaction data. The input file must contain a JSON array of transaction objects with `from`, `to`, and `value` fields.')\n }\n const { extractGraphFromJson } = await import('./data-extractor.js')\n rawData = extractGraphFromJson(parsed)\n } else if (opts.caseId) {\n const { extractGraphFromCase } = await import('./data-extractor.js')\n const extracted = await extractGraphFromCase(opts.caseId)\n if (extracted.nodes.length === 0) {\n throw new Error('No Transaction Data. This case has no evidence with transaction data. Add evidence using `chain-insights evidence add` or provide a JSON file with `chain-insights viz --data <file.json>`.')\n }\n rawData = extracted\n } else {\n throw new Error('Provide either a case ID or --data <file.json>')\n }\n\n const data = truncateGraph(rawData as Parameters<typeof truncateGraph>[0])\n\n const vizId = opts.caseId\n ? `${opts.caseId}_${Date.now()}`\n : `adhoc_${Date.now()}`\n\n const title = data.metadata.caseId\n ? `${data.metadata.caseId} - Money Flow`\n : 'Ad-hoc Visualization'\n\n const html = generateHtml(data, title)\n const htmlPath = await writeVizHtml(vizId, html, opts.caseId)\n\n return { vizId, htmlPath }\n}\n"],"mappings":";;;;;;AASA,eAAsB,sBAAsB,MAGK;CAC/C,IAAI;CAEJ,IAAI,KAAK,UAAU;EACjB,MAAM,UAAU,MAAM,SAAS,KAAK,UAAU,OAAO;EACrD,IAAI;EACJ,IAAI;GACF,SAAS,KAAK,MAAM,OAAO;EAC7B,QAAQ;GACN,MAAM,IAAI,MAAM,kIAAkI;EACpJ;EACA,MAAM,EAAE,yBAAyB,MAAM,OAAO,iCAAA,MAAA,MAAA,EAAA,CAAA;EAC9C,UAAU,qBAAqB,MAAM;CACvC,OAAO,IAAI,KAAK,QAAQ;EACtB,MAAM,EAAE,yBAAyB,MAAM,OAAO,iCAAA,MAAA,MAAA,EAAA,CAAA;EAC9C,MAAM,YAAY,MAAM,qBAAqB,KAAK,MAAM;EACxD,IAAI,UAAU,MAAM,WAAW,GAC7B,MAAM,IAAI,MAAM,6LAA6L;EAE/M,UAAU;CACZ,OACE,MAAM,IAAI,MAAM,gDAAgD;CAGlE,MAAM,OAAO,cAAc,OAA8C;CAEzE,MAAM,QAAQ,KAAK,SACf,GAAG,KAAK,OAAO,GAAG,KAAK,IAAI,MAC3B,SAAS,KAAK,IAAI;CAStB,OAAO;EAAE;EAAO,UAAA,MAFO,aAAa,OADvB,aAAa,MAJZ,KAAK,SAAS,SACxB,GAAG,KAAK,SAAS,OAAO,iBACxB,sBAG0C,GAAG,KAAK,MAAM;CAEnC;AAC3B"}
|
|
@@ -1,204 +0,0 @@
|
|
|
1
|
-
# Knowledge Exports
|
|
2
|
-
|
|
3
|
-
Chain Insights workspaces are Obsidian-compatible vaults. Normal local
|
|
4
|
-
investigation work happens in the workspace; exports are portable, redacted,
|
|
5
|
-
and shareable bundles for partner handoff, LLM Wiki ingestion, and archive.
|
|
6
|
-
|
|
7
|
-
Chain Insights can export a verified case as a local knowledge bundle for LLM
|
|
8
|
-
Wiki, Codex, Claude Code, ChatGPT, Obsidian, and any agent that can read a
|
|
9
|
-
folder of Markdown and JSON files.
|
|
10
|
-
|
|
11
|
-
The export is local-first. Chain Insights writes files under your initialized
|
|
12
|
-
workspace and does not upload the case anywhere by itself.
|
|
13
|
-
|
|
14
|
-
## Install Viewers And Agent Tools
|
|
15
|
-
|
|
16
|
-
Install Chain Insights:
|
|
17
|
-
|
|
18
|
-
```bash
|
|
19
|
-
npm install -g chain-insights
|
|
20
|
-
cia --version
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
Install Obsidian when you want a human vault UI:
|
|
24
|
-
|
|
25
|
-
- Windows and macOS: download the installer from
|
|
26
|
-
<https://obsidian.md/download> and open it.
|
|
27
|
-
- Linux AppImage: download the AppImage from <https://obsidian.md/download>,
|
|
28
|
-
then run:
|
|
29
|
-
|
|
30
|
-
```bash
|
|
31
|
-
chmod u+x Obsidian-<version>.AppImage
|
|
32
|
-
./Obsidian-<version>.AppImage --no-sandbox
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
- Linux Flatpak:
|
|
36
|
-
|
|
37
|
-
```bash
|
|
38
|
-
flatpak install flathub md.obsidian.Obsidian
|
|
39
|
-
flatpak run md.obsidian.Obsidian
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
Install LLM Wiki when you want an agent-native research wiki on top of the
|
|
43
|
-
exported case:
|
|
44
|
-
|
|
45
|
-
```bash
|
|
46
|
-
# Claude Code
|
|
47
|
-
claude plugin install wiki@llm-wiki
|
|
48
|
-
|
|
49
|
-
# OpenAI Codex
|
|
50
|
-
codex plugin marketplace add nvk/llm-wiki
|
|
51
|
-
# Then open /plugins, enable "LLM Wiki", and use @wiki.
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
For any other LLM agent, install the portable LLM Wiki instructions in the
|
|
55
|
-
project where the agent runs:
|
|
56
|
-
|
|
57
|
-
```bash
|
|
58
|
-
curl -sL https://raw.githubusercontent.com/nvk/llm-wiki/master/AGENTS.md \
|
|
59
|
-
> AGENTS.md
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
You do not need Obsidian or LLM Wiki to read an export. The bundle is plain
|
|
63
|
-
Markdown plus JSON, so editors and agents can consume it directly.
|
|
64
|
-
|
|
65
|
-
## Create A Case Export
|
|
66
|
-
|
|
67
|
-
Start from a Chain Insights workspace:
|
|
68
|
-
|
|
69
|
-
```bash
|
|
70
|
-
mkdir -p ~/work/chain-insights-investigations
|
|
71
|
-
cd ~/work/chain-insights-investigations
|
|
72
|
-
cia init .
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
Open a case and run investigation tools with `--case` so evidence, reports, and
|
|
76
|
-
graph artifacts stay attached to the case:
|
|
77
|
-
|
|
78
|
-
```bash
|
|
79
|
-
cia case open "Exchange deposit clustering" \
|
|
80
|
-
--tags aml,bittensor \
|
|
81
|
-
--description "Trace source funds into exchange entities"
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
After evidence exists, verify and export:
|
|
85
|
-
|
|
86
|
-
```bash
|
|
87
|
-
cia case evidence verify <case-id>
|
|
88
|
-
cia case export <case-id> --target obsidian-llmwiki --mode private
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
The default output path is:
|
|
92
|
-
|
|
93
|
-
```text
|
|
94
|
-
published/<case-slug>/
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
Inspect the bundle:
|
|
98
|
-
|
|
99
|
-
```bash
|
|
100
|
-
find published/<case-slug> -maxdepth 3 -type f | sort
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
## Output Files
|
|
104
|
-
|
|
105
|
-
The export writes:
|
|
106
|
-
|
|
107
|
-
```text
|
|
108
|
-
README.md
|
|
109
|
-
Case.md
|
|
110
|
-
Agent Console.md
|
|
111
|
-
LLMWIKI.md
|
|
112
|
-
llms.txt
|
|
113
|
-
manifest.chain-insights.json
|
|
114
|
-
graph.chain-insights.json
|
|
115
|
-
Graph.canvas
|
|
116
|
-
Entities/
|
|
117
|
-
Evidence/
|
|
118
|
-
Prompts/Codex.md
|
|
119
|
-
Prompts/Claude-Code.md
|
|
120
|
-
Prompts/ChatGPT.md
|
|
121
|
-
Sources/evidence-manifest.md
|
|
122
|
-
Sources/reports-index.md
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
Use `manifest.chain-insights.json` as the machine-readable source of truth for
|
|
126
|
-
case ID, export mode, verification status, file hashes, and redaction warnings.
|
|
127
|
-
Use `graph.chain-insights.json` for node/edge import, and `Graph.canvas` for an
|
|
128
|
-
Obsidian Canvas view of the same graph.
|
|
129
|
-
|
|
130
|
-
## Open In Obsidian
|
|
131
|
-
|
|
132
|
-
1. Open Obsidian.
|
|
133
|
-
2. Open the vault switcher.
|
|
134
|
-
3. Select **Open folder as vault**.
|
|
135
|
-
4. Choose `published/<case-slug>/`.
|
|
136
|
-
5. Start with `Case.md`, `Agent Console.md`, and `Graph.canvas`.
|
|
137
|
-
|
|
138
|
-
Obsidian treats the export directory as a normal vault. It may create a local
|
|
139
|
-
`.obsidian/` settings folder inside the export; that file is viewer state, not
|
|
140
|
-
Chain Insights evidence.
|
|
141
|
-
|
|
142
|
-
## Load Into LLM Wiki
|
|
143
|
-
|
|
144
|
-
LLM Wiki stores topic wikis under `~/wiki/` by default and can ingest local
|
|
145
|
-
files. A simple Chain Insights flow is:
|
|
146
|
-
|
|
147
|
-
```text
|
|
148
|
-
/wiki init chain-insights-cases
|
|
149
|
-
/wiki:ingest /absolute/path/to/published/<case-slug>/LLMWIKI.md --wiki chain-insights-cases
|
|
150
|
-
/wiki:ingest /absolute/path/to/published/<case-slug>/Case.md --wiki chain-insights-cases
|
|
151
|
-
/wiki:ingest /absolute/path/to/published/<case-slug>/Agent\ Console.md --wiki chain-insights-cases
|
|
152
|
-
/wiki:ingest /absolute/path/to/published/<case-slug>/manifest.chain-insights.json --wiki chain-insights-cases
|
|
153
|
-
/wiki:ingest /absolute/path/to/published/<case-slug>/graph.chain-insights.json --wiki chain-insights-cases
|
|
154
|
-
/wiki:compile --wiki chain-insights-cases
|
|
155
|
-
```
|
|
156
|
-
|
|
157
|
-
For larger cases, drop selected exported files into the topic wiki inbox and run
|
|
158
|
-
LLM Wiki ingestion from there. Keep the original `published/<case-slug>/`
|
|
159
|
-
directory unchanged so the Chain Insights manifest hashes remain auditable.
|
|
160
|
-
|
|
161
|
-
## Use With Codex, Claude Code, Or ChatGPT
|
|
162
|
-
|
|
163
|
-
For coding-agent sessions, open or attach `published/<case-slug>/` and start
|
|
164
|
-
with this instruction:
|
|
165
|
-
|
|
166
|
-
```text
|
|
167
|
-
Read Case.md, Agent Console.md, LLMWIKI.md, manifest.chain-insights.json, and
|
|
168
|
-
graph.chain-insights.json first. Treat manifest.chain-insights.json and
|
|
169
|
-
Sources/evidence-manifest.md as canonical. Preserve full blockchain addresses
|
|
170
|
-
exactly unless this is a public redacted export. Use Chain Insights MCP tools
|
|
171
|
-
for fresh graph facts when available.
|
|
172
|
-
```
|
|
173
|
-
|
|
174
|
-
For ChatGPT, upload the smallest useful subset first:
|
|
175
|
-
|
|
176
|
-
- `Case.md`
|
|
177
|
-
- `Agent Console.md`
|
|
178
|
-
- `manifest.chain-insights.json`
|
|
179
|
-
- `graph.chain-insights.json`
|
|
180
|
-
- selected files from `Evidence/` and `Entities/`
|
|
181
|
-
|
|
182
|
-
## Export Modes
|
|
183
|
-
|
|
184
|
-
Use the least-shareable mode that fits the audience:
|
|
185
|
-
|
|
186
|
-
| Mode | Use it for |
|
|
187
|
-
| --- | --- |
|
|
188
|
-
| `private` | Local analyst work. May include full addresses and sensitive notes. |
|
|
189
|
-
| `partner` | Controlled partner handoff. Review the bundle before sharing. |
|
|
190
|
-
| `public` | Demos and public writeups. Addresses are aliased and redaction metadata is written to the manifest. |
|
|
191
|
-
|
|
192
|
-
Do not share `private` exports outside the investigation team.
|
|
193
|
-
|
|
194
|
-
## MCP Tool Flow
|
|
195
|
-
|
|
196
|
-
Agents connected through the Chain Insights MCP proxy can create the same
|
|
197
|
-
bundle without shelling out:
|
|
198
|
-
|
|
199
|
-
1. Call `case_verify_evidence` for the case.
|
|
200
|
-
2. Call `case_export` with `case_id`, `target=obsidian-llmwiki`, and
|
|
201
|
-
`mode=private`.
|
|
202
|
-
3. Open the returned `outputDir`, then read `Agent Console.md` first.
|
|
203
|
-
|
|
204
|
-
The MCP tool and CLI command write the same file format.
|
package/docs/obsidian-vault.md
DELETED
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
# Obsidian Vault Workflow
|
|
2
|
-
|
|
3
|
-
Chain Insights workspaces are Obsidian-compatible investigation vaults.
|
|
4
|
-
Obsidian is the first-class human review UI, while Chain Insights case files,
|
|
5
|
-
evidence manifests, reports, graph JSON, and exports remain plain local files.
|
|
6
|
-
Obsidian plugin is not required.
|
|
7
|
-
|
|
8
|
-
## Install
|
|
9
|
-
|
|
10
|
-
Install Chain Insights:
|
|
11
|
-
|
|
12
|
-
```bash
|
|
13
|
-
npm install -g chain-insights
|
|
14
|
-
cia --version
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
Install Obsidian when you want the vault UI:
|
|
18
|
-
|
|
19
|
-
- Windows and macOS: download the installer from
|
|
20
|
-
<https://obsidian.md/download> and open it.
|
|
21
|
-
- Linux AppImage: download the AppImage from <https://obsidian.md/download>,
|
|
22
|
-
then run:
|
|
23
|
-
|
|
24
|
-
```bash
|
|
25
|
-
chmod u+x Obsidian-<version>.AppImage
|
|
26
|
-
./Obsidian-<version>.AppImage --no-sandbox
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
- Linux Flatpak:
|
|
30
|
-
|
|
31
|
-
```bash
|
|
32
|
-
flatpak install flathub md.obsidian.Obsidian
|
|
33
|
-
flatpak run md.obsidian.Obsidian
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
## Create An Investigation Vault
|
|
37
|
-
|
|
38
|
-
Create a normal local folder and initialize it:
|
|
39
|
-
|
|
40
|
-
```bash
|
|
41
|
-
mkdir -p ~/work/chain-insights-investigations
|
|
42
|
-
cd ~/work/chain-insights-investigations
|
|
43
|
-
cia init .
|
|
44
|
-
cia obsidian open .
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
If the app association is not available, open Obsidian manually, choose
|
|
48
|
-
**Open folder as vault**, and select the initialized workspace folder.
|
|
49
|
-
|
|
50
|
-
The workspace includes Chain Insights runtime metadata, case state, generated
|
|
51
|
-
vault notes, Obsidian settings, evidence, entities, canvases, reports, and
|
|
52
|
-
published handoff bundles. The files remain readable in any editor.
|
|
53
|
-
|
|
54
|
-
## Work A Case
|
|
55
|
-
|
|
56
|
-
Open a case:
|
|
57
|
-
|
|
58
|
-
```bash
|
|
59
|
-
cia case open "Exchange deposit clustering" \
|
|
60
|
-
--tags aml,bittensor \
|
|
61
|
-
--description "Trace source funds into exchange entities"
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
Run investigation tools with `--case` so evidence and report pointers attach to
|
|
65
|
-
the case:
|
|
66
|
-
|
|
67
|
-
```bash
|
|
68
|
-
cia mcp trace-victim-funds \
|
|
69
|
-
--network bittensor \
|
|
70
|
-
--victim-addresses 5GTjfJaLpBNrgybhY24NqhDnKW9r94z72RSYLxeodxJfSkj5 \
|
|
71
|
-
--case 1
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
Refresh live vault notes whenever case evidence, dossiers, or sessions change:
|
|
75
|
-
|
|
76
|
-
```bash
|
|
77
|
-
cia case vault refresh 1 --force
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
Use Obsidian for review of `Home.md`, case notes, entity notes, evidence notes,
|
|
81
|
-
and canvases. Use the CLI or MCP tools for live GraphRAG MCP reads and evidence
|
|
82
|
-
capture.
|
|
83
|
-
|
|
84
|
-
## VS Code And Agent Operator Setup
|
|
85
|
-
|
|
86
|
-
Open the same folder in VS Code, Codex, Claude Code, or another local agent.
|
|
87
|
-
The agent and Obsidian should operate over the same workspace path:
|
|
88
|
-
|
|
89
|
-
```bash
|
|
90
|
-
code .
|
|
91
|
-
codex
|
|
92
|
-
claude
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
Agents should read the workspace notes, case files, evidence manifests, graph
|
|
96
|
-
JSON, and report pointers before running new tools. When a result changes the
|
|
97
|
-
case, refresh the vault notes again:
|
|
98
|
-
|
|
99
|
-
```bash
|
|
100
|
-
cia case vault refresh 1 --force
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
## LLM Wiki Overlay
|
|
104
|
-
|
|
105
|
-
LLM Wiki is an optional overlay for agent-native retrieval and compiled case
|
|
106
|
-
knowledge. Use the live workspace for normal local work, then export a selected
|
|
107
|
-
case when you need an ingestion bundle:
|
|
108
|
-
|
|
109
|
-
```bash
|
|
110
|
-
cia case evidence verify 1
|
|
111
|
-
cia case export 1 --target obsidian-llmwiki --mode private
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
The exported `published/<case-slug>/LLMWIKI.md`,
|
|
115
|
-
`manifest.chain-insights.json`, `graph.chain-insights.json`, and Markdown notes
|
|
116
|
-
can be ingested into an LLM Wiki topic while the original workspace remains the
|
|
117
|
-
auditable source.
|
|
118
|
-
|
|
119
|
-
## Sharing
|
|
120
|
-
|
|
121
|
-
Normal local investigation work stays in the initialized vault. Export only
|
|
122
|
-
when you need sharing, partner handoff, LLM Wiki ingestion, or archive.
|
|
123
|
-
|
|
124
|
-
Use `private` only inside the investigation team. Use `partner` for controlled
|
|
125
|
-
handoff after review. Use `public` for demos and public writeups where address
|
|
126
|
-
aliasing and redaction metadata are required.
|
|
127
|
-
|
|
128
|
-
Do not share `.chain-insights/` runtime state, local credentials, wallet
|
|
129
|
-
material, debug tokens, or unreviewed private notes. Review generated bundles
|
|
130
|
-
before sending them outside the team.
|
package/skills/ci-case/SKILL.md
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: ci-case
|
|
3
|
-
description: "Manage Chain Insights investigation cases (open, activate, suspend, close)"
|
|
4
|
-
allowed-tools:
|
|
5
|
-
- Read
|
|
6
|
-
- Write
|
|
7
|
-
- Bash
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
# /ci-case
|
|
11
|
-
|
|
12
|
-
Manage investigation cases. Open new cases, switch active cases, suspend work-in-progress, or close completed investigations.
|
|
13
|
-
|
|
14
|
-
Run case commands from an initialized Chain Insights workspace. If
|
|
15
|
-
`.chain-insights/workspace.json` is missing, initialize the current project
|
|
16
|
-
folder first:
|
|
17
|
-
|
|
18
|
-
```bash
|
|
19
|
-
cia init .
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
Cases live under the workspace `cases/` directory. Global `~/.chain-insights`
|
|
23
|
-
is reserved for config, cache, wallet, and installed skills; it is not the
|
|
24
|
-
investigation root.
|
|
25
|
-
|
|
26
|
-
## Usage
|
|
27
|
-
|
|
28
|
-
- `/ci-case open <name>`: open a new workspace-local investigation case.
|
|
29
|
-
- `/ci-case status`: show active and open cases in the current workspace.
|
|
30
|
-
- `/ci-case suspend`: suspend the active workspace case.
|
|
31
|
-
- `/ci-case close <name>`: close a workspace case.
|
|
32
|
-
|
|
33
|
-
## CLI Equivalents
|
|
34
|
-
|
|
35
|
-
```bash
|
|
36
|
-
cia case open "<name>" --tags "<network-or-topic>"
|
|
37
|
-
cia case list
|
|
38
|
-
cia case show <case-number>
|
|
39
|
-
cia case session start <case-number> "session title"
|
|
40
|
-
cia case session end <case-number> --findings "..." --next-steps "..."
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
Use numbered selectors from `cia case list` when a command accepts a case.
|