@ainova-systems/intelligence 0.11.0-rc.2 → 0.11.0-rc.3
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/commands/registry.sh +13 -0
- package/cli/lib/cli-common.sh +5 -1
- package/cli/lib/manifest.sh +10 -3
- package/cli/lib/semver.sh +5 -2
- package/package.json +1 -1
package/cli/commands/registry.sh
CHANGED
|
@@ -35,6 +35,19 @@ case "$sub" in
|
|
|
35
35
|
{ [ -n "$scope" ] && [ -n "$url" ]; } || die "usage: intelligence registry add @scope <registry-repo-url>"
|
|
36
36
|
case "$scope" in @*/*) die "bind a scope (@acme), not a package name" ;; @*) ;; *) die "scope must start with @" ;; esac
|
|
37
37
|
require_v2
|
|
38
|
+
# Validate at bind time, not at the first `add`: a registry is a git
|
|
39
|
+
# repo holding index.yaml, and a URL pointing at anything else (a pack
|
|
40
|
+
# repo, a typo) is a mistake worth hearing about now. The binding is
|
|
41
|
+
# still written — the registry may simply not be reachable yet.
|
|
42
|
+
index="$(_fetch_index "${url#git+}")"
|
|
43
|
+
if [ -n "$index" ]; then
|
|
44
|
+
n="$(qmap_keys "$index" "packages" | grep -c . || true)"
|
|
45
|
+
echo " index.yaml reachable — $n package(s) offered"
|
|
46
|
+
else
|
|
47
|
+
echo " WARN: no index.yaml found at $url — 'intelligence add $scope/<name>' will fail until it has one." >&2
|
|
48
|
+
echo " A registry is a git repo with index.yaml at its root (see the README of" >&2
|
|
49
|
+
echo " https://github.com/ainova-systems/intelligence-registry for the format)." >&2
|
|
50
|
+
fi
|
|
38
51
|
qmap_set_value "$IP_ROOT/intelligence.yaml" "registries" "$scope" "$url"
|
|
39
52
|
echo "$scope -> $url"
|
|
40
53
|
;;
|
package/cli/lib/cli-common.sh
CHANGED
|
@@ -102,7 +102,11 @@ stage_engine_content() {
|
|
|
102
102
|
rm -rf "$store"
|
|
103
103
|
mkdir -p "$store"
|
|
104
104
|
local d s name skip
|
|
105
|
-
|
|
105
|
+
# `scripts` travels too: engine-shipped skills reference `<module>/scripts/…`
|
|
106
|
+
# (adapters, docs) and `<module>` resolves here, so the paths they hand an
|
|
107
|
+
# agent must exist. Running that sync.sh directly is harmless — outside CLI
|
|
108
|
+
# mode it fails closed rather than generating against the wrong layout.
|
|
109
|
+
for d in rules agents docs scripts; do
|
|
106
110
|
[ -d "$IS_ENGINE_DIR/$d" ] && cp -R "$IS_ENGINE_DIR/$d" "$store/$d"
|
|
107
111
|
done
|
|
108
112
|
if [ -d "$IS_ENGINE_DIR/skills" ]; then
|
package/cli/lib/manifest.sh
CHANGED
|
@@ -134,10 +134,13 @@ qmap_set() {
|
|
|
134
134
|
if (c > 0 && substr(line, 1, c - 1) == field) { print fieldline(); done = 1; next }
|
|
135
135
|
print; next
|
|
136
136
|
}
|
|
137
|
-
{ print }
|
|
137
|
+
{ last = $0; print }
|
|
138
138
|
END {
|
|
139
139
|
flush_key(); flush_block()
|
|
140
140
|
if (!blockseen) {
|
|
141
|
+
# A block appended to a file that does not end blank would
|
|
142
|
+
# otherwise glue itself onto the previous section.
|
|
143
|
+
if (last != "") print ""
|
|
141
144
|
print block ":"
|
|
142
145
|
print keyline()
|
|
143
146
|
print fieldline()
|
|
@@ -159,10 +162,14 @@ qmap_set_value() {
|
|
|
159
162
|
s = substr($0, 4); q = index(s, "\"")
|
|
160
163
|
if (q > 0 && substr(s, 1, q - 1) == key) { print entry(); done = 1; next }
|
|
161
164
|
}
|
|
162
|
-
{ print }
|
|
165
|
+
{ last = $0; print }
|
|
163
166
|
END {
|
|
164
167
|
if (inb && !done) { print entry(); done = 1 }
|
|
165
|
-
if (!blockseen) {
|
|
168
|
+
if (!blockseen) {
|
|
169
|
+
if (last != "") print ""
|
|
170
|
+
print block ":"
|
|
171
|
+
print entry()
|
|
172
|
+
}
|
|
166
173
|
}
|
|
167
174
|
'
|
|
168
175
|
}
|
package/cli/lib/semver.sh
CHANGED
|
@@ -39,9 +39,12 @@ semver_match() {
|
|
|
39
39
|
""|"*"|latest) return 0 ;;
|
|
40
40
|
esac
|
|
41
41
|
local op="" base="$range"
|
|
42
|
+
# Both strip patterns are quoted: an unquoted `~` in ${range#~} is a tilde
|
|
43
|
+
# EXPANSION (it becomes $HOME), so the prefix never strips and every
|
|
44
|
+
# `~x.y.z` range silently matches nothing.
|
|
42
45
|
case "$range" in
|
|
43
|
-
"^"*) op="^"; base="${range
|
|
44
|
-
"~"*) op="~"; base="${range
|
|
46
|
+
"^"*) op="^"; base="${range#'^'}" ;;
|
|
47
|
+
"~"*) op="~"; base="${range#'~'}" ;;
|
|
45
48
|
esac
|
|
46
49
|
base="${base#v}"
|
|
47
50
|
semver_is_stable "$base" || return 1
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ainova-systems/intelligence",
|
|
3
|
-
"version": "0.11.0-rc.
|
|
3
|
+
"version": "0.11.0-rc.3",
|
|
4
4
|
"description": "Build, version and distribute AI agent intelligence across your organization — one CLI, versioned Intelligence Packages, and a sync engine for Claude Code, Cursor, Copilot, Codex, Pi and OpenCode.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"intelligence": "bin/intelligence.js"
|