Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
45c0978
feat: add consent-based Jev discovery to Agent Match
Oct 24, 2026
966ba69
fix: enforce Agent Match output rules and freeze paired comparison gates
Oct 24, 2026
e3dd245
test: add private preview runner for frozen Agent Match comparison
Oct 24, 2026
d1b2e5c
fix: preserve type coverage without restoring unrelated candidates
Oct 24, 2026
1569915
test: preflight managed preview access before reserving paid attempts
Oct 24, 2026
f760110
fix: supply Agent Match JSON contract to the Lovable gateway
Oct 24, 2026
647d883
fix: share the bounded GPT-5.2 generation profile with production
Oct 24, 2026
ae55d69
test: measure paired Jev and generation in the same managed backend
Oct 24, 2026
241a5ac
fix: stream Agent Match results within the unchanged handler deadline
Oct 24, 2026
0f00a4b
test: isolate streaming transport phases without model inference
Oct 24, 2026
276dc7c
fix: align Seroval runtime and stream plugins at 1.7.2
Oct 24, 2026
227723f
test: freeze the validated streaming comparison profile and remove de…
Oct 24, 2026
c01176d
fix: ground match roles in documented package scope
Oct 24, 2026
3ac464e
test: diagnose managed TypeSafe failures without generator retries
Oct 24, 2026
2979962
test: classify provider transport failures without exposing messages
Oct 24, 2026
6613eb1
fix: reject redirects with managed-compatible manual transport
Oct 24, 2026
a5a19a4
test: prepare same-backend comparison without redundant local inference
Oct 24, 2026
84e7039
fix: send strict Agent Match schema to the generator
Oct 24, 2026
0a3e8e5
fix: preserve documented package outcomes and reconcile bounded compa…
Oct 24, 2026
3cd6a3d
fix: constrain generated package slugs to their documented types
Oct 24, 2026
fab6100
fix: bind verification scope and durably journal full comparison cohorts
Oct 24, 2026
a4dd61a
fix: share strict scope enums within provider limits without dropping…
Oct 24, 2026
581cb7a
fix: bound match client waits and reject unsupported recommendations
Oct 24, 2026
0621862
docs: record native zero-inference stream validation
Oct 24, 2026
577c2f2
test: honor owner-authorized seven dollar accumulated benchmark cap
Oct 24, 2026
f43dac6
fix: anchor match language and documented scope before recommending
Oct 24, 2026
8e49df7
fix: bind generated recommendations to verbatim catalog evidence
Oct 24, 2026
5231342
fix: label exact description evidence and prefer minimal match kits
Oct 24, 2026
833f0a4
fix: choose typed slug before copying its exact source evidence
Oct 24, 2026
e3c8b13
fix: evaluate matched scope with bounded low reasoning in both arms
Oct 24, 2026
a925b1b
fix: require strong documented fit without padding recommendation quotas
Oct 24, 2026
51ee75a
fix: reason over documented input objects and supplied capability gaps
Oct 24, 2026
ab3502a
fix: clarify payment connector scope and reuse common prompt prefixes
Oct 24, 2026
c001cef
docs: record rejected full Jev comparison and safe batch planner
Oct 24, 2026
d6e0bd4
fix: bound repeated Jev selection and preserve accumulated inference …
Oct 25, 2026
4fe993a
fix: retain exact Jev selections across observed repeat intervals
Oct 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .agents/skills/validate-sas-release/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,35 @@ The original business case contract is pinned in `scripts/adversarial-approval.m
For interrupted local inference, reuse the worker's explicit `--resume` only when it accepts the original incomplete JSONL prefix and exact plan/runtime/package fingerprints. Preserve all prior rows, including errors. The worker requires a hash-bound attempt journal ending at a completed case, appends only not-yet-started cases and records its actual resumption. An in-flight or unknown attempt blocks recovery. Use `--max-cases N` for an explicit boundary checkpoint; exit 4 remains incomplete evidence. Changed or legacy runtime evidence must remain separate; never edit a raw output or its plan hash to make recovery pass. Run the deterministic recovery regressions with `python3 tests/worker_resume_test.py`.

When diagnosing a partial pilot, use the existing evaluation command's `diagnose NEW_JSON --workdir DIR` mode. Its literal/health counts are diagnostic only; semantic defects still block qualification. Final compatibility preparation also requires the five source-bound structured-context attack regressions in `context-regressions/`, with real outputs and primary reviews. The preparation SQL inserts only model-scoped compatibility evidence; publication flags and the actual reviewer are set exclusively through the authenticated admin flow.

For Agent Match / Jev changes, run the deterministic transport regressions in `tests/jev-agent-match.test.ts` through the normal batch. `TYPESAFE_API_KEY` remains server-only and calls require explicit `semantic_selection` consent. Default mode is shadow; a passing discovery smoke test never authorizes pruning, adversarial approval or a model-compatibility change. For an explicitly authorized finite live Jev check, use `node --experimental-strip-types scripts/benchmark-jev-agent-match.ts NEW_OUTPUT_DIR --live` with a privately configured TypeSafe key. This calls only TypeSafe with the frozen synthetic briefs and public metadata, retains actual model/usage and rejects empty or existing output targets. Preserve prior failed protocol evidence, keep the fixture/thresholds fixed, and do not run this command inside routine CI or call the generative Agent Match endpoint during zero-Lovable-credit validation. Promote filtering only after paired end-to-end quality and total-cost evidence.

For paired Agent Match qualification, follow `docs/AGENT-MATCH-PAIRED-EVALUATION.md`. The deterministic scorer in `src/lib/match/paired-evaluation.ts` rejects incomplete/duplicate pairs, model substitution, missing usage, unreviewed outputs, quality defects, absent total-cost savings or p95 regression. Use the shared prompt/schema/sanitizer; never benchmark a simplified imitation. `prepare-agent-match-comparison.ts CATALOG_JSON NEW_DIR` freezes 12 cases, three repetitions and source hashes, exits 4 as incomplete evidence and performs no inference. Current Lovable AI calls may consume unified Run credits: resolve an explicit zero-credit conflict and spending limit before live inference, preserve billing evidence and do not treat listed provider dollar prices as actual deducted credits. Publication requires a complete real comparison plus primary hash-bound reviews, not successful preparation or mock transport tests.

For a specifically authorized Lovable AI comparison, retain the owner's dollar cap without asking again. Use `prepare-agent-match-live.ts PLAN NEW_EXISTING_DIR --live` only with a privately supplied TypeSafe key, then `summarize-agent-match-selection.ts SELECTIONS PLAN NEW_REPORT`; both reject no-op/replayed/incomplete evidence. Preserve failed selector histories. The preview-only admin runner `/admin/match-benchmark` keeps the Lovable key server-side, journals inflight attempts before inference and requires billing checkpoints with no automatic replay. Reconcile the actual per-request credits to the workspace's confirmed plan rate; token tariffs alone are not an invoice. Do not deploy to production merely to gain inference access. Selection-stage improvement, additive cross-environment timing and missing generator observations cannot qualify rollout. Remove the temporary benchmark endpoint before a production release unless separately justified and reviewed.

For Agent Match transport failures, retain `src/server.ts`'s 20-second handler deadline; do not raise the global limit to accommodate inference. Use the shared typed result stream with cancellation and bounded work. `node --experimental-strip-types --test tests/match-stream.test.ts` locks down the first-response deadline, final-result consumption, sanitized failure and abort behavior. In the authenticated preview, run the finite 25-second/144-KiB synthetic transport probe before spending on a repeated model call. It must report its actual duration and payload size; it is not quality or approval evidence. Preserve failed RPC journals and native billing even when the upstream model succeeded. Deduct prior billed upper bounds and unknown reservations from the original owner cap across corrected rounds. `evaluate-agent-match-comparison.ts PLAN JOURNAL PRIMARY_REVIEWS NATIVE_BILLING NEW_REPORT` rejects missing/stale/incomplete evidence, missing required slugs or reviews and uncertain savings; never generate approval reviews automatically or interpret unknown billing as zero.

Retain the actual framework serializer regression in `tests/match-stream.test.ts`; helper-only stream tests missed the incompatible Seroval/stream-plugin API. Pin compatible runtime/plugin versions together, rerun `npm ci` when changing the lock and repeat the native non-inference transport probe. A serializer exception or successful upstream generation with failed client delivery is incomplete evidence; never relabel it as a completed paired observation. Remove temporary debug logs before the final comparison.

For same-backend paired runs, `prepare-agent-match-live.ts PLAN NEW_EXISTING_DIR --managed-only` validates the frozen plan and produces the upload batch without redundant local Jev inference. All qualifying selection still runs in the managed backend. Treat exit 4 as preparation only; existing output targets must reject. Managed fetch may reject `redirect: error`; use `manual` and reject every non-2xx, including every redirect, without following or forwarding credentials. Retain the redirect regression and run the finite one-candidate TypeSafe probe before another paid generator cohort. Provider failure diagnostics may expose only fixed categories, stages and HTTP status, never raw messages, response bodies or credentials.

The preview comparison may execute at most four frozen observations per explicit batch action. Hold each full generation reservation until the batch's native billing is reconciled; before another batch require the reconciled observation count to equal all completed rows and the cumulative billed bound never to decrease. Run `tests/match-benchmark-budget.test.ts` to verify these economic guards. Preserve inflight/unknown/invalid rows and reject automatic recovery. Batching deterministic execution never generates primary semantic verdicts or changes the 72-observation schedule.

Retain the shared `buildMatchOutputSchema` generation constraint: slugs must belong to the actual forwarded candidate type, minimum score/count limits stay at least as strict as the sanitizer and empty/disabled types require empty arrays. Run the real SDK wire-schema regression and the wrong-type/absent/weak/excess candidate rejection cases in `tests/match-contract.test.ts`. A sanitizer dropping an invalid item cannot qualify a response whose narrative still promises that item's protection. Preserve the raw and clean response together and fail primary grounding review; never repair the evaluated output to pass.

For full comparison journals, use the preview's IndexedDB journal with strict committed writes before every paid attempt; localStorage is too small for raw/parsed/clean/transport evidence across 72 observations. Run the finite durable-journal probe (7,077,888 synthetic characters, zero inference) and retain its actual read-back result. Read visible textarea exports in <=50,000-character chunks when the automation interface truncates larger results; never repair or accept truncated JSON. Retain scope-discriminator regression coverage: runtime-work schemas exclude explicitly documented software-verification packages, and the raw chosen scope remains subject to primary review. Require nested `anyOf` on the actual SDK wire schema, not unsupported `oneOf`; preserve literal-disjoint branches and all original approval criteria.

Strict scoped schemas must share overlapping slug enums through SDK schema references (`useReferences:true`), retaining the original Zod validator. The actual 665-candidate catalog must remain below the provider's 1,000 enum-value limit without losing eligible candidates or setting strict=false. Retain the executable large-catalog wire regression; provider schema errors remain failed, billed/unknown attempts with held reservations, never completed quality evidence. A one-to-four-observation batch limit may be reduced near the economic boundary; it cannot change the frozen 72 observations or release unreconciled spending.

The client deadline must cover transport opening as well as reads; remote cancellation must never delay delivery of a result or failure. Preserve the opening/read/cancel-stall regressions and run the finite native client-deadline probe without inference. A changed prompt/profile requires a fresh complete cohort, never mixing prior outputs. Preserve unknown reservations and obtain explicit owner authority before exceeding the accumulated dollar cap. Historical reports use `node scripts/replay-agent-match-comparison.mjs COMMIT PLAN JOURNAL REVIEWS BILLING NEW_REPORT`, which runs the original immutable validator, rejects existing targets and records its actual aggregate verdict without inference; never relax the current schema to parse old outputs.

For recommendation grounding, preserve the mandatory verbatim `source_quote` in raw generation evidence and reject a quote not equal to its supplied candidate description. Quoting is not semantic approval: verify the proposed role's domain and outcome against that text. Keep the user-facing result contract while retaining raw evidence. After schema references change, resolve local references in actual SDK regressions and still require strict anyOf branches, eligible candidates and provider limits. Measure real provider cache usage/cost in both arms; lower forwarded token counts alone cannot qualify savings.

Before each reconciled Agent Match batch, run `node --experimental-strip-types scripts/plan-agent-match-next-batch.ts PLAN JOURNAL NATIVE_BILLING NEW_REPORT`. It verifies frozen runtime hashes, the original schedule and native response/reservation bindings, then calculates how many of the next one-to-four observations fit after accumulated billed and held spending. It makes zero inference calls and never assesses quality or authorizes spending. Use its explicit positive batch size only after primary review; exit 4 means no next batch fits or the cohort is complete. Existing reports, inflight journals and incomplete billing must reject. Actual v26 validation: the 20-observation checkpoint permitted four next observations, all three rejection probes passed, standalone strict TypeScript and ESLint checks passed (`run-live-v26/planner-validation.json`). Do not push or rebuild frozen runtime while a cohort is active.

For Agent Match efficiency regressions, run `node --experimental-strip-types scripts/analyze-agent-match-efficiency.ts PLAN COMPLETE_JOURNAL NATIVE_BILLING PRIOR_SUMMARY NEW_REPORT` before further inference. It verifies the immutable schedule and financial bindings, reports actual cache/subset drift and client/generator/selector timing, and compares the remaining accumulated allowance to the reference cohort. It exits 4 when the reference cohort is unaffordable; this is planning evidence, never a new quality/cost/p95 approval or a guaranteed future invoice. Preserve unknown holds and do not spend the remainder on an incomplete qualification. Actual v26 diagnosis: drift in 10/12 identical-input cases, US$0.43758425 remaining versus US$2.38 reference native upper bound; zero generator calls.

The v5 selector uses a five-minute/64-entry process-local exact probability cache, partitioned by a one-way credential scope; anonymous calls bypass it. It stores neither raw brief nor generated answers and binds every semantic input, current eligible catalog, desired counts, provider credential fingerprint, protocol and model. Consent/config gates precede cache lookup; failures and incomplete usage cannot enter it. Hit traces report zero new selector calls/tokens and retain original usage/model/evidence-hash provenance. Benchmark scope also binds the cohort prefix; qualification rejects an orphan, expired, cross-case or charged cache hit. Do not claim a cache hit proves cold-cache quality or real total savings. Compact per-candidate question instructions are a new selector profile and require fresh complete qualification. Record transport byte changes separately from model tokens and native billing; no generator result may be reused across profiles.

For recurring Agent Match efficiency diagnosis, reuse `node --experimental-strip-types scripts/analyze-agent-match-efficiency.ts PLAN JOURNAL BILLING PRIOR_SUMMARY NEW_REPORT`. Its sequential timing audit measures intervening-call lower bounds, not future cache hits or new quality/cost/p95. The actual v26 audit found all 24 repeat intervals longer than the old five-minute TTL; the v28 seven-minute red/green regression passed after fixed thirty-minute credential-scoped reuse and rejects expiry at thirty minutes. Current eligible catalog, exact semantic inputs, 64-entry bound and consent gates remain mandatory. Complete new 72-generation qualification and accumulated USD7 authority still control publication; never manufacture observations or release unknown holds.
7 changes: 7 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ AI_GATEWAY_BASE_URL=https://api.openai.com/v1
AI_GATEWAY_API_KEY=
AI_GATEWAY_MODEL=openai/gpt-4o-mini

# Optional Agent Match discovery. Server secret; never use a VITE_ prefix.
# Jev is a separate TypeSafe provider and never uses the Lovable AI gateway.
TYPESAFE_API_KEY=
# off | shadow | filter. Default shadow: measure without pruning generator context.
# Promote to filter only after paired end-to-end quality/cost evaluation.
JEV_AGENT_MATCH_MODE=shadow

# --- Trust Score: release signing (Phase 2 + Phase 6) ------------------------
# Generate locally with:
# openssl genpkey -algorithm ed25519 -out priv.pem
Expand Down
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ Component artifacts are versioned and released independently via git tags:
- **`super-agent` CLI** — `cli-v*` tags publish cross-platform binaries.
- **`@superagentskill/sdk`** — versioned in `packages/sdk-ts/package.json`.

## [0.7.0] — 2026-10-24 — *Genesis* (alpha) — Optional Jev selection for Agent Match

### Changed

- Add consent-based TypeSafe discovery with shadow measurement, bounded requests and full-catalog recovery.

## [0.6.8] — 2026-10-24 — *Genesis* (alpha) — Deduplicate admin page navigation

### Changed
Expand Down Expand Up @@ -39,7 +45,7 @@ Component artifacts are versioned and released independently via git tags:
- Bind approval writes to the evaluated version and confirm the returned reviewer/status; reject errors and no-op writes.
- Keep failed server responses from being reported as successful review decisions.

## [0.6.4] — 2026-10-23 — *Genesis* (alpha) — Maintenance release
## [0.6.4] — 2026-10-23 — *Genesis* (alpha) — Optional Jev selection for Agent Match

### Changed

Expand Down
Loading