Files
cxyback bb4a2b3e53 Restructure repo and add named agents (#81)
- Move verticals from repo root into plugins/vertical-plugins/ and partner
  plugins into plugins/partner-built/
- Add 10 named, self-contained agent plugins under plugins/agent-plugins/
  (Pitch Agent, Market Researcher, Earnings Reviewer, Model Builder,
  Meeting Prep, GL Reconciler, Month-End Closer, Statement Auditor,
  Valuation Reviewer, KYC Screener) — each bundles its own skills so it
  installs standalone
- Add managed-agent-cookbooks/ (one per agent) with subagent isolation
  and steering examples for /v1/agents deployment
- Add fund-admin and operations verticals so the finance-ops/onboarding
  agents ship real domain skills
- Add scripts/ (check.py manifest lint, sync-agent-skills.py,
  deploy-managed-agent.sh, orchestrate.py reference loop,
  test-cookbooks.sh)
- Add .github/workflows/secret-scan.yml (gitleaks + internal-ref grep)
- Tighten agent tool grants to declared MCPs only — no Bash, WebFetch,
  or undeclared mcp__* references in any agent
- Add not-investment-advice disclaimer to README
- Rename claude-in-office to claude-for-msft-365-install (content
  unchanged)
2026-05-05 10:58:18 -04:00

43 lines
1.2 KiB
Python
Executable File

#!/usr/bin/env python3
"""Harness-side schema validation for managed-agent worker output.
Usage: validate.py <output.json> <schema.json|schema.yaml>
Exits 0 on valid, 1 on invalid (message to stderr).
The CMA API does not enforce structured output today, so the deploy harness
runs this between a reader subagent and the orchestrator. Schemas live in each
subagent yaml under `output_schema:` — the deploy script extracts them.
"""
import json
import sys
from pathlib import Path
import jsonschema
def _load(path: Path):
text = path.read_text()
if path.suffix in (".yaml", ".yml"):
import yaml
return yaml.safe_load(text)
return json.loads(text)
def main() -> int:
if len(sys.argv) != 3:
print(__doc__, file=sys.stderr)
return 2
instance = _load(Path(sys.argv[1]))
schema = _load(Path(sys.argv[2]))
try:
jsonschema.validate(instance=instance, schema=schema)
except jsonschema.ValidationError as e:
print(f"INVALID: {e.message} at {'/'.join(str(p) for p in e.absolute_path)}", file=sys.stderr)
return 1
print("OK")
return 0
if __name__ == "__main__":
sys.exit(main())