feat(conductor): Restore mma_implementation track
This commit is contained in:
@@ -103,11 +103,12 @@ def main():
|
||||
# 4. Check context — if not running via Manual Slop, we pass through (allow)
|
||||
# This prevents the hook from affecting normal CLI usage.
|
||||
hook_context = os.environ.get("GEMINI_CLI_HOOK_CONTEXT")
|
||||
logging.debug(f"Checking GEMINI_CLI_HOOK_CONTEXT: '{hook_context}'")
|
||||
if hook_context != "manual_slop":
|
||||
logging.debug("GEMINI_CLI_HOOK_CONTEXT not set to 'manual_slop'. Allowing execution without confirmation.")
|
||||
logging.debug(f"GEMINI_CLI_HOOK_CONTEXT is '{hook_context}', NOT 'manual_slop'. Allowing execution without confirmation.")
|
||||
print(json.dumps({
|
||||
"decision": "allow",
|
||||
"reason": "Non-programmatic usage (GEMINI_CLI_HOOK_CONTEXT not set)."
|
||||
"reason": f"Non-programmatic usage (GEMINI_CLI_HOOK_CONTEXT={hook_context})."
|
||||
}))
|
||||
return
|
||||
|
||||
|
||||
42
scripts/tool_discovery.py
Normal file
42
scripts/tool_discovery.py
Normal file
@@ -0,0 +1,42 @@
|
||||
import json
|
||||
import sys
|
||||
import os
|
||||
|
||||
# Add project root to sys.path
|
||||
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
||||
|
||||
try:
|
||||
import mcp_client
|
||||
except ImportError:
|
||||
print("[]")
|
||||
sys.exit(0)
|
||||
|
||||
def main():
|
||||
specs = list(mcp_client.MCP_TOOL_SPECS)
|
||||
|
||||
# Add run_powershell (manually define to match ai_client.py)
|
||||
specs.append({
|
||||
"name": "run_powershell",
|
||||
"description": (
|
||||
"Run a PowerShell script within the project base_dir. "
|
||||
"Use this to create, edit, rename, or delete files and directories. "
|
||||
"The working directory is set to base_dir automatically. "
|
||||
"stdout and stderr are returned to you as the result."
|
||||
),
|
||||
"parameters": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"script": {
|
||||
"type": "string",
|
||||
"description": "The PowerShell script to execute."
|
||||
}
|
||||
},
|
||||
"required": ["script"]
|
||||
}
|
||||
})
|
||||
|
||||
# Output as JSON array of FunctionDeclarations
|
||||
print(json.dumps(specs, indent=2))
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user