chain-insights 0.60.0 → 0.62.1
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 +6 -1
- package/bin/install.cjs +18 -2
- package/dist/mcp-proxy.cjs +4 -4
- package/dist/mcp-proxy.mjs +4 -4
- package/dist/mcp-proxy.mjs.map +1 -1
- package/dist/{skill-refresh-DQZ2gox4.cjs → skill-refresh-FXhQpW94.cjs} +105 -40
- package/dist/skill-refresh-I5MSULwP.mjs +214 -0
- package/dist/skill-refresh-I5MSULwP.mjs.map +1 -0
- package/docs/contributing.md +11 -3
- package/docs/graph-query-compatibility.md +1 -0
- package/docs/graph-tools.md +67 -8
- package/docs/mcp-proxy.md +3 -1
- package/package.json +1 -1
- package/skills/chain-insights-cypher/SKILL.md +67 -2
- package/skills/chain-insights-virtuals/SKILL.md +156 -0
- package/skills/chain-insights-virtuals/agents/openai.yaml +4 -0
- package/skills/chain-insights-virtuals/reference.md +209 -0
- package/dist/skill-refresh-Dya9LQKN.mjs +0 -149
- package/dist/skill-refresh-Dya9LQKN.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -182,7 +182,12 @@ an address instead. A thing has one name on every layer: `address`, `tx_id`,
|
|
|
182
182
|
|
|
183
183
|
Agent installs include `chain-insights-cypher` for graph-query dialect rules,
|
|
184
184
|
one query for each kind of graph search, and how to find the fields of the
|
|
185
|
-
EVM / Robinhood graph.
|
|
185
|
+
EVM / Robinhood graph. Protocol skills sit beside it and load only when a
|
|
186
|
+
question names their protocol:
|
|
187
|
+
|
|
188
|
+
- `chain-insights-virtuals`: Virtuals Protocol agents on robinhood: who
|
|
189
|
+
created an agent, who is behind a creator wallet, whether an agent was
|
|
190
|
+
dumped, and whether its buyers form a cartel.
|
|
186
191
|
|
|
187
192
|
## Billing: Billable Units
|
|
188
193
|
|
package/bin/install.cjs
CHANGED
|
@@ -49,8 +49,9 @@ const homeDir = os.homedir()
|
|
|
49
49
|
const dataDir = path.join(homeDir, '.chain-insights')
|
|
50
50
|
const configPath = path.join(dataDir, 'config.json')
|
|
51
51
|
const srcSkillsDir = path.join(__dirname, '..', 'skills')
|
|
52
|
-
const PUBLIC_SKILL_NAMES = Object.freeze(['chain-insights-cypher'])
|
|
53
52
|
const SKILL_VERSION_FILE = '.chain-insights-version'
|
|
53
|
+
// The core skill every install carries. Protocol skills sit beside it.
|
|
54
|
+
const CORE_SKILL_NAME = 'chain-insights-cypher'
|
|
54
55
|
const RETIRED_SKILL_NAMES = Object.freeze([
|
|
55
56
|
'chain-insights-address-risk',
|
|
56
57
|
'chain-insights-bittensor-cypher',
|
|
@@ -63,6 +64,21 @@ const RETIRED_SKILL_NAMES = Object.freeze([
|
|
|
63
64
|
'test-chain-insights-graph',
|
|
64
65
|
])
|
|
65
66
|
|
|
67
|
+
// The shipped skills, read from the package's own skills/ at run time: the core
|
|
68
|
+
// skill, then every protocol skill. A shipped skill is a directory named
|
|
69
|
+
// chain-insights-* that holds a SKILL.md. src/skill-refresh.ts and
|
|
70
|
+
// scripts/sync-plugin-skills.mjs apply the same rule.
|
|
71
|
+
function publicSkillNames(skillsDir) {
|
|
72
|
+
const names = fs
|
|
73
|
+
.readdirSync(skillsDir, { withFileTypes: true })
|
|
74
|
+
.filter((entry) => entry.isDirectory() && /^chain-insights-[a-z0-9-]+$/.test(entry.name))
|
|
75
|
+
.map((entry) => entry.name)
|
|
76
|
+
.filter((name) => !RETIRED_SKILL_NAMES.includes(name))
|
|
77
|
+
.filter((name) => fs.existsSync(path.join(skillsDir, name, 'SKILL.md')))
|
|
78
|
+
.sort()
|
|
79
|
+
return [CORE_SKILL_NAME, ...names.filter((name) => name !== CORE_SKILL_NAME)]
|
|
80
|
+
}
|
|
81
|
+
|
|
66
82
|
// Determine skills targets
|
|
67
83
|
const skillsTargets = []
|
|
68
84
|
if (hasClaude)
|
|
@@ -110,7 +126,7 @@ function copyCommandsAsClaudeSkills(srcDir, targetDir) {
|
|
|
110
126
|
fs.rmSync(path.join(targetDir, skillName), { recursive: true, force: true })
|
|
111
127
|
}
|
|
112
128
|
|
|
113
|
-
for (const skillName of
|
|
129
|
+
for (const skillName of publicSkillNames(srcDir)) {
|
|
114
130
|
const skillSrc = path.join(srcDir, skillName)
|
|
115
131
|
const skillDest = path.join(targetDir, skillName)
|
|
116
132
|
if (!fs.existsSync(skillSrc) || !fs.statSync(skillSrc).isDirectory()) {
|
package/dist/mcp-proxy.cjs
CHANGED
|
@@ -222,7 +222,7 @@ const ROUTING_HANDOFF = "The layers hand each other keys, and each key keeps its
|
|
|
222
222
|
* A whole-chain question is a time-bounded topology search, sent only when the
|
|
223
223
|
* family of its link type is close to the head; a refusal names the family.
|
|
224
224
|
*/
|
|
225
|
-
const ROUTING_NOT_SERVED = "A question about the whole chain (recent activity, the biggest senders, a top list) is a `USE topology` search: bound it by time with `f.last_seen_timestamp >= <epoch ms>` on the `FLOWS_TO` link, then sort and `LIMIT`. A search has 10 s. Read `Head` first (`USE chain MATCH (h:Head) RETURN h.behind_money, h.behind_dex`, under a second): a `FLOWS_TO` search is sent when `behind_money` is at most 100000; a `SWAPPED`, `ADDED_LIQUIDITY` or `REMOVED_LIQUIDITY` search when `behind_dex` is at most 100000 (100000 blocks is a few hours: a robinhood block is about a tenth of a second apart from the next). When the family is further behind, the search cannot finish, so do not send it: say which family, how many blocks, and ask for an address. On a server whose Head has no `behind_money`, read `h.graph_blocks_behind` and hold it to the same limit. Never turn the block count into days or hours by head. To say how fresh the data is, give the newest `_utc` time you read on the layer you used: a family's lag counts its slowest layer, and the links of an address and the facts rows are often newer than it. If the server refuses the search with `anchor_missing` or `family_behind`, or stops it with `query_timeout`, it cannot search the whole chain now: say so in one line, name the family the refusal names, and ask for an address or drop the link type that is behind. A narrower window times out the same way, so do not send it again.";
|
|
225
|
+
const ROUTING_NOT_SERVED = "A question about the whole chain (recent activity, the biggest senders, a top list) is a `USE topology` search: bound it by time with `f.last_seen_timestamp >= <epoch ms>` on the `FLOWS_TO` link, then sort and `LIMIT`. A search has 10 s. Read `Head` first (`USE chain MATCH (h:Head) RETURN h.behind_money, h.behind_dex, h.behind_transfers`, under a second): a `FLOWS_TO` search is sent when `behind_money` is at most 100000; a `SWAPPED`, `ADDED_LIQUIDITY` or `REMOVED_LIQUIDITY` search when `behind_dex` is at most 100000; a `TRANSFERRED` search when `behind_transfers` is at most 100000 (100000 blocks is a few hours: a robinhood block is about a tenth of a second apart from the next). When the family is further behind, the search cannot finish, so do not send it: say which family, how many blocks, and ask for an address. On a server whose Head has no `behind_money`, read `h.graph_blocks_behind` and hold it to the same limit. On a server whose Head has no `behind_transfers`, it serves no `TRANSFERRED` link: send no `TRANSFERRED` search. Never turn the block count into days or hours by head. To say how fresh the data is, give the newest `_utc` time you read on the layer you used: a family's lag counts its slowest layer, and the links of an address and the facts rows are often newer than it. If the server refuses the search with `anchor_missing` or `family_behind`, or stops it with `query_timeout`, it cannot search the whole chain now: say so in one line, name the family the refusal names, and ask for an address or drop the link type that is behind. A narrower window times out the same way, so do not send it again.";
|
|
226
226
|
/** What a refusal carries, and which part of it decides the move. */
|
|
227
227
|
const MOVE_INTRO = "A refused, killed, busy or failed query comes back with `error_detail`: `code`, `rule`, `class`, `fix` and `example`. The `class` decides your next move.";
|
|
228
228
|
/** The move for each class of the refusal envelope. */
|
|
@@ -1362,9 +1362,9 @@ async function createProxy() {
|
|
|
1362
1362
|
return;
|
|
1363
1363
|
}
|
|
1364
1364
|
if (process.env["CHAIN_INSIGHTS_SKILL_REFRESH"] !== "0") try {
|
|
1365
|
-
const { refreshInstalledSkills } = await Promise.resolve().then(() => require("./skill-refresh-
|
|
1365
|
+
const { refreshInstalledSkills } = await Promise.resolve().then(() => require("./skill-refresh-FXhQpW94.cjs"));
|
|
1366
1366
|
const refresh = refreshInstalledSkills(require_print_result.PACKAGE_VERSION);
|
|
1367
|
-
if (refresh.refreshed.length > 0 || refresh.failed.length > 0) await logger.info("skills.refresh", {
|
|
1367
|
+
if (refresh.refreshed.length > 0 || refresh.installed.length > 0 || refresh.failed.length > 0) await logger.info("skills.refresh", {
|
|
1368
1368
|
version: require_print_result.PACKAGE_VERSION,
|
|
1369
1369
|
...refresh
|
|
1370
1370
|
});
|
|
@@ -1732,7 +1732,7 @@ async function createProxy() {
|
|
|
1732
1732
|
openWorldHint: false
|
|
1733
1733
|
}
|
|
1734
1734
|
}, async () => {
|
|
1735
|
-
const { readPackagedSkillRules } = await Promise.resolve().then(() => require("./skill-refresh-
|
|
1735
|
+
const { readPackagedSkillRules } = await Promise.resolve().then(() => require("./skill-refresh-FXhQpW94.cjs"));
|
|
1736
1736
|
return {
|
|
1737
1737
|
content: [{
|
|
1738
1738
|
type: "text",
|
package/dist/mcp-proxy.mjs
CHANGED
|
@@ -218,7 +218,7 @@ const ROUTING_HANDOFF = "The layers hand each other keys, and each key keeps its
|
|
|
218
218
|
* A whole-chain question is a time-bounded topology search, sent only when the
|
|
219
219
|
* family of its link type is close to the head; a refusal names the family.
|
|
220
220
|
*/
|
|
221
|
-
const ROUTING_NOT_SERVED = "A question about the whole chain (recent activity, the biggest senders, a top list) is a `USE topology` search: bound it by time with `f.last_seen_timestamp >= <epoch ms>` on the `FLOWS_TO` link, then sort and `LIMIT`. A search has 10 s. Read `Head` first (`USE chain MATCH (h:Head) RETURN h.behind_money, h.behind_dex`, under a second): a `FLOWS_TO` search is sent when `behind_money` is at most 100000; a `SWAPPED`, `ADDED_LIQUIDITY` or `REMOVED_LIQUIDITY` search when `behind_dex` is at most 100000 (100000 blocks is a few hours: a robinhood block is about a tenth of a second apart from the next). When the family is further behind, the search cannot finish, so do not send it: say which family, how many blocks, and ask for an address. On a server whose Head has no `behind_money`, read `h.graph_blocks_behind` and hold it to the same limit. Never turn the block count into days or hours by head. To say how fresh the data is, give the newest `_utc` time you read on the layer you used: a family's lag counts its slowest layer, and the links of an address and the facts rows are often newer than it. If the server refuses the search with `anchor_missing` or `family_behind`, or stops it with `query_timeout`, it cannot search the whole chain now: say so in one line, name the family the refusal names, and ask for an address or drop the link type that is behind. A narrower window times out the same way, so do not send it again.";
|
|
221
|
+
const ROUTING_NOT_SERVED = "A question about the whole chain (recent activity, the biggest senders, a top list) is a `USE topology` search: bound it by time with `f.last_seen_timestamp >= <epoch ms>` on the `FLOWS_TO` link, then sort and `LIMIT`. A search has 10 s. Read `Head` first (`USE chain MATCH (h:Head) RETURN h.behind_money, h.behind_dex, h.behind_transfers`, under a second): a `FLOWS_TO` search is sent when `behind_money` is at most 100000; a `SWAPPED`, `ADDED_LIQUIDITY` or `REMOVED_LIQUIDITY` search when `behind_dex` is at most 100000; a `TRANSFERRED` search when `behind_transfers` is at most 100000 (100000 blocks is a few hours: a robinhood block is about a tenth of a second apart from the next). When the family is further behind, the search cannot finish, so do not send it: say which family, how many blocks, and ask for an address. On a server whose Head has no `behind_money`, read `h.graph_blocks_behind` and hold it to the same limit. On a server whose Head has no `behind_transfers`, it serves no `TRANSFERRED` link: send no `TRANSFERRED` search. Never turn the block count into days or hours by head. To say how fresh the data is, give the newest `_utc` time you read on the layer you used: a family's lag counts its slowest layer, and the links of an address and the facts rows are often newer than it. If the server refuses the search with `anchor_missing` or `family_behind`, or stops it with `query_timeout`, it cannot search the whole chain now: say so in one line, name the family the refusal names, and ask for an address or drop the link type that is behind. A narrower window times out the same way, so do not send it again.";
|
|
222
222
|
/** What a refusal carries, and which part of it decides the move. */
|
|
223
223
|
const MOVE_INTRO = "A refused, killed, busy or failed query comes back with `error_detail`: `code`, `rule`, `class`, `fix` and `example`. The `class` decides your next move.";
|
|
224
224
|
/** The move for each class of the refusal envelope. */
|
|
@@ -1358,9 +1358,9 @@ async function createProxy() {
|
|
|
1358
1358
|
return;
|
|
1359
1359
|
}
|
|
1360
1360
|
if (process.env["CHAIN_INSIGHTS_SKILL_REFRESH"] !== "0") try {
|
|
1361
|
-
const { refreshInstalledSkills } = await import("./skill-refresh-
|
|
1361
|
+
const { refreshInstalledSkills } = await import("./skill-refresh-I5MSULwP.mjs");
|
|
1362
1362
|
const refresh = refreshInstalledSkills(PACKAGE_VERSION);
|
|
1363
|
-
if (refresh.refreshed.length > 0 || refresh.failed.length > 0) await logger.info("skills.refresh", {
|
|
1363
|
+
if (refresh.refreshed.length > 0 || refresh.installed.length > 0 || refresh.failed.length > 0) await logger.info("skills.refresh", {
|
|
1364
1364
|
version: PACKAGE_VERSION,
|
|
1365
1365
|
...refresh
|
|
1366
1366
|
});
|
|
@@ -1728,7 +1728,7 @@ async function createProxy() {
|
|
|
1728
1728
|
openWorldHint: false
|
|
1729
1729
|
}
|
|
1730
1730
|
}, async () => {
|
|
1731
|
-
const { readPackagedSkillRules } = await import("./skill-refresh-
|
|
1731
|
+
const { readPackagedSkillRules } = await import("./skill-refresh-I5MSULwP.mjs");
|
|
1732
1732
|
return {
|
|
1733
1733
|
content: [{
|
|
1734
1734
|
type: "text",
|