@ggui-ai/ui-gen 0.26.0 → 0.28.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/dist/{adapter-BJwn74rx.d.ts → adapter-h4_V69LI.d.ts} +1 -1
- package/dist/adapters/base.d.ts +6 -1
- package/dist/adapters/base.js.map +1 -1
- package/dist/adapters/generation-dispatch.d.ts +2 -2
- package/dist/adapters/generation-dispatch.js +233 -17
- package/dist/adapters/generation-dispatch.js.map +1 -1
- package/dist/adapters/index.js +36 -14
- package/dist/adapters/index.js.map +1 -1
- package/dist/advanced/index.d.ts +4 -4
- package/dist/advanced/index.js +268 -28
- package/dist/advanced/index.js.map +1 -1
- package/dist/boilerplate.js +4 -6
- package/dist/boilerplate.js.map +1 -1
- package/dist/check/index.d.ts +1 -7
- package/dist/check/index.js +50 -4
- package/dist/check/index.js.map +1 -1
- package/dist/{create-ui-generator-N4gRXpcL.d.ts → create-ui-generator-BrZHF0cf.d.ts} +2 -2
- package/dist/{dispatch-BUoXRj_r.d.ts → dispatch-B07TI30d.d.ts} +1 -1
- package/dist/evaluation/axis-checks/index.d.ts +3 -3
- package/dist/evaluation/axis-checks/index.js +97 -1
- package/dist/evaluation/axis-checks/index.js.map +1 -1
- package/dist/evaluation/axis-checks/registry.d.ts +1 -1
- package/dist/evaluation/axis-checks/registry.js +97 -1
- package/dist/evaluation/axis-checks/registry.js.map +1 -1
- package/dist/evaluation/index.d.ts +22 -12
- package/dist/evaluation/index.js +138 -14
- package/dist/evaluation/index.js.map +1 -1
- package/dist/evaluation/types.d.ts +1 -1
- package/dist/harness/check/runtime-render/index.d.ts +3 -3
- package/dist/harness/index.d.ts +1 -1
- package/dist/harness/index.js +6 -6
- package/dist/harness/index.js.map +1 -1
- package/dist/harness/prompts.js +1 -4
- package/dist/harness/prompts.js.map +1 -1
- package/dist/harness/result-types.d.ts +14 -3
- package/dist/harness/result-types.js.map +1 -1
- package/dist/harness/runtime.d.ts +1 -1
- package/dist/harness/runtime.js +6 -7
- package/dist/harness/runtime.js.map +1 -1
- package/dist/harness/types-public.d.ts +1 -1
- package/dist/harness/types-public.js +4 -6
- package/dist/harness/types-public.js.map +1 -1
- package/dist/harness/validator-trace-sink.d.ts +1 -1
- package/dist/index.d.ts +6 -6
- package/dist/index.js +268 -28
- package/dist/index.js.map +1 -1
- package/dist/patch.d.ts +1 -1
- package/dist/{types-public-B7wn4ce5.d.ts → types-public-h8IMnYuh.d.ts} +4 -0
- package/dist/{visual-evaluator-C9L-o6ap.d.ts → visual-evaluator-C2strxqD.d.ts} +1 -1
- package/dist/workflows.d.ts +1 -1
- package/package.json +13 -13
- package/src/adapters/base.ts +6 -1
- package/src/adapters/claude/message-parser.ts +5 -6
- package/src/adapters/claude/sdk-tool-pins.ts +44 -0
- package/src/adapters/claude/sdk.ts +3 -3
- package/src/adapters/claude/source-capture.ts +20 -0
- package/src/adapters/provider-router.ts +1 -0
- package/src/boilerplate/system-prompt.ts +3 -2
- package/src/check/run-tier0.ts +61 -0
- package/src/create-ui-generator.ts +4 -2
- package/src/design-system-docs.ts +2 -1
- package/src/evaluation/axis-checks/checks/state-merge.ts +1 -1
- package/src/evaluation/axis-checks/helpers.ts +125 -0
- package/src/evaluation/criteria/resolve.ts +19 -1
- package/src/evaluation/evaluator.ts +2 -2
- package/src/evaluation/llm-evaluator.ts +2 -2
- package/src/evaluation/loop.ts +25 -4
- package/src/evaluation/message-parsing.ts +11 -12
- package/src/evaluation/types-public.ts +4 -0
- package/src/evaluation/visual-evaluator.ts +1 -1
- package/src/harness/coding/assemble-result.ts +1 -0
- package/src/harness/coding/dupe-break.ts +70 -0
- package/src/harness/coding/generate-task-runner.ts +5 -1
- package/src/harness/coding/run-coding-turn.ts +56 -1
- package/src/harness/result-types.ts +12 -0
- package/src/index.ts +1 -1
- package/src/taught-tokens.ts +5 -6
package/dist/advanced/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { GeneratorTier, UiGenerator } from '@ggui-ai/mcp-server-core';
|
|
2
2
|
import { ModelRef, JsonObject } from '@ggui-ai/protocol';
|
|
3
3
|
import { BehaviorFailure, PlaywrightModule } from '@ggui-ai/ui-visual-tester';
|
|
4
|
-
import { C as CreateUiGeneratorOptions } from '../create-ui-generator-
|
|
5
|
-
import { a as RenderCheckIssue } from '../adapter-
|
|
4
|
+
import { C as CreateUiGeneratorOptions } from '../create-ui-generator-BrZHF0cf.js';
|
|
5
|
+
import { a as RenderCheckIssue } from '../adapter-h4_V69LI.js';
|
|
6
6
|
import '../harness/runtime.js';
|
|
7
7
|
import '../styling-profile-CxfvV48g.js';
|
|
8
|
-
import '../types-public-
|
|
8
|
+
import '../types-public-h8IMnYuh.js';
|
|
9
9
|
import '../llm.js';
|
|
10
10
|
import '../design-mode-DGWN_Gkm.js';
|
|
11
11
|
import '../axes-CKVCzR_x.js';
|
|
@@ -21,7 +21,7 @@ import '../policy.js';
|
|
|
21
21
|
import '../harness/result-types.js';
|
|
22
22
|
import '../adapters/types.js';
|
|
23
23
|
import '../prompts-BhNUuRoZ.js';
|
|
24
|
-
import '../visual-evaluator-
|
|
24
|
+
import '../visual-evaluator-C2strxqD.js';
|
|
25
25
|
import 'puppeteer-core';
|
|
26
26
|
|
|
27
27
|
/**
|
package/dist/advanced/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import * as esbuild2 from 'esbuild';
|
|
|
3
3
|
import { build } from 'esbuild';
|
|
4
4
|
import Anthropic from '@anthropic-ai/sdk';
|
|
5
5
|
import { EXPANDED_FRAME, getCssTokens, expandedFrameScrimDecls, fillFitRule, expandedFramePanelRule, FORBIDDEN_IMPORT_SPECIFIERS } from '@ggui-ai/design/rendering';
|
|
6
|
-
import { listContractGadgets, HOOK_NAME_RE, classifyUi, MODEL_REGISTRY, DANGEROUS_PATTERNS as DANGEROUS_PATTERNS$1, modelRefOfRoute, isGeneratorId, APP_GENERATION_PROFILE_BOUNDS, STDLIB_GADGETS_PACKAGE, resolveAppGadgets, anthropicRejectsForcedToolChoice, normalizeAnthropicModelId, anthropicRejectsSamplingParams, isRecord } from '@ggui-ai/protocol';
|
|
6
|
+
import { listContractGadgets, HOOK_NAME_RE, classifyUi, MODEL_REGISTRY, DANGEROUS_PATTERNS as DANGEROUS_PATTERNS$1, modelRefOfRoute, isGeneratorId, DEFAULT_MODEL as DEFAULT_MODEL$1, APP_GENERATION_PROFILE_BOUNDS, STDLIB_GADGETS_PACKAGE, resolveAppGadgets, anthropicRejectsForcedToolChoice, normalizeAnthropicModelId, anthropicRejectsSamplingParams, isRecord } from '@ggui-ai/protocol';
|
|
7
7
|
import fs, { existsSync, mkdtempSync, writeFileSync, rmSync, readFileSync, readdirSync, statSync } from 'fs';
|
|
8
8
|
import { contentHash } from '@ggui-ai/protocol/content-hash';
|
|
9
9
|
import ts4 from 'typescript';
|
|
@@ -338,6 +338,21 @@ var init_raw = __esm({
|
|
|
338
338
|
}
|
|
339
339
|
});
|
|
340
340
|
|
|
341
|
+
// src/adapters/claude/source-capture.ts
|
|
342
|
+
function sourceCodeFromToolUse(name, input) {
|
|
343
|
+
if (typeof name !== "string") return void 0;
|
|
344
|
+
const field2 = name === "Write" ? "content" : name.endsWith(COMPILE_TOOL_SUFFIX) ? "code" : void 0;
|
|
345
|
+
if (field2 === void 0 || typeof input !== "object" || input === null) return void 0;
|
|
346
|
+
const value = Reflect.get(input, field2);
|
|
347
|
+
return typeof value === "string" && value.length > 0 ? value : void 0;
|
|
348
|
+
}
|
|
349
|
+
var COMPILE_TOOL_SUFFIX;
|
|
350
|
+
var init_source_capture = __esm({
|
|
351
|
+
"src/adapters/claude/source-capture.ts"() {
|
|
352
|
+
COMPILE_TOOL_SUFFIX = "__compile_component";
|
|
353
|
+
}
|
|
354
|
+
});
|
|
355
|
+
|
|
341
356
|
// src/adapters/claude/message-parser.ts
|
|
342
357
|
function createArtifacts() {
|
|
343
358
|
return {
|
|
@@ -457,12 +472,9 @@ function extractSourceCode(message, artifacts) {
|
|
|
457
472
|
const content = assistantMsg.message?.content;
|
|
458
473
|
if (!Array.isArray(content)) return;
|
|
459
474
|
for (const block of content) {
|
|
460
|
-
if (block.type
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
artifacts.sourceCode = input.content;
|
|
464
|
-
}
|
|
465
|
-
}
|
|
475
|
+
if (block.type !== "tool_use") continue;
|
|
476
|
+
const value = sourceCodeFromToolUse(block.name, block.input);
|
|
477
|
+
if (value !== void 0) artifacts.sourceCode = value;
|
|
466
478
|
}
|
|
467
479
|
}
|
|
468
480
|
function unescapeJsonString(s) {
|
|
@@ -500,6 +512,7 @@ function extractGeneratorMeta(message, artifacts) {
|
|
|
500
512
|
}
|
|
501
513
|
var init_message_parser = __esm({
|
|
502
514
|
"src/adapters/claude/message-parser.ts"() {
|
|
515
|
+
init_source_capture();
|
|
503
516
|
}
|
|
504
517
|
});
|
|
505
518
|
|
|
@@ -595,6 +608,17 @@ var init_claude_code_login = __esm({
|
|
|
595
608
|
}
|
|
596
609
|
});
|
|
597
610
|
|
|
611
|
+
// src/adapters/claude/sdk-tool-pins.ts
|
|
612
|
+
function sdkToolPins(input) {
|
|
613
|
+
const builtins = [...input.builtinTools ?? []];
|
|
614
|
+
const approved = input.allowedTools !== void 0 ? [...input.allowedTools] : Object.keys(input.mcpServers ?? {}).map((name) => `mcp__${name}`);
|
|
615
|
+
return { tools: builtins, settingSources: [], allowedTools: [...approved, ...builtins] };
|
|
616
|
+
}
|
|
617
|
+
var init_sdk_tool_pins = __esm({
|
|
618
|
+
"src/adapters/claude/sdk-tool-pins.ts"() {
|
|
619
|
+
}
|
|
620
|
+
});
|
|
621
|
+
|
|
598
622
|
// src/adapters/claude/sdk.ts
|
|
599
623
|
var sdk_exports = {};
|
|
600
624
|
__export(sdk_exports, {
|
|
@@ -621,6 +645,7 @@ var init_sdk = __esm({
|
|
|
621
645
|
init_message_parser();
|
|
622
646
|
init_tool_bridge2();
|
|
623
647
|
init_claude_code_login();
|
|
648
|
+
init_sdk_tool_pins();
|
|
624
649
|
ClaudeSdkAdapter = class extends GeneratorAdapter {
|
|
625
650
|
provider = "claude";
|
|
626
651
|
mode = "sdk";
|
|
@@ -660,9 +685,8 @@ var init_sdk = __esm({
|
|
|
660
685
|
systemPrompt: params.systemPrompt,
|
|
661
686
|
...mcpServers && { mcpServers },
|
|
662
687
|
...cfg.agents && { agents: cfg.agents },
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
allowDangerouslySkipPermissions: true,
|
|
688
|
+
// ggui#1714 — no CLI built-ins unless asked for, no host settings, no permission bypass.
|
|
689
|
+
...sdkToolPins({ mcpServers, allowedTools, builtinTools: cfg.builtinTools }),
|
|
666
690
|
...cfg.cliPath && { pathToClaudeCodeExecutable: cfg.cliPath },
|
|
667
691
|
...cfg.stderr && { stderr: cfg.stderr },
|
|
668
692
|
// ggui#1185 — tool-less, config-less, non-bare; the model is pinned above.
|
|
@@ -2944,10 +2968,7 @@ var init_design_mode = __esm({
|
|
|
2944
2968
|
var NOT_YET_TAUGHT_TOKENS, taughtTokenManifest;
|
|
2945
2969
|
var init_taught_tokens = __esm({
|
|
2946
2970
|
"src/taught-tokens.ts"() {
|
|
2947
|
-
NOT_YET_TAUGHT_TOKENS = /* @__PURE__ */ new Set([
|
|
2948
|
-
"--ggui-color-controlAccentOutline",
|
|
2949
|
-
"--ggui-color-controlOutline"
|
|
2950
|
-
]);
|
|
2971
|
+
NOT_YET_TAUGHT_TOKENS = /* @__PURE__ */ new Set([]);
|
|
2951
2972
|
taughtTokenManifest = consumedTokenManifest.filter(
|
|
2952
2973
|
(token) => !NOT_YET_TAUGHT_TOKENS.has(token)
|
|
2953
2974
|
);
|
|
@@ -3467,6 +3488,40 @@ function detectComponentNeverReturns(sourceCode) {
|
|
|
3467
3488
|
for (const st of body.statements) if (!isFunctionLike(st)) visit(st);
|
|
3468
3489
|
return returnsValue ? null : { jsxStatementLine };
|
|
3469
3490
|
}
|
|
3491
|
+
function kitControlTags(source) {
|
|
3492
|
+
const out = [];
|
|
3493
|
+
const open = new RegExp(`<(${KIT_CONTROLS.join("|")})\\b`, "g");
|
|
3494
|
+
for (const m of source.matchAll(open)) {
|
|
3495
|
+
const start = (m.index ?? 0) + m[0].length;
|
|
3496
|
+
let depth = 0;
|
|
3497
|
+
let quote = null;
|
|
3498
|
+
let i = start;
|
|
3499
|
+
for (; i < source.length; i += 1) {
|
|
3500
|
+
const c = source[i];
|
|
3501
|
+
if (quote !== null) {
|
|
3502
|
+
if (c === quote && source[i - 1] !== "\\") quote = null;
|
|
3503
|
+
} else if (c === '"' || c === "'" || c === "`") quote = c;
|
|
3504
|
+
else if (c === "{") depth += 1;
|
|
3505
|
+
else if (c === "}") depth -= 1;
|
|
3506
|
+
else if (c === ">" && depth === 0) break;
|
|
3507
|
+
}
|
|
3508
|
+
out.push({ name: m[1] ?? "", attrs: source.slice(start, i), line: source.slice(0, m.index ?? 0).split("\n").length });
|
|
3509
|
+
}
|
|
3510
|
+
return out;
|
|
3511
|
+
}
|
|
3512
|
+
function inlineBorderKey(attrs, source) {
|
|
3513
|
+
const BORDER = /\b(border(?:Top|Right|Bottom|Left)?(?:Color|Width|Style)?)\s*:/;
|
|
3514
|
+
const style = attrs.match(/\bstyle=\{\{([\s\S]*)\}\}/);
|
|
3515
|
+
if (style !== null) {
|
|
3516
|
+
const hit2 = (style[1] ?? "").match(BORDER);
|
|
3517
|
+
if (hit2 !== null) return hit2[1] ?? null;
|
|
3518
|
+
}
|
|
3519
|
+
const named = attrs.match(/\bstyle=\{\s*([A-Za-z_$][\w$]*)\s*\}/);
|
|
3520
|
+
if (named === null) return null;
|
|
3521
|
+
const decl = source.match(new RegExp(`\\b(?:const|let)\\s+${named[1]}\\b[^=]*=\\s*\\{([^{}]*)\\}`));
|
|
3522
|
+
const hit = decl !== null ? (decl[1] ?? "").match(BORDER) : null;
|
|
3523
|
+
return hit !== null ? hit[1] ?? null : null;
|
|
3524
|
+
}
|
|
3470
3525
|
async function runTier0Checks(sourceCode, contract, buildErrors, gadgetTypes, designMode = DEFAULT_DESIGN_MODE) {
|
|
3471
3526
|
const issues = [];
|
|
3472
3527
|
const lines = sourceCode.split("\n");
|
|
@@ -3864,6 +3919,20 @@ ${errorDetail}`,
|
|
|
3864
3919
|
});
|
|
3865
3920
|
}
|
|
3866
3921
|
}
|
|
3922
|
+
for (const tag of enforceDesignVocabulary ? kitControlTags(sourceCode) : []) {
|
|
3923
|
+
const key = inlineBorderKey(tag.attrs, sourceCode);
|
|
3924
|
+
if (key === null) continue;
|
|
3925
|
+
issues.push({
|
|
3926
|
+
tier: 0,
|
|
3927
|
+
result: "fail",
|
|
3928
|
+
category: "tokens",
|
|
3929
|
+
subcategory: "control-inline-border",
|
|
3930
|
+
severity: "critical",
|
|
3931
|
+
description: `control-inline-border: <${tag.name}> sets an inline \`${key}\` \u2014 a kit control draws its own boundary, and an inline border paints over it`,
|
|
3932
|
+
fix: `Remove the border from <${tag.name}>'s style (keep borderRadius if you need it). An outline chip is <Button variant="outline"> exactly as it comes; a control-like edge on your own element uses var(--ggui-color-controlOutline).`,
|
|
3933
|
+
line: tag.line
|
|
3934
|
+
});
|
|
3935
|
+
}
|
|
3867
3936
|
if (!sourceCode.includes("interface Props") && !sourceCode.includes("type Props")) {
|
|
3868
3937
|
issues.push({
|
|
3869
3938
|
tier: 0,
|
|
@@ -4135,7 +4204,7 @@ async function runTier0(sourceCode, contract, designMode = DEFAULT_DESIGN_MODE)
|
|
|
4135
4204
|
}
|
|
4136
4205
|
return { issues, pass };
|
|
4137
4206
|
}
|
|
4138
|
-
var MANIFEST_TOKENS, RETIRED_TOKEN_SUCCESSORS, TOKEN_REF_RE, HOOK_NAME_FOR, CONTRACT_FIELD_FOR;
|
|
4207
|
+
var MANIFEST_TOKENS, RETIRED_TOKEN_SUCCESSORS, TOKEN_REF_RE, HOOK_NAME_FOR, CONTRACT_FIELD_FOR, KIT_CONTROLS;
|
|
4139
4208
|
var init_run_tier0 = __esm({
|
|
4140
4209
|
"src/check/run-tier0.ts"() {
|
|
4141
4210
|
init_design_mode();
|
|
@@ -4164,6 +4233,7 @@ var init_run_tier0 = __esm({
|
|
|
4164
4233
|
stream: "streamSpec",
|
|
4165
4234
|
context: "contextSpec"
|
|
4166
4235
|
};
|
|
4236
|
+
KIT_CONTROLS = ["Button", "Input", "Select", "TextArea", "Checkbox", "RadioGroup", "Toggle", "SearchField"];
|
|
4167
4237
|
}
|
|
4168
4238
|
});
|
|
4169
4239
|
|
|
@@ -4457,6 +4527,8 @@ var init_policy = __esm({
|
|
|
4457
4527
|
function getBedrockModelId(model) {
|
|
4458
4528
|
const BEDROCK_MAP = {
|
|
4459
4529
|
"anthropic/claude-haiku-4-5": "us.anthropic.claude-haiku-4-5-20251001-v1:0",
|
|
4530
|
+
"anthropic/claude-haiku-5-5": "us.anthropic.claude-haiku-5-5",
|
|
4531
|
+
// listed ACTIVE in us-east-1 (ggui#1743)
|
|
4460
4532
|
"anthropic/claude-sonnet-4-6": "us.anthropic.claude-sonnet-4-6",
|
|
4461
4533
|
"anthropic/claude-opus-4-6": "us.anthropic.claude-opus-4-6-v1:0",
|
|
4462
4534
|
// Claude 5-family (ggui#706, strings verified 2026-09-02 against
|
|
@@ -6973,10 +7045,16 @@ var dupe_break_exports = {};
|
|
|
6973
7045
|
__export(dupe_break_exports, {
|
|
6974
7046
|
SAME_EXCHANGE_BREAK_AT: () => SAME_EXCHANGE_BREAK_AT,
|
|
6975
7047
|
SAME_EXCHANGE_NUDGE: () => SAME_EXCHANGE_NUDGE,
|
|
7048
|
+
SAME_FAILURE_BREAK_AT: () => SAME_FAILURE_BREAK_AT,
|
|
7049
|
+
SAME_FAILURE_NUDGE: () => SAME_FAILURE_NUDGE,
|
|
7050
|
+
SAME_FAILURE_NUDGE_AT: () => SAME_FAILURE_NUDGE_AT,
|
|
7051
|
+
clearWriteFailures: () => clearWriteFailures,
|
|
6976
7052
|
computePatchFingerprint: () => computePatchFingerprint,
|
|
6977
7053
|
createDupeBreakState: () => createDupeBreakState,
|
|
6978
7054
|
errorClassBucket: () => errorClassBucket,
|
|
6979
|
-
|
|
7055
|
+
failureSignatures: () => failureSignatures,
|
|
7056
|
+
recordToolExchange: () => recordToolExchange,
|
|
7057
|
+
recordWriteFailure: () => recordWriteFailure
|
|
6980
7058
|
});
|
|
6981
7059
|
function recordToolExchange(state, name, input, resultText) {
|
|
6982
7060
|
const key = createHash("sha256").update(name).update("\0").update(JSON.stringify(input) ?? "undefined").update("\0").update(resultText).digest("hex");
|
|
@@ -6988,6 +7066,25 @@ function recordToolExchange(state, name, input, resultText) {
|
|
|
6988
7066
|
}
|
|
6989
7067
|
return state.consecutiveIdenticalExchanges;
|
|
6990
7068
|
}
|
|
7069
|
+
function failureSignatures(resultText) {
|
|
7070
|
+
const norm = (text) => text.replace(/[0-9]+/g, "#").replace(/\s+/g, " ").trim();
|
|
7071
|
+
const violations = [...resultText.matchAll(/^\[[^\]\n]+\] [^\n]+/gm)].map((m) => norm(m[0]));
|
|
7072
|
+
if (violations.length > 0) return [...new Set(violations)];
|
|
7073
|
+
const rest = norm(resultText.replace(/^Committed [^\n]*\n/, ""));
|
|
7074
|
+
return rest.length > 0 ? [rest] : [];
|
|
7075
|
+
}
|
|
7076
|
+
function recordWriteFailure(state, resultText) {
|
|
7077
|
+
let top;
|
|
7078
|
+
for (const signature of failureSignatures(resultText)) {
|
|
7079
|
+
const repeats = (state.failureCounts.get(signature) ?? 0) + 1;
|
|
7080
|
+
state.failureCounts.set(signature, repeats);
|
|
7081
|
+
if (top === void 0 || repeats > top.repeats) top = { signature, repeats };
|
|
7082
|
+
}
|
|
7083
|
+
return top;
|
|
7084
|
+
}
|
|
7085
|
+
function clearWriteFailures(state) {
|
|
7086
|
+
state.failureCounts.clear();
|
|
7087
|
+
}
|
|
6991
7088
|
function createDupeBreakState() {
|
|
6992
7089
|
return {
|
|
6993
7090
|
lastFailedPatchFingerprint: null,
|
|
@@ -7004,7 +7101,8 @@ function createDupeBreakState() {
|
|
|
7004
7101
|
consecutiveBrokenApplies: 0,
|
|
7005
7102
|
consecutiveNoToolCalls: 0,
|
|
7006
7103
|
lastExchangeKey: null,
|
|
7007
|
-
consecutiveIdenticalExchanges: 0
|
|
7104
|
+
consecutiveIdenticalExchanges: 0,
|
|
7105
|
+
failureCounts: /* @__PURE__ */ new Map()
|
|
7008
7106
|
};
|
|
7009
7107
|
}
|
|
7010
7108
|
function errorClassBucket(errText) {
|
|
@@ -7029,11 +7127,14 @@ function computePatchFingerprint(changes, errText) {
|
|
|
7029
7127
|
h.update(errBucket);
|
|
7030
7128
|
return h.digest("hex");
|
|
7031
7129
|
}
|
|
7032
|
-
var SAME_EXCHANGE_BREAK_AT, SAME_EXCHANGE_NUDGE;
|
|
7130
|
+
var SAME_EXCHANGE_BREAK_AT, SAME_EXCHANGE_NUDGE, SAME_FAILURE_NUDGE_AT, SAME_FAILURE_BREAK_AT, SAME_FAILURE_NUDGE;
|
|
7033
7131
|
var init_dupe_break = __esm({
|
|
7034
7132
|
"src/harness/coding/dupe-break.ts"() {
|
|
7035
7133
|
SAME_EXCHANGE_BREAK_AT = 3;
|
|
7036
7134
|
SAME_EXCHANGE_NUDGE = "\n\n[harness] This is the SAME tool call with the SAME result as your previous turn \u2014 repeating it cannot produce new information. Use what you already have and emit an apply_changes (or scoped) call now; one more identical repeat terminates the run.";
|
|
7135
|
+
SAME_FAILURE_NUDGE_AT = 3;
|
|
7136
|
+
SAME_FAILURE_BREAK_AT = 5;
|
|
7137
|
+
SAME_FAILURE_NUDGE = "\n\n[harness] This same failure has now been reported for three of your patches. Changing other code does not clear it: re-read that check above and change exactly what it names. Two more reports of it end the run.";
|
|
7037
7138
|
}
|
|
7038
7139
|
});
|
|
7039
7140
|
|
|
@@ -7425,13 +7526,13 @@ Return your evaluation using the evaluate_${criterion} tool.`;
|
|
|
7425
7526
|
function getDefaultEvalModel(provider) {
|
|
7426
7527
|
switch (provider) {
|
|
7427
7528
|
case "claude":
|
|
7428
|
-
return "claude-haiku-
|
|
7529
|
+
return "claude-haiku-5-5";
|
|
7429
7530
|
case "openai":
|
|
7430
7531
|
return "gpt-5.6-luna";
|
|
7431
7532
|
case "google":
|
|
7432
7533
|
return "gemini-3.5-flash-lite";
|
|
7433
7534
|
default:
|
|
7434
|
-
return "claude-haiku-
|
|
7535
|
+
return "claude-haiku-5-5";
|
|
7435
7536
|
}
|
|
7436
7537
|
}
|
|
7437
7538
|
function callTokens(response) {
|
|
@@ -7891,6 +7992,7 @@ function instrumentRead(kind, m) {
|
|
|
7891
7992
|
return { verdict: "n/a", evidence: `fill ${m.inkRatio.toFixed(3)} reported; no floor ruled` };
|
|
7892
7993
|
}
|
|
7893
7994
|
function readRow(row, answers, m, unansweredReason) {
|
|
7995
|
+
if (row.evaluation === "judge" && REQUIRES_POST_ACTION_CAPTURE.has(row.id) && m.postActionCapture !== true) return { verdict: "n/a", evidence: NO_POST_ACTION };
|
|
7894
7996
|
if (row.evaluation === "judge") return majority(row.id, answers, unansweredReason);
|
|
7895
7997
|
if (row.evaluation === "human") return { verdict: "n/a", evidence: `reader's column (status ${row.status})` };
|
|
7896
7998
|
if (row.status !== "live") return { verdict: "n/a", evidence: `not implemented (status ${row.status})` };
|
|
@@ -7949,14 +8051,14 @@ ${text}
|
|
|
7949
8051
|
}
|
|
7950
8052
|
function buildCriteriaJudgeBlock(bank, selected, inputs = {}) {
|
|
7951
8053
|
const byId = new Map(bankRows(bank).map((r) => [r.id, r]));
|
|
7952
|
-
const asked = selected.selection.map((s) => byId.get(s.id)).filter((r) => r !== void 0 && r.evaluation === "judge");
|
|
8054
|
+
const asked = selected.selection.map((s) => byId.get(s.id)).filter((r) => r !== void 0 && r.evaluation === "judge").filter((r) => inputs.postActionCapture === true || !REQUIRES_POST_ACTION_CAPTURE.has(r.id));
|
|
7953
8055
|
if (asked.length === 0) return "";
|
|
7954
8056
|
const lines = asked.map((r) => `- ${r.id} (${r.severity}): ${r.text} Evidence must name: ${r.evidence}`);
|
|
7955
8057
|
return "## Criteria \u2014 answer each one from the FRAME only\nRead these off the screenshot. Never infer them from the request, the styling profile or any direction text above.\n" + (inputs.frame !== void 0 ? `${criteriaFrameLine(inputs.frame)}
|
|
7956
8058
|
` : "") + (inputs.propsJson !== void 0 ? criteriaPropsSection(inputs.propsJson) : "") + `${lines.join("\n")}
|
|
7957
8059
|
Add to your JSON a top-level "criteria" array with exactly these ids: [{ "id": "<id>", "verdict": "pass" | "fail" | "n/a", "evidence": "<one sentence naming the region or element you read it from>" }]. Every row here was selected as applicable to this card, so "n/a" never means "does not apply": use it ONLY when this frame cannot show the criterion \u2014 it is then recorded as not evaluated.`;
|
|
7958
8060
|
}
|
|
7959
|
-
var INSTRUMENT_BY_ID, INSTRUMENT_BESIDE_JUDGE, CRITERIA_PROPS_MAX_CHARS;
|
|
8061
|
+
var INSTRUMENT_BY_ID, INSTRUMENT_BESIDE_JUDGE, REQUIRES_POST_ACTION_CAPTURE, NO_POST_ACTION, CRITERIA_PROPS_MAX_CHARS;
|
|
7960
8062
|
var init_resolve = __esm({
|
|
7961
8063
|
"src/evaluation/criteria/resolve.ts"() {
|
|
7962
8064
|
init_bank();
|
|
@@ -7969,6 +8071,8 @@ var init_resolve = __esm({
|
|
|
7969
8071
|
INSTRUMENT_BESIDE_JUDGE = {
|
|
7970
8072
|
"space.edge": "edge"
|
|
7971
8073
|
};
|
|
8074
|
+
REQUIRES_POST_ACTION_CAPTURE = /* @__PURE__ */ new Set(["state.feedback"]);
|
|
8075
|
+
NO_POST_ACTION = "not evaluated: no post-action capture";
|
|
7972
8076
|
CRITERIA_PROPS_MAX_CHARS = 2e3;
|
|
7973
8077
|
}
|
|
7974
8078
|
});
|
|
@@ -9506,7 +9610,7 @@ function parseCriteriaAnswers(raw) {
|
|
|
9506
9610
|
function getDefaultVisualModel(provider) {
|
|
9507
9611
|
switch (provider) {
|
|
9508
9612
|
case "claude":
|
|
9509
|
-
return "claude-haiku-
|
|
9613
|
+
return "claude-haiku-5-5";
|
|
9510
9614
|
case "google":
|
|
9511
9615
|
return "gemini-3-flash-preview";
|
|
9512
9616
|
}
|
|
@@ -10140,6 +10244,7 @@ These tokens adapt automatically to any theme (light, dark, branded). **ALWAYS u
|
|
|
10140
10244
|
| link | var(--ggui-color-link) | Accent TEXT \u2014 eyebrows, taglines, links, labels, inline arrows: the brand's readable ink, derived per mode to clear 4.5:1 on the container and the ground |
|
|
10141
10245
|
| outline | var(--ggui-color-outline) | Borders, dividers |
|
|
10142
10246
|
| outlineVariant | var(--ggui-color-outlineVariant) | Subtle borders |
|
|
10247
|
+
| controlOutline | var(--ggui-color-controlOutline) | A control's edge \u2014 clears 3:1 on its surface; kit controls draw it themselves |
|
|
10143
10248
|
|
|
10144
10249
|
**Usage pattern:**
|
|
10145
10250
|
- Page/section background \u2192 \`var(--ggui-color-ground)\`
|
|
@@ -10264,7 +10369,7 @@ Use \`var(--ggui-spacing-N)\` for all padding, gap, and margin values. **Never u
|
|
|
10264
10369
|
### Color usage guide
|
|
10265
10370
|
- **Layering roles** (ground, container, elevated, sunken + their on* inks; outline): one kind of AREA each \u2014 use them for every background/text/border decision; they adapt to any theme
|
|
10266
10371
|
- **primary-50/100**: Section backgrounds, highlight strips, card headers
|
|
10267
|
-
- **primary-200/300**:
|
|
10372
|
+
- **primary-200/300**: Dividers and section rules \u2014 never a control's border: kit controls draw their own edge (\`controlOutline\` / \`controlAccentOutline\`), so set no inline border on them
|
|
10268
10373
|
- **primary-500/600**: Filled buttons, CTAs, badges, icon fills, active indicators \u2014 fills and borders, NOT a text color
|
|
10269
10374
|
- **link**: Accent TEXT \u2014 eyebrows, taglines, links, labels, inline arrows; the brand's readable ink per mode (a bare \`primary-300\u2026600\` as a text color fails tier-0: \`universal.accent_text_ink\`)
|
|
10270
10375
|
- **primary-700/800/900**: Headings and text on light primary backgrounds
|
|
@@ -11749,10 +11854,96 @@ function getInitialValuePropNames(contract) {
|
|
|
11749
11854
|
}
|
|
11750
11855
|
return names;
|
|
11751
11856
|
}
|
|
11857
|
+
function objectLiteralKeysAt(src, open) {
|
|
11858
|
+
if (src[open] !== "{") return void 0;
|
|
11859
|
+
const keys = [];
|
|
11860
|
+
let depth = 0;
|
|
11861
|
+
let expectKey = true;
|
|
11862
|
+
for (let i = open; i < src.length; i++) {
|
|
11863
|
+
const c = src[i];
|
|
11864
|
+
if (c === '"' || c === "'" || c === "`") {
|
|
11865
|
+
let j = i + 1;
|
|
11866
|
+
while (j < src.length && src[j] !== c) j += src[j] === "\\" ? 2 : 1;
|
|
11867
|
+
if (depth === 1 && expectKey && /^\s*:/.test(src.slice(j + 1))) keys.push(src.slice(i + 1, j));
|
|
11868
|
+
i = j;
|
|
11869
|
+
expectKey = false;
|
|
11870
|
+
continue;
|
|
11871
|
+
}
|
|
11872
|
+
if (c === "{" || c === "[" || c === "(") {
|
|
11873
|
+
depth++;
|
|
11874
|
+
if (depth === 1) expectKey = true;
|
|
11875
|
+
continue;
|
|
11876
|
+
}
|
|
11877
|
+
if (c === "}" || c === "]" || c === ")") {
|
|
11878
|
+
depth--;
|
|
11879
|
+
if (depth === 0) return keys;
|
|
11880
|
+
continue;
|
|
11881
|
+
}
|
|
11882
|
+
if (depth !== 1) continue;
|
|
11883
|
+
if (c === ",") {
|
|
11884
|
+
expectKey = true;
|
|
11885
|
+
continue;
|
|
11886
|
+
}
|
|
11887
|
+
if (expectKey && /[A-Za-z_$]/.test(c ?? "")) {
|
|
11888
|
+
const m = /^([A-Za-z_$][\w$]*)\s*(:|,|\})/.exec(src.slice(i));
|
|
11889
|
+
if (m !== null && m[1] !== void 0) keys.push(m[1]);
|
|
11890
|
+
expectKey = false;
|
|
11891
|
+
}
|
|
11892
|
+
}
|
|
11893
|
+
return keys;
|
|
11894
|
+
}
|
|
11895
|
+
function callArgsAt(src, open) {
|
|
11896
|
+
const args = [];
|
|
11897
|
+
let depth = 0;
|
|
11898
|
+
let start = open + 1;
|
|
11899
|
+
for (let i = open; i < src.length; i++) {
|
|
11900
|
+
const c = src[i];
|
|
11901
|
+
if (c === '"' || c === "'" || c === "`") {
|
|
11902
|
+
let j = i + 1;
|
|
11903
|
+
while (j < src.length && src[j] !== c) j += src[j] === "\\" ? 2 : 1;
|
|
11904
|
+
i = j;
|
|
11905
|
+
continue;
|
|
11906
|
+
}
|
|
11907
|
+
if (c === "(" || c === "{" || c === "[") depth++;
|
|
11908
|
+
else if (c === ")" || c === "}" || c === "]") {
|
|
11909
|
+
depth--;
|
|
11910
|
+
if (depth === 0) {
|
|
11911
|
+
args.push(src.slice(start, i));
|
|
11912
|
+
return args;
|
|
11913
|
+
}
|
|
11914
|
+
} else if (c === "," && depth === 1) {
|
|
11915
|
+
args.push(src.slice(start, i));
|
|
11916
|
+
start = i + 1;
|
|
11917
|
+
}
|
|
11918
|
+
}
|
|
11919
|
+
return args;
|
|
11920
|
+
}
|
|
11921
|
+
function initialStateKeys(src, argStart, argText) {
|
|
11922
|
+
const lead = argText.length - argText.trimStart().length;
|
|
11923
|
+
let at = argStart + lead;
|
|
11924
|
+
let text = argText.trim();
|
|
11925
|
+
const lazy = /^\(\s*\)\s*=>\s*\(?\s*/.exec(text);
|
|
11926
|
+
if (lazy !== null) {
|
|
11927
|
+
at += lazy[0].length;
|
|
11928
|
+
text = text.slice(lazy[0].length);
|
|
11929
|
+
}
|
|
11930
|
+
if (text.startsWith("{")) return objectLiteralKeysAt(src, at) ?? [];
|
|
11931
|
+
const ident = /^([A-Za-z_$][\w$]*)\s*\)?\s*$/.exec(text);
|
|
11932
|
+
if (ident === null || ident[1] === void 0) return [];
|
|
11933
|
+
const decls = [...src.matchAll(new RegExp(`(?:const|let|var)\\s+${ident[1]}\\s*(?::[^=]{1,200})?=\\s*`, "g"))];
|
|
11934
|
+
const decl = decls.length === 1 ? decls[0] : void 0;
|
|
11935
|
+
if (decl === void 0) return [];
|
|
11936
|
+
return objectLiteralKeysAt(src, (decl.index ?? 0) + decl[0].length) ?? [];
|
|
11937
|
+
}
|
|
11752
11938
|
function collectStateKeys(src) {
|
|
11753
11939
|
const keys = /* @__PURE__ */ new Set();
|
|
11754
11940
|
const varRe = /const\s*\[\s*(\w+)\s*,\s*(\w+)\s*\]\s*=\s*useState/g;
|
|
11755
11941
|
for (const m of src.matchAll(varRe)) keys.add(m[1]);
|
|
11942
|
+
const contextRe = /const\s*\[\s*(\w+)\s*,\s*\w+\s*\]\s*=\s*useGguiContext\s*(?:<[^>]*>)?\s*\(\s*['"`](\w+)['"`]/g;
|
|
11943
|
+
for (const m of src.matchAll(contextRe)) {
|
|
11944
|
+
keys.add(m[1]);
|
|
11945
|
+
keys.add(m[2]);
|
|
11946
|
+
}
|
|
11756
11947
|
const objRe = /useState(?:<[^>]*>)?\s*\(\s*\{([\s\S]*?)\}\s*\)/g;
|
|
11757
11948
|
for (const m of src.matchAll(objRe)) {
|
|
11758
11949
|
const keyRe = /(?:^|,)\s*(\w+)\s*:/g;
|
|
@@ -11763,6 +11954,16 @@ function collectStateKeys(src) {
|
|
|
11763
11954
|
const keyRe = /(?:^|,)\s*(\w+)\s*:/g;
|
|
11764
11955
|
for (const km of m[1].matchAll(keyRe)) keys.add(km[1]);
|
|
11765
11956
|
}
|
|
11957
|
+
for (const m of src.matchAll(/\b(useState|useReducer)\s*(?:<[^>]*>)?\s*\(/g)) {
|
|
11958
|
+
const open = (m.index ?? 0) + m[0].length - 1;
|
|
11959
|
+
const args = callArgsAt(src, open);
|
|
11960
|
+
const which = m[1] === "useReducer" ? 1 : 0;
|
|
11961
|
+
const arg = args[which];
|
|
11962
|
+
if (arg === void 0) continue;
|
|
11963
|
+
let argStart = open + 1;
|
|
11964
|
+
for (let k = 0; k < which; k++) argStart += (args[k]?.length ?? 0) + 1;
|
|
11965
|
+
for (const key of initialStateKeys(src, argStart, arg)) keys.add(key);
|
|
11966
|
+
}
|
|
11766
11967
|
return keys;
|
|
11767
11968
|
}
|
|
11768
11969
|
function mkIssue(subcategory, description, fix, result = "fail") {
|
|
@@ -12375,7 +12576,7 @@ function runNoHardcodedEntities(input) {
|
|
|
12375
12576
|
mkIssue(
|
|
12376
12577
|
"state.merge.no_hardcoded_entities",
|
|
12377
12578
|
`Hardcoded entity array literal (multiple objects with "${idField}") in the component \u2014 entity data should come from state/props.`,
|
|
12378
|
-
`Remove the literal array
|
|
12579
|
+
`Remove the literal array: this data comes from ${all.filter((e) => e.idField === idField).map((e) => `props.${e.name}`).join(" / ") || "props"}. Read it there (\`?? []\` for an absent value, never a literal default), seed state from it, and merge updates via stream.`
|
|
12379
12580
|
)
|
|
12380
12581
|
);
|
|
12381
12582
|
}
|
|
@@ -15267,13 +15468,14 @@ MANDATORY:
|
|
|
15267
15468
|
2. NEVER use CSS gradients with custom colors. If you need a gradient: \`linear-gradient(to bottom, var(--ggui-color-primary-500), var(--ggui-color-primary-700))\`.
|
|
15268
15469
|
3. NEVER invent your own palette. The system provides primary, neutral, success, warning, error, and info \u2014 use ONLY these.
|
|
15269
15470
|
4. NEVER include literal fallback values in ANY token reference \u2014 colors, spacing, typography, radius, shadows alike. Write \`var(--ggui-spacing-4)\` bare, never \`var(--ggui-spacing-4, 16px)\`; \`var(--ggui-color-primary-600)\` bare, never \`var(--ggui-color-primary-600, #0284c7)\`. The runtime injects every token; a literal fallback paints the wrong value exactly when the operator's theme matters most.
|
|
15471
|
+
5. NEVER set an inline \`border\`, \`borderColor\`, \`borderWidth\` or \`borderStyle\` on a kit control \u2014 \`Button\`, \`Input\`, \`Select\`, \`TextArea\`, \`Checkbox\`, \`RadioGroup\`, \`Toggle\`, \`SearchField\`. The control draws its own boundary, and it clears 3:1 on its surface in every theme: an outline chip is \`<Button variant="outline">\` exactly as it comes (its edge is \`controlAccentOutline\`). Where you draw a control-like edge on your own element, use \`var(--ggui-color-controlOutline)\`. A ramp step such as \`primary-200\` as a control's border is nearly invisible (about 1.1:1).
|
|
15270
15472
|
|
|
15271
15473
|
Token categories:
|
|
15272
15474
|
- Brand fills: \`var(--ggui-color-primary-600)\`, \`var(--ggui-color-primary-50)\`
|
|
15273
15475
|
- Accent text: \`var(--ggui-color-link)\` \u2014 eyebrows, taglines, links, labels; readable per mode (never a bare \`primary-<stop>\` as a text color)
|
|
15274
15476
|
- Text: \`var(--ggui-color-onContainer)\`, \`var(--ggui-color-onSunken)\`
|
|
15275
15477
|
- Backgrounds: \`var(--ggui-color-container)\`, \`var(--ggui-color-sunken)\`
|
|
15276
|
-
- Borders: \`var(--ggui-color-outline)\`
|
|
15478
|
+
- Borders: \`var(--ggui-color-outline)\` \u2014 dividers and the edges of non-interactive boxes; a control's edge is the kit's (rule 5)
|
|
15277
15479
|
- Spacing: \`var(--ggui-spacing-4)\`, \`var(--ggui-spacing-6)\`
|
|
15278
15480
|
- Typography: \`var(--ggui-font-size-sm)\`, \`var(--ggui-font-weight-semibold)\`
|
|
15279
15481
|
- Shadows: \`var(--ggui-shape-shadow-sm)\`, \`var(--ggui-shape-shadow-md)\`, \`var(--ggui-shape-shadow-lg)\`
|
|
@@ -15288,7 +15490,7 @@ Use the FULL primary palette throughout the component \u2014 NOT only on submit
|
|
|
15288
15490
|
| Element | Token | Purpose |
|
|
15289
15491
|
|---------|-------|---------|
|
|
15290
15492
|
| Section headers, hero areas, highlight strips | \`primary-50\` / \`primary-100\` | Subtle branded backgrounds |
|
|
15291
|
-
|
|
|
15493
|
+
| Dividers, section rules, edges of non-interactive boxes | \`primary-200\` / \`primary-300\` | Branded structure \u2014 never a control's border (rule 5) |
|
|
15292
15494
|
| Accent TEXT \u2014 eyebrows, taglines, links, labels, inline arrows | \`link\` (\`var(--ggui-color-link)\`) or \`<Text tone="emphasized">\` | The brand's READABLE ink, derived per mode to clear 4.5:1 \u2014 a bare \`primary-300\u2026600\` as a text color fails tier-0 |
|
|
15293
15495
|
| Icon fills, badges, active indicators | \`primary-500\` / \`primary-600\` | Core accent fill |
|
|
15294
15496
|
| Buttons, CTAs, filled interactive elements | \`primary-600\` / \`primary-700\` | Primary actions |
|
|
@@ -18260,6 +18462,7 @@ async function assembleGenerationResult(input) {
|
|
|
18260
18462
|
evalResult: telemetry.evalResult !== void 0 && telemetry.contractFeedback !== void 0 ? { ...telemetry.evalResult, contractFeedback: telemetry.contractFeedback } : telemetry.evalResult,
|
|
18261
18463
|
// ggui#404 — present only when the same-exchange guard ended the run.
|
|
18262
18464
|
...telemetry.sameExchangeBreak !== void 0 ? { sameExchangeBreak: telemetry.sameExchangeBreak } : {},
|
|
18465
|
+
...telemetry.sameFailureBreak !== void 0 ? { sameFailureBreak: telemetry.sameFailureBreak } : {},
|
|
18263
18466
|
needsBackgroundImprovement,
|
|
18264
18467
|
selfCheckPassed: telemetry.selfCheckPassed,
|
|
18265
18468
|
timing,
|
|
@@ -19199,6 +19402,18 @@ Repeated error: ${errText}
|
|
|
19199
19402
|
augmentedResultText += SAME_EXCHANGE_NUDGE;
|
|
19200
19403
|
}
|
|
19201
19404
|
}
|
|
19405
|
+
const isWrite = call.name === "apply_changes" || call.name === "rewrite";
|
|
19406
|
+
let repeatedFailure;
|
|
19407
|
+
if (ctx.dupeBreak && isWrite) {
|
|
19408
|
+
if (result.done) {
|
|
19409
|
+
clearWriteFailures(ctx.dupeBreak);
|
|
19410
|
+
} else {
|
|
19411
|
+
repeatedFailure = recordWriteFailure(ctx.dupeBreak, result.result);
|
|
19412
|
+
if (repeatedFailure?.repeats === SAME_FAILURE_NUDGE_AT) {
|
|
19413
|
+
augmentedResultText += SAME_FAILURE_NUDGE;
|
|
19414
|
+
}
|
|
19415
|
+
}
|
|
19416
|
+
}
|
|
19202
19417
|
await codingAgent.sendToolResult([{
|
|
19203
19418
|
callId: call.id,
|
|
19204
19419
|
name: call.name,
|
|
@@ -19227,6 +19442,29 @@ Repeated error: ${errText}
|
|
|
19227
19442
|
sameExchangeBreak: { tool: call.name, repeats: sameExchangeRepeats }
|
|
19228
19443
|
};
|
|
19229
19444
|
}
|
|
19445
|
+
if (repeatedFailure !== void 0 && repeatedFailure.repeats >= SAME_FAILURE_BREAK_AT) {
|
|
19446
|
+
const signature = repeatedFailure.signature.slice(0, 160);
|
|
19447
|
+
console.log(
|
|
19448
|
+
`[coding-agent] SAME_FAILURE_BREAK | tool=${call.name} | repeats=${repeatedFailure.repeats} | failure=${JSON.stringify(signature.slice(0, 80))} \u2014 terminating run (ggui#1791)`
|
|
19449
|
+
);
|
|
19450
|
+
return {
|
|
19451
|
+
control: "break",
|
|
19452
|
+
compiledCode: "",
|
|
19453
|
+
selfCheckPassed: false,
|
|
19454
|
+
outcome: void 0,
|
|
19455
|
+
phase: void 0,
|
|
19456
|
+
tokens,
|
|
19457
|
+
...cacheTokens,
|
|
19458
|
+
llmMs,
|
|
19459
|
+
toolMs,
|
|
19460
|
+
lastResultText: augmentedResultText,
|
|
19461
|
+
lastDiffFailed: false,
|
|
19462
|
+
isEvalFeedback: false,
|
|
19463
|
+
iconNamesCache,
|
|
19464
|
+
preWarmedContext,
|
|
19465
|
+
sameFailureBreak: { signature, repeats: repeatedFailure.repeats }
|
|
19466
|
+
};
|
|
19467
|
+
}
|
|
19230
19468
|
const turnDiffFailed = !!result.error && result.result.includes("DIFF");
|
|
19231
19469
|
const isDiffFail = turnDiffFailed && !isPatchInvalid;
|
|
19232
19470
|
const outcome = result.done ? "PASS" : isPatchInvalid ? "PATCH_INVALID" : isDiffFail ? "DIFF_FAIL" : "SELF_CHECK_FAIL";
|
|
@@ -20214,6 +20452,7 @@ function createTelemetry() {
|
|
|
20214
20452
|
probeRepairTrigger: void 0,
|
|
20215
20453
|
contractFeedback: void 0,
|
|
20216
20454
|
sameExchangeBreak: void 0,
|
|
20455
|
+
sameFailureBreak: void 0,
|
|
20217
20456
|
compiledCode: "",
|
|
20218
20457
|
pairedSource: "",
|
|
20219
20458
|
selfCheckPassed: false,
|
|
@@ -20269,6 +20508,7 @@ function absorbTurn(telemetry, turn) {
|
|
|
20269
20508
|
else telemetry.counters.outcomes.selfCheckFail++;
|
|
20270
20509
|
}
|
|
20271
20510
|
if (turn.sameExchangeBreak !== void 0) telemetry.sameExchangeBreak = turn.sameExchangeBreak;
|
|
20511
|
+
if (turn.sameFailureBreak !== void 0) telemetry.sameFailureBreak = turn.sameFailureBreak;
|
|
20272
20512
|
}
|
|
20273
20513
|
function createGenerateTaskRunner(input) {
|
|
20274
20514
|
const { session, params, classification, telemetry } = input;
|
|
@@ -21423,7 +21663,7 @@ function injectVariance(userPrompt, variance, options) {
|
|
|
21423
21663
|
init_design_mode();
|
|
21424
21664
|
init_provider_router();
|
|
21425
21665
|
var DEFAULT_TIER = "default";
|
|
21426
|
-
var DEFAULT_MODEL =
|
|
21666
|
+
var DEFAULT_MODEL = DEFAULT_MODEL$1;
|
|
21427
21667
|
function createUiGenerator(options = {}) {
|
|
21428
21668
|
const {
|
|
21429
21669
|
enableRuntimeRender = false,
|