diff --git a/lib/pack-census-fragments.jq b/lib/pack-census-fragments.jq index 163d95b..d079b1d 100644 --- a/lib/pack-census-fragments.jq +++ b/lib/pack-census-fragments.jq @@ -1,13 +1,11 @@ # lib/pack-census-fragments.jq โ fragment invariants (lib/pack-census.sh). -# $m = manifests [{id,on}], $deny = space-separated profiles that deny the -# two higgsfield connectors; inputs = lib/profiles/*.json. Prints RED lines, +# $m = manifests [{id,on}]; inputs = lib/profiles/*.json. Prints RED lines, # and WARN lines for a pack id with no manifest. def name_of: input_filename | sub(".*/"; ""); def dn: [(.deniedMcpServers // [])[] | .serverName] | sort; [inputs | {f: name_of, frag: .}] as $all | ($all[] | select(.f == "full.json") | .frag) as $full | ($full.enabledPlugins | keys) as $keys -| ($deny | split(" ") | map(. + ".json")) as $deny_files | ($m | map({key: .id, value: .on}) | from_entries) as $mdef | ($m | map(.id)) as $mids | ( [$all[] | {f, ep: .frag.enabledPlugins, d: (.frag | dn)}] as $s @@ -25,12 +23,6 @@ def dn: [(.deniedMcpServers // [])[] | .serverName] | sort; ( ["example-skills@anthropic-agent-skills", "brightdata-plugin@synced"][] | select($g.enabledPlugins[.] != false) | "RED lib/profiles/\($f): \(.) must be false" ), - ( (["claude.ai higgsfield", "claude.ai Higgsfield AI"] | sort) as $both - | if (($deny_files | index($f)) != null) and (($g | dn) != $both) - then "RED lib/profiles/\($f): must deny both higgsfield connectors" - elif (($deny_files | index($f)) == null) and (($g | dn) | length) > 0 - then "RED lib/profiles/\($f): must deny no connector" - else empty end ), ( if $f == "full.json" then ($mdef | to_entries[] | select($g.enabledPlugins[.key] != .value) | "RED lib/profiles/full.json: \(.key) is \($g.enabledPlugins[.key])" diff --git a/lib/pack-census.sh b/lib/pack-census.sh index 82cae4b..ec3df47 100755 --- a/lib/pack-census.sh +++ b/lib/pack-census.sh @@ -11,8 +11,7 @@ # flat and in a pack; no retired gstack name (lib/gstack-removed.list). # 2. fragments lib/profiles/*.json: same key set as full.json; model-router # + security-guidance true, example-skills + brightdata false -# everywhere; the two higgsfield connectors denied on exactly -# DENY_PROFILES; full.json packs = manifest defaults. +# everywhere; full.json packs = manifest defaults. # 3. no reader of the old layout left (scope and terms in check_citers). # Shared by make test (lib/tests/pack-census.test.sh) and doctor.sh. # Prints RED/WARN lines, then `PACKS OK
packs skills` when no RED.
@@ -35,7 +34,6 @@ PROFILES="$REPO/lib/profiles"
REMOVED="$REPO/lib/gstack-removed.list"
HERE="$(cd -P "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
FRAG_JQ="$HERE/pack-census-fragments.jq"
-DENY_PROFILES="audit dev minimal qa seo" # spec ยง 2
red=0; packs=0; skills=0
declare -A seen
red() { echo "RED $*"; red=1; }
@@ -75,7 +73,7 @@ check_entry() { # $1 pack dir, $2 entry path
check_fragments() {
local files=("$PROFILES"/*.json) full="$PROFILES/full.json" out
[ -f "$full" ] || { red "lib/profiles/full.json missing"; return; }
- out="$(jq -rn --arg deny "$DENY_PROFILES" --argjson m "$(manifests_json)" \
+ out="$(jq -rn --argjson m "$(manifests_json)" \
-f "$FRAG_JQ" "${files[@]}")" \
|| { red "lib/profiles: a fragment is not JSON"; return; }
[ -z "$out" ] || echo "$out"
diff --git a/lib/profiles/audit.json b/lib/profiles/audit.json
index 30ccb0f..57bc508 100644
--- a/lib/profiles/audit.json
+++ b/lib/profiles/audit.json
@@ -15,13 +15,5 @@
"pr-review-toolkit@claude-code-plugins": true,
"example-skills@anthropic-agent-skills": false,
"brightdata-plugin@synced": false
- },
- "deniedMcpServers": [
- {
- "serverName": "claude.ai higgsfield"
- },
- {
- "serverName": "claude.ai Higgsfield AI"
- }
- ]
+ }
}
diff --git a/lib/profiles/dev.json b/lib/profiles/dev.json
index 829bef0..a927e03 100644
--- a/lib/profiles/dev.json
+++ b/lib/profiles/dev.json
@@ -15,13 +15,5 @@
"pr-review-toolkit@claude-code-plugins": false,
"example-skills@anthropic-agent-skills": false,
"brightdata-plugin@synced": false
- },
- "deniedMcpServers": [
- {
- "serverName": "claude.ai higgsfield"
- },
- {
- "serverName": "claude.ai Higgsfield AI"
- }
- ]
+ }
}
diff --git a/lib/profiles/minimal.json b/lib/profiles/minimal.json
index d98652a..a182983 100644
--- a/lib/profiles/minimal.json
+++ b/lib/profiles/minimal.json
@@ -15,13 +15,5 @@
"pr-review-toolkit@claude-code-plugins": false,
"example-skills@anthropic-agent-skills": false,
"brightdata-plugin@synced": false
- },
- "deniedMcpServers": [
- {
- "serverName": "claude.ai higgsfield"
- },
- {
- "serverName": "claude.ai Higgsfield AI"
- }
- ]
+ }
}
diff --git a/lib/profiles/qa.json b/lib/profiles/qa.json
index c8c7319..2231e4d 100644
--- a/lib/profiles/qa.json
+++ b/lib/profiles/qa.json
@@ -15,13 +15,5 @@
"pr-review-toolkit@claude-code-plugins": false,
"example-skills@anthropic-agent-skills": false,
"brightdata-plugin@synced": false
- },
- "deniedMcpServers": [
- {
- "serverName": "claude.ai higgsfield"
- },
- {
- "serverName": "claude.ai Higgsfield AI"
- }
- ]
+ }
}
diff --git a/lib/profiles/seo.json b/lib/profiles/seo.json
index 0b93d92..5119843 100644
--- a/lib/profiles/seo.json
+++ b/lib/profiles/seo.json
@@ -15,13 +15,5 @@
"pr-review-toolkit@claude-code-plugins": false,
"example-skills@anthropic-agent-skills": false,
"brightdata-plugin@synced": false
- },
- "deniedMcpServers": [
- {
- "serverName": "claude.ai higgsfield"
- },
- {
- "serverName": "claude.ai Higgsfield AI"
- }
- ]
+ }
}
diff --git a/lib/tests/pack-census.test.sh b/lib/tests/pack-census.test.sh
index 32b6c35..40003e5 100755
--- a/lib/tests/pack-census.test.sh
+++ b/lib/tests/pack-census.test.sh
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
# lib/tests/pack-census.test.sh โ lib/pack-census.sh: pack layout (manifest
# name = folder, entries resolve, no skill twice, retired gstack names absent),
-# fragment invariants (same key set, fixed values, deny set, full = manifest
+# fragment invariants (same key set, fixed values, full = manifest
# defaults), old-layout citers. Fixture cases, then the hermetic part of the
# census on the real repo (dangling targets are WARN without --installed).
set -u
@@ -26,11 +26,10 @@ mk_pack() { # name defaultEnabled skill...
}
mk_pack alpha true a1 a2
mk_pack beta false b1
-frag() { # name alpha beta deny(yes|no) โ the two real connector names
- local d=""; [ "$4" = yes ] && d=', "deniedMcpServers": [{"serverName": "claude.ai higgsfield"}, {"serverName": "claude.ai Higgsfield AI"}]'
- printf '{"enabledPlugins": {"model-router@skills-dir": true, "pack-alpha@skills-dir": %s, "pack-beta@skills-dir": %s, "security-guidance@claude-code-plugins": true, "example-skills@anthropic-agent-skills": false, "brightdata-plugin@synced": false}%s}\n' \
- "$2" "$3" "$d" > "$FX/lib/profiles/$1.json"; }
-frag full true false no; frag dev false false yes
+frag() { # name alpha beta
+ printf '{"enabledPlugins": {"model-router@skills-dir": true, "pack-alpha@skills-dir": %s, "pack-beta@skills-dir": %s, "security-guidance@claude-code-plugins": true, "example-skills@anthropic-agent-skills": false, "brightdata-plugin@synced": false}}\n' \
+ "$2" "$3" > "$FX/lib/profiles/$1.json"; }
+frag full true false; frag dev false false
census() { bash "$ROOT/lib/pack-census.sh" --repo "$FX" "$@" 2>&1; }
out="$(census)"; rc=$?
@@ -86,10 +85,10 @@ printf '{"enabledPlugins": {"model-router@skills-dir": true, "pack-alpha@skills-
out="$(census)"; rc=$?
check T8-keyset-rc "$rc" 1; check_has T8-keyset "$out" "RED lib/profiles/short.json: key set differs from full.json"
rm "$FX/lib/profiles/short.json"
-frag full true true no
+frag full true true
out="$(census)"; rc=$?
check T9-full-defaults-rc "$rc" 1; check_has T9-full-defaults "$out" "RED lib/profiles/full.json: pack-beta@skills-dir is true but the manifest default is false"
-frag full true false no
+frag full true false
sed -i.bak 's/"security-guidance@claude-code-plugins": true/"security-guidance@claude-code-plugins": false/' "$FX/lib/profiles/dev.json"
out="$(census)"; rc=$?
check T10-fixed-rc "$rc" 1; check_has T10-fixed "$out" "RED lib/profiles/dev.json: security-guidance@claude-code-plugins must be true"