@ggui-ai/shared 0.2.0-alpha.4 → 0.4.0-rc.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 +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/types/benchmark.d.ts +54 -31
- package/dist/types/benchmark.d.ts.map +1 -1
- package/dist/types/self-repair.d.ts +15 -58
- package/dist/types/self-repair.d.ts.map +1 -1
- package/dist/types/self-repair.js +9 -8
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -10,8 +10,8 @@ Type-only — no runtime code.
|
|
|
10
10
|
|
|
11
11
|
## What it exports
|
|
12
12
|
|
|
13
|
-
- **Self-repair types** — `ComponentErrorReport`, `ComponentRepairResult`, `SelfRepairConfig`,
|
|
14
|
-
- **Agent listing types** — `AgentListingItem`, `AgentListingVisibility`, `AgentListingStatus` for
|
|
13
|
+
- **Self-repair types** — `ComponentErrorReport`, `ComponentRepairResult`, `SelfRepairConfig`, and related shapes for the generated-component error boundary and repair flow.
|
|
14
|
+
- **Agent listing types** — `AgentListingItem`, `AgentListingVisibility`, `AgentListingStatus` for agent browse/listing UIs.
|
|
15
15
|
- **Benchmark display types** — `BenchmarkReportDisplay` and related shapes for rendering UI-generation benchmark reports.
|
|
16
16
|
|
|
17
17
|
## License
|
package/dist/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Contains types that are shared between @ggui-ai/react, @ggui-ai/react-native,
|
|
5
5
|
* and other public packages but aren't wire protocol types.
|
|
6
6
|
*/
|
|
7
|
-
export type { ComponentErrorReport, ComponentRepairResult, SelfRepairConfig,
|
|
7
|
+
export type { ComponentErrorReport, ComponentRepairResult, SelfRepairConfig, } from './types/self-repair';
|
|
8
8
|
export type { AgentListingItem, AgentListingVisibility, AgentListingStatus, } from './types/agent-listing';
|
|
9
|
-
export type { BenchmarkReportDisplay, BenchmarkMeta, VariantInfo, CommitInfo, GenerationResultDisplay, EvaluationResultDisplay, TierEvaluationDisplay, PostGenerationDisplay, BenchmarkRunResultDisplay, VariantSummaryDisplay, CommitSummaryDisplay,
|
|
9
|
+
export type { BenchmarkReportDisplay, BenchmarkMeta, JudgeDisclosureDisplay, VariantInfo, CommitInfo, GenerationResultDisplay, EvaluationDimensionsDisplay, EvaluationResultDisplay, PanelJudgeBreakdownDisplay, TierEvaluationDisplay, PostGenerationDisplay, BenchmarkRunResultDisplay, VariantSummaryDisplay, CommitSummaryDisplay, SdkComparisonEntry, } from './types/benchmark';
|
|
10
10
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,YAAY,EACV,oBAAoB,EACpB,qBAAqB,EACrB,gBAAgB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,YAAY,EACV,oBAAoB,EACpB,qBAAqB,EACrB,gBAAgB,GACjB,MAAM,qBAAqB,CAAC;AAG7B,YAAY,EACV,gBAAgB,EAChB,sBAAsB,EACtB,kBAAkB,GACnB,MAAM,uBAAuB,CAAC;AAG/B,YAAY,EACV,sBAAsB,EACtB,aAAa,EACb,sBAAsB,EACtB,WAAW,EACX,UAAU,EACV,uBAAuB,EACvB,2BAA2B,EAC3B,uBAAuB,EACvB,0BAA0B,EAC1B,qBAAqB,EACrB,qBAAqB,EACrB,yBAAyB,EACzB,qBAAqB,EACrB,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,mBAAmB,CAAC"}
|
|
@@ -9,23 +9,14 @@ export interface BenchmarkReportDisplay {
|
|
|
9
9
|
variantSummaries: VariantSummaryDisplay[];
|
|
10
10
|
commitSummaries: CommitSummaryDisplay[];
|
|
11
11
|
sdkComparison: Record<string, Record<string, SdkComparisonEntry>>;
|
|
12
|
-
/**
|
|
13
|
-
* Per-floor summary view — OSS vs hosted. Optional because
|
|
14
|
-
* pre-floor-split reports (historical) don't carry it, and
|
|
15
|
-
* single-floor runs emit a length-1 array. Field shape matches
|
|
16
|
-
* `FloorSummary` in `@ggui-ai/benchmark/multi-sdk/types`;
|
|
17
|
-
* duplicated here instead of cross-imported so shared types stay
|
|
18
|
-
* free of the core workspace dep.
|
|
19
|
-
*/
|
|
20
|
-
floorSummaries?: FloorSummaryDisplay[];
|
|
21
12
|
/**
|
|
22
13
|
* Per-generator comparison matrix —
|
|
23
14
|
* `byGenerator[slug][commitId][sdkName]` = aggregate metrics.
|
|
24
15
|
* Optional because older reports don't carry it; single-generator
|
|
25
16
|
* runs emit a one-key map. Field shape matches
|
|
26
17
|
* `GeneratorComparisonMatrix` in `@ggui-ai/benchmark/multi-sdk/types`;
|
|
27
|
-
* duplicated here
|
|
28
|
-
*
|
|
18
|
+
* duplicated here instead of cross-imported so shared types stay
|
|
19
|
+
* free of the core workspace dep.
|
|
29
20
|
*/
|
|
30
21
|
byGenerator?: Record<string, Record<string, Record<string, GeneratorComparisonCellDisplay>>>;
|
|
31
22
|
/**
|
|
@@ -62,22 +53,6 @@ export interface GeneratorSummaryDisplay {
|
|
|
62
53
|
avgCostUsd: number;
|
|
63
54
|
successRate: number;
|
|
64
55
|
}
|
|
65
|
-
export interface FloorSummaryDisplay {
|
|
66
|
-
floor: 'oss' | 'hosted';
|
|
67
|
-
runs: number;
|
|
68
|
-
avgTimeMs: number;
|
|
69
|
-
avgScore: number;
|
|
70
|
-
successRate: number;
|
|
71
|
-
capHitRate: number;
|
|
72
|
-
predefinedToolCallRate: number;
|
|
73
|
-
avgPredefinedToolCalls: number;
|
|
74
|
-
errorBuckets: {
|
|
75
|
-
pass: number;
|
|
76
|
-
patchInvalid: number;
|
|
77
|
-
selfCheckFail: number;
|
|
78
|
-
diffFail: number;
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
56
|
export interface BenchmarkMeta {
|
|
82
57
|
reportId: string;
|
|
83
58
|
timestamp: string;
|
|
@@ -89,6 +64,19 @@ export interface BenchmarkMeta {
|
|
|
89
64
|
failureCount: number;
|
|
90
65
|
successRate: number;
|
|
91
66
|
durationMs: number;
|
|
67
|
+
/**
|
|
68
|
+
* Disclosure of the LLM judge PANEL that produced every `score` in
|
|
69
|
+
* this report — one entry per distinct judge model. Absent when no
|
|
70
|
+
* result was evaluated (skip-evaluation runs).
|
|
71
|
+
*/
|
|
72
|
+
judges?: JudgeDisclosureDisplay[];
|
|
73
|
+
/** SPDX id of the published dataset license. */
|
|
74
|
+
dataLicense?: string;
|
|
75
|
+
}
|
|
76
|
+
/** Which model + prompt version produced the quality scores. */
|
|
77
|
+
export interface JudgeDisclosureDisplay {
|
|
78
|
+
model: string;
|
|
79
|
+
promptVersion: string;
|
|
92
80
|
}
|
|
93
81
|
export interface VariantInfo {
|
|
94
82
|
id: string;
|
|
@@ -111,10 +99,43 @@ export interface GenerationResultDisplay {
|
|
|
111
99
|
};
|
|
112
100
|
passesUsed?: number;
|
|
113
101
|
}
|
|
102
|
+
/**
|
|
103
|
+
* The 5 dimensions the aesthetic judge actually measures. Mirrors
|
|
104
|
+
* `AestheticScores` in `@ggui-ai/benchmark/multi-sdk/post-eval`;
|
|
105
|
+
* duplicated here (named, not an index signature) so the compiler
|
|
106
|
+
* catches dimension drift between the runner and the viewer.
|
|
107
|
+
*/
|
|
108
|
+
export interface EvaluationDimensionsDisplay {
|
|
109
|
+
layout: number;
|
|
110
|
+
designTokens: number;
|
|
111
|
+
hierarchy: number;
|
|
112
|
+
polish: number;
|
|
113
|
+
dataPresentation: number;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* One judge's contribution to the panel for a single evaluated run.
|
|
117
|
+
* Mirrors `SingleJudgeResult` (minus token counts, which are
|
|
118
|
+
* cost-accounting internals not surfaced to the viewer) from
|
|
119
|
+
* `@ggui-ai/benchmark/multi-sdk/post-eval`.
|
|
120
|
+
*/
|
|
121
|
+
export interface PanelJudgeBreakdownDisplay {
|
|
122
|
+
judge: JudgeDisclosureDisplay;
|
|
123
|
+
score: number;
|
|
124
|
+
dimensions: EvaluationDimensionsDisplay;
|
|
125
|
+
critique?: string;
|
|
126
|
+
}
|
|
114
127
|
export interface EvaluationResultDisplay {
|
|
115
128
|
passed: boolean;
|
|
129
|
+
/** Panel aggregate score (mean of the surviving judges). */
|
|
116
130
|
score: number;
|
|
117
|
-
|
|
131
|
+
/** Panel aggregate per-dimension means. */
|
|
132
|
+
dimensions: EvaluationDimensionsDisplay;
|
|
133
|
+
/** Distinct judge disclosures (model + prompt version) on this panel. */
|
|
134
|
+
judges: JudgeDisclosureDisplay[];
|
|
135
|
+
/** Per-judge breakdown — one entry per judge that responded. */
|
|
136
|
+
panel: PanelJudgeBreakdownDisplay[];
|
|
137
|
+
/** max−min of the surviving judges' weighted scores — disagreement signal. */
|
|
138
|
+
spread: number;
|
|
118
139
|
critique?: string;
|
|
119
140
|
evalTimeMs?: number;
|
|
120
141
|
}
|
|
@@ -160,8 +181,6 @@ export interface BenchmarkRunResultDisplay {
|
|
|
160
181
|
error?: string;
|
|
161
182
|
timestamp: string;
|
|
162
183
|
postGeneration?: PostGenerationDisplay;
|
|
163
|
-
/** S3 key for the compiled component JS (so frontend can fetch directly) */
|
|
164
|
-
compiledCodeS3Key?: string;
|
|
165
184
|
}
|
|
166
185
|
export interface VariantSummaryDisplay {
|
|
167
186
|
variantId: string;
|
|
@@ -171,7 +190,11 @@ export interface VariantSummaryDisplay {
|
|
|
171
190
|
avgScore: number;
|
|
172
191
|
avgTimeMs: number;
|
|
173
192
|
avgCostUsd: number;
|
|
174
|
-
|
|
193
|
+
/**
|
|
194
|
+
* Generation success rate (generation produced output without
|
|
195
|
+
* erroring) — NOT a quality-threshold pass rate.
|
|
196
|
+
*/
|
|
197
|
+
successRate: number;
|
|
175
198
|
totalRuns: number;
|
|
176
199
|
}
|
|
177
200
|
export interface CommitSummaryDisplay {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"benchmark.d.ts","sourceRoot":"","sources":["../../src/types/benchmark.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,aAAa,CAAC;IACpB,OAAO,EAAE,yBAAyB,EAAE,CAAC;IACrC,gBAAgB,EAAE,qBAAqB,EAAE,CAAC;IAC1C,eAAe,EAAE,oBAAoB,EAAE,CAAC;IACxC,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC,CAAC;IAClE
|
|
1
|
+
{"version":3,"file":"benchmark.d.ts","sourceRoot":"","sources":["../../src/types/benchmark.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,aAAa,CAAC;IACpB,OAAO,EAAE,yBAAyB,EAAE,CAAC;IACrC,gBAAgB,EAAE,qBAAqB,EAAE,CAAC;IAC1C,eAAe,EAAE,oBAAoB,EAAE,CAAC;IACxC,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC,CAAC;IAClE;;;;;;;;OAQG;IACH,WAAW,CAAC,EAAE,MAAM,CAClB,MAAM,EACN,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,8BAA8B,CAAC,CAAC,CAC/D,CAAC;IACF;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,uBAAuB,EAAE,CAAC;CAChD;AAED;;;;GAIG;AACH,MAAM,WAAW,8BAA8B;IAC7C,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CA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,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;CACrB"}
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Self-Repair Types
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* Shared vocabulary for reporting runtime errors in generated
|
|
5
|
+
* components and describing repair outcomes.
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
7
|
+
* `SelfRepairBoundary` (in the React SDKs) catches a component error,
|
|
8
|
+
* builds a `ComponentErrorReport`, and hands it to the consumer-supplied
|
|
9
|
+
* `onReportError` callback — how (and whether) the report reaches a
|
|
10
|
+
* repair backend is the consumer's choice; the boundary itself carries
|
|
11
|
+
* no transport. `ComponentRepairResult` describes the outcome a repair
|
|
12
|
+
* backend returns; `SelfRepairConfig` shapes the boundary's retry/UI
|
|
13
|
+
* policy.
|
|
13
14
|
*/
|
|
14
15
|
/**
|
|
15
16
|
* Error report sent from client to server
|
|
@@ -17,11 +18,10 @@
|
|
|
17
18
|
export interface ComponentErrorReport {
|
|
18
19
|
/** Unique error ID for tracking */
|
|
19
20
|
errorId: string;
|
|
20
|
-
/**
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
|
|
24
|
-
renderId: string;
|
|
21
|
+
/** GguiSession that experienced the error. Post-Phase-B the old
|
|
22
|
+
* per-item identity is gone — every GguiSession is now a top-level
|
|
23
|
+
* instance, folded into a single `sessionId`. */
|
|
24
|
+
sessionId: string;
|
|
25
25
|
/** App ID */
|
|
26
26
|
appId: string;
|
|
27
27
|
/** Error details */
|
|
@@ -63,8 +63,8 @@ export interface ComponentRepairResult {
|
|
|
63
63
|
success: boolean;
|
|
64
64
|
/** The error ID this repairs */
|
|
65
65
|
errorId: string;
|
|
66
|
-
/**
|
|
67
|
-
|
|
66
|
+
/** GguiSession ID — the failing component's render identity. */
|
|
67
|
+
sessionId: string;
|
|
68
68
|
/** Repaired compiled code (if successful) */
|
|
69
69
|
repairedCode?: string;
|
|
70
70
|
/** Repaired source code (if available) */
|
|
@@ -104,47 +104,4 @@ export interface SelfRepairConfig {
|
|
|
104
104
|
/** Callback when repair fails */
|
|
105
105
|
onRepairFailure?: (errorId: string, reason: string) => void;
|
|
106
106
|
}
|
|
107
|
-
/**
|
|
108
|
-
* WebSocket event types for self-repair
|
|
109
|
-
*/
|
|
110
|
-
export type SelfRepairEventType = 'component:error' | 'component:repairing' | 'component:repaired' | 'component:repair-failed';
|
|
111
|
-
/**
|
|
112
|
-
* Self-repair WebSocket events
|
|
113
|
-
*/
|
|
114
|
-
export interface SelfRepairEvents {
|
|
115
|
-
'component:error': ComponentErrorReport;
|
|
116
|
-
'component:repairing': {
|
|
117
|
-
errorId: string;
|
|
118
|
-
renderId: string;
|
|
119
|
-
};
|
|
120
|
-
'component:repaired': ComponentRepairResult;
|
|
121
|
-
'component:repair-failed': {
|
|
122
|
-
errorId: string;
|
|
123
|
-
renderId: string;
|
|
124
|
-
reason: string;
|
|
125
|
-
};
|
|
126
|
-
}
|
|
127
|
-
/**
|
|
128
|
-
* Repair history entry (for analytics)
|
|
129
|
-
*/
|
|
130
|
-
export interface RepairHistoryEntry {
|
|
131
|
-
/** Error ID */
|
|
132
|
-
errorId: string;
|
|
133
|
-
/** App ID */
|
|
134
|
-
appId: string;
|
|
135
|
-
/** Render ID */
|
|
136
|
-
renderId: string;
|
|
137
|
-
/** Error type */
|
|
138
|
-
errorType: string;
|
|
139
|
-
/** Error message */
|
|
140
|
-
errorMessage: string;
|
|
141
|
-
/** Whether repair succeeded */
|
|
142
|
-
repairSucceeded: boolean;
|
|
143
|
-
/** Number of attempts */
|
|
144
|
-
attempts: number;
|
|
145
|
-
/** Total repair time */
|
|
146
|
-
totalRepairTimeMs: number;
|
|
147
|
-
/** Timestamp */
|
|
148
|
-
timestamp: string;
|
|
149
|
-
}
|
|
150
107
|
//# sourceMappingURL=self-repair.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"self-repair.d.ts","sourceRoot":"","sources":["../../src/types/self-repair.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"self-repair.d.ts","sourceRoot":"","sources":["../../src/types/self-repair.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,mCAAmC;IACnC,OAAO,EAAE,MAAM,CAAC;IAChB;;sDAEkD;IAClD,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa;IACb,KAAK,EAAE,MAAM,CAAC;IACd,oBAAoB;IACpB,KAAK,EAAE;QACL,oBAAoB;QACpB,OAAO,EAAE,MAAM,CAAC;QAChB,qDAAqD;QACrD,IAAI,EAAE,MAAM,CAAC;QACb,kBAAkB;QAClB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,uCAAuC;QACvC,cAAc,CAAC,EAAE,MAAM,CAAC;KACzB,CAAC;IACF,8CAA8C;IAC9C,OAAO,EAAE;QACP,6CAA6C;QAC7C,MAAM,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,UAAU,GAAG,cAAc,CAAC;QACrE,4CAA4C;QAC5C,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAChC,yCAAyC;QACzC,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAC3C,+BAA+B;QAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;IACF,0CAA0C;IAC1C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gCAAgC;IAChC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gBAAgB;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,6CAA6C;IAC7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3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* Shared vocabulary for reporting runtime errors in generated
|
|
5
|
+
* components and describing repair outcomes.
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
7
|
+
* `SelfRepairBoundary` (in the React SDKs) catches a component error,
|
|
8
|
+
* builds a `ComponentErrorReport`, and hands it to the consumer-supplied
|
|
9
|
+
* `onReportError` callback — how (and whether) the report reaches a
|
|
10
|
+
* repair backend is the consumer's choice; the boundary itself carries
|
|
11
|
+
* no transport. `ComponentRepairResult` describes the outcome a repair
|
|
12
|
+
* backend returns; `SelfRepairConfig` shapes the boundary's retry/UI
|
|
13
|
+
* policy.
|
|
13
14
|
*/
|
|
14
15
|
export {};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ggui-ai/shared",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Shared types for ggui SDK packages — self-repair, agent listings",
|
|
3
|
+
"version": "0.4.0-rc.0",
|
|
4
|
+
"description": "Shared types for ggui SDK packages — self-repair, agent listings, benchmark report display",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"ggui",
|