@iamu-dev/iamu 0.3.0-beta.6 → 0.4.0-beta.1

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.
@@ -0,0 +1,31 @@
1
+ /** Stamped into `advised_by` and `advice.json`. Bump when advise.md changes meaningfully. */
2
+ export declare const ADVISOR_VERSION = "1.2.0";
3
+ /** The installed `iamu/.prompts/advise.md`, or the bundled template. */
4
+ export declare function readAdvisePrompt(projectRoot: string): string;
5
+ export interface AdviseOptions {
6
+ project?: boolean;
7
+ json?: boolean;
8
+ promptFile?: string;
9
+ }
10
+ /**
11
+ * Print the advisor's input: for a run (after the judge, before publish)
12
+ * or, with --project, across every open finding in the project.
13
+ */
14
+ export declare function advise(runId: string | undefined, opts?: AdviseOptions): Promise<void>;
15
+ export interface AdviseRecordOptions {
16
+ project?: boolean;
17
+ file?: string;
18
+ data?: string;
19
+ json?: boolean;
20
+ }
21
+ /** Record the advisor's answer for a run, or a project synthesis. */
22
+ export declare function adviseRecord(runId: string | undefined, opts: AdviseRecordOptions): Promise<void>;
23
+ export interface DirectionsOptions {
24
+ json?: boolean;
25
+ }
26
+ /** List directions, open ones first. */
27
+ export declare function directionsList(opts: DirectionsOptions): Promise<void>;
28
+ /** Change a direction's status. */
29
+ export declare function directionsSet(slug: string, opts: DirectionsOptions & {
30
+ status?: string;
31
+ }): Promise<void>;
@@ -0,0 +1,20 @@
1
+ export interface AnswerInputOptions {
2
+ file?: string;
3
+ data?: string;
4
+ json?: boolean;
5
+ }
6
+ /** All of stdin as UTF-8 text. */
7
+ export declare function readStdinText(): Promise<string>;
8
+ /**
9
+ * Read a subagent's JSON answer for a `<stage>-record` command: `--data`
10
+ * inline, `--file -` from stdin, `--file <path>`, or the stage's default
11
+ * file in the run directory when neither is given (then `opts.file` is
12
+ * set to it). Reports problems as command errors and returns `undefined`.
13
+ */
14
+ export declare function readAnswerInput(opts: AnswerInputOptions, what: string, fallback: {
15
+ defaultPath: string;
16
+ code: string;
17
+ fix: string;
18
+ }): Promise<{
19
+ value: unknown;
20
+ } | undefined>;
@@ -76,11 +76,6 @@ export declare function auditStepProvenance(steps: Array<{
76
76
  }>): ProvenanceAudit;
77
77
  /** Strictly validate runtime canonical structure against the protocol schema. */
78
78
  export declare function validateCanonicalWalkthrough(canonical: unknown): CanonicalWalkthrough;
79
- /**
80
- * Read recorded judge verdicts (if present) and overlay them onto the canonical
81
- * walkthrough for report markdown rendering.
82
- */
83
- export declare function applyRecordedVerdicts(canonical: CanonicalWalkthrough, runDirPath: string): Promise<CanonicalWalkthrough>;
84
79
  /** Persist canonical.json to disk atomically. */
85
80
  export declare function persistCanonical(runDirPath: string, canonical: CanonicalWalkthrough): Promise<string>;
86
81
  /** Persist report.md to disk atomically. */
@@ -100,6 +95,7 @@ export declare function assembleRun(projectRoot: string, runId: string, manifest
100
95
  };
101
96
  canonicalPath: string;
102
97
  reportPath: string;
98
+ htmlReportPath?: string;
103
99
  }>;
104
100
  /** One requested place, whether the run reached it, and what awaits there. */
105
101
  export type RevisitReportPlace = RevisitPlaceCoverage & {
@@ -30,13 +30,6 @@ export declare function resolveRunDir(projectRoot: string, runId: string, opts?:
30
30
  * 3. Single-entity auto-selection: if exactly 1 scenario exists on disk, auto-select it.
31
31
  */
32
32
  export declare function resolveScenarioSlug(projectRoot: string, explicitSlug?: string): string | null;
33
- /**
34
- * Resolves the active finding slug following the OpenSpec single-entity resolution pattern:
35
- * 1. Explicit slug argument if provided
36
- * 2. Active finding in session state (`iamu/.cache/session-state.json`)
37
- * 3. Single-entity auto-selection: if exactly 1 finding exists on disk, auto-select it.
38
- */
39
- export declare function resolveFindingSlug(projectRoot: string, explicitSlug?: string): string | null;
40
33
  /**
41
34
  * Resolves the active run ID from an explicit argument or falls back to
42
35
  * session state (`iamu/.cache/session-state.json`).
@@ -18,6 +18,11 @@ export interface RecordedVerdicts {
18
18
  * itself never carries them (its writer is `complete`); the report does.
19
19
  */
20
20
  export declare function applyVerdicts(canonical: CanonicalWalkthrough, recorded: RecordedVerdicts): CanonicalWalkthrough;
21
+ /**
22
+ * Read recorded judge verdicts (if present) and overlay them onto the canonical
23
+ * walkthrough for report markdown rendering.
24
+ */
25
+ export declare function applyRecordedVerdicts(canonical: CanonicalWalkthrough, runDirPath: string): Promise<CanonicalWalkthrough>;
21
26
  export declare function evaluate(runId: string, opts?: {
22
27
  json?: boolean;
23
28
  promptFile?: string;
@@ -1,3 +1,8 @@
1
+ import { type WalkthroughManifest } from "@iamu-dev/local-store";
2
+ /** A completed run's manifest, or null after reporting why not. */
3
+ export declare function completedManifest(runDirPath: string, runId: string, opts?: {
4
+ json?: boolean;
5
+ }): Promise<WalkthroughManifest | null>;
1
6
  /**
2
7
  * Print the matcher's input bundle: this run's findings, the scenario's
3
8
  * earlier canonical findings, this run's steps, and the prompt.
@@ -16,6 +16,8 @@ export interface NewFindingOptions {
16
16
  step?: string;
17
17
  /** Finding narrative description. */
18
18
  description?: string;
19
+ /** What the persona needed at that moment, with no solution. */
20
+ need?: string;
19
21
  /** Concrete recommendation for fixing the finding. */
20
22
  recommendation?: string;
21
23
  /** Complete markdown body (overrides description and recommendation). */
@@ -1,8 +1,9 @@
1
1
  export interface OpenOptions {
2
2
  printOnly?: boolean;
3
+ local?: boolean;
3
4
  }
4
5
  /**
5
6
  * Opens the Iamu Cloud dashboard for the project or a specific walkthrough run.
6
- * If the project is not cloud-linked, prompts the user to link or view the terminal summary.
7
+ * If not cloud-linked (or if --local is passed), generates and opens the local HTML report.
7
8
  */
8
9
  export declare function openDashboard(runId?: string, opts?: OpenOptions): Promise<void>;
@@ -1,5 +1,5 @@
1
1
  import type { Command } from "commander";
2
2
  /**
3
- * Registers walkthrough execution commands: start-run, instructions, browse, step, new-finding, complete, match, match-record, evaluate, evaluate-record, prune.
3
+ * Registers walkthrough execution commands: start-run, instructions, browse, step, new-finding, complete, match, match-record, advise, advise-record, directions, evaluate, evaluate-record, prune.
4
4
  */
5
5
  export declare function registerWalkthroughCommands(program: Command): void;
@@ -0,0 +1,16 @@
1
+ import type { CanonicalWalkthrough } from "@iamu-dev/protocol";
2
+ import { type OverviewView, type RunView, type VerdictLabel } from "../ui/report-view.js";
3
+ export interface CompletedRun {
4
+ runId: string;
5
+ manifest: Record<string, unknown>;
6
+ /** canonical.json with the judge's recorded verdicts applied. */
7
+ canonical: CanonicalWalkthrough | null;
8
+ }
9
+ /** Completed runs, newest first, optionally for one scenario. */
10
+ export declare function readCompletedRuns(projectRoot: string, runIds: string[], scenario?: string): Promise<CompletedRun[]>;
11
+ /** One label for the run: every judged test agreeing, or PARTIAL. */
12
+ export declare function verdictLabel(c: CanonicalWalkthrough | null): VerdictLabel;
13
+ /** "/request · step 8" from a page URL and a step id. */
14
+ export declare function whereOf(pageUrl: unknown, stepId: unknown): string | null;
15
+ export declare function buildRunView(projectRoot: string, run: CompletedRun): Promise<RunView>;
16
+ export declare function buildOverview(projectRoot: string, runs: CompletedRun[]): Promise<OverviewView>;
@@ -1,4 +1,8 @@
1
- export declare function report(scenario?: string, opts?: {
1
+ export interface ReportOptions {
2
2
  json?: boolean;
3
3
  all?: boolean;
4
- }): Promise<void>;
4
+ html?: boolean;
5
+ open?: boolean;
6
+ journey?: boolean;
7
+ }
8
+ export declare function report(scenario?: string, opts?: ReportOptions): Promise<void>;
@@ -2,6 +2,8 @@ export interface SummaryOptions {
2
2
  run?: string;
3
3
  worked?: string | string[];
4
4
  question?: string | string[];
5
+ /** Doubts about the test setup (data, accounts, dates), not the product. */
6
+ setupNote?: string | string[];
5
7
  model?: string;
6
8
  /** The walk could not start as set up: what was missing, or `false` to clear. */
7
9
  blocked?: string | false;
@@ -11,6 +13,8 @@ export interface SummaryOptions {
11
13
  export interface SummaryData {
12
14
  what_worked: string[];
13
15
  open_questions: string[];
16
+ /** Doubts about the test setup, for whoever stages the scenario. */
17
+ setup_notes: string[];
14
18
  model?: string;
15
19
  /** Set when the walk could not start as set up (`--blocked`). */
16
20
  blocked?: {