mirror of
https://github.com/chainbase-labs/Agentkey.git
synced 2026-09-20 14:20:23 +08:00
fbec683e87
## Summary - preserve the existing `agentkey.skill` GitHub Release asset and add platform-named Gemini extension archives for macOS, Linux, and Windows - opt the Gemini extension into native first-connect OAuth with `oauth.enabled`, while keeping `/mcp auth agentkey` as the manual retry path - add explicit Gemini, Antigravity 2.0, and Antigravity CLI authentication and connection-verification guidance - explain Gemini's user-Skill precedence warning and avoid duplicate MCP registrations when an extension or plugin already owns the server entry - add regression coverage and trigger the scripts test workflow when authentication guidance or release packaging changes ## Root causes Gemini CLI treats a lone generic GitHub Release asset as the extension archive. AgentKey releases currently publish only `agentkey.skill`, but Gemini CLI extracts only `.tar.gz` and `.zip` extension archives. After that extraction failure, Gemini retries Git clone in the same non-empty temporary directory and fails again. Separately, the Gemini manifest omitted `oauth.enabled`. Gemini discovered that AgentKey required OAuth, but only reported `/mcp auth agentkey` instead of starting the browser flow automatically. A pre-existing user Skill at `~/.agents/skills/agentkey` can also override the extension-bundled Skill, hiding new setup guidance even though the extension MCP entry is active. ## Authentication design - Gemini uses `httpUrl` plus `oauth.enabled: true`; OAuth endpoints and client registration remain dynamically discovered. - Antigravity keeps the documented credential-free `serverUrl` configuration and uses DCR through its native Authenticate controls. - No static access token, Authorization header, OAuth client secret, or hard-coded authorization endpoint is added to either package. ## Validation - Bats suite: 27/27 passing - `gemini extensions validate .` - built and inspected `agentkey.skill`, `darwin.agentkey.tar.gz`, `linux.agentkey.tar.gz`, and `win32.agentkey.zip` - verified both Gemini platform archive formats contain `oauth.enabled: true`, `gemini-extension.json`, and `skills/agentkey/SKILL.md` - validated workflow YAML, shell syntax, archive roots, manifest invariants, and `git diff --check` - verified the live AgentKey endpoint advertises protected-resource metadata, PKCE, and a dynamic client registration endpoint ## Release coordination Merge this fix before release PR #92 so the first Gemini-enabled release publishes compatible archives and the corrected first-connect OAuth behavior. --------- Co-authored-by: Allen <0xfatdog@gmail.com>
45 lines
1.4 KiB
Bash
45 lines
1.4 KiB
Bash
#!/usr/bin/env bats
|
|
|
|
setup_file() {
|
|
local repo_root
|
|
repo_root="$(cd "$(dirname "$BATS_TEST_FILENAME")/.." && pwd)"
|
|
"$repo_root/scripts/build-release-assets.sh" "$BATS_FILE_TMPDIR/assets"
|
|
}
|
|
|
|
setup() {
|
|
REPO_ROOT="$(cd "$BATS_TEST_DIRNAME/.." && pwd)"
|
|
ASSET_DIR="$BATS_FILE_TMPDIR/assets"
|
|
}
|
|
|
|
@test "release build preserves the Skill asset" {
|
|
[ -f "$ASSET_DIR/agentkey.skill" ]
|
|
|
|
run unzip -Z1 "$ASSET_DIR/agentkey.skill"
|
|
[ "$status" -eq 0 ]
|
|
[[ "$output" == *"SKILL.md"* ]]
|
|
[[ "$output" == *"scripts/check-update.sh"* ]]
|
|
}
|
|
|
|
@test "release build creates a Gemini archive for every supported platform" {
|
|
[ -f "$ASSET_DIR/darwin.agentkey.tar.gz" ]
|
|
[ -f "$ASSET_DIR/linux.agentkey.tar.gz" ]
|
|
[ -f "$ASSET_DIR/win32.agentkey.zip" ]
|
|
|
|
run cmp "$ASSET_DIR/darwin.agentkey.tar.gz" "$ASSET_DIR/linux.agentkey.tar.gz"
|
|
[ "$status" -eq 0 ]
|
|
}
|
|
|
|
@test "Gemini release archives expose the manifest and Skill at their roots" {
|
|
for archive_name in darwin.agentkey.tar.gz linux.agentkey.tar.gz; do
|
|
run tar -tzf "$ASSET_DIR/$archive_name"
|
|
[ "$status" -eq 0 ]
|
|
[[ "$output" == *"gemini-extension.json"* ]]
|
|
[[ "$output" == *"skills/agentkey/SKILL.md"* ]]
|
|
done
|
|
|
|
run unzip -Z1 "$ASSET_DIR/win32.agentkey.zip"
|
|
[ "$status" -eq 0 ]
|
|
[[ "$output" == *"gemini-extension.json"* ]]
|
|
[[ "$output" == *"skills/agentkey/SKILL.md"* ]]
|
|
}
|