mirror of
https://github.com/cursor/plugins.git
synced 2026-09-14 20:00:00 +08:00
659a6363c0
Adds an Advisor plugin: the main model consults a stronger model before major decisions, when stuck on an error, and before declaring a task done. The advisor gets a full briefing plus the conversation transcript path, returns a verdict with guidance, and the main model keeps doing the work. The default advisor is the latest Grok (Grok 4.6) at its highest reasoning effort; /advisor <model> accepts any model available to subagents. - skill `advisor`: /advisor [model|off|status|ask ...|nudge on|off], checkpoint protocol, briefing template, usable as a Custom Mode - agent `advisor-subagent`: read-only, pinned to grok-4.6[effort=xhigh] - hooks: track edits since the last consult, log consults to .cursor/advisor/log.md, nudge a pre-completion consult once per batch of edits; state is bound to the conversation that enabled it - registered in marketplace.json and the root README
21 lines
518 B
Bash
Executable File
21 lines
518 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# afterAgentResponse hook for Advisor.
|
|
# Keeps the tail of the latest assistant message so the stop hook can tell
|
|
# whether the agent ended its turn with a question for the user.
|
|
#
|
|
# Input: { "text": "<assistant response text>", ...common }
|
|
# Output: none
|
|
|
|
set -euo pipefail
|
|
|
|
source "$(dirname "${BASH_SOURCE[0]}")/lib.sh"
|
|
|
|
HOOK_INPUT=$(cat)
|
|
|
|
advisor_require_enabled
|
|
advisor_bind_conversation "$HOOK_INPUT" || exit 0
|
|
|
|
jq -r '.text // empty' <<< "$HOOK_INPUT" | tail -c 400 > "$LAST_RESPONSE_FILE"
|
|
exit 0
|