chain-insights 0.60.0 → 0.61.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/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 PUBLIC_SKILL_NAMES) {
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()) {
@@ -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-DQZ2gox4.cjs"));
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-DQZ2gox4.cjs"));
1735
+ const { readPackagedSkillRules } = await Promise.resolve().then(() => require("./skill-refresh-FXhQpW94.cjs"));
1736
1736
  return {
1737
1737
  content: [{
1738
1738
  type: "text",
@@ -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-Dya9LQKN.mjs");
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-Dya9LQKN.mjs");
1731
+ const { readPackagedSkillRules } = await import("./skill-refresh-I5MSULwP.mjs");
1732
1732
  return {
1733
1733
  content: [{
1734
1734
  type: "text",