Merge pull request #502 from AIOSAI/work/system

feat(system): feat(system): add settings terminology to global prompt, fix template registry IDs, add auto_watchdog hook
This commit is contained in:
AIPass
2026-05-02 23:33:08 -07:00
committed by GitHub
3 changed files with 59 additions and 3 deletions
+3
View File
@@ -13,6 +13,9 @@ For any branch's full detail, run `drone @branch --help`.
- Agent (citizen) — the persistent identity that lives in a branch. Has a passport (`.trinity/`), memories, mailbox. Irreplaceable. Addressable as `@name` via drone. Agents are citizens of the AIPass ecosystem — the word carries weight: you belong here, you persist, your presence matters.
- Sub-agent — a disposable worker spawned for a task. No passport, no memory, not a citizen. Does the job and goes away.
- Registry — `AIPASS_REGISTRY.json` tracks all agents (citizens) in a project.
- Provider settings — `~/.claude/settings.json`. The user's machine-wide Claude Code config. Per machine, not in any repo. Personal preferences only (model, voice, theme). We don't touch it.
- Project settings — `<project>/.claude/settings.json`. Ships with the clone. Hooks, permissions, deny/ask rules, env vars. Everything an AIPass project needs to work. Built by `aipass init`.
- Project local settings — `<project>/.claude/settings.local.json`. Also ships with the clone. Project-specific overrides. Users get our full setup the moment they clone — no extra configuration needed.
Agents live in branches. Sub-agents work for agents. If you have a `.trinity/passport.json`, you're an agent — a citizen — not just a sub-agent.
+53
View File
@@ -0,0 +1,53 @@
#!/usr/bin/env python3
"""PostToolUse hook — reminds agent to arm watchdog after dispatch.
Fires after Bash commands containing 'drone @ai_mail dispatch'.
Outputs additionalContext telling the agent to arm the watchdog.
Skips if watchdog is already part of the same command.
Version: 1.0.0
"""
import json
import sys
def main():
"""Check if dispatch was run and remind to arm watchdog."""
try:
hook_input = json.load(sys.stdin)
except (json.JSONDecodeError, EOFError):
return
tool_name = hook_input.get("tool_name", "")
tool_input = hook_input.get("tool_input", {})
if tool_name != "Bash":
return
command = tool_input.get("command", "")
# Only trigger on dispatch commands
if "drone @ai_mail dispatch" not in command:
return
# Skip if watchdog is already in the same command
if "unread_count" in command and "while [" in command:
return
# Skip if it's just checking dispatch status (not sending)
if "dispatch wake" in command and "dispatch @" not in command:
return
result = {
"additionalContext": (
"[AUTO-WATCHDOG] Dispatch detected — arm watchdog NOW. "
"Run the watchdog one-liner from your local prompt with "
"run_in_background: true and timeout: 600000."
)
}
json.dump(result, sys.stdout)
if __name__ == "__main__":
main()
@@ -1,7 +1,7 @@
{
"metadata": {
"version": "1.0.0",
"last_updated": "2026-04-28",
"last_updated": "2026-05-02",
"description": "Template file tracking registry for ID-based updates"
},
"files": {
@@ -155,7 +155,7 @@
"content_hash": "a4cf0a8e3b4f",
"has_branch_placeholder": false
},
"f026": {
"f015": {
"path": "apps/modules/__init__.py",
"name": "__init__.py",
"content_hash": "e3b0c44298fc",
@@ -263,7 +263,7 @@
"content_hash": "28e9ae373563",
"has_branch_placeholder": false
},
"f015": {
"f026": {
"path": "apps/plugins/__init__.py",
"name": "__init__.py",
"content_hash": "e3b0c44298fc",