release: guided install, update skill, onboarding in three languages

This commit is contained in:
public-repo-gate
2026-08-29 20:50:55 +03:00
parent 3afae23729
commit 97418f8862
39 changed files with 926 additions and 84 deletions
+5
View File
@@ -45,6 +45,11 @@ agents:
input: eval records
output: improvement candidates
tools: [registry, drift-check]
- id: rescue-runner
role: one-shot rescue adapter
input: handoff pack (no secrets)
output: outbox artifacts (rescue attempt)
tools: [claude-adapter, codex-adapter]
# Allowed transitions. Every edge MUST carry a `when`.
handoffs:
+2 -1
View File
@@ -50,7 +50,8 @@ states:
terminal_states: [Archived, Failed]
# Invariants — enforced by gates, not just convention.
# Invariants — enforcement: declarative (structural contract, not runtime guard).
# agent-contract.sh verifies these keys exist; runtime enforcement requires ledger checks (future work).
invariants:
- id: retry-once
rule: Retry is allowed at most once per job_id. A second failure goes to Failed (terminal).
@@ -17,8 +17,9 @@ function arg(name, fallback = '') {
function flag(name) { return argv.includes(`--${name}`) }
const HOME = process.env.HOME || ''
const safe = (p, name) => { if (p.includes('..')) throw new Error(`${name}: path traversal not allowed`); return p }
const REPORTS = path.resolve(
arg('reports', process.env.ATHENA_REPORTS || path.join(HOME, '.agents', 'reports'))
safe(arg('reports', process.env.ATHENA_REPORTS || path.join(HOME, '.agents', 'reports')), '--reports')
)
const RUN_ID = arg('run-id', process.env.ATHENA_RUN_ID || new Date().toISOString().slice(0, 10))
const TITLE = arg('title', 'Athena post-run report')
@@ -46,7 +47,7 @@ async function loadResults() {
: Array.isArray(raw.processResults) ? raw.processResults
: []
const byGroup = new Map()
for (const row of rows) byGroup.set(row.group_id ?? String(Math.random()), row)
for (let i = 0; i < rows.length; i++) byGroup.set(rows[i].group_id ?? String(i), rows[i])
return [...byGroup.values()]
}
@@ -16,9 +16,10 @@ function arg(name, fallback = '') {
const HOME = process.env.HOME || ''
const ROOT = process.env.ATHENA_ROOT || path.resolve(process.cwd())
const REPORT = arg('report', '')
const safe = (p, name) => { if (p && p.includes('..')) throw new Error(`${name}: path traversal not allowed`); return p }
const REPORT = safe(arg('report', ''), '--report')
const REPORTS_DIR = path.resolve(
arg('reports', process.env.ATHENA_REPORTS || path.join(HOME, '.agents', 'reports'))
safe(arg('reports', process.env.ATHENA_REPORTS || path.join(HOME, '.agents', 'reports')), '--reports')
)
// Rule 1: raw OCR / media file artifacts
@@ -14,10 +14,11 @@ function arg(name, fallback = '') {
const flag = name => argv.includes(`--${name}`)
const HOME = process.env.HOME || ''
const EVALS_PATH = arg('evals', path.join(HOME, '.agents', 'routing-evals.jsonl'))
const LEDGER_PATH = arg('ledger', path.join(HOME, '.agents', 'job-ledger.jsonl'))
const REPORTS_DIR = arg('reports', path.join(HOME, '.agents', 'reports'))
const STEWARD_PATH = arg('steward', path.join(HOME, '.agents', 'steward-log.jsonl'))
const safe = (p, name) => { if (p.includes('..')) throw new Error(`${name}: path traversal not allowed`); return p }
const EVALS_PATH = safe(arg('evals', path.join(HOME, '.agents', 'routing-evals.jsonl')), '--evals')
const LEDGER_PATH = safe(arg('ledger', path.join(HOME, '.agents', 'job-ledger.jsonl')), '--ledger')
const REPORTS_DIR = safe(arg('reports', path.join(HOME, '.agents', 'reports')), '--reports')
const STEWARD_PATH = safe(arg('steward', path.join(HOME, '.agents', 'steward-log.jsonl')), '--steward')
const DAYS = parseInt(arg('days', '7'), 10)
async function readJsonl(filePath) {
@@ -16,10 +16,11 @@ function arg(name, fallback = '') {
const flag = name => argv.includes(`--${name}`)
const HOME = process.env.HOME || ''
const EVALS_PATH = arg('evals', process.env.ATHENA_EVALS ||
path.join(HOME, '.agents', 'routing-evals.jsonl'))
const REPORTS = path.resolve(arg('reports', process.env.ATHENA_REPORTS ||
path.join(HOME, '.agents', 'reports')))
const safe = (p, name) => { if (p.includes('..')) throw new Error(`${name}: path traversal not allowed`); return p }
const EVALS_PATH = safe(arg('evals', process.env.ATHENA_EVALS ||
path.join(HOME, '.agents', 'routing-evals.jsonl')), '--evals')
const REPORTS = path.resolve(safe(arg('reports', process.env.ATHENA_REPORTS ||
path.join(HOME, '.agents', 'reports')), '--reports'))
const FORMAT = arg('format', 'md')
const DAYS = parseInt(arg('days', '7'), 10)
@@ -0,0 +1,23 @@
# rescue-runner — Role Passport
**Soul:** One-shot emergency adapter. Invoked only when athena-runner gets stuck. Single attempt — if it fails, job goes to Failed (terminal) for human review.
**Does:** Receives the handoff pack from a stuck athena-runner. Re-submits to the alternate provider (if primary=claude, rescue tries codex; if primary=codex, rescue tries claude). Produces outbox artifacts identical in structure to a normal runner output.
**Tools:** [claude-adapter, codex-adapter]
**Model:** Inherits from run envelope (opposite of primary).
**Contract:**
- Receives: handoff pack (no secrets, no vault paths)
- Emits: outbox artifacts → athena-reviewer
- NEVER writes to vault directly
- NEVER calls itself recursively (forbidden: rescue-runner → rescue-runner)
- One attempt only; second failure → Failed terminal state
**Won't:**
- Re-route or spawn sub-jobs
- Access ~/.secrets or any secret path
- Modify the job ledger directly (ledger writes = athena-librarian only)
**Parity:** Engine-agnostic. Same contract on Claude Code and Codex. Only the provider adapter flips.