@iamu-dev/iamu 0.2.0-beta.1 → 0.2.0-beta.2
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/dist/bin.js +29 -8
- package/dist/index.js +29 -8
- package/dist/templates/skills/iamu-setup.md +8 -16
- package/package.json +3 -3
- package/dist/adapters/claude-plugin.d.ts +0 -13
- package/dist/adapters/registry.d.ts +0 -6
- package/dist/adapters/types.d.ts +0 -19
- package/dist/bin.d.ts +0 -2
- package/dist/build-info.d.ts +0 -53
- package/dist/cloud-url.d.ts +0 -19
- package/dist/commands/auth-http.d.ts +0 -37
- package/dist/commands/auth-project-choice.d.ts +0 -74
- package/dist/commands/auth-token-input.d.ts +0 -21
- package/dist/commands/auth.d.ts +0 -84
- package/dist/commands/browse-actions.d.ts +0 -56
- package/dist/commands/browse-driver.d.ts +0 -117
- package/dist/commands/browse.d.ts +0 -156
- package/dist/commands/cloud-push.d.ts +0 -27
- package/dist/commands/complete.d.ts +0 -131
- package/dist/commands/completion.d.ts +0 -2
- package/dist/commands/context.d.ts +0 -58
- package/dist/commands/credentials.d.ts +0 -144
- package/dist/commands/diff-filter.d.ts +0 -11
- package/dist/commands/doctor.d.ts +0 -24
- package/dist/commands/evaluate.d.ts +0 -30
- package/dist/commands/findings.d.ts +0 -7
- package/dist/commands/init.d.ts +0 -9
- package/dist/commands/instructions-walk.d.ts +0 -59
- package/dist/commands/list.d.ts +0 -5
- package/dist/commands/match.d.ts +0 -12
- package/dist/commands/mcp-config.d.ts +0 -10
- package/dist/commands/new-entity.d.ts +0 -15
- package/dist/commands/new-finding.d.ts +0 -19
- package/dist/commands/open.d.ts +0 -8
- package/dist/commands/port.d.ts +0 -17
- package/dist/commands/prune.d.ts +0 -11
- package/dist/commands/pull.d.ts +0 -5
- package/dist/commands/register-cloud.d.ts +0 -5
- package/dist/commands/register-findings.d.ts +0 -5
- package/dist/commands/register-project.d.ts +0 -5
- package/dist/commands/register-walkthrough.d.ts +0 -5
- package/dist/commands/register.d.ts +0 -10
- package/dist/commands/report.d.ts +0 -3
- package/dist/commands/serve.d.ts +0 -11
- package/dist/commands/skills.d.ts +0 -34
- package/dist/commands/start-run.d.ts +0 -49
- package/dist/commands/status.d.ts +0 -3
- package/dist/commands/step-numbering.d.ts +0 -87
- package/dist/commands/step.d.ts +0 -95
- package/dist/commands/sync.d.ts +0 -6
- package/dist/commands/triage.d.ts +0 -21
- package/dist/commands/update.d.ts +0 -4
- package/dist/commands/validate.d.ts +0 -8
- package/dist/commands/view-results.d.ts +0 -9
- package/dist/index.d.ts +0 -9
- package/dist/sync-mcp/fatal.d.ts +0 -42
- package/dist/sync-mcp/server.d.ts +0 -1
- package/dist/sync-mcp/tools.d.ts +0 -12
- package/dist/templates.d.ts +0 -10
- package/dist/ui/journey-diff.d.ts +0 -3
- package/dist/ui/json.d.ts +0 -6
- package/dist/ui/logger.d.ts +0 -5
- package/dist/ui/panic.d.ts +0 -11
- package/dist/ui/symbols.d.ts +0 -11
- package/dist/ui/table.d.ts +0 -20
- package/dist/ui/update-check.d.ts +0 -6
- package/dist/worktree-state.d.ts +0 -49
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { type CanonicalWalkthrough } from "@iamu-dev/protocol";
|
|
2
|
-
/** What `verdicts.json` holds, as far as the report needs it. */
|
|
3
|
-
export interface RecordedVerdicts {
|
|
4
|
-
verdicts: Array<{
|
|
5
|
-
human_test_id: string;
|
|
6
|
-
verdict: string;
|
|
7
|
-
reasoning: string;
|
|
8
|
-
grounding_step_ids: string[];
|
|
9
|
-
grounding_finding_ids: string[];
|
|
10
|
-
}>;
|
|
11
|
-
overall?: {
|
|
12
|
-
answer: string;
|
|
13
|
-
reasoning: string;
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* A copy of `canonical` with the judge's verdicts filled in. canonical.json
|
|
18
|
-
* itself never carries them (its writer is `complete`); the report does.
|
|
19
|
-
*/
|
|
20
|
-
export declare function applyVerdicts(canonical: CanonicalWalkthrough, recorded: RecordedVerdicts): CanonicalWalkthrough;
|
|
21
|
-
export declare function evaluate(runId: string, opts?: {
|
|
22
|
-
json?: boolean;
|
|
23
|
-
}): Promise<void>;
|
|
24
|
-
export declare function evaluateRecord(runId: string, opts: {
|
|
25
|
-
file: string;
|
|
26
|
-
json?: boolean;
|
|
27
|
-
yes?: boolean;
|
|
28
|
-
prompt?: boolean;
|
|
29
|
-
view?: boolean;
|
|
30
|
-
}): Promise<void>;
|
package/dist/commands/init.d.ts
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { type GuidanceRule, type RevisitPlace } from "@iamu-dev/local-store";
|
|
2
|
-
import { type RunViewport } from "@iamu-dev/protocol";
|
|
3
|
-
/** "The browser is sized as a phone screen, 390×844." */
|
|
4
|
-
export declare function viewportLine(v: RunViewport): string;
|
|
5
|
-
interface WalkerPromptParts {
|
|
6
|
-
targetUrl: string | null;
|
|
7
|
-
persona: {
|
|
8
|
-
name: string;
|
|
9
|
-
role: string;
|
|
10
|
-
disposition: string | null;
|
|
11
|
-
background: string | null;
|
|
12
|
-
};
|
|
13
|
-
outline: {
|
|
14
|
-
title: string;
|
|
15
|
-
tension: unknown;
|
|
16
|
-
narrative: unknown;
|
|
17
|
-
};
|
|
18
|
-
brief: string | null;
|
|
19
|
-
access: {
|
|
20
|
-
project: string | null;
|
|
21
|
-
persona: string | null;
|
|
22
|
-
};
|
|
23
|
-
methodology: string;
|
|
24
|
-
dismissed: string[];
|
|
25
|
-
/** Active tester guidance in the scenario's scope. */
|
|
26
|
-
guidance?: GuidanceRule[];
|
|
27
|
-
/** Where fixes awaiting a re-run were seen — places only, no findings. */
|
|
28
|
-
revisit?: RevisitPlace[];
|
|
29
|
-
scenarioSlug: string;
|
|
30
|
-
runId: string;
|
|
31
|
-
runDirPath: string;
|
|
32
|
-
projectRoot: string;
|
|
33
|
-
surface: string;
|
|
34
|
-
/** The run's viewport (`start-run`, from persona tags), if any. */
|
|
35
|
-
viewport?: RunViewport | null;
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* The places-to-pass-through section: where this scenario's fixes
|
|
39
|
-
* awaiting a re-run were observed, framed as part of the persona's own
|
|
40
|
-
* route. It carries URLs and screen names only — never a finding's
|
|
41
|
-
* title, type, severity or any hint of what was wrong, so the walker
|
|
42
|
-
* judges each place fresh (the same reason it never sees human tests).
|
|
43
|
-
* Empty when nothing awaits, so those prompts stay as they were.
|
|
44
|
-
*/
|
|
45
|
-
export declare function revisitSection(places: readonly RevisitPlace[]): string[];
|
|
46
|
-
/**
|
|
47
|
-
* The walker subagent's whole prompt — persona, situation, brief, access,
|
|
48
|
-
* driving surface, methodology, and the run-directory contract (steps,
|
|
49
|
-
* screenshots, findings, summary.json). Composed here so every host
|
|
50
|
-
* hands its walker the same thing instead of assembling it by hand.
|
|
51
|
-
*/
|
|
52
|
-
export declare function composeWalkerPrompt(p: WalkerPromptParts): string;
|
|
53
|
-
export declare function instructionsWalk(opts: {
|
|
54
|
-
scenario: string;
|
|
55
|
-
run?: string;
|
|
56
|
-
surface?: string;
|
|
57
|
-
json?: boolean;
|
|
58
|
-
}): Promise<void>;
|
|
59
|
-
export {};
|
package/dist/commands/list.d.ts
DELETED
package/dist/commands/match.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Print the matcher's input bundle: this run's findings, the scenario's
|
|
3
|
-
* earlier canonical findings, this run's steps, and the prompt.
|
|
4
|
-
*/
|
|
5
|
-
export declare function match(runId: string, opts?: {
|
|
6
|
-
json?: boolean;
|
|
7
|
-
}): Promise<void>;
|
|
8
|
-
/** Record the matcher's answer and re-derive the run's delta and report. */
|
|
9
|
-
export declare function matchRecord(runId: string, opts: {
|
|
10
|
-
file: string;
|
|
11
|
-
json?: boolean;
|
|
12
|
-
}): Promise<void>;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Write or update the `iamu-sync` entry in an MCP config file.
|
|
3
|
-
* Merges with existing content — does not clobber other servers.
|
|
4
|
-
* Throws if existing file contains invalid JSON (avoids silent data loss).
|
|
5
|
-
*/
|
|
6
|
-
export declare function writeSyncMcpEntry(mcpPath: string): Promise<void>;
|
|
7
|
-
/**
|
|
8
|
-
* Check if an MCP config file has an `iamu-sync` entry.
|
|
9
|
-
*/
|
|
10
|
-
export declare function hasSyncMcpEntry(parsed: Record<string, unknown>, mcpPath: string): boolean;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export interface NewEntityOptions {
|
|
2
|
-
name: string;
|
|
3
|
-
slug?: string;
|
|
4
|
-
description?: string;
|
|
5
|
-
role?: string;
|
|
6
|
-
disposition?: string;
|
|
7
|
-
outline?: string;
|
|
8
|
-
persona?: string;
|
|
9
|
-
url?: string;
|
|
10
|
-
authority?: string;
|
|
11
|
-
/** Scenario start path, e.g. /en/episodes/1. */
|
|
12
|
-
entry?: string;
|
|
13
|
-
json?: boolean;
|
|
14
|
-
}
|
|
15
|
-
export declare function newEntity(type: string, opts: NewEntityOptions): Promise<void>;
|
|
@@ -1,19 +0,0 @@
|
|
|
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>;
|
package/dist/commands/open.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
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>;
|
package/dist/commands/port.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
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;
|
package/dist/commands/prune.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
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>;
|
package/dist/commands/pull.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
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;
|
|
@@ -1,10 +0,0 @@
|
|
|
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, };
|
package/dist/commands/serve.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
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>;
|
|
@@ -1,34 +0,0 @@
|
|
|
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
|
-
}>;
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { type BuildMetadata, type RunViewport, type ScenarioFrontmatter } from "@iamu-dev/protocol";
|
|
2
|
-
/**
|
|
3
|
-
* The URL a run starts at: `--target` (or the scenario's `target_url`)
|
|
4
|
-
* as the base, with the scenario's `entry_path` resolved against it.
|
|
5
|
-
* Returns an error message instead when there is nothing usable.
|
|
6
|
-
*/
|
|
7
|
-
export declare function resolveStartUrl(target: string | undefined, scenario: Pick<ScenarioFrontmatter, "target_url" | "entry_path">): {
|
|
8
|
-
url: string;
|
|
9
|
-
} | {
|
|
10
|
-
error: string;
|
|
11
|
-
};
|
|
12
|
-
/**
|
|
13
|
-
* Fast preflight probe to check if the target URL answers HTTP requests.
|
|
14
|
-
* Times out quickly (default: 1000ms) to avoid stalling walkthrough initialization.
|
|
15
|
-
*/
|
|
16
|
-
export declare function checkTargetReachable(url: string, timeoutMs?: number): Promise<{
|
|
17
|
-
reachable: boolean;
|
|
18
|
-
error?: string;
|
|
19
|
-
}>;
|
|
20
|
-
/**
|
|
21
|
-
* The build as one line: label, branch, commit and CI provider. A dirty
|
|
22
|
-
* tree shows next to the commit, so a re-run after an uncommitted fix
|
|
23
|
-
* visibly walks a different build.
|
|
24
|
-
*
|
|
25
|
-
* @example
|
|
26
|
-
* ```ts
|
|
27
|
-
* formatBuild({ git_sha: "90e2444…", git_dirty: true, worktree_hash: "3fa9c1d2e4b5" });
|
|
28
|
-
* // "90e2444 + uncommitted changes (3fa9c1…)"
|
|
29
|
-
* ```
|
|
30
|
-
*/
|
|
31
|
-
export declare function formatBuild(build: BuildMetadata): string;
|
|
32
|
-
/**
|
|
33
|
-
* A run viewport as one line.
|
|
34
|
-
*
|
|
35
|
-
* @example
|
|
36
|
-
* ```ts
|
|
37
|
-
* formatViewport({ device: "desktop", width: 1280, height: 800, source: "persona-tags" });
|
|
38
|
-
* // "desktop 1280×800 (from persona tags)"
|
|
39
|
-
* ```
|
|
40
|
-
*/
|
|
41
|
-
export declare function formatViewport(v: RunViewport): string;
|
|
42
|
-
export interface StartRunOptions {
|
|
43
|
-
target?: string;
|
|
44
|
-
build?: string;
|
|
45
|
-
env?: string;
|
|
46
|
-
json?: boolean;
|
|
47
|
-
check?: boolean;
|
|
48
|
-
}
|
|
49
|
-
export declare function startRun(scenarioSlug: string, opts: StartRunOptions): Promise<void>;
|
|
@@ -1,87 +0,0 @@
|
|
|
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>;
|
package/dist/commands/step.d.ts
DELETED
|
@@ -1,95 +0,0 @@
|
|
|
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>;
|
package/dist/commands/sync.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
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>;
|
|
@@ -1,9 +0,0 @@
|
|
|
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>;
|
package/dist/index.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* \@iamu-dev/iamu
|
|
3
|
-
*
|
|
4
|
-
* Scenario-driven development — test your product as realistic personas.
|
|
5
|
-
*
|
|
6
|
-
* @packageDocumentation
|
|
7
|
-
*/
|
|
8
|
-
export { registerAllCommands } from "./commands/register.js";
|
|
9
|
-
export { setupProcessHandlers, registerSigintCleanup } from "./ui/panic.js";
|
package/dist/sync-mcp/fatal.d.ts
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Fatal-error reporting for the sync MCP server entry point.
|
|
3
|
-
*
|
|
4
|
-
* stdout is the MCP stdio transport, so a diagnostic printed there would
|
|
5
|
-
* corrupt the protocol stream. Everything here writes to stderr only.
|
|
6
|
-
*/
|
|
7
|
-
/** Side effects a fatal report needs, injectable so it can be tested. */
|
|
8
|
-
export interface FatalDeps {
|
|
9
|
-
/** Write a diagnostic line — stderr, never stdout. */
|
|
10
|
-
writeErr: (text: string) => void;
|
|
11
|
-
/** Terminate the process with the given exit code. */
|
|
12
|
-
exit: (code: number) => void;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Describe a fatal error, with its stack when there is one.
|
|
16
|
-
*
|
|
17
|
-
* @example
|
|
18
|
-
* ```ts
|
|
19
|
-
* formatFatal("uncaughtException", new Error("boom"));
|
|
20
|
-
* // "iamu sync-server: fatal uncaughtException: boom\n…stack…\n"
|
|
21
|
-
* ```
|
|
22
|
-
*/
|
|
23
|
-
export declare function formatFatal(kind: string, err: unknown): string;
|
|
24
|
-
/**
|
|
25
|
-
* Report a fatal error on stderr and exit non-zero.
|
|
26
|
-
*
|
|
27
|
-
* @example
|
|
28
|
-
* ```ts
|
|
29
|
-
* handleFatal("uncaughtException", err, deps);
|
|
30
|
-
* ```
|
|
31
|
-
*/
|
|
32
|
-
export declare function handleFatal(kind: string, err: unknown, deps?: FatalDeps): void;
|
|
33
|
-
/**
|
|
34
|
-
* Install `uncaughtException` / `unhandledRejection` handlers that log
|
|
35
|
-
* to stderr before exiting, instead of dying silently with code 1.
|
|
36
|
-
*
|
|
37
|
-
* @example
|
|
38
|
-
* ```ts
|
|
39
|
-
* installFatalHandlers();
|
|
40
|
-
* ```
|
|
41
|
-
*/
|
|
42
|
-
export declare function installFatalHandlers(deps?: FatalDeps): void;
|