recovered from aaronjaworski710
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
# Copy to .env locally — never commit real values.
|
||||
# PROXY=http://127.0.0.1:7897
|
||||
# HEADLESS=true
|
||||
# COUNT=1
|
||||
@@ -0,0 +1,33 @@
|
||||
# Provider template: `{{name}}`
|
||||
|
||||
Copy this directory:
|
||||
|
||||
```bash
|
||||
cp -R providers/_template providers/myproduct
|
||||
```
|
||||
|
||||
## Checklist
|
||||
|
||||
- [ ] `name` / aliases in `register_core/providers/registry.py`
|
||||
- [ ] Adapter `register_one` with **this-run** success attribution
|
||||
- [ ] Black-box? Add to `Pipeline._BLACKBOX_PROVIDERS`
|
||||
- [ ] `run-register.sh` or Python entry; hub case in `register.sh`
|
||||
- [ ] `.env.example` (no secrets)
|
||||
- [ ] Offline tests for attribution + redact
|
||||
- [ ] Row in `providers/README.md`
|
||||
|
||||
## Suggested layout
|
||||
|
||||
```text
|
||||
providers/myproduct/
|
||||
README.md
|
||||
.env.example
|
||||
run-register.sh # COUNT=1 production runner
|
||||
scripts/ # product-specific
|
||||
output/ # gitignored
|
||||
```
|
||||
|
||||
## Contract
|
||||
|
||||
Return `RegisterResult(ok=..., provider=..., email=..., secret=..., secret_kind=...)`.
|
||||
Never treat historical `output/*` tails as this-run success.
|
||||
@@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env bash
|
||||
# Template product runner — replace with real signup.
|
||||
# Contract for register_core black-box adapters:
|
||||
# - Prefer printing one line: RESULT_JSON:{"ok":true,"email":"...","secret":"..."}
|
||||
# - Or append-only files with caller-owned offsets
|
||||
# - Exit non-zero on failure; do not exit 0 with empty identity
|
||||
set -euo pipefail
|
||||
|
||||
COUNT="${COUNT:-${1:-1}}"
|
||||
ROOT="$(cd "$(dirname "$0")/../.." && pwd)"
|
||||
OUT_DIR="$(cd "$(dirname "$0")" && pwd)/output"
|
||||
mkdir -p "$OUT_DIR"
|
||||
|
||||
echo "[template] COUNT=$COUNT ROOT=$ROOT" >&2
|
||||
echo "[template] Replace this runner. Failing closed." >&2
|
||||
exit 2
|
||||
Reference in New Issue
Block a user