Use this skill to complete Tianyi account AST login and direct authentication. The public version is tianyi-ast-direct-auth-v7.1; the machine skill name is tianyi-ast-direct-auth-v7-1.
This skill handles one path only: direct authentication through /ast/verify. It does not use gateway mode or /ast/introspect.
direct_auth_init.json or explicit caller parameters.agent_session.json with the bundled Python helper.appId from explicit caller input, runtime parameters, or direct_auth_init.json.appId is available, call /ast/verify./ast/login/start, then /ast/login/qrcode./ast/login/status/{ticket}./ast/verify to get idToken + expiresAt.For code plugins, use scripts/get_id_token.py as the stable CLI wrapper around the same flow.
Read references/login-flow.md for login and pending-state details.
Read references/verify-flow.md for /ast/verify details.
Read references/caller-contract.md when another skill or business flow asks for an idToken.
Read references/auth-result-contract.md when returning auth results to a caller.
Read references/pending-handoff-contract.md when a caller must resume business work after QR login.
Read references/plugin-api-contract.md when a pure code plugin needs a CLI entrypoint.
Read references/partner-skill-template.md when writing a partner business skill.
Read references/local-session-contract.md before handling local files.
Read references/error-handling.md for failure handling.
Use this skill when the user or caller asks to:
idTokenidTokenappId 获取天翼账号 idTokenagent_session.json/ast/verifyAfter login starts, preserve:
pending_skill = "tianyi-ast-direct-auth-v7-1"
pending_action = "wait_user_confirm_login"
pending_ticketpending_login_urlpending_ticket_expires_atpending_last_statuspending_business_app_id when provided by a callerpending_caller_skill when invoked by another skillpending_business_intent when the caller must resume business workpending_return_target = "idToken" when the caller expects an idTokenOnly treat "已登录", "查登录状态", or equivalent replies as this skill's continuation when pending_skill, pending_action, and pending_ticket all match.
Keep user-facing replies short. Show only the QR image, login link, and next action. Do not expose service URLs, local file paths, private key paths, signing plaintext, appId, or trusted-network details.
Login is complete only after:
/ast/login/status/{ticket} returns status=success
agent_session.json is saved successfully
privateKeyPem is returned
Direct authentication is complete only after /ast/verify returns idToken + expiresAt.
When another skill invokes this skill as an authentication dependency, this skill owns the full AST login and /ast/verify flow. The caller receives only the resulting idToken + expiresAt for business API use.
The caller must not receive agentSessionToken, private key material, signing plaintext, or local file paths. See references/caller-contract.md.
For pure code plugins:
python scripts/get_id_token.py --app-id <partner-app-id> --json
python scripts/get_id_token.py --app-id <partner-app-id> --allow-login --json
python scripts/get_id_token.py --app-id <partner-app-id> --ticket <ticket> --json
The CLI output follows references/auth-result-contract.md.
/ast/introspect.appId, ticket, loginUrl, or idToken into agent_session.json.
login_success.json.
共 1 个版本