diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7a60b85 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +__pycache__/ +*.pyc diff --git a/__pycache__/vault-librarian.cpython-313.pyc b/__pycache__/vault-librarian.cpython-313.pyc deleted file mode 100644 index 8ae5df0..0000000 Binary files a/__pycache__/vault-librarian.cpython-313.pyc and /dev/null differ diff --git a/vault b/vault index eed850a..07859cb 100755 --- a/vault +++ b/vault @@ -15,7 +15,11 @@ Subcommands: vault sync-data reconcile /data skeleton to match manifest (create missing dirs) vault manifest regenerate the topology manifest note vault report [--pretty] deterministic Librarian report (delegates to vault-librarian.py) - vault analyze spawn a Hermes Librarian pass (ad-hoc; uses the cron prompt) + vault analyze [-m MODEL] [--provider PROVIDER] + spawn a Hermes Librarian pass (ad-hoc; uses the cron prompt). + -m/--provider dial intelligence/spend inline. e.g. nightly cheap: + vault analyze -m us.anthropic.claude-haiku-4-5-20251001-v1:0 --provider bedrock + omit both to use the profile's default (smart) model. """ import os, re, sys, subprocess @@ -131,7 +135,22 @@ def main(): sys.exit(subprocess.run([sys.executable, LIBRARIAN] + argv).returncode) elif cmd == "analyze": prompt = open(PROMPT, encoding="utf-8").read() - subprocess.run([HERMES, "-z", prompt]) + # `vault analyze [-m MODEL]` — pass an inline Bedrock/other model through to hermes -z + # so intelligence/spend can be dialed per cadence (nightly cheap, ad-hoc smart). + hcmd = [HERMES, "-z", prompt] + if "-m" in argv: + i = argv.index("-m") + if i + 1 < len(argv): + hcmd += ["-m", argv[i + 1]] + else: + die("-m requires a model name (e.g. vault analyze -m us.anthropic.claude-haiku-4-5-20251001-v1:0)") + if "--provider" in argv: + i = argv.index("--provider") + if i + 1 < len(argv): + hcmd += ["--provider", argv[i + 1]] + else: + die("--provider requires a provider name (e.g. vault analyze --provider bedrock)") + subprocess.run(hcmd) else: die(f"unknown command '{cmd}'") diff --git a/vault_ops.py b/vault_ops.py index 287fb4a..0a2d085 100644 --- a/vault_ops.py +++ b/vault_ops.py @@ -198,6 +198,7 @@ def op_sync_data(argv, execute): if len(made) > 40: print(f" ... and {len(made)-40} more") if execute: + _git_commit(f"vault sync-data ({len(made)} /data dir(s))", execute) print("EXECUTED.") else: print("DRY-RUN — nothing changed. Add --execute.")