openclacky 0.9.15 → 0.9.16
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.
- checksums.yaml +4 -4
- data/.clacky/skills/gem-release/SKILL.md +24 -0
- data/CHANGELOG.md +6 -0
- data/lib/clacky/skill.rb +5 -0
- data/lib/clacky/version.rb +1 -1
- data/scripts/install_simple.sh +21 -10
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5e4f19a4e5cd22ab1ecc81bfb9c62db1b458a9823699ce853d6094a24b4d3496
|
|
4
|
+
data.tar.gz: b0916deb0e5cce5d68f2454ddf35e267409869c19c26e7c203adfd8215aeabe4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fe1aeaeac77dddfbb06bfc702c4d09adbffb338b0815481902b3490ab8610448f38ec0921b8e7a6885154b722a89528f911995bb473025339890554399611094
|
|
7
|
+
data.tar.gz: ca2505ac215e2cf9430b2b5c7e9629f581108daa6798d6a379e61e8446c199def9537813218b835304c3bf412d8df452767e78fff1a39a05b7d125c93ec0a8f3
|
|
@@ -130,6 +130,24 @@ To use this skill, simply say:
|
|
|
130
130
|
|
|
131
131
|
> **Prerequisite**: `coscli` installed at `/usr/local/bin/coscli` and configured at `~/.cos.yaml`
|
|
132
132
|
|
|
133
|
+
6. **Sync scripts/ to OSS**
|
|
134
|
+
|
|
135
|
+
After updating latest.txt, sync all files in `scripts/` to OSS so users always get the latest install scripts:
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
# Upload each script file to OSS
|
|
139
|
+
for script in scripts/*; do
|
|
140
|
+
coscli cp "$script" cos://clackyai-1258723534/clacky-ai/openclacky/main/scripts/$(basename "$script")
|
|
141
|
+
done
|
|
142
|
+
|
|
143
|
+
# Verify one of the key scripts
|
|
144
|
+
curl -fsSL https://oss.1024code.com/clacky-ai/openclacky/main/scripts/install.sh | head -5
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
This ensures `scripts/install.sh`, `scripts/install_simple.sh`, `scripts/install.ps1`, `scripts/uninstall.sh` and any future scripts are all mirrored on OSS.
|
|
148
|
+
|
|
149
|
+
> **Prerequisite**: Same `coscli` setup as above
|
|
150
|
+
|
|
133
151
|
5. **Verify Publication**
|
|
134
152
|
- Check gem appears on RubyGems.org
|
|
135
153
|
- Verify version information is correct
|
|
@@ -319,6 +337,12 @@ coscli cp openclacky-X.Y.Z.gem cos://clackyai-1258723534/openclacky/openclacky-X
|
|
|
319
337
|
echo "X.Y.Z" > /tmp/latest.txt
|
|
320
338
|
coscli cp /tmp/latest.txt cos://clackyai-1258723534/openclacky/latest.txt
|
|
321
339
|
curl -fsSL https://oss.1024code.com/openclacky/latest.txt # verify
|
|
340
|
+
|
|
341
|
+
# Sync scripts/ to OSS
|
|
342
|
+
for script in scripts/*; do
|
|
343
|
+
coscli cp "$script" cos://clackyai-1258723534/clacky-ai/openclacky/main/scripts/$(basename "$script")
|
|
344
|
+
done
|
|
345
|
+
curl -fsSL https://oss.1024code.com/clacky-ai/openclacky/main/scripts/install.sh | head -5 # verify
|
|
322
346
|
```
|
|
323
347
|
|
|
324
348
|
## File Locations
|
data/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.9.16] - 2026-03-27
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
- **Skill templates now expand `${ENV_VAR}` placeholders**: skill SKILL.md files can reference environment variables like `${CLACKY_SERVER_HOST}` and `${CLACKY_SERVER_PORT}` — they are now automatically substituted at load time (unknown variables are left as-is)
|
|
14
|
+
- **gemrc restored to default when switching from CN to global network**: the install script now correctly restores the system gemrc when the user switches from China mirror mode to the global network, preventing stale mirror configuration from persisting
|
|
15
|
+
|
|
10
16
|
## [0.9.15] - 2026-03-27
|
|
11
17
|
|
|
12
18
|
### Improved
|
data/lib/clacky/skill.rb
CHANGED
|
@@ -527,6 +527,11 @@ module Clacky
|
|
|
527
527
|
# @param context [Hash]
|
|
528
528
|
# @return [String]
|
|
529
529
|
def expand_templates(content, context)
|
|
530
|
+
# Shell-style ${VAR} substitution from ENV — handles variables like
|
|
531
|
+
# ${CLACKY_SERVER_PORT}, ${CLACKY_SERVER_HOST} used in SKILL.md files.
|
|
532
|
+
# Unknown variables are left as-is (no substitution).
|
|
533
|
+
content = content.gsub(/\$\{([A-Z_][A-Z0-9_]*)\}/) { ENV[$1] || $& }
|
|
534
|
+
|
|
530
535
|
return content if context.nil? || context.empty?
|
|
531
536
|
|
|
532
537
|
# Build a lightweight binding that exposes each context key as a local method
|
data/lib/clacky/version.rb
CHANGED
data/scripts/install_simple.sh
CHANGED
|
@@ -277,18 +277,31 @@ check_ruby() {
|
|
|
277
277
|
# Configure gem source (CN mirror if needed)
|
|
278
278
|
# --------------------------------------------------------------------------
|
|
279
279
|
configure_gem_source() {
|
|
280
|
-
[ "$USE_CN_MIRRORS" = true ] || return 0
|
|
281
|
-
|
|
282
280
|
local gemrc="$HOME/.gemrc"
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
[ -f "$gemrc" ] &&
|
|
287
|
-
|
|
281
|
+
|
|
282
|
+
if [ "$USE_CN_MIRRORS" = true ]; then
|
|
283
|
+
# CN: point gem source to Aliyun mirror
|
|
284
|
+
if [ -f "$gemrc" ] && grep -q "${CN_RUBYGEMS_URL}" "$gemrc" 2>/dev/null; then
|
|
285
|
+
print_success "gem source already → ${CN_RUBYGEMS_URL}"
|
|
286
|
+
else
|
|
287
|
+
[ -f "$gemrc" ] && mv "$gemrc" "$HOME/.gemrc_clackybak"
|
|
288
|
+
cat > "$gemrc" <<GEMRC
|
|
288
289
|
:sources:
|
|
289
290
|
- ${CN_RUBYGEMS_URL}
|
|
290
291
|
GEMRC
|
|
291
|
-
|
|
292
|
+
print_success "gem source → ${CN_RUBYGEMS_URL}"
|
|
293
|
+
fi
|
|
294
|
+
else
|
|
295
|
+
# Global: restore original gemrc if we were the ones who changed it
|
|
296
|
+
if [ -f "$gemrc" ] && grep -q "${CN_RUBYGEMS_URL}" "$gemrc" 2>/dev/null; then
|
|
297
|
+
if [ -f "$HOME/.gemrc_clackybak" ]; then
|
|
298
|
+
mv "$HOME/.gemrc_clackybak" "$gemrc"
|
|
299
|
+
print_info "gem source restored from backup"
|
|
300
|
+
else
|
|
301
|
+
rm "$gemrc"
|
|
302
|
+
print_info "gem source restored to default"
|
|
303
|
+
fi
|
|
304
|
+
fi
|
|
292
305
|
fi
|
|
293
306
|
}
|
|
294
307
|
|
|
@@ -574,8 +587,6 @@ main() {
|
|
|
574
587
|
print_info "Please install Ruby >= 2.6.0 manually and run: gem install openclacky"
|
|
575
588
|
exit 1
|
|
576
589
|
fi
|
|
577
|
-
# WSL: auto-trust Windows system32 to suppress mise warnings
|
|
578
|
-
export MISE_TRUSTED_CONFIG_PATHS="/mnt/c/Windows/system32"
|
|
579
590
|
elif [ "$OS" != "macOS" ]; then
|
|
580
591
|
print_error "Unsupported OS: $OS"
|
|
581
592
|
print_info "Please install Ruby >= 2.6.0 manually and run: gem install openclacky"
|