ia_dev/ai_working_help/notary-ai/list-pending-notary-ai.sh
Nicolas Cantu 61cec6f430 Sync ia_dev: token resolution via .secrets/<env>/ia_token, doc updates
**Motivations:**
- Align master with current codebase (token from projects/<id>/.secrets/<env>/ia_token)
- Id resolution by mail To or by API token; no slug

**Root causes:**
- Token moved from conf.json to .secrets/<env>/ia_token; env from directory name

**Correctifs:**
- Server and scripts resolve project+env by scanning all projects and envs

**Evolutions:**
- tickets-fetch-inbox routes by To address; notary-ai agents and API doc updated

**Pages affectées:**
- ai_working_help/server.js, docs, project_config.py, lib/project_config.sh
- projects/README.md, lecoffreio/docs/API.md, gitea-issues/tickets-fetch-inbox.py
2026-03-16 15:00:23 +01:00

20 lines
789 B
Bash
Executable File

#!/usr/bin/env bash
# List pending JSON files in projects/<slug>/data/notary-ai/pending/.
# Run from repo root (parent of ia_dev). Output: one path per line.
# Usage: ./ia_dev/ai_working_help/notary-ai/list-pending-notary-ai.sh
set -euo pipefail
NOTARY_AI_DIR="${NOTARY_AI_DIR:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}"
export NOTARY_AI_DIR
ROOT="$(cd "${NOTARY_AI_DIR}/../../.." && pwd)"
cd "$ROOT"
# shellcheck source=lib.sh
source "${NOTARY_AI_DIR}/lib.sh"
if [[ -z "${DATA_NOTARY_AI_PENDING_DIR:-}" || ! -d "${DATA_NOTARY_AI_PENDING_DIR}" ]]; then
echo "[notary-ai] DATA_NOTARY_AI_PENDING_DIR not set or not a directory. Set IA_PROJECT or ai_project_id at repo root." >&2
exit 1
fi
for f in "${DATA_NOTARY_AI_PENDING_DIR}"/*.json; do
[[ -f "$f" ]] || continue
echo "$f"
done