@iamu-dev/iamu 0.0.0-stage → 0.2.0-beta.10
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/LICENSE +9 -0
- package/README.md +103 -2
- package/dist/adapters/claude-plugin.d.ts +13 -0
- package/dist/adapters/registry.d.ts +6 -0
- package/dist/adapters/types.d.ts +19 -0
- package/dist/bin.d.ts +2 -0
- package/dist/bin.js +22853 -0
- package/dist/build-info.d.ts +53 -0
- package/dist/cloud-url.d.ts +19 -0
- package/dist/commands/auth-http.d.ts +37 -0
- package/dist/commands/auth-project-choice.d.ts +74 -0
- package/dist/commands/auth-token-input.d.ts +21 -0
- package/dist/commands/auth.d.ts +84 -0
- package/dist/commands/browse-actions.d.ts +56 -0
- package/dist/commands/browse-driver.d.ts +117 -0
- package/dist/commands/browse.d.ts +170 -0
- package/dist/commands/cloud-push.d.ts +27 -0
- package/dist/commands/complete.d.ts +132 -0
- package/dist/commands/completion.d.ts +2 -0
- package/dist/commands/context.d.ts +58 -0
- package/dist/commands/credentials.d.ts +144 -0
- package/dist/commands/diff-filter.d.ts +11 -0
- package/dist/commands/doctor.d.ts +33 -0
- package/dist/commands/evaluate.d.ts +32 -0
- package/dist/commands/explore-crawl.d.ts +67 -0
- package/dist/commands/explore.d.ts +52 -0
- package/dist/commands/findings.d.ts +7 -0
- package/dist/commands/init.d.ts +16 -0
- package/dist/commands/instructions-walk.d.ts +69 -0
- package/dist/commands/list.d.ts +5 -0
- package/dist/commands/match.d.ts +13 -0
- package/dist/commands/mcp-config.d.ts +10 -0
- package/dist/commands/new-entity.d.ts +28 -0
- package/dist/commands/new-finding.d.ts +19 -0
- package/dist/commands/open.d.ts +8 -0
- package/dist/commands/port.d.ts +17 -0
- package/dist/commands/prune.d.ts +11 -0
- package/dist/commands/pull.d.ts +5 -0
- package/dist/commands/register-cloud.d.ts +5 -0
- package/dist/commands/register-findings.d.ts +5 -0
- package/dist/commands/register-project.d.ts +5 -0
- package/dist/commands/register-walkthrough.d.ts +5 -0
- package/dist/commands/register.d.ts +10 -0
- package/dist/commands/report.d.ts +3 -0
- package/dist/commands/serve.d.ts +11 -0
- package/dist/commands/skills.d.ts +34 -0
- package/dist/commands/start-run.d.ts +54 -0
- package/dist/commands/status.d.ts +3 -0
- package/dist/commands/step-numbering.d.ts +87 -0
- package/dist/commands/step.d.ts +95 -0
- package/dist/commands/sync.d.ts +6 -0
- package/dist/commands/triage.d.ts +21 -0
- package/dist/commands/update.d.ts +4 -0
- package/dist/commands/validate.d.ts +8 -0
- package/dist/commands/view-results.d.ts +9 -0
- package/dist/eval/gemini-eval-cli.d.ts +10 -0
- package/dist/eval/gemini-eval-cli.js +976 -0
- package/dist/eval/gemini-walker.d.ts +46 -0
- package/dist/eval/walkthrough-evaluator.d.ts +61 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +22700 -0
- package/dist/sync-mcp/fatal.d.ts +42 -0
- package/dist/sync-mcp/server.d.ts +1 -0
- package/dist/sync-mcp/tools.d.ts +12 -0
- package/dist/templates/prompts/combine.md +69 -0
- package/dist/templates/prompts/complete.md +132 -0
- package/dist/templates/prompts/evaluate.md +64 -0
- package/dist/templates/prompts/outline.md +54 -0
- package/dist/templates/prompts/persona.md +40 -0
- package/dist/templates/prompts/walk.md +179 -0
- package/dist/templates/skills/iamu-findings.md +266 -0
- package/dist/templates/skills/iamu-new.md +263 -0
- package/dist/templates/skills/iamu-propose.md +157 -0
- package/dist/templates/skills/iamu-run.md +520 -0
- package/dist/templates/skills/iamu-setup.md +270 -0
- package/dist/templates/skills/iamu-status.md +71 -0
- package/dist/templates.d.ts +10 -0
- package/dist/ui/journey-diff.d.ts +3 -0
- package/dist/ui/json.d.ts +6 -0
- package/dist/ui/logger.d.ts +5 -0
- package/dist/ui/panic.d.ts +11 -0
- package/dist/ui/symbols.d.ts +11 -0
- package/dist/ui/table.d.ts +20 -0
- package/dist/ui/update-check.d.ts +6 -0
- package/dist/worktree-state.d.ts +49 -0
- package/package.json +72 -3
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export interface NewEntityOptions {
|
|
2
|
+
name: string;
|
|
3
|
+
slug?: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
body?: string;
|
|
6
|
+
narrative?: string;
|
|
7
|
+
access?: string;
|
|
8
|
+
role?: string;
|
|
9
|
+
disposition?: string;
|
|
10
|
+
outline?: string;
|
|
11
|
+
persona?: string;
|
|
12
|
+
url?: string;
|
|
13
|
+
authority?: string;
|
|
14
|
+
/** Primary capability slug (outline only). */
|
|
15
|
+
capability?: string;
|
|
16
|
+
/** Structural tension driving the situation (outline only). */
|
|
17
|
+
tension?: string;
|
|
18
|
+
/** Human-test question to evaluate at walkthrough completion (outline only). */
|
|
19
|
+
humanTest?: string | string[];
|
|
20
|
+
/** Scenario start path, e.g. /en/episodes/1. */
|
|
21
|
+
entry?: string;
|
|
22
|
+
/** Scenario assumed environment state description. */
|
|
23
|
+
stateDescription?: string;
|
|
24
|
+
/** Scenario squint/approximation guidance when exact records are missing. */
|
|
25
|
+
stateApproximation?: string;
|
|
26
|
+
json?: boolean;
|
|
27
|
+
}
|
|
28
|
+
export declare function newEntity(type: string, opts: NewEntityOptions): Promise<void>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface NewFindingOptions {
|
|
2
|
+
scenario?: string;
|
|
3
|
+
run?: string;
|
|
4
|
+
title: string;
|
|
5
|
+
type: string;
|
|
6
|
+
severity: string;
|
|
7
|
+
uiFact?: string;
|
|
8
|
+
consequence?: string;
|
|
9
|
+
lens?: string;
|
|
10
|
+
uxHeuristic?: string;
|
|
11
|
+
/** What the finding does to the persona's task (blocks … enables). */
|
|
12
|
+
taskImpact?: string;
|
|
13
|
+
/** How sure the walker is that this is real (high | medium | low). */
|
|
14
|
+
confidence?: string;
|
|
15
|
+
/** Step number whose screenshot shows the finding. */
|
|
16
|
+
step?: string;
|
|
17
|
+
json?: boolean;
|
|
18
|
+
}
|
|
19
|
+
export declare function newFinding(opts: NewFindingOptions): Promise<void>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface OpenOptions {
|
|
2
|
+
printOnly?: boolean;
|
|
3
|
+
}
|
|
4
|
+
/**
|
|
5
|
+
* 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
|
+
*/
|
|
8
|
+
export declare function openDashboard(runId?: string, opts?: OpenOptions): Promise<void>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Commander coercer for `--port`. Commander calls a coercer as
|
|
3
|
+
* `(value, previous)`, so a bare `parseInt` took the previous value as
|
|
4
|
+
* its radix — reinterpreting the digits — and silently truncated
|
|
5
|
+
* anything non-numeric instead of rejecting it.
|
|
6
|
+
*
|
|
7
|
+
* @param value - Raw option text from the command line.
|
|
8
|
+
* @returns The port as an integer in `0..65535`.
|
|
9
|
+
* @throws InvalidArgumentError when `value` is not such an integer.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* parsePortOption("8080"); // 8080
|
|
14
|
+
* parsePortOption("abc"); // throws InvalidArgumentError
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
export declare function parsePortOption(value: string, _previous?: unknown): number;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type PruneResult } from "@iamu-dev/local-store";
|
|
2
|
+
export interface PruneCliOptions {
|
|
3
|
+
keep?: string | number;
|
|
4
|
+
days?: string | number;
|
|
5
|
+
screenshotsOnly?: boolean;
|
|
6
|
+
dryRun?: boolean;
|
|
7
|
+
yes?: boolean;
|
|
8
|
+
json?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare function formatBytes(bytes: number): string;
|
|
11
|
+
export declare function prune(opts?: PruneCliOptions): Promise<PruneResult | undefined>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { Command } from "commander";
|
|
2
|
+
/**
|
|
3
|
+
* Registers walkthrough execution commands: start-run, instructions, browse, step, new-finding, complete, match, match-record, evaluate, evaluate-record, prune.
|
|
4
|
+
*/
|
|
5
|
+
export declare function registerWalkthroughCommands(program: Command): void;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Command } from "commander";
|
|
2
|
+
import { registerCloudCommands } from "./register-cloud.js";
|
|
3
|
+
import { registerFindingsCommands } from "./register-findings.js";
|
|
4
|
+
import { registerProjectCommands } from "./register-project.js";
|
|
5
|
+
import { registerWalkthroughCommands } from "./register-walkthrough.js";
|
|
6
|
+
/**
|
|
7
|
+
* Registers all CLI command groups onto the root Commander program.
|
|
8
|
+
*/
|
|
9
|
+
export declare function registerAllCommands(program: Command): void;
|
|
10
|
+
export { registerProjectCommands, registerWalkthroughCommands, registerFindingsCommands, registerCloudCommands, };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface ServeOptions {
|
|
2
|
+
/**
|
|
3
|
+
* `false` (from `--no-open`) prints the dashboard URL instead of
|
|
4
|
+
* launching a browser, like `iamu open --print`.
|
|
5
|
+
*/
|
|
6
|
+
open?: boolean;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Deprecated: The local web UI has been retired in favor of Iamu Cloud and terminal reporting.
|
|
10
|
+
*/
|
|
11
|
+
export declare function serve(opts?: ServeOptions): Promise<void>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { HostAdapter, CommandContent } from "../adapters/types.js";
|
|
2
|
+
export declare function getVersion(): string;
|
|
3
|
+
export declare function loadSkillTemplates(version: string): Map<string, string>;
|
|
4
|
+
export declare function commandsFromSkills(templates: Map<string, string>): CommandContent[];
|
|
5
|
+
/**
|
|
6
|
+
* Hosts in `projectRoot` that already have iamu skills or commands
|
|
7
|
+
* installed — the ones `iamu update` refreshes.
|
|
8
|
+
*/
|
|
9
|
+
export declare function detectInstalledHosts(projectRoot: string): HostAdapter[];
|
|
10
|
+
/**
|
|
11
|
+
* Resolves target hosts for install or update.
|
|
12
|
+
* If hostFilter is supplied, matches by value or name (case-insensitive).
|
|
13
|
+
* Otherwise combines already-installed hosts and detected editor hosts in the workspace.
|
|
14
|
+
*/
|
|
15
|
+
export declare function resolveTargetHosts(projectRoot: string, hostFilter?: string): {
|
|
16
|
+
hosts: HostAdapter[];
|
|
17
|
+
error?: string;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Installed skill/command files that differ from what `iamu update` would
|
|
21
|
+
* write for this CLI version. Local reads only — no network.
|
|
22
|
+
*
|
|
23
|
+
* @returns Absolute paths of the stale files; empty when up to date or
|
|
24
|
+
* when no host has iamu skills installed.
|
|
25
|
+
*/
|
|
26
|
+
export declare function findStaleSkills(projectRoot: string): Promise<string[]>;
|
|
27
|
+
/** The one-line nudge `iamu status` and `iamu sync` print. */
|
|
28
|
+
export declare const STALE_SKILLS_MESSAGE = "Skills are out of date \u2014 run `iamu update`";
|
|
29
|
+
export declare function installSkillsForHosts(hosts: HostAdapter[], projectRoot: string, version: string, opts?: {
|
|
30
|
+
quiet?: boolean;
|
|
31
|
+
}): Promise<{
|
|
32
|
+
totalSkills: number;
|
|
33
|
+
totalCommands: number;
|
|
34
|
+
}>;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { type BuildMetadata, type RunViewport, type ScenarioFrontmatter } from "@iamu-dev/protocol";
|
|
2
|
+
/** `target_url` from `iamu/testability.md`, when there is one. */
|
|
3
|
+
export declare function testabilityTarget(projectRoot: string): Promise<string | null>;
|
|
4
|
+
/**
|
|
5
|
+
* The URL a run starts at: `--target` (or the scenario's `target_url` or `iamu/testability.md`)
|
|
6
|
+
* as the base, with the scenario's `entry_path` resolved against it.
|
|
7
|
+
* Returns an error message instead when there is nothing usable.
|
|
8
|
+
*/
|
|
9
|
+
export declare function resolveStartUrl(target: string | undefined, scenario: Pick<ScenarioFrontmatter, "target_url" | "entry_path">, fallbackTarget?: string | null): {
|
|
10
|
+
url: string;
|
|
11
|
+
} | {
|
|
12
|
+
error: string;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Fast preflight probe to check if the target URL answers HTTP requests.
|
|
16
|
+
* Times out quickly (default: 1000ms) to avoid stalling walkthrough initialization.
|
|
17
|
+
*/
|
|
18
|
+
export declare function checkTargetReachable(url: string, timeoutMs?: number): Promise<{
|
|
19
|
+
reachable: boolean;
|
|
20
|
+
error?: string;
|
|
21
|
+
}>;
|
|
22
|
+
/**
|
|
23
|
+
* The build as one line: label, branch, commit and CI provider. A dirty
|
|
24
|
+
* tree shows next to the commit, so a re-run after an uncommitted fix
|
|
25
|
+
* visibly walks a different build.
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```ts
|
|
29
|
+
* formatBuild({ git_sha: "90e2444…", git_dirty: true, worktree_hash: "3fa9c1d2e4b5" });
|
|
30
|
+
* // "90e2444 + uncommitted changes (3fa9c1…)"
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
export declare function formatBuild(build: BuildMetadata): string;
|
|
34
|
+
/**
|
|
35
|
+
* A run viewport as one line.
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```ts
|
|
39
|
+
* formatViewport({ device: "desktop", width: 1280, height: 800, source: "persona-tags" });
|
|
40
|
+
* // "desktop 1280×800 (from persona tags)"
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
export declare function formatViewport(v: RunViewport): string;
|
|
44
|
+
export interface StartRunOptions {
|
|
45
|
+
target?: string;
|
|
46
|
+
build?: string;
|
|
47
|
+
env?: string;
|
|
48
|
+
json?: boolean;
|
|
49
|
+
check?: boolean;
|
|
50
|
+
walker?: string;
|
|
51
|
+
judge?: string;
|
|
52
|
+
matcher?: string;
|
|
53
|
+
}
|
|
54
|
+
export declare function startRun(scenarioSlug: string, opts: StartRunOptions): Promise<void>;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A step number claimed on disk. The file at `stepPath` exists (empty)
|
|
3
|
+
* until the caller overwrites it with the step, or calls `release()`.
|
|
4
|
+
*
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export interface StepReservation {
|
|
8
|
+
/** The reserved 1-based step number. */
|
|
9
|
+
stepNumber: number;
|
|
10
|
+
/** Absolute path of the reserved `NNN.json`. */
|
|
11
|
+
stepPath: string;
|
|
12
|
+
/** Give the number back — removes the placeholder file. Never throws. */
|
|
13
|
+
release(): Promise<void>;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* The file name for a step number: `7` → `"007.json"`.
|
|
17
|
+
*
|
|
18
|
+
* @param stepNumber - 1-based step number.
|
|
19
|
+
* @returns The zero-padded file name.
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```ts
|
|
23
|
+
* stepFileName(7); // "007.json"
|
|
24
|
+
* ```
|
|
25
|
+
*
|
|
26
|
+
* @public
|
|
27
|
+
*/
|
|
28
|
+
export declare function stepFileName(stepNumber: number): string;
|
|
29
|
+
/**
|
|
30
|
+
* The step-limit error message shared by `iamu step` and
|
|
31
|
+
* `iamu browse step`.
|
|
32
|
+
*
|
|
33
|
+
* @param maxSteps - The limit that was hit.
|
|
34
|
+
* @param runId - The run being recorded into.
|
|
35
|
+
* @returns A message naming the limit and both ways out.
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```ts
|
|
39
|
+
* throw new Error(stepLimitMessage(50, runId));
|
|
40
|
+
* ```
|
|
41
|
+
*
|
|
42
|
+
* @public
|
|
43
|
+
*/
|
|
44
|
+
export declare function stepLimitMessage(maxSteps: number, runId: string): string;
|
|
45
|
+
/**
|
|
46
|
+
* The number the next step would get (highest recorded + 1), without
|
|
47
|
+
* claiming it. Use for an early "would this exceed the limit?" check;
|
|
48
|
+
* only {@link reserveStepFile} makes the number yours.
|
|
49
|
+
*
|
|
50
|
+
* @param stepsDir - Absolute path of `<runDir>/steps`.
|
|
51
|
+
* @returns The next free step number (1 when the directory is empty or missing).
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* ```ts
|
|
55
|
+
* if ((await peekNextStepNumber(stepsDir)) > maxSteps) fail("limit");
|
|
56
|
+
* ```
|
|
57
|
+
*
|
|
58
|
+
* @public
|
|
59
|
+
*/
|
|
60
|
+
export declare function peekNextStepNumber(stepsDir: string): Promise<number>;
|
|
61
|
+
/**
|
|
62
|
+
* Claim the next step number by exclusively creating its `NNN.json`.
|
|
63
|
+
* On `EEXIST` (another writer won that number) it moves to the next
|
|
64
|
+
* one, so N concurrent callers end up with N distinct files.
|
|
65
|
+
*
|
|
66
|
+
* @param stepsDir - Absolute path of `<runDir>/steps` (must exist).
|
|
67
|
+
* @param limit - `maxSteps` cap and the `runId` named in the error.
|
|
68
|
+
* @returns The reservation; overwrite `stepPath` with the step or `release()` it.
|
|
69
|
+
* @throws Error with {@link stepLimitMessage} when the next number exceeds `maxSteps`.
|
|
70
|
+
*
|
|
71
|
+
* @example
|
|
72
|
+
* ```ts
|
|
73
|
+
* const r = await reserveStepFile(stepsDir, { maxSteps: 50, runId });
|
|
74
|
+
* try {
|
|
75
|
+
* await writeStep(runDir, { ...step, step_number: r.stepNumber });
|
|
76
|
+
* } catch (err) {
|
|
77
|
+
* await r.release();
|
|
78
|
+
* throw err;
|
|
79
|
+
* }
|
|
80
|
+
* ```
|
|
81
|
+
*
|
|
82
|
+
* @public
|
|
83
|
+
*/
|
|
84
|
+
export declare function reserveStepFile(stepsDir: string, limit: {
|
|
85
|
+
maxSteps: number;
|
|
86
|
+
runId: string;
|
|
87
|
+
}): Promise<StepReservation>;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { type RunStep } from "@iamu-dev/protocol";
|
|
2
|
+
/** Steps a run may record before the circuit breaker trips. */
|
|
3
|
+
export declare const DEFAULT_MAX_STEPS = 50;
|
|
4
|
+
/**
|
|
5
|
+
* The step limit to enforce: `val` (from `--max-steps`) when it is a
|
|
6
|
+
* positive integer, else `IAMU_MAX_STEPS`, else {@link DEFAULT_MAX_STEPS}.
|
|
7
|
+
*
|
|
8
|
+
* @param val - The raw `--max-steps` value, if any.
|
|
9
|
+
* @returns A positive step limit.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* parseMaxSteps("20"); // 20
|
|
14
|
+
* parseMaxSteps(undefined); // 50, unless IAMU_MAX_STEPS is set
|
|
15
|
+
* ```
|
|
16
|
+
*
|
|
17
|
+
* @public
|
|
18
|
+
*/
|
|
19
|
+
export declare function parseMaxSteps(val?: string | number): number;
|
|
20
|
+
/** What {@link recordStep} records. */
|
|
21
|
+
export interface RecordStepInput {
|
|
22
|
+
projectRoot: string;
|
|
23
|
+
runId: string;
|
|
24
|
+
action: string;
|
|
25
|
+
note?: string | null;
|
|
26
|
+
/** Path of an existing screenshot to copy in; a missing file is an error. */
|
|
27
|
+
shot?: string | null;
|
|
28
|
+
url?: string | null;
|
|
29
|
+
surface?: string | null;
|
|
30
|
+
grounding?: string | null;
|
|
31
|
+
timestamp?: string;
|
|
32
|
+
maxSteps?: string | number;
|
|
33
|
+
extra?: Record<string, unknown>;
|
|
34
|
+
}
|
|
35
|
+
/** What {@link recordStep} wrote. */
|
|
36
|
+
export interface RecordStepResult {
|
|
37
|
+
step: RunStep;
|
|
38
|
+
stepPath: string;
|
|
39
|
+
screenshotPath: string | null;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Record a single step into `<runDir>/steps/NNN.json`.
|
|
43
|
+
*
|
|
44
|
+
* The step number is reserved with an exclusive create (see
|
|
45
|
+
* {@link reserveStepFile}), so concurrent calls get distinct numbers
|
|
46
|
+
* instead of overwriting each other; the content is then written
|
|
47
|
+
* atomically (temp file + rename). A `shot` is copied into
|
|
48
|
+
* `<runDir>/screenshots/step-N.png`; a `shot` that is not an existing
|
|
49
|
+
* file is an error — a step never points at a screenshot that is not there.
|
|
50
|
+
*
|
|
51
|
+
* @param input - The run, the action, and optional evidence.
|
|
52
|
+
* @returns The validated step, its file, and the copied screenshot path.
|
|
53
|
+
* @throws Error when the run is missing, `shot` is not a file, or the step limit is reached.
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* ```ts
|
|
57
|
+
* const { step } = await recordStep({
|
|
58
|
+
* projectRoot,
|
|
59
|
+
* runId,
|
|
60
|
+
* action: "Clicked checkout",
|
|
61
|
+
* shot: "./shot.png",
|
|
62
|
+
* });
|
|
63
|
+
* console.log(step.step_number);
|
|
64
|
+
* ```
|
|
65
|
+
*
|
|
66
|
+
* @public
|
|
67
|
+
*/
|
|
68
|
+
export declare function recordStep(input: RecordStepInput): Promise<RecordStepResult>;
|
|
69
|
+
/** Options for `iamu step`. */
|
|
70
|
+
export interface StepOptions {
|
|
71
|
+
run?: string;
|
|
72
|
+
action: string;
|
|
73
|
+
note?: string;
|
|
74
|
+
shot?: string;
|
|
75
|
+
url?: string;
|
|
76
|
+
surface?: string;
|
|
77
|
+
grounding?: string;
|
|
78
|
+
maxSteps?: string | number;
|
|
79
|
+
json?: boolean;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* `iamu step [run-id]` — record one step via {@link recordStep} and
|
|
83
|
+
* print it (one JSON document with `--json`). Errors set exit code 1.
|
|
84
|
+
*
|
|
85
|
+
* @param runArg - Positional run ID; falls back to `opts.run`.
|
|
86
|
+
* @param opts - Parsed CLI options.
|
|
87
|
+
*
|
|
88
|
+
* @example
|
|
89
|
+
* ```ts
|
|
90
|
+
* await stepCommand("run-123", { action: "Clicked checkout", json: true });
|
|
91
|
+
* ```
|
|
92
|
+
*
|
|
93
|
+
* @public
|
|
94
|
+
*/
|
|
95
|
+
export declare function stepCommand(runArg: string | undefined, opts: StepOptions): Promise<void>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface TriageOptions {
|
|
2
|
+
status: string;
|
|
3
|
+
/** Why — the triager's words. Required when dismissing. */
|
|
4
|
+
note?: string;
|
|
5
|
+
/** Dismiss reason: not_relevant | walker_error | duplicate. */
|
|
6
|
+
reason?: string;
|
|
7
|
+
/** Guidance rule text; defaults to "Don't report: <title>". */
|
|
8
|
+
rule?: string;
|
|
9
|
+
/** Where the guidance rule applies. Default: project. */
|
|
10
|
+
scope?: string;
|
|
11
|
+
/** `false` (`--no-guidance`): dismiss without writing a guidance rule. */
|
|
12
|
+
guidance?: boolean;
|
|
13
|
+
json?: boolean;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Set the triage status of one or more findings. Dismissing as
|
|
17
|
+
* `not_relevant` or `walker_error` also writes a tester guidance rule
|
|
18
|
+
* (`iamu/guidance/<slug>.md`) so later walks stop reporting the same
|
|
19
|
+
* thing; several findings dismissed together share one rule.
|
|
20
|
+
*/
|
|
21
|
+
export declare function triage(refs: string[], opts: TriageOptions): Promise<void>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare function openBrowserResults(projectRoot: string, runId?: string): Promise<void>;
|
|
2
|
+
export interface PromptViewResultsOptions {
|
|
3
|
+
prompt?: boolean;
|
|
4
|
+
yes?: boolean;
|
|
5
|
+
view?: boolean;
|
|
6
|
+
json?: boolean;
|
|
7
|
+
runId?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare function promptViewResults(projectRoot: string, opts?: PromptViewResultsOptions): Promise<void>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI Entrypoint: Autonomous Gemini Walker Benchmark Suite
|
|
3
|
+
*
|
|
4
|
+
* Runs Gemini 2.5 Flash through the live iamu CLI walking prompt and tools,
|
|
5
|
+
* grading autonomous decisions against ground-truth contracts.
|
|
6
|
+
*
|
|
7
|
+
* Usage:
|
|
8
|
+
* GEMINI_API_KEY=... pnpm eval:gemini
|
|
9
|
+
*/
|
|
10
|
+
export {};
|