cli-calctool 1.0.3 → 1.0.4
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/cli.mjs +6 -8
- package/package.json +1 -1
- package/skill/SKILL.md +1 -1
- package/skill/skill.json +1 -1
package/cli.mjs
CHANGED
|
@@ -128,24 +128,22 @@ async function install(explicit) {
|
|
|
128
128
|
const previous = readMeta(target)
|
|
129
129
|
await copyFile(join(PACKAGE_SKILL_DIR, 'SKILL.md'), join(target, 'SKILL.md'))
|
|
130
130
|
await copyFile(join(PACKAGE_SKILL_DIR, 'skill.json'), join(target, 'skill.json'))
|
|
131
|
+
const installedVersion = JSON.parse(readFileSync(join(target, 'skill.json'), 'utf8')).version
|
|
132
|
+
if (!installedVersion) throw new Error('skill.json is missing version')
|
|
131
133
|
const localVersion = process.env.npm_package_version ?? ''
|
|
132
|
-
const latest = await fetchLatestVersion()
|
|
133
134
|
await writeFile(join(target, INSTALL_META), `${JSON.stringify({
|
|
134
135
|
source: 'KKyA6xljUX',
|
|
135
136
|
slug: 'calctool',
|
|
136
|
-
version:
|
|
137
|
+
version: installedVersion,
|
|
137
138
|
packageVersion: localVersion,
|
|
138
139
|
endpoint: ENDPOINT,
|
|
139
140
|
installedAt: new Date().toISOString(),
|
|
140
141
|
}, null, 2)}\n`)
|
|
141
|
-
if (previous?.version &&
|
|
142
|
+
if (previous?.version && previous.version !== installedVersion) {
|
|
142
143
|
console.log(`calctool skill updated: ${target}`)
|
|
143
|
-
console.log(` ⤴ ${previous.version} → ${
|
|
144
|
+
console.log(` ⤴ ${previous.version} → ${installedVersion}`)
|
|
144
145
|
} else {
|
|
145
|
-
console.log(`calctool skill installed: ${target}
|
|
146
|
-
}
|
|
147
|
-
if (latest?.version) {
|
|
148
|
-
console.log(`Latest version on cli.tax: ${latest.version}`)
|
|
146
|
+
console.log(`calctool skill installed: ${target} (${installedVersion})`)
|
|
149
147
|
}
|
|
150
148
|
console.log('Next: return to your IDE conversation and describe the calculator tool you want.')
|
|
151
149
|
console.log('The IDE agent reads the installed SKILL.md, asks you the intake questions,')
|
package/package.json
CHANGED
package/skill/SKILL.md
CHANGED
|
@@ -53,7 +53,7 @@ description: '按需生成「万能计算工具」:用户输入一个领域需
|
|
|
53
53
|
|
|
54
54
|
## Official catalog hops
|
|
55
55
|
|
|
56
|
-
After `capabilities`, read `officialCatalog`. Default allowlist is official skills. Call another skill only when its capability matches this demand. User-named extras enter only when the user names them; then confirm that skill's capabilities before invoke. Do not call chain-unrelated or self-extended skills.
|
|
56
|
+
After `capabilities`, read `officialCatalog`. Default allowlist is official skills. Call another skill only when its capability matches this demand. User-named extras enter only when the user names them; then confirm that skill's capabilities before invoke. Do not call chain-unrelated or self-extended skills. Image npm package is `cli-images`. Quick start: `npx cli-images@latest install`. Never install `cli-image`: that is a third-party terminal image viewer, unrelated to CLI.Tax.
|
|
57
57
|
|
|
58
58
|
## 核心原则
|
|
59
59
|
|