fetchsandbox-mcp 0.4.5 → 0.4.6
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.
|
@@ -21,6 +21,47 @@ export interface VerifyBehaviorInput {
|
|
|
21
21
|
sandbox_id?: string;
|
|
22
22
|
flow_run_id?: string;
|
|
23
23
|
}
|
|
24
|
+
interface BackendProbe {
|
|
25
|
+
name?: string;
|
|
26
|
+
buggy_response?: {
|
|
27
|
+
status?: number;
|
|
28
|
+
body?: string;
|
|
29
|
+
error?: string | null;
|
|
30
|
+
};
|
|
31
|
+
fixed_response?: {
|
|
32
|
+
status?: number;
|
|
33
|
+
body?: string;
|
|
34
|
+
error?: string | null;
|
|
35
|
+
};
|
|
36
|
+
expected_diff_observed?: boolean;
|
|
37
|
+
verdict?: string;
|
|
38
|
+
}
|
|
39
|
+
interface BackendVerifyResponse {
|
|
40
|
+
/** Typed next step from the server. Every entry point carries the exit:
|
|
41
|
+
* a finding is a hypothesis until prove_fix measures it. */
|
|
42
|
+
next_actions?: unknown;
|
|
43
|
+
prove_instructions?: string;
|
|
44
|
+
pattern_id?: string;
|
|
45
|
+
mode?: string;
|
|
46
|
+
disclaimer?: string;
|
|
47
|
+
probes?: BackendProbe[];
|
|
48
|
+
/** Present only for `mode: order_fuzz`, which returns no probes at all —
|
|
49
|
+
* the per-side verdict over every permutation and duplicate variant. */
|
|
50
|
+
order_fuzz?: {
|
|
51
|
+
confirmed?: boolean;
|
|
52
|
+
confirmed_by?: string[];
|
|
53
|
+
order_independence_confirmed?: boolean;
|
|
54
|
+
terminal_safety_confirmed?: boolean;
|
|
55
|
+
idempotency_confirmed?: boolean;
|
|
56
|
+
events_tested?: string[];
|
|
57
|
+
minimized_sequence?: unknown;
|
|
58
|
+
buggy?: Record<string, unknown>;
|
|
59
|
+
fixed?: Record<string, unknown>;
|
|
60
|
+
};
|
|
61
|
+
duration_ms?: number;
|
|
62
|
+
error?: string | null;
|
|
63
|
+
classification?: unknown;
|
|
64
|
+
}
|
|
24
65
|
export interface NormalizedVerifyResult {
|
|
25
66
|
/** Typed next step from the server. Every entry point carries the exit:
|
|
26
67
|
* a finding is a hypothesis until prove_fix measures it. */
|
|
@@ -29,6 +70,10 @@ export interface NormalizedVerifyResult {
|
|
|
29
70
|
pattern_id?: string;
|
|
30
71
|
mode?: string;
|
|
31
72
|
confirmed: boolean;
|
|
73
|
+
/** Which property the fuzzer flipped, when the simulation was an order_fuzz.
|
|
74
|
+
* A receipt must never claim a property this run did not prove. */
|
|
75
|
+
confirmed_by?: string[];
|
|
76
|
+
order_fuzz?: BackendVerifyResponse["order_fuzz"];
|
|
32
77
|
disclaimer?: string;
|
|
33
78
|
probes: Array<{
|
|
34
79
|
name?: string;
|
|
@@ -68,3 +113,4 @@ export declare const verifyBehaviorTool: {
|
|
|
68
113
|
};
|
|
69
114
|
};
|
|
70
115
|
export declare function runVerifyBehavior(input: VerifyBehaviorInput): Promise<NormalizedVerifyResult>;
|
|
116
|
+
export {};
|
|
@@ -80,13 +80,36 @@ export async function runVerifyBehavior(input) {
|
|
|
80
80
|
mode: raw.mode,
|
|
81
81
|
// Full response bodies live on the receipt; the tool returns the verdict-
|
|
82
82
|
// level diff so the agent's transcript stays small.
|
|
83
|
+
// An order_fuzz simulation returns NO probes — it returns an `order_fuzz`
|
|
84
|
+
// block with a per-side verdict. This client whitelists fields, so that
|
|
85
|
+
// block was dropped and the probe-based rule below then evaluated an empty
|
|
86
|
+
// array to `confirmed: false`. Every order_fuzz pattern therefore came back
|
|
87
|
+
// to the agent as "confirmed: false, probes: []" while the server held a
|
|
88
|
+
// correct, measured proof.
|
|
89
|
+
//
|
|
90
|
+
// Measured on prod 2026-09-07, duplicate_provisioning_on_webhook_retry:
|
|
91
|
+
// server: buggy idempotent=false max_side_effects=2
|
|
92
|
+
// fixed idempotent=true max_side_effects=1 -> a real flip
|
|
93
|
+
// agent: {confirmed: false, probes: []}
|
|
94
|
+
//
|
|
95
|
+
// Same failure as the find_bugs next_actions whitelist named above, in the
|
|
96
|
+
// same file, three fields down. For this mode the SERVER owns the verdict:
|
|
97
|
+
// it ran the permutations and it is the only party that saw them.
|
|
98
|
+
order_fuzz: raw.order_fuzz ?? undefined,
|
|
83
99
|
// Confirmed = every probe met its expectation AND the pattern actually
|
|
84
100
|
// manifested a behavioral difference somewhere. A run of only sanity
|
|
85
101
|
// probes (buggy == fixed everywhere) matches expectations but proves
|
|
86
|
-
// nothing, so it must NOT count as a confirmation.
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
102
|
+
// nothing, so it must NOT count as a confirmation. That rule is about
|
|
103
|
+
// PROBES, so it applies only where probes exist.
|
|
104
|
+
confirmed: raw.order_fuzz
|
|
105
|
+
? raw.order_fuzz.confirmed === true
|
|
106
|
+
: probes.length > 0 &&
|
|
107
|
+
probes.every((p) => p.matched_expectation) &&
|
|
108
|
+
probes.some((p) => p.divergent),
|
|
109
|
+
// Which property the fuzzer actually flipped — order independence,
|
|
110
|
+
// terminal safety, idempotency. Never let a receipt claim a property this
|
|
111
|
+
// run did not prove.
|
|
112
|
+
confirmed_by: raw.order_fuzz?.confirmed_by ?? undefined,
|
|
90
113
|
disclaimer: raw.disclaimer,
|
|
91
114
|
probes,
|
|
92
115
|
duration_ms: raw.duration_ms,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verify_behavior.js","sourceRoot":"","sources":["../../src/tools/verify_behavior.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"verify_behavior.js","sourceRoot":"","sources":["../../src/tools/verify_behavior.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AA0FvD,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,IAAI,EAAE,iBAAiB;IACvB,WAAW,EACT,0EAA0E;QAC1E,yEAAyE;QACzE,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S,EAAE,GAAG,CAAC,UAAU;YACvB,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,SAAS,KAAK,IAAI;YACnC,CAAC,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC;gBACjB,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,mBAAmB,CAAC;gBAC1C,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;QACnC,mEAAmE;QACnE,0EAA0E;QAC1E,qBAAqB;QACrB,YAAY,EAAE,GAAG,CAAC,UAAU,EAAE,YAAY,IAAI,SAAS;QACvD,UAAU,EAAE,GAAG,CAAC,UAAU;QAC1B,MAAM;QACN,WAAW,EAAE,GAAG,CAAC,WAAW;KAC7B,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fetchsandbox-mcp",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.6",
|
|
4
4
|
"mcpName": "io.github.fetchsandbox/mcp",
|
|
5
5
|
"description": "Turn any OpenAPI spec into a working sandbox your AI agent can use. MCP server for Claude Code, Cursor, and any other MCP-compatible LLM IDE.",
|
|
6
6
|
"license": "MIT",
|