@ggui-ai/negotiator 0.27.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/llm-rerank.d.ts +1 -1
- package/dist/llm-rerank.d.ts.map +1 -1
- package/dist/llm-rerank.js +2 -0
- package/dist/rerank-eval/run-probe-cli.js +2 -2
- package/dist/synth-bench/cli-llm.d.ts +1 -1
- package/dist/synth-bench/cli-llm.js +1 -1
- package/package.json +4 -4
- package/src/llm-rerank.ts +2 -0
- package/src/rerank-eval/run-probe-cli.ts +2 -2
- package/src/synth-bench/cli-llm.ts +1 -1
package/dist/llm-rerank.d.ts
CHANGED
|
@@ -67,7 +67,7 @@ export interface RerankQuery {
|
|
|
67
67
|
readonly intent: string;
|
|
68
68
|
readonly contractSummary: string;
|
|
69
69
|
}
|
|
70
|
-
declare const RERANK_SYSTEM_PROMPT = "You match user UI requests against previously-generated UI blueprints. Each blueprint was produced for a past request and stored. Decide whether any candidate belongs to the SAME FAMILY as the current request \u2014 i.e. it would serve as a reasonable starting point that the requester can refine, not a pixel-exact replica.\n\nMATCH means the candidate is the same intended user task AND the same broad UI shape (component types, layout pattern). A candidate still MATCHES when the current request adds or omits fields, slots, or actions relative to the cached blueprint \u2014 a superset, a subset, or an overlapping wire surface all still match. Added or omitted fields/slots/actions DO NOT block a match and are NOT yours to judge: those wire-surface deltas are reconciled and reported to the agent separately, after you decide. Judge similarity of task and shape, never coverage of fields.\n\nNO-MATCH means the candidate is a fundamentally different thing \u2014 a different intended task (haiku composer vs tweet draft, login vs signup), a different UI shape (form vs list vs dashboard), OR a conflicting load-bearing fixed VALUE baked into the blueprint (calendar pinned to Jan vs a request for Mar \u2014 same contract shape, but the fixed value conflicts). Reserve NO-MATCH for these; do not decline a candidate merely because its fields, slots, or actions differ from the request.\n\nVisual style differences alone (minimal vs ornate, dense vs spacious) DO NOT block a match \u2014 the user can refine those after they get a working UI.\n\nOutput exactly ONE tool call with your decision. confidence is a number in [0, 1] measuring how strongly the candidate is in the same task-and-shape family as the request (not how completely its fields cover the request). matchId is a string from the candidate ids, or null when no candidate matches. reason is a short sentence the operator can use to debug.";
|
|
70
|
+
declare const RERANK_SYSTEM_PROMPT = "You match user UI requests against previously-generated UI blueprints. Each blueprint was produced for a past request and stored. Decide whether any candidate belongs to the SAME FAMILY as the current request \u2014 i.e. it would serve as a reasonable starting point that the requester can refine, not a pixel-exact replica.\n\nMATCH means the candidate is the same intended user task AND the same broad UI shape (component types, layout pattern). A candidate still MATCHES when the current request adds or omits fields, slots, or actions relative to the cached blueprint \u2014 a superset, a subset, or an overlapping wire surface all still match. Added or omitted fields/slots/actions DO NOT block a match and are NOT yours to judge: those wire-surface deltas are reconciled and reported to the agent separately, after you decide. Judge similarity of task and shape, never coverage of fields.\n\nUI shape includes the interaction model. A surface that observes input and filters data it already has (context only, no action: it narrows what is on the screen as you type and has nothing to press) is a different shape from one that submits an action to fetch or act (a button, a pending state, results that arrive). Do not match across that line, even when the fields look alike.\n\nNO-MATCH means the candidate is a fundamentally different thing \u2014 a different intended task (haiku composer vs tweet draft, login vs signup), a different UI shape (form vs list vs dashboard), OR a conflicting load-bearing fixed VALUE baked into the blueprint (calendar pinned to Jan vs a request for Mar \u2014 same contract shape, but the fixed value conflicts). Reserve NO-MATCH for these; do not decline a candidate merely because its fields, slots, or actions differ from the request.\n\nVisual style differences alone (minimal vs ornate, dense vs spacious) DO NOT block a match \u2014 the user can refine those after they get a working UI.\n\nOutput exactly ONE tool call with your decision. confidence is a number in [0, 1] measuring how strongly the candidate is in the same task-and-shape family as the request (not how completely its fields cover the request). matchId is a string from the candidate ids, or null when no candidate matches. reason is a short sentence the operator can use to debug.";
|
|
71
71
|
declare const RERANK_TOOL: ToolSchema;
|
|
72
72
|
/**
|
|
73
73
|
* Run the rerank judge against a query + candidate list.
|
package/dist/llm-rerank.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"llm-rerank.d.ts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AE,WAAW,EAAE,CAAC"}
|
package/dist/llm-rerank.js
CHANGED
|
@@ -17,6 +17,8 @@ const RERANK_SYSTEM_PROMPT = `You match user UI requests against previously-gene
|
|
|
17
17
|
|
|
18
18
|
MATCH means the candidate is the same intended user task AND the same broad UI shape (component types, layout pattern). A candidate still MATCHES when the current request adds or omits fields, slots, or actions relative to the cached blueprint — a superset, a subset, or an overlapping wire surface all still match. Added or omitted fields/slots/actions DO NOT block a match and are NOT yours to judge: those wire-surface deltas are reconciled and reported to the agent separately, after you decide. Judge similarity of task and shape, never coverage of fields.
|
|
19
19
|
|
|
20
|
+
UI shape includes the interaction model. A surface that observes input and filters data it already has (context only, no action: it narrows what is on the screen as you type and has nothing to press) is a different shape from one that submits an action to fetch or act (a button, a pending state, results that arrive). Do not match across that line, even when the fields look alike.
|
|
21
|
+
|
|
20
22
|
NO-MATCH means the candidate is a fundamentally different thing — a different intended task (haiku composer vs tweet draft, login vs signup), a different UI shape (form vs list vs dashboard), OR a conflicting load-bearing fixed VALUE baked into the blueprint (calendar pinned to Jan vs a request for Mar — same contract shape, but the fixed value conflicts). Reserve NO-MATCH for these; do not decline a candidate merely because its fields, slots, or actions differ from the request.
|
|
21
23
|
|
|
22
24
|
Visual style differences alone (minimal vs ornate, dense vs spacious) DO NOT block a match — the user can refine those after they get a working UI.
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Rerank quality probe CLI.
|
|
4
4
|
*
|
|
5
5
|
* Reads `~/.ggui/credentials.json` for the Anthropic API key, runs
|
|
6
|
-
* the probe against `claude-haiku-
|
|
6
|
+
* the probe against `claude-haiku-5-5` (ggui#1804), prints the report. Its readings are not comparable to runs made before the switch.
|
|
7
7
|
*
|
|
8
8
|
* Usage:
|
|
9
9
|
* pnpm -F @ggui-ai/negotiator probe-rerank
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
*/
|
|
17
17
|
import { runProbe, formatReport } from './run-probe.js';
|
|
18
18
|
import { buildAnthropicLlmCaller, getTokenUsage, resolveAnthropicKey, } from '../synth-bench/cli-llm.js';
|
|
19
|
-
const DEFAULT_MODEL = 'claude-haiku-
|
|
19
|
+
const DEFAULT_MODEL = 'claude-haiku-5-5';
|
|
20
20
|
function parseArgs(argv) {
|
|
21
21
|
let limit;
|
|
22
22
|
let threshold;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { LLMCaller } from '../llm-caller.js';
|
|
2
2
|
/** Default bench model — the model the `ui-gen-default` seed generator declares. */
|
|
3
|
-
export declare const DEFAULT_MODEL = "claude-haiku-
|
|
3
|
+
export declare const DEFAULT_MODEL = "claude-haiku-5-5";
|
|
4
4
|
/** Haiku 4.5 token pricing (USD per token) for the cost report. */
|
|
5
5
|
export declare const HAIKU_4_5_PRICE_INPUT_PER_TOKEN: number;
|
|
6
6
|
export declare const HAIKU_4_5_PRICE_OUTPUT_PER_TOKEN: number;
|
|
@@ -11,7 +11,7 @@ import { resolve as pathResolve } from 'node:path';
|
|
|
11
11
|
import { anthropicRejectsForcedToolChoice } from '@ggui-ai/protocol';
|
|
12
12
|
const ANTHROPIC_API = 'https://api.anthropic.com/v1/messages';
|
|
13
13
|
/** Default bench model — the model the `ui-gen-default` seed generator declares. */
|
|
14
|
-
export const DEFAULT_MODEL = 'claude-haiku-
|
|
14
|
+
export const DEFAULT_MODEL = 'claude-haiku-5-5';
|
|
15
15
|
/** Haiku 4.5 token pricing (USD per token) for the cost report. */
|
|
16
16
|
export const HAIKU_4_5_PRICE_INPUT_PER_TOKEN = 1.0 / 1_000_000;
|
|
17
17
|
export const HAIKU_4_5_PRICE_OUTPUT_PER_TOKEN = 5.0 / 1_000_000;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ggui-ai/negotiator",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Contract-synthesis + match-judge engine for
|
|
3
|
+
"version": "0.28.0",
|
|
4
|
+
"description": "Contract-synthesis + match-judge engine for GGUI's handshake. Synthesizes or repairs a conforming DataContract from an agent's draft, judges blueprint-match candidates for reuse, and validates contract structure + novelty — the primitives composed by decideHandshake in @ggui-ai/mcp-server-handlers. Deployment-agnostic: concrete embedding and vector-store bindings plug in via the storage interfaces from @ggui-ai/mcp-server-core.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"ggui",
|
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
}
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@ggui-ai/mcp-server-core": "0.
|
|
51
|
-
"@ggui-ai/protocol": "0.
|
|
50
|
+
"@ggui-ai/mcp-server-core": "0.28.0",
|
|
51
|
+
"@ggui-ai/protocol": "0.28.0"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@types/node": "^24.0.0",
|
package/src/llm-rerank.ts
CHANGED
|
@@ -90,6 +90,8 @@ const RERANK_SYSTEM_PROMPT = `You match user UI requests against previously-gene
|
|
|
90
90
|
|
|
91
91
|
MATCH means the candidate is the same intended user task AND the same broad UI shape (component types, layout pattern). A candidate still MATCHES when the current request adds or omits fields, slots, or actions relative to the cached blueprint — a superset, a subset, or an overlapping wire surface all still match. Added or omitted fields/slots/actions DO NOT block a match and are NOT yours to judge: those wire-surface deltas are reconciled and reported to the agent separately, after you decide. Judge similarity of task and shape, never coverage of fields.
|
|
92
92
|
|
|
93
|
+
UI shape includes the interaction model. A surface that observes input and filters data it already has (context only, no action: it narrows what is on the screen as you type and has nothing to press) is a different shape from one that submits an action to fetch or act (a button, a pending state, results that arrive). Do not match across that line, even when the fields look alike.
|
|
94
|
+
|
|
93
95
|
NO-MATCH means the candidate is a fundamentally different thing — a different intended task (haiku composer vs tweet draft, login vs signup), a different UI shape (form vs list vs dashboard), OR a conflicting load-bearing fixed VALUE baked into the blueprint (calendar pinned to Jan vs a request for Mar — same contract shape, but the fixed value conflicts). Reserve NO-MATCH for these; do not decline a candidate merely because its fields, slots, or actions differ from the request.
|
|
94
96
|
|
|
95
97
|
Visual style differences alone (minimal vs ornate, dense vs spacious) DO NOT block a match — the user can refine those after they get a working UI.
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Rerank quality probe CLI.
|
|
4
4
|
*
|
|
5
5
|
* Reads `~/.ggui/credentials.json` for the Anthropic API key, runs
|
|
6
|
-
* the probe against `claude-haiku-
|
|
6
|
+
* the probe against `claude-haiku-5-5` (ggui#1804), prints the report. Its readings are not comparable to runs made before the switch.
|
|
7
7
|
*
|
|
8
8
|
* Usage:
|
|
9
9
|
* pnpm -F @ggui-ai/negotiator probe-rerank
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
resolveAnthropicKey,
|
|
22
22
|
} from '../synth-bench/cli-llm.js';
|
|
23
23
|
|
|
24
|
-
const DEFAULT_MODEL = 'claude-haiku-
|
|
24
|
+
const DEFAULT_MODEL = 'claude-haiku-5-5';
|
|
25
25
|
|
|
26
26
|
function parseArgs(argv: readonly string[]): { limit?: number; threshold?: number; model: string } {
|
|
27
27
|
let limit: number | undefined;
|
|
@@ -14,7 +14,7 @@ import { anthropicRejectsForcedToolChoice } from '@ggui-ai/protocol';
|
|
|
14
14
|
const ANTHROPIC_API = 'https://api.anthropic.com/v1/messages';
|
|
15
15
|
|
|
16
16
|
/** Default bench model — the model the `ui-gen-default` seed generator declares. */
|
|
17
|
-
export const DEFAULT_MODEL = 'claude-haiku-
|
|
17
|
+
export const DEFAULT_MODEL = 'claude-haiku-5-5';
|
|
18
18
|
|
|
19
19
|
/** Haiku 4.5 token pricing (USD per token) for the cost report. */
|
|
20
20
|
export const HAIKU_4_5_PRICE_INPUT_PER_TOKEN = 1.0 / 1_000_000;
|