@allurereport/plugin-agent 3.14.3 → 3.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -297,7 +297,7 @@ Acceptance should stay strict even though the plugin itself is advisory:
297
297
 
298
298
  When agent output does not fully model runner-visible failures:
299
299
 
300
- - inspect `artifacts/global/stderr.txt` and global errors before concluding the run is complete
300
+ - inspect process-log paths in `manifest/run.json` (or command-qualified artifacts under `artifacts/global/`) and global errors before concluding the run is complete
301
301
  - treat the review as partial when suite-load, import, or setup failures are visible outside logical test files
302
302
  - keep console-only conclusions provisional until the missing modeling is understood
303
303
 
@@ -10,7 +10,7 @@ export declare const createAgentCapabilities: () => {
10
10
  readonly run: {
11
11
  readonly supported: true;
12
12
  readonly usage: "allure agent [options] -- <command>";
13
- readonly options: readonly ["--config", "--cwd", "--output", "--report", "--expectations", "--goal", "--task-id", "--expect-tests", "--expect-label", "--expect-env", "--expect-test", "--expect-prefix", "--expect-step-containing", "--forbid-label", "--expect-steps", "--expect-attachments", "--expect-attachment", "--environment", "--environment-name", "--silent", "--rerun-from", "--rerun-latest", "--rerun-preset", "--rerun-environment", "--rerun-label"];
13
+ readonly options: readonly ["--config", "--cwd", "--output", "--report", "--results-dir", "--expectations", "--goal", "--task-id", "--expect-tests", "--expect-label", "--expect-env", "--expect-test", "--expect-prefix", "--expect-step-containing", "--forbid-label", "--expect-steps", "--expect-attachments", "--expect-attachment", "--environment", "--environment-name", "--silent", "--rerun-from", "--rerun-latest", "--rerun-preset", "--rerun-environment", "--rerun-label"];
14
14
  };
15
15
  readonly inspect: {
16
16
  readonly supported: true;
@@ -15,6 +15,7 @@ export const createAgentCapabilities = () => ({
15
15
  "--cwd",
16
16
  "--output",
17
17
  "--report",
18
+ "--results-dir",
18
19
  "--expectations",
19
20
  "--goal",
20
21
  "--task-id",
@@ -5,13 +5,13 @@ export type EnrichmentActionDefinition = {
5
5
  guidance: string;
6
6
  };
7
7
  export declare const ENRICHMENT_ACTIONS_BY_CHECK_NAME: Record<string, EnrichmentActionDefinition>;
8
- export declare const AGENT_WORKFLOWS_MARKDOWN = "Use the smallest workflow that matches the task. Each workflow has the same shape: when to use it, which agent-mode commands help, and what must be true before you call the task done.\n\n### Validate A Change\n\nUse when code or tests changed and you need a user-facing safety conclusion. For small mechanical changes, use this same workflow with narrower expectations rather than a separate shortcut.\n\nCommands:\n\n- `allure agent --goal <text> --expect-* -- <command>`\n\nDone when:\n\n- the expected scope ran and no forbidden scope appeared\n- `index.md`, `manifest/run.json`, `manifest/tests.jsonl`, and `manifest/findings.jsonl` were reviewed\n- the `index.md` path was reported\n- the changed package build and required static checks passed when this repository guide requires them\n\n### Add Or Update Tests\n\nUse when creating or changing tests for a feature, fix, or behavior gap.\n\nCommands:\n\n- `allure agent --goal <text> --expect-tests <count> --expect-test \"<fullName>\" --expect-label name=value --expect-step-containing <text> -- <command>`\n\nDone when:\n\n- the tests prove the intended behavior rather than only touching the code path\n- scope expectations match the intended feature, issue, or package slice\n- each expected test has enough steps or attachments for a reviewer to understand what happened\n- weak evidence, scope drift, and unexpected-test findings are fixed or explicitly accepted as out of scope\n\n### Review Existing Coverage\n\nUse when auditing a package, command matrix, feature area, or business behavior without necessarily changing tests first.\n\nCommands:\n\n- one scoped `allure agent --goal <text> --expect-* -- <command>` run per review group\n- `allure agent inspect --goal <text> --expect-* <allure-results-dir-or-glob>` or `--dump <archive-or-glob>` when the evidence already exists as local results or CI dump artifacts\n\nDone when:\n\n- the audit is split into reviewable groups, or it is explicitly documented as a broad package-health run\n- each group has expectations that describe the intended scope\n- runtime artifacts are reviewed before source-only coverage conclusions\n- uncovered behavior is recorded as follow-up test work instead of being hidden in a broad pass/fail summary\n\n### Review Existing Evidence\n\nUse when CI has already produced dump archives or local Allure results already exist and you need agent-readable review artifacts without rerunning tests locally.\n\nCommands:\n\n- `allure agent inspect <allure-results-dir-or-glob>`\n- `allure agent inspect --dump <archive-or-glob>`\n- `allure agent inspect --dump <linux.zip> --dump <macos.zip>`\n- `allure agent inspect --goal <text> --expect-* --dump <archive-or-glob>`\n\nDone when:\n\n- all intended result directories or dump artifacts were downloaded or present and matched by the command\n- `index.md`, `manifest/run.json`, `manifest/tests.jsonl`, and `manifest/findings.jsonl` were reviewed\n- the review calls out that inspect-derived output cannot add missing live process logs or rerun-time evidence unless those artifacts were captured in the results or dumps\n- any environment-specific gaps between CI jobs are explicit\n\n### Triage Failures\n\nUse when tests failed, broke, or runner output does not match agent artifacts.\n\nCommands:\n\n- `allure agent latest`\n- `allure agent --rerun-latest --rerun-preset failed -- <command>`\n- `allure agent --rerun-from <output-dir> --rerun-preset failed -- <command>`\n\nDone when:\n\n- failing, broken, or unmodeled runner-visible failures are represented in agent artifacts, or partial modeling is called out explicitly\n- `artifacts/global/stderr.txt` and global errors were checked when failures are missing from `manifest/tests.jsonl`\n- reruns use prior agent output instead of hand-built runner test names whenever the runner can consume the generated test plan\n\n### Rerun A Prior Scope\n\nUse when prior agent output already identifies failed, unsuccessful, or review-targeted tests and the next run should stay focused.\n\nCommands:\n\n- `allure agent select --latest [--preset review|failed|unsuccessful|all]`\n- `allure agent select --from <output-dir> [--environment <id>] [--label name=value]`\n- `allure agent --rerun-latest -- <command>`\n- `allure agent --rerun-from <output-dir> -- <command>`\n\nDone when:\n\n- the rerun scope comes from Allure testplan support\n- `--rerun-preset`, `--rerun-environment`, or `--rerun-label` filters explain any narrowed selection\n- manual test names are used only as a fallback when testplan support is unavailable\n- the rerun output is reviewed before making a new conclusion\n\n### Improve Evidence Quality\n\nUse when tests pass or fail but the runtime story is too weak to review.\n\nCommands:\n\n- `allure agent --expect-step-containing <text> --expect-steps <count> --expect-attachments <count> -- <command>`\n- `allure agent --expect-attachment <name|name=value|content-type=value> -- <command>`\n\nDone when:\n\n- steps describe real setup, actions, state transitions, or assertions\n- attachments contain runtime evidence such as payloads, responses, screenshots, DOM snapshots, diffs, logs, or traces\n- placeholder steps, generic `\"passed\"` attachments, and other dummy evidence are removed\n- the same intended scope was rerun and no high-confidence evidence findings remain\n\n### Recover Or Diagnose Agent Mode\n\nUse when agent output is missing, the latest run cannot be found, local CLI support is unclear, or state behaves differently in CI or a sandbox.\n\nCommands:\n\n- `allure --version`\n- `allure agent capabilities --json`\n- `allure agent --help`\n- `allure agent latest`\n- `allure agent state-dir`\n- `ALLURE_AGENT_STATE_DIR=<dir>`\n\nDone when:\n\n- supported local commands and flags are known from capabilities or help output\n- the output directory, `index.md` path, or state directory is identified, or the reason it is unavailable is documented\n- console-only conclusions stay provisional until agent-mode artifacts are available";
8
+ export declare const AGENT_WORKFLOWS_MARKDOWN = "Use the smallest workflow that matches the task. Each workflow has the same shape: when to use it, which agent-mode commands help, and what must be true before you call the task done.\n\n### Validate A Change\n\nUse when code or tests changed and you need a user-facing safety conclusion. For small mechanical changes, use this same workflow with narrower expectations rather than a separate shortcut.\n\nCommands:\n\n- `allure agent --goal <text> --expect-* -- <command>`\n\nDone when:\n\n- the expected scope ran and no forbidden scope appeared\n- `index.md`, `manifest/run.json`, `manifest/tests.jsonl`, and `manifest/findings.jsonl` were reviewed\n- the `index.md` path was reported\n- the changed package build and required static checks passed when this repository guide requires them\n\n### Add Or Update Tests\n\nUse when creating or changing tests for a feature, fix, or behavior gap.\n\nCommands:\n\n- `allure agent --goal <text> --expect-tests <count> --expect-test \"<fullName>\" --expect-label name=value --expect-step-containing <text> -- <command>`\n\nDone when:\n\n- the tests prove the intended behavior rather than only touching the code path\n- scope expectations match the intended feature, issue, or package slice\n- each expected test has enough steps or attachments for a reviewer to understand what happened\n- weak evidence, scope drift, and unexpected-test findings are fixed or explicitly accepted as out of scope\n\n### Review Existing Coverage\n\nUse when auditing a package, command matrix, feature area, or business behavior without necessarily changing tests first.\n\nCommands:\n\n- one scoped `allure agent --goal <text> --expect-* -- <command>` run per review group\n- `allure agent inspect --goal <text> --expect-* <allure-results-dir-or-glob>` or `--dump <archive-or-glob>` when the evidence already exists as local results or CI dump artifacts\n\nDone when:\n\n- the audit is split into reviewable groups, or it is explicitly documented as a broad package-health run\n- each group has expectations that describe the intended scope\n- runtime artifacts are reviewed before source-only coverage conclusions\n- uncovered behavior is recorded as follow-up test work instead of being hidden in a broad pass/fail summary\n\n### Review Existing Evidence\n\nUse when CI has already produced dump archives or local Allure results already exist and you need agent-readable review artifacts without rerunning tests locally.\n\nCommands:\n\n- `allure agent inspect <allure-results-dir-or-glob>`\n- `allure agent inspect --dump <archive-or-glob>`\n- `allure agent inspect --dump <linux.zip> --dump <macos.zip>`\n- `allure agent inspect --goal <text> --expect-* --dump <archive-or-glob>`\n\nDone when:\n\n- all intended result directories or dump artifacts were downloaded or present and matched by the command\n- `index.md`, `manifest/run.json`, `manifest/tests.jsonl`, and `manifest/findings.jsonl` were reviewed\n- the review calls out that inspect-derived output cannot add missing live process logs or rerun-time evidence unless those artifacts were captured in the results or dumps\n- any environment-specific gaps between CI jobs are explicit\n\n### Triage Failures\n\nUse when tests failed, broke, or runner output does not match agent artifacts.\n\nCommands:\n\n- `allure agent latest`\n- `allure agent --rerun-latest --rerun-preset failed -- <command>`\n- `allure agent --rerun-from <output-dir> --rerun-preset failed -- <command>`\n\nDone when:\n\n- failing, broken, or unmodeled runner-visible failures are represented in agent artifacts, or partial modeling is called out explicitly\n- command-named stderr process log under `artifacts/global/` and global errors were checked when failures are missing from `manifest/tests.jsonl`\n- reruns use prior agent output instead of hand-built runner test names whenever the runner can consume the generated test plan\n\n### Rerun A Prior Scope\n\nUse when prior agent output already identifies failed, unsuccessful, or review-targeted tests and the next run should stay focused.\n\nCommands:\n\n- `allure agent select --latest [--preset review|failed|unsuccessful|all]`\n- `allure agent select --from <output-dir> [--environment <id>] [--label name=value]`\n- `allure agent --rerun-latest -- <command>`\n- `allure agent --rerun-from <output-dir> -- <command>`\n\nDone when:\n\n- the rerun scope comes from Allure testplan support\n- `--rerun-preset`, `--rerun-environment`, or `--rerun-label` filters explain any narrowed selection\n- manual test names are used only as a fallback when testplan support is unavailable\n- the rerun output is reviewed before making a new conclusion\n\n### Improve Evidence Quality\n\nUse when tests pass or fail but the runtime story is too weak to review.\n\nCommands:\n\n- `allure agent --expect-step-containing <text> --expect-steps <count> --expect-attachments <count> -- <command>`\n- `allure agent --expect-attachment <name|name=value|content-type=value> -- <command>`\n\nDone when:\n\n- steps describe real setup, actions, state transitions, or assertions\n- attachments contain runtime evidence such as payloads, responses, screenshots, DOM snapshots, diffs, logs, or traces\n- placeholder steps, generic `\"passed\"` attachments, and other dummy evidence are removed\n- the same intended scope was rerun and no high-confidence evidence findings remain\n\n### Recover Or Diagnose Agent Mode\n\nUse when agent output is missing, the latest run cannot be found, local CLI support is unclear, or state behaves differently in CI or a sandbox.\n\nCommands:\n\n- `allure --version`\n- `allure agent capabilities --json`\n- `allure agent --help`\n- `allure agent latest`\n- `allure agent state-dir`\n- `ALLURE_AGENT_STATE_DIR=<dir>`\n\nDone when:\n\n- supported local commands and flags are known from capabilities or help output\n- the output directory, `index.md` path, or state directory is identified, or the reason it is unavailable is documented\n- console-only conclusions stay provisional until agent-mode artifacts are available";
9
9
  export declare const AGENT_COMMAND_TASK_MAP: readonly ["`allure --version`, `allure agent capabilities --json`, and `allure agent --help`: setup and capability-detection loop. Use when the local CLI surface is unknown, generated guidance may be stale, or you need to choose supported flags without guessing.", "`allure agent --goal ... -- <command>`: test review, feature delivery, smoke-check, and coverage loops. Use when a test command needs runtime evidence, scope expectations, and user-facing conclusions based on agent artifacts rather than console output alone. The default `--report auto` may also write a human-readable `awesome/index.html` for small runs.", "`allure agent inspect <allure-results-dir-or-glob>` / `allure agent inspect --dump <archive-or-glob>`: existing evidence review loop. Use after downloading one or more dump archives or when Allure results already exist and you need agent-readable markdown, manifests, and optional human report output without rerunning tests locally. Repeat `--dump` to merge multiple environments or jobs.", "`allure agent latest`: output recovery loop. Use when a previous run omitted `--output`, you need the newest output directory and `index.md` path, a user asks for the human-readable report from the last run, or a follow-up task needs prior output before selecting or rerunning tests.", "`allure agent state-dir`: tooling diagnosis loop. Use when `latest` cannot find a run, CI or sandbox state looks wrong, or you need to explain where per-project run registries are stored.", "`allure agent query --latest summary|tests|findings|test` / `allure agent query --from <output-dir> ...`: output inspection loop. Use when you need a focused JSON summary, human-report status, filtered tests, filtered findings, or one test from prior agent output without manually loading raw manifests first.", "`allure agent select --latest` / `allure agent select --from <output-dir>`: rerun-planning loop. Use when you need to inspect, filter, or write the Allure test plan from prior results before executing another run. Without `--output`, stdout is raw testplan JSON; with `--output`, stdout summarizes the file path, source output, preset, and selected count.", "`allure agent --rerun-latest` / `allure agent --rerun-from <output-dir>`: focused retry loop. Use when prior output already identifies failed, unsuccessful, or review-targeted tests and you should rerun that slice through Allure testplan support instead of rebuilding runner-specific test names.", "`ALLURE_AGENT_STATE_DIR=<dir>`: CI and sandbox state-control loop. Use when multiple jobs need a deterministic state location, the default temp state is not shared, or the default state directory is not writable."];
10
10
  export declare const AGENT_VERIFICATION_RULES: readonly ["If a command executes tests and its result will be used for smoke checking, reasoning, review, coverage analysis, debugging, or any user-facing conclusion, run it through `allure agent`. It preserves the original console logs and adds agent-mode artifacts without inheriting the normal report or export plugins from the project config.", "Use `allure agent` for smoke checks too, even when the change is small or mechanical.", "Only skip agent mode when it is impossible or when you are debugging agent mode itself.", "After changing a package in this repository, run that package build command before finalizing (for example, `yarn workspace <package-name> build`).", "After each agent-mode test run, print the `index.md` path from that run's output directory so users can open the run overview quickly."];
11
11
  export declare const AGENT_TEST_ENRICHMENT_BEST_PRACTICES: readonly ["Steps should wrap real actions, state transitions, or assertions; let the test's nature decide how granular they are.", "Attachments must capture real runtime evidence from that execution: payloads, responses, screenshots, DOM snapshots, diffs, logs, or traces.", "Add metadata only when it improves scope review, debugging, or downstream policy. Keep labels and parameters intentionally minimal.", "If multiple call sites need the same evidence, instrument the helper once. Example: teach `runCommand` to emit a step instead of wrapping every `runCommand(...)` call site with identical step blocks."];
12
12
  export declare const AGENT_ANTI_DUMMY_POLICY: readonly ["Do not add empty wrapper steps, placeholder attachments, or generic strings such as `passed`, `success`, or static boilerplate.", "Do not attach evidence that is not grounded in the current test execution. Synthetic summaries are fine only when they are derived from real runtime artifacts.", "Do not inflate metadata with labels, stories, or severities that no expectation, review step, or policy actually uses."];
13
13
  export declare const AGENT_ACCEPTANCE_CHECKLIST: readonly ["The rerun matches the intended scope and does not trigger forbidden or unexpected-test findings.", "Each touched test shows enough evidence to explain what happened and what was verified.", "Retries include per-attempt diagnostics when the same test reruns."];
14
14
  export declare const AGENT_REVIEW_COMPLETENESS_CHECKLIST: readonly ["The relevant scope was run with agent mode unless that was impossible.", "Scoped reviews created expectations before the final rerun, unless the task was an intentionally broad package-health audit.", "The final conclusion was based on `manifest/run.json`, `manifest/test-events.jsonl`, `index.md`, `manifest/tests.jsonl`, and `manifest/findings.jsonl` rather than console output alone.", "Any missing or partial runtime modeling was called out explicitly before the review was considered complete."];
15
- export declare const AGENT_PARTIAL_RUNTIME_REVIEW_RULES: readonly ["Suite-load, import, or setup failures may appear only in `artifacts/global/stderr.txt` or global errors instead of `manifest/tests.jsonl`.", "If runner-visible failures are not represented as logical tests, inspect global stderr and treat the run as a partial runtime review, not a clean result set.", "Console-only conclusions stay provisional when agent output is missing, incomplete, or partially modeled."];
15
+ export declare const AGENT_PARTIAL_RUNTIME_REVIEW_RULES: readonly ["Suite-load, import, or setup failures may appear only in command-named stderr under `artifacts/global/` or global errors instead of `manifest/tests.jsonl`.", "If runner-visible failures are not represented as logical tests, inspect global stderr and treat the run as a partial runtime review, not a clean result set.", "Console-only conclusions stay provisional when agent output is missing, incomplete, or partially modeled."];
16
16
  export declare const AGENT_INSTRUCTIONS_TEMPLATE = "## Allure Agent Mode Instructions\n\n- If a command executes tests and its result will be used for smoke checking, reasoning, review, coverage analysis, debugging, or any user-facing conclusion, run it through `allure agent`. It preserves the original console logs and adds agent-mode artifacts without inheriting the normal report or export plugins from the project config.\n- Use `allure agent` for smoke checks too, even when the change is small or mechanical.\n- Only skip agent mode when it is impossible or when you are debugging agent mode itself.\n- After each agent-mode test run, print the `index.md` path from that run's output directory so users can open the run overview quickly.\n- Use `allure agent latest` to print the newest output directory and `index.md` path when `--output` was omitted.\n- When a user asks for the human-readable report from the last run, use `allure agent latest` first if the output directory is unknown, then check `manifest/human-report.json`; when its status is `generated`, use the path recorded there, usually `awesome/index.html`.\n- Use `allure agent capabilities --json` when you need structured supported-command, expectation, output, rerun, and unsupported-feature data without scraping help text.\n- Use `allure agent state-dir` to inspect the shared state directory that stores per-project run registries.\n- Use `allure agent latest`, `state-dir`, `query`, `select`, and `--rerun-*` according to their loop/task/problem mapping instead of treating them as interchangeable helper commands.\n- Use `allure agent inspect <allure-results-dir-or-glob>` or `allure agent inspect --dump <archive-or-glob>` when you need agent-readable markdown and manifests from existing Allure results without rerunning tests locally; repeat `--dump` for multiple CI jobs or environments.\n- Use `--report auto|off|awesome|config` to control human report output. The default `auto` mode writes `awesome/index.html` for 1000 or fewer stored visible logical results and records generated, skipped, disabled, or failed status in `manifest/human-report.json`.\n- Use `allure agent query --latest summary|tests|findings|test` or `allure agent query --from <output-dir> ...` to inspect prior output as focused JSON before manually opening raw manifests.\n- Use `allure agent select --latest` or `allure agent select --from <output-dir>` to inspect the review-targeted test plan before rerunning; add `--output <file>` when you want the CLI to write the plan and print a short selection summary.\n- Use `allure agent --rerun-latest -- <command>` or `allure agent --rerun-from <output-dir> -- <command>` to rerun only the selected tests.\n- When rerunning previous failures, use `allure agent --rerun-latest --rerun-preset failed -- <command>` or `allure agent --rerun-from <output-dir> --rerun-preset failed -- <command>` instead of manually rebuilding runner-specific test names.\n- Use `--rerun-preset review|failed|unsuccessful|all`, repeated `--rerun-environment <id>`, and repeated `--rerun-label name=value` when you need a narrower rerun selection from the previous output.\n- Use `ALLURE_AGENT_STATE_DIR` when you need to override the shared agent state directory for `latest`, `state-dir`, or `--rerun-latest`.\n- Prefer inline `allure agent` expectation flags such as `--goal`, `--expect-tests`, `--expect-test`, `--expect-label`, and `--expect-step-containing`; use `--expectations <file>` only when flags become awkward.\n- Run tests with `allure agent` and review `manifest/run.json`, `manifest/test-events.jsonl`, `index.md`, `manifest/tests.jsonl`, and `manifest/findings.jsonl`.\n- Enrich only the intended tests. Add real steps for real setup, actions, and assertions.\n- Attach only real runtime evidence such as payloads, responses, screenshots, DOM snapshots, diffs, logs, or traces.\n- Keep metadata minimal. Add labels or severity only when scope review, debugging, or quality policy uses them.\n- Instrument stable helpers when several call sites need the same evidence. For example, teach `runCommand` to emit a step instead of wrapping every caller.\n- Reject the rerun if scope drifts or evidence stays weak.";
17
17
  export declare const renderAgentsGuide: () => string;
package/dist/guidance.js CHANGED
@@ -194,7 +194,7 @@ Commands:
194
194
  Done when:
195
195
 
196
196
  - failing, broken, or unmodeled runner-visible failures are represented in agent artifacts, or partial modeling is called out explicitly
197
- - \`artifacts/global/stderr.txt\` and global errors were checked when failures are missing from \`manifest/tests.jsonl\`
197
+ - command-named stderr process log under \`artifacts/global/\` and global errors were checked when failures are missing from \`manifest/tests.jsonl\`
198
198
  - reruns use prior agent output instead of hand-built runner test names whenever the runner can consume the generated test plan
199
199
 
200
200
  ### Rerun A Prior Scope
@@ -290,7 +290,7 @@ export const AGENT_REVIEW_COMPLETENESS_CHECKLIST = [
290
290
  "Any missing or partial runtime modeling was called out explicitly before the review was considered complete.",
291
291
  ];
292
292
  export const AGENT_PARTIAL_RUNTIME_REVIEW_RULES = [
293
- "Suite-load, import, or setup failures may appear only in `artifacts/global/stderr.txt` or global errors instead of `manifest/tests.jsonl`.",
293
+ "Suite-load, import, or setup failures may appear only in command-named stderr under `artifacts/global/` or global errors instead of `manifest/tests.jsonl`.",
294
294
  "If runner-visible failures are not represented as logical tests, inspect global stderr and treat the run as a partial runtime review, not a clean result set.",
295
295
  "Console-only conclusions stay provisional when agent output is missing, incomplete, or partially modeled.",
296
296
  ];
@@ -333,7 +333,7 @@ export const renderAgentsGuide = () => `# AGENTS Guide
333
333
  3. Open \`index.md\` for run-level status, scope summary, and the highest-priority findings.
334
334
  4. If a human-readable report is needed, read \`manifest/human-report.json\`; when status is \`generated\`, open the recorded path such as \`awesome/index.html\`.
335
335
  5. Open the relevant file under \`tests/<environment>/<historyId-or-trId>.md\` for evidence review.
336
- 6. Follow links into \`.assets/\` for test-scoped artifacts and into \`artifacts/global/\` for process logs such as stdout and stderr.
336
+ 6. Follow links into \`.assets/\` for test-scoped artifacts and into \`artifacts/global/\` for command-named process logs such as stdout and stderr.
337
337
 
338
338
  ## Directory Contract
339
339
 
package/dist/paths.d.ts CHANGED
@@ -1,3 +1,7 @@
1
1
  export declare const isPathInside: (parentPath: string, candidatePath: string) => boolean;
2
2
  export declare const resolveAgentIndexPath: (outputDir: string) => string;
3
3
  export declare const formatAgentOutputLinks: (outputDir: string) => string[];
4
+ export type ProcessLogStream = "stdout" | "stderr";
5
+ export declare const sanitizeProcessCommand: (command: string) => string;
6
+ export declare const formatProcessLogAttachmentName: (command: string, stream: ProcessLogStream) => string;
7
+ export declare const isProcessLogAttachmentName: (name: string | undefined, stream: ProcessLogStream) => boolean;
package/dist/paths.js CHANGED
@@ -8,3 +8,20 @@ export const formatAgentOutputLinks = (outputDir) => [
8
8
  `agent output: ${outputDir}`,
9
9
  `agent index: ${resolveAgentIndexPath(outputDir)}`,
10
10
  ];
11
+ const MAX_PROCESS_COMMAND_COMPONENT_LENGTH = 180;
12
+ export const sanitizeProcessCommand = (command) => {
13
+ const normalized = command.replace(/[^A-Za-z0-9._-]+/g, "_");
14
+ let start = 0;
15
+ let end = normalized.length;
16
+ while (start < end && normalized[start] === "_") {
17
+ start += 1;
18
+ }
19
+ while (end > start && normalized[end - 1] === "_") {
20
+ end -= 1;
21
+ }
22
+ const readable = normalized.slice(start, end);
23
+ const base = readable.length > 0 ? readable : "process";
24
+ return base.slice(0, MAX_PROCESS_COMMAND_COMPONENT_LENGTH);
25
+ };
26
+ export const formatProcessLogAttachmentName = (command, stream) => `${sanitizeProcessCommand(command)}.${stream}.txt`;
27
+ export const isProcessLogAttachmentName = (name, stream) => name === `${stream}.txt` || (name?.endsWith(`.${stream}.txt`) ?? false);
package/dist/plugin.js CHANGED
@@ -16,6 +16,7 @@ import process from "node:process";
16
16
  import { formatDuration, isAttachment, isStep, } from "@allurereport/core-api";
17
17
  import { renderAgentsGuide } from "./guidance.js";
18
18
  import { parseAgentExpectations } from "./model.js";
19
+ import { isProcessLogAttachmentName } from "./paths.js";
19
20
  const AGENT_SCHEMA_VERSION = "allure-agent-output/v1";
20
21
  const MANAGED_ENTRIES = ["index.md", "AGENTS.md", "tests", "artifacts", "manifest"];
21
22
  const STATUS_ORDER = {
@@ -1314,9 +1315,10 @@ const renderTestFile = (params) => {
1314
1315
  };
1315
1316
  const renderIndex = (params) => {
1316
1317
  const { context, command, generatedAt, phase, stats, durationSummary, environmentSummary, modelingSummary, expectations, tests, globalArtifacts, globalErrors, globalExitCode, qualityGateResults, findings, humanReport, } = params;
1317
- const stdoutArtifact = globalArtifacts.find((artifact) => artifact.displayName === "stdout.txt");
1318
- const stderrArtifact = globalArtifacts.find((artifact) => artifact.displayName === "stderr.txt");
1319
- const remainingGlobalArtifacts = globalArtifacts.filter((artifact) => artifact.displayName !== "stdout.txt" && artifact.displayName !== "stderr.txt");
1318
+ const stdoutArtifact = globalArtifacts.find((artifact) => isProcessLogAttachmentName(artifact.displayName, "stdout"));
1319
+ const stderrArtifact = globalArtifacts.find((artifact) => isProcessLogAttachmentName(artifact.displayName, "stderr"));
1320
+ const remainingGlobalArtifacts = globalArtifacts.filter((artifact) => !isProcessLogAttachmentName(artifact.displayName, "stdout") &&
1321
+ !isProcessLogAttachmentName(artifact.displayName, "stderr"));
1320
1322
  const exitCodeSummary = globalExitCode?.actual !== undefined && globalExitCode.actual !== globalExitCode.original
1321
1323
  ? `${globalExitCode.actual} (original: ${globalExitCode.original})`
1322
1324
  : globalExitCode
@@ -1873,8 +1875,8 @@ const matchesAttachmentExpectation = (artifact, expectation) => {
1873
1875
  const buildRunAndTestFindings = (params) => {
1874
1876
  const { entries, expectations, globalArtifacts, modelingSummary, createFinding } = params;
1875
1877
  const runFindings = [];
1876
- const stdoutArtifact = globalArtifacts.find((artifact) => artifact.displayName === "stdout.txt");
1877
- const stderrArtifact = globalArtifacts.find((artifact) => artifact.displayName === "stderr.txt");
1878
+ const stdoutArtifact = globalArtifacts.find((artifact) => isProcessLogAttachmentName(artifact.displayName, "stdout"));
1879
+ const stderrArtifact = globalArtifacts.find((artifact) => isProcessLogAttachmentName(artifact.displayName, "stderr"));
1878
1880
  if (entries.length === 0 && expectations?.expected.testCount !== 0) {
1879
1881
  runFindings.push(createFinding({
1880
1882
  subject: "run",
@@ -2443,7 +2445,7 @@ const buildSnapshot = async (params) => {
2443
2445
  const globalErrors = await store.allGlobalErrors();
2444
2446
  const globalExitCode = await store.globalExitCode();
2445
2447
  const qualityGateResults = await store.qualityGateResults();
2446
- const stderrArtifact = globalArtifacts.find((artifact) => artifact.displayName === "stderr.txt");
2448
+ const stderrArtifact = globalArtifacts.find((artifact) => isProcessLogAttachmentName(artifact.displayName, "stderr"));
2447
2449
  const stderrContent = await readMaterializedArtifactText(outputDir, stderrArtifact);
2448
2450
  const modelingSummary = buildModelingSummary({
2449
2451
  entries,
@@ -2496,8 +2498,8 @@ const appendJsonlLine = async (path, item) => {
2496
2498
  };
2497
2499
  const toRunManifest = (params) => {
2498
2500
  const { context, command, agentContext, generatedAt, phase, expectations, snapshot, humanReport } = params;
2499
- const stdoutArtifact = snapshot.globalArtifacts.find((artifact) => artifact.displayName === "stdout.txt");
2500
- const stderrArtifact = snapshot.globalArtifacts.find((artifact) => artifact.displayName === "stderr.txt");
2501
+ const stdoutArtifact = snapshot.globalArtifacts.find((artifact) => isProcessLogAttachmentName(artifact.displayName, "stdout"));
2502
+ const stderrArtifact = snapshot.globalArtifacts.find((artifact) => isProcessLogAttachmentName(artifact.displayName, "stderr"));
2501
2503
  const originalExitCode = snapshot.globalExitCode?.original ?? null;
2502
2504
  const actualExitCode = snapshot.globalExitCode?.actual ?? snapshot.globalExitCode?.original ?? null;
2503
2505
  const expectationResult = buildExpectationResult({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allurereport/plugin-agent",
3
- "version": "3.14.3",
3
+ "version": "3.16.0",
4
4
  "description": "Allure Agent Plugin – AI-friendly markdown report generator",
5
5
  "keywords": [
6
6
  "agent",
@@ -31,12 +31,12 @@
31
31
  "lint:fix": "yarn run -T oxlint --import-plugin --fix src test features stories"
32
32
  },
33
33
  "dependencies": {
34
- "@allurereport/core-api": "3.14.3",
35
- "@allurereport/plugin-api": "3.14.3",
34
+ "@allurereport/core-api": "3.16.0",
35
+ "@allurereport/plugin-api": "3.16.0",
36
36
  "yaml": "^2.8.1"
37
37
  },
38
38
  "devDependencies": {
39
- "@allurereport/reader-api": "3.14.3",
39
+ "@allurereport/reader-api": "3.16.0",
40
40
  "@types/node": "^20",
41
41
  "@vitest/runner": "^2",
42
42
  "allure-js-commons": "^3",