Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4ad0d0e077 | |||
| b55a77634b | |||
| f7db603922 |
@@ -1,31 +0,0 @@
|
||||
name: Link Discord Account
|
||||
description: Connect your GitHub and Discord for the bounty program
|
||||
title: "link: @{{ github.actor }}"
|
||||
labels: ["link-discord"]
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Link your Discord account to receive XP and role rewards when your bounty PRs are merged.
|
||||
|
||||
**How to find your Discord ID:**
|
||||
1. Open Discord Settings > Advanced > Enable **Developer Mode**
|
||||
2. Right-click your username > **Copy User ID**
|
||||
|
||||
- type: input
|
||||
id: discord_id
|
||||
attributes:
|
||||
label: Discord User ID
|
||||
description: "Your numeric Discord ID (not your username). Example: 123456789012345678"
|
||||
placeholder: "123456789012345678"
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: input
|
||||
id: display_name
|
||||
attributes:
|
||||
label: Display Name (optional)
|
||||
description: How you'd like to be credited
|
||||
placeholder: "Jane Doe"
|
||||
validations:
|
||||
required: false
|
||||
@@ -1312,6 +1312,15 @@ def register_queen_lifecycle_tools(
|
||||
Returns credential IDs, aliases, status, and identity metadata.
|
||||
Never returns secret values. Optionally filter by credential_id.
|
||||
"""
|
||||
# Load shell config vars into os.environ — same first step as check-agent.
|
||||
# Ensures keys set in ~/.zshrc/~/.bashrc are visible to is_available() checks.
|
||||
try:
|
||||
from framework.credentials.validation import ensure_credential_key_env
|
||||
|
||||
ensure_credential_key_env()
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
try:
|
||||
# Primary: CredentialStoreAdapter sees both Aden OAuth and local accounts
|
||||
from aden_tools.credentials import CredentialStoreAdapter
|
||||
@@ -1319,13 +1328,24 @@ def register_queen_lifecycle_tools(
|
||||
store = CredentialStoreAdapter.default()
|
||||
all_accounts = store.get_all_account_info()
|
||||
|
||||
# Filter by credential_id / provider if requested
|
||||
# Filter by credential_id / provider if requested.
|
||||
# A spec name like "gmail_oauth" maps to provider "google" via
|
||||
# credential_id field — resolve that alias before filtering.
|
||||
if credential_id:
|
||||
try:
|
||||
from aden_tools.credentials import CREDENTIAL_SPECS
|
||||
|
||||
spec = CREDENTIAL_SPECS.get(credential_id)
|
||||
resolved_provider = (
|
||||
(spec.credential_id or credential_id) if spec else credential_id
|
||||
)
|
||||
except Exception:
|
||||
resolved_provider = credential_id
|
||||
all_accounts = [
|
||||
a
|
||||
for a in all_accounts
|
||||
if a.get("credential_id", "").startswith(credential_id)
|
||||
or a.get("provider", "") == credential_id
|
||||
or a.get("provider", "") in (credential_id, resolved_provider)
|
||||
]
|
||||
|
||||
return json.dumps(
|
||||
@@ -1342,13 +1362,43 @@ def register_queen_lifecycle_tools(
|
||||
|
||||
# Fallback: local encrypted store only
|
||||
try:
|
||||
from framework.credentials.local.models import LocalAccountInfo
|
||||
from framework.credentials.local.registry import LocalCredentialRegistry
|
||||
from framework.credentials.storage import EncryptedFileStorage
|
||||
|
||||
registry = LocalCredentialRegistry.default()
|
||||
accounts = registry.list_accounts(
|
||||
credential_id=credential_id or None,
|
||||
)
|
||||
|
||||
# Also include flat-file credentials saved by the GUI (no "/" separator).
|
||||
# LocalCredentialRegistry.list_accounts() skips these — read them directly.
|
||||
seen_cred_ids = {info.credential_id for info in accounts}
|
||||
storage = EncryptedFileStorage()
|
||||
for storage_id in storage.list_all():
|
||||
if "/" in storage_id:
|
||||
continue # already handled by LocalCredentialRegistry above
|
||||
if credential_id and storage_id != credential_id:
|
||||
continue
|
||||
if storage_id in seen_cred_ids:
|
||||
continue
|
||||
try:
|
||||
cred_obj = storage.load(storage_id)
|
||||
except Exception:
|
||||
continue
|
||||
if cred_obj is None:
|
||||
continue
|
||||
accounts.append(
|
||||
LocalAccountInfo(
|
||||
credential_id=storage_id,
|
||||
alias="default",
|
||||
status="unknown",
|
||||
identity=cred_obj.identity,
|
||||
last_validated=cred_obj.last_refreshed,
|
||||
created_at=cred_obj.created_at,
|
||||
)
|
||||
)
|
||||
|
||||
credentials = []
|
||||
for info in accounts:
|
||||
entry: dict[str, Any] = {
|
||||
|
||||
Reference in New Issue
Block a user