π€― LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.
TypeScript agentagent-collaborationagent-harnessloop-engineeringmcppersonal-assistantproactive-agentskillssuper-agenttask-management
π chore(acceptance): sync upstream skill snapshot (#19854)
AmAzing-8bce0bb73f18
diff --git a/.agents/skills/acceptance/SKILL.md b/.agents/skills/acceptance/SKILL.mdindex 99f8f086dfa..783fec8b6d3 100644--- a/.agents/skills/acceptance/SKILL.md+++ b/.agents/skills/acceptance/SKILL.md@@ -184,7 +184,32 @@ transitions or verification conditions. Do not move execution nodes or start anew round just to reorganize the checklist; those operations have differentexecution semantics.-1. Use the named acceptance (or create one with `lh acceptance create --help`).+1. Use the named acceptance, or create one before publishing the flow. If none+ was named, first run `lh acceptance create --help` and confirm it shows+ `Usage: lh acceptance create [options]` and `--requirement`. Parent-command+ help or a zero exit code alone does not prove support. If unavailable, upgrade+ `@lobehub/cli` to a release that supports this command and check again;+ updating the skill alone does not upgrade the CLI. If still unavailable,+ report flow-first creation as blocked. Do not invent a subject ID, upload an+ empty report, or substitute `lh acceptance run create` (which creates a round).++ ```bash+ lh acceptance create --title "Checkout recovery" \+ --requirement "Customers can recover from a declined payment and complete checkout" --json+ ```++ `--requirement` is a required, nonblank durable business goal; `--title` is+ optional. Omit `--subject` for a fresh standalone subject, even when an ambient+ topic exists. Pass `--subject task:<id>`, `topic:<id>`, `document:<id>`, or+ `standalone:<id>` only for an explicitly supplied subject. Reusing a subject+ preserves its recorded requirement, title, and state; it does not reopen it.+ Creation does not create a verification round, report, results, or passing verdict.++ The JSON contains `acceptanceId`, `acceptanceUrl`, `requirement`, `status`,+ and `subject: { subjectType, subjectId }`. Use `acceptanceId` in all flow+ commands below, **not** `subject.subjectId` or a verification run ID. Share+ `acceptanceUrl` verbatim; it already uses the CLI's configured server.+Write a JSON file with `definition: { title, entryNodeId, nodes, edges }`.Give nodes and edges stable UUIDs. Each node has `id` and exactly one of`criterionId` (existing check asset), `check: { id, title, definition }`@@ -347,17 +372,35 @@ Before declaring the task done, prove coverage: for each check withexplicitly; a missing type holds the delivery at `uncertain` no matter how goodthe work is.-The final response MUST include the published acceptance URL together with the-coverage result β never only a check-result id or a prose claim. Expose only the-**acceptance** (`/acceptance/<acceptanceId>`), the stable cross-round decision-surface; append `?r=<roundIndex>` for this round's fixed snapshot.+The final response for a completed handoff MUST include the published acceptance+URL together with the coverage result β never only a check-result id or a prose+claim. Obtain the links from the path you actually executed:++- **Authored round:** copy `acceptanceUrl` returned by+ `lh acceptance run ingest --json` verbatim. Add its `roundUrl` verbatim when+ non-null; otherwise the acceptance URL alone is the handoff.+- **Operation-plan round:** follow the read-only+ [plan handoff lookup](references/plan-format.md#resolve-the-plan-rounds-handoff-links).+ It resolves the supplied operation ID to its existing run, acceptance, and+ round using the CLI's actual server configuration. Copy its+ `acceptanceUrl` and `roundUrl` output. Do not run authored ingest, create another+ acceptance, or resubmit evidence merely to obtain a link.++Never guess a host, acceptance ID, or round index. The documented plan lookup is+the only reconstruction needed for CLIs whose submission output contains only an+internal run URL. If the run has no acceptance association or the lookup fails,+report the handoff as blocked and preserve the submitted evidence; do not declare+delivery complete or fabricate a link.Put no images, local paths, local file links, or internal run-page paths in thechat reply.Write the link as a plain-text line, never inside a fenced or inline code block β the-chat client only linkifies plain text, and a code block makes it unclickable:+chat client only linkifies plain text, and a code block makes it unclickable.+Replace each placeholder below with the URL from the selected path; omit the+`Round` line when `roundUrl` is null:-Acceptance: <https://lobehub.com/acceptance/ACCEPTANCE_ID> (the placeholder is the id ingest printed; it stays inside the URL)+Acceptance: <acceptanceUrl, verbatim>+Round: <roundUrl, verbatim>Coverage: 2/2 criteria, all required evidence uploaded## Portability rulesdiff --git a/.agents/skills/acceptance/agents/openai.yaml b/.agents/skills/acceptance/agents/openai.yamlnew file mode 100644index 00000000000..0879fff854f--- /dev/null+++ b/.agents/skills/acceptance/agents/openai.yaml@@ -0,0 +1,4 @@+interface:+ display_name: "Acceptance"+ short_description: "Verify deliveries and collect evidence for review"+ default_prompt: "Use $acceptance to verify this delivery against its requirements, collect product evidence, and publish the results for review."diff --git a/.agents/skills/acceptance/references/plan-format.md b/.agents/skills/acceptance/references/plan-format.mdindex 410d4af8e82..e9e70de5d03 100644--- a/.agents/skills/acceptance/references/plan-format.md+++ b/.agents/skills/acceptance/references/plan-format.md@@ -100,3 +100,60 @@ lh acceptance run evidence list "$CHECK_RESULT_ID" --json # confirm each requireCoverage rule: for each required criterion, **every** `requiredEvidence[].type`appears at least once in its evidence list. A missing type β capture and submitagain; then hand off per SKILL.md (acceptance URL + `coverage: n/n`).++## Resolve the plan round's handoff links++`result submit --json` returns an internal `url`, not `acceptanceUrl` or+`roundUrl`. Some plans need no evidence submissions at all. In both cases, resolve+the supplied operation ID with `lh verify plan state <operationId> --json`, then+read its `verifyRunId` using `lh acceptance run get <runId> --json`. The run's+`acceptanceId` and `roundIndex` identify the existing handoff; do not substitute a+result ID, subject ID, or the most recent round from another acceptance.++Keep the same CLI server, account, and workspace as the verification. This example+reads the resolved server from `lh doctor --offline --json` (`endpoints.resolution`+check, `evidence.serverUrl`), preserving self-hosted hosts and ports. Doctor may exit+nonzero for unrelated diagnostics while still returning this field; only a valid+endpoint result is used. No repair, network doctor probe, or remote write is requested.+The example requires Node.js and the existing CLI commands, not a new CLI release:++```bash+node - "$OPERATION_ID" <<'NODE'+const { execFileSync, spawnSync } = require('node:child_process');+const operationId = process.argv[2];+if (!operationId) throw new Error('Handoff blocked: the invocation must supply an operation ID.');+const doctor = spawnSync('lh', ['doctor', '--offline', '--json'], { encoding: 'utf8' });+if (doctor.error) throw doctor.error;+const endpoint = JSON.parse(doctor.stdout).checks?.find((check) => check.id === 'endpoints.resolution');+if (!['ok', 'warn'].includes(endpoint?.status) || !endpoint.evidence?.serverUrl) {+ throw new Error('Handoff blocked: the CLI did not resolve its server URL.');+}+const origin = new URL(endpoint.evidence.serverUrl).origin;+const query = (...args) => JSON.parse(execFileSync('lh', [...args, '--json'], { encoding: 'utf8' }));+const state = query('verify', 'plan', 'state', operationId);+const runId = state?.verifyRunId;+if (!runId) throw new Error('Handoff blocked: the operation has no verification run.');+const run = query('acceptance', 'run', 'get', runId);+if (run?.id !== runId || run.operationId !== operationId || !run.acceptanceId || !Number.isInteger(run.roundIndex) || run.roundIndex < 1) {+ throw new Error('Handoff blocked: the operation run must already be attached to an acceptance and round.');+}+const acceptanceUrl = new URL(`/acceptance/${encodeURIComponent(run.acceptanceId)}`, origin);+const roundUrl = new URL(acceptanceUrl);+roundUrl.searchParams.set('r', String(run.roundIndex));+console.log(JSON.stringify({+ acceptanceId: run.acceptanceId, verifyRunId: runId, roundIndex: run.roundIndex,+ acceptanceUrl: acceptanceUrl.href, roundUrl: roundUrl.href,+}, null, 2));+NODE+```++Using the IDs printed by the lookup, read back+`lh acceptance view <acceptanceId> --json` and confirm its round ledger contains+this `verifyRunId` and `roundIndex`, then copy the lookup's links into the final+handoff with the observed evidence coverage. The lookup neither settles the+round nor supplies a verifier verdict or user acceptance.++If the lookup fails or the run has no acceptance association, preserve the+evidence and report the handoff as blocked so the owning workflow can link the+existing run. Do not invent an acceptance ID, expose the internal `/verify/` URL,+create a replacement acceptance, or ingest a duplicate round to obtain a link.diff --git a/.agents/skills/acceptance/references/report.md b/.agents/skills/acceptance/references/report.mdindex a816112093b..f57fe240e87 100644--- a/.agents/skills/acceptance/references/report.md+++ b/.agents/skills/acceptance/references/report.md@@ -63,6 +63,13 @@ lh acceptance run result submit --run "$RUN" --item "$CHECK_ITEM_ID" β¦Prefer **A**: per-criterion submits without a plan produce checks with nodeclared intent, so the page has nothing to pair the outcome against.+For a flow-first plan without an acceptance yet, use+[`lh acceptance create`](../SKILL.md#optional-user-journey-flows) before publishing+the graph. Unlike `acceptance run create` above, it returns an **Acceptance ID**+without creating a round. Do not use the round ID from **B** in flow commands.+If an acceptance was already created, pass `--acceptance <acceptanceId>` to ingest+so the report joins that acceptance rather than creating another standalone one.+## Directory layoutRounds live under `.acceptances/`, grouped by the delivery they belong to:@@ -174,9 +181,13 @@ supersedes? }`.standalone acceptance. Pass `--subject` only when you were told which Task,Topic, or Document owns the work. To publish a repair into that same history, add`--acceptance <acceptanceId>` using the ID printed by the first ingest. The- command uploads cases + evidence + report body and prints- `/acceptance/<acceptanceId>` plus its `?r=<roundIndex>` snapshot form β- the only link the final reply exposes (SKILL.md, Final handoff).+ command uploads cases + evidence + report body and returns `acceptanceUrl`+ for the stable acceptance page, plus `roundUrl` for this round's snapshot+ (`null` when no round index is available). Copy `acceptanceUrl` verbatim in+ the final reply, and add `roundUrl` verbatim when it is non-null.+ Never reconstruct the host, path, or round query: the CLI resolves the+ configured server, including self-hosted installations. See+ [Final handoff](../SKILL.md#final-handoff-mandatory).## result.json schemadiff --git a/.agents/skills/acceptance/references/screenshot-helpers.md b/.agents/skills/acceptance/references/screenshot-helpers.mdindex 58f7b4842ec..5541a2b57c4 100644--- a/.agents/skills/acceptance/references/screenshot-helpers.md+++ b/.agents/skills/acceptance/references/screenshot-helpers.md@@ -29,6 +29,12 @@ bounds discovery, the WebSocket handshake, and capture together. `--full` capturthe page's content bounds. Errors exit nonzero; missing/old Node exits 7, capturefailure exits 5. The script creates the output's parent directories.+Without `--out`, either helper saves to a unique directory in the system temporary+directory (honoring `TMPDIR`), even for concurrent captures on the same port.+Read the actual screenshot path from the JSON result's `out` field; do not assume+a fixed filename. Ordinary captures are retained for inspection; remove the+temporary directory after use. An explicit `--out` writes to that exact path.+The wrapper also attempts a brightness probe using **macOS `sips` and Python 3**(standard library only). Ordinary capture can succeed without these tools, butexplicitly reports that brightness was not measured. A measured black frame exitsdiff --git a/.agents/skills/acceptance/scripts/cdp-capture.cjs b/.agents/skills/acceptance/scripts/cdp-capture.cjsindex 166191eb4c4..08ecd7e6aef 100644--- a/.agents/skills/acceptance/scripts/cdp-capture.cjs+++ b/.agents/skills/acceptance/scripts/cdp-capture.cjs@@ -18,7 +18,7 @@ async function capture() {const { values } = parseArgs({options: {'port': { type: 'string', default: '9222' },- 'out': { type: 'string', default: path.join(require('node:os').tmpdir(), 'cdp-capture.png') },+ 'out': { type: 'string' },'full': { type: 'boolean', default: false },'target-url': { type: 'string' },'timeout': { type: 'string', default: '12000' },@@ -106,8 +106,12 @@ async function capture() {if (bytes.length < 24 || !bytes.subarray(0, 8).equals(Buffer.from('89504e470d0a1a0a', 'hex'))) {throw new Error('CDP returned an empty or invalid PNG.');}- fs.mkdirSync(path.dirname(path.resolve(values.out)), { recursive: true });- fs.writeFileSync(values.out, bytes);+ const out = values.out ?? path.join(+ fs.mkdtempSync(path.join(require('node:os').tmpdir(), 'acceptance-cdp.')),+ 'shot.png',+ );+ fs.mkdirSync(path.dirname(path.resolve(out)), { recursive: true });+ fs.writeFileSync(out, bytes);socket.close();clearTimeout(deadline);finish(@@ -116,7 +120,7 @@ async function capture() {bytes: bytes.length,ms: Date.now() - started,targetUrl: page.url,- out: values.out,+ out,},0,);diff --git a/.agents/skills/acceptance/scripts/cdp-screenshot.sh b/.agents/skills/acceptance/scripts/cdp-screenshot.shindex a7625cc8e2d..c42bf467265 100644--- a/.agents/skills/acceptance/scripts/cdp-screenshot.sh+++ b/.agents/skills/acceptance/scripts/cdp-screenshot.sh@@ -25,19 +25,22 @@ while [ $# -gt 0 ]; dodonecommand -v node >/dev/null 2>&1 || { echo '[cdp-shot] Node.js >=22.15 is required.' >&2; exit 7; }+# Give every implicit capture its own path, including concurrent calls on one port.# Only an implicit --check output is disposable; never delete a caller's --out.if [ -z "$OUT" ]; then+ capture_dir="$(mktemp -d "${TMPDIR:-/tmp}/acceptance-cdp.XXXXXX")" || exit 5if [ "$CHECK" = 1 ]; then- capture_dir="$(mktemp -d "${TMPDIR:-/tmp}/acceptance-cdp.XXXXXX")" || exit 5trap 'rm -rf "$capture_dir"' EXIT- OUT="$capture_dir/shot.png"- else- OUT="${TMPDIR:-/tmp}/cdp-capture.png"fi+ OUT="$capture_dir/shot.png"finode "$SCRIPT_DIR/cdp-capture.cjs" --out "$OUT" ${PASS[@]+"${PASS[@]}"}status=$?-[ "$status" = 0 ] || exit "$status"+if [ "$status" != 0 ]; then+ # A failed implicit capture wrote nothing; do not leave its empty directory behind.+ [ "$CHECK" = 0 ] && [ -n "${capture_dir:-}" ] && rm -rf "$capture_dir"+ exit "$status"+fiif maximum="$(image_brightness "$OUT")"; thenif [ "$maximum" -lt 12 ]; then