@iamu-dev/iamu 0.2.0-beta.1 → 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/dist/bin.js +2178 -330
- package/dist/commands/browse.d.ts +14 -0
- package/dist/commands/complete.d.ts +1 -0
- package/dist/commands/credentials.d.ts +1 -1
- package/dist/commands/doctor.d.ts +11 -2
- package/dist/commands/evaluate.d.ts +2 -0
- package/dist/commands/explore-crawl.d.ts +67 -0
- package/dist/commands/explore.d.ts +52 -0
- package/dist/commands/init.d.ts +7 -0
- package/dist/commands/instructions-walk.d.ts +11 -1
- package/dist/commands/match.d.ts +1 -0
- package/dist/commands/new-entity.d.ts +13 -0
- package/dist/commands/start-run.d.ts +7 -2
- 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.js +2174 -326
- package/dist/templates/prompts/walk.md +16 -4
- package/dist/templates/skills/iamu-findings.md +70 -32
- package/dist/templates/skills/iamu-new.md +123 -66
- package/dist/templates/skills/iamu-propose.md +60 -27
- package/dist/templates/skills/iamu-run.md +180 -60
- package/dist/templates/skills/iamu-setup.md +195 -117
- package/dist/templates/skills/iamu-status.md +21 -14
- package/package.json +6 -3
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Autonomous Gemini Walker Runner
|
|
3
|
+
*
|
|
4
|
+
* Runs an LLM (Gemini 2.5 Flash via REST) against realistic product fixtures
|
|
5
|
+
* using the real `iamu` CLI driving surface, and grades the resulting walkthrough
|
|
6
|
+
* using the Walkthrough Evaluation Scorecard.
|
|
7
|
+
*/
|
|
8
|
+
import type { CanonicalWalkthrough } from "@iamu-dev/protocol";
|
|
9
|
+
export interface GeminiRunnerOptions {
|
|
10
|
+
scenarioSlug: string;
|
|
11
|
+
targetUrl: string;
|
|
12
|
+
projectDir: string;
|
|
13
|
+
binPath: string;
|
|
14
|
+
cdpPort: number;
|
|
15
|
+
apiKey?: string;
|
|
16
|
+
googleCloudProject?: string;
|
|
17
|
+
googleCloudLocation?: string;
|
|
18
|
+
model?: string;
|
|
19
|
+
maxTurns?: number;
|
|
20
|
+
}
|
|
21
|
+
export interface GeminiCallTurn {
|
|
22
|
+
role: "user" | "model";
|
|
23
|
+
parts: Array<{
|
|
24
|
+
text: string;
|
|
25
|
+
thoughtSignature?: string;
|
|
26
|
+
} | {
|
|
27
|
+
functionCall: {
|
|
28
|
+
name: string;
|
|
29
|
+
args: Record<string, unknown>;
|
|
30
|
+
};
|
|
31
|
+
thoughtSignature?: string;
|
|
32
|
+
} | {
|
|
33
|
+
functionResponse: {
|
|
34
|
+
name: string;
|
|
35
|
+
response: Record<string, unknown>;
|
|
36
|
+
};
|
|
37
|
+
}>;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Execute an autonomous Gemini walker walkthrough run against a live fixture app.
|
|
41
|
+
*/
|
|
42
|
+
export declare function runGeminiWalkthrough(opts: GeminiRunnerOptions): Promise<{
|
|
43
|
+
runId: string;
|
|
44
|
+
canonical: CanonicalWalkthrough;
|
|
45
|
+
turns: number;
|
|
46
|
+
}>;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { CanonicalWalkthrough } from "@iamu-dev/protocol";
|
|
2
|
+
export interface GroundTruthDefect {
|
|
3
|
+
id: string;
|
|
4
|
+
category: "compliance" | "functional" | "ux";
|
|
5
|
+
keywords: string[];
|
|
6
|
+
description: string;
|
|
7
|
+
}
|
|
8
|
+
export interface ScenarioEvalContract {
|
|
9
|
+
scenarioSlug: string;
|
|
10
|
+
expectedState: "populated" | "empty" | "mismatch" | "auth_gated";
|
|
11
|
+
optimalSteps: number;
|
|
12
|
+
expectedDefects?: GroundTruthDefect[];
|
|
13
|
+
unseededDataKeywords?: string[];
|
|
14
|
+
allowedSurfaces?: string[];
|
|
15
|
+
expectedApproximationTarget?: string;
|
|
16
|
+
authRequired?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export interface WalkthroughEvaluationScorecard {
|
|
19
|
+
scenarioSlug: string;
|
|
20
|
+
runId: string;
|
|
21
|
+
expectedState: string;
|
|
22
|
+
defectRecall: {
|
|
23
|
+
matched: number;
|
|
24
|
+
expected: number;
|
|
25
|
+
rate: number;
|
|
26
|
+
};
|
|
27
|
+
defectPrecision: {
|
|
28
|
+
legitimate: number;
|
|
29
|
+
total: number;
|
|
30
|
+
rate: number;
|
|
31
|
+
};
|
|
32
|
+
falsePositiveRateEnvironment: {
|
|
33
|
+
count: number;
|
|
34
|
+
totalFindings: number;
|
|
35
|
+
rate: number;
|
|
36
|
+
};
|
|
37
|
+
preconditionAdherence: {
|
|
38
|
+
adhered: boolean;
|
|
39
|
+
reason: string;
|
|
40
|
+
};
|
|
41
|
+
trajectory: {
|
|
42
|
+
totalSteps: number;
|
|
43
|
+
optimalSteps: number;
|
|
44
|
+
driftCount: number;
|
|
45
|
+
stepWasteIndex: number;
|
|
46
|
+
};
|
|
47
|
+
authTransition: {
|
|
48
|
+
detected: boolean;
|
|
49
|
+
transitionSteps: number;
|
|
50
|
+
success: boolean;
|
|
51
|
+
};
|
|
52
|
+
passed: boolean;
|
|
53
|
+
summary: string;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Evaluates a completed canonical walkthrough against ground-truth contracts
|
|
57
|
+
* for compliance detection, empty-state false positives, semantic squinting, and auth.
|
|
58
|
+
*/
|
|
59
|
+
export declare function evaluateWalkthroughRun(canonical: CanonicalWalkthrough, contract: ScenarioEvalContract): WalkthroughEvaluationScorecard;
|
|
60
|
+
/** Formats an array of evaluation scorecards into an ASCII scorecard table */
|
|
61
|
+
export declare function formatEvaluationScorecardTable(scorecards: WalkthroughEvaluationScorecard[]): string;
|