@glubean/mcp 0.8.0 → 0.8.4
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/cloud.d.ts +162 -0
- package/dist/cloud.d.ts.map +1 -0
- package/dist/cloud.js +375 -0
- package/dist/cloud.js.map +1 -0
- package/dist/index.d.ts +18 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +216 -76
- package/dist/index.js.map +1 -1
- package/package.json +6 -5
package/dist/cloud.d.ts
ADDED
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Glubean Cloud client for the MCP open* tools — `/v1/*` ingest contract
|
|
3
|
+
* (GLU-77).
|
|
4
|
+
*
|
|
5
|
+
* The legacy Open Platform (`POST /open/v1/runs` — server-side bundle
|
|
6
|
+
* execution) was retired with the old stack. The new platform API exposes an
|
|
7
|
+
* INGEST model instead: tests execute locally, and the results are POSTed to
|
|
8
|
+
* `POST {apiUrl}/v1/projects/{projectId}/targets/{targetId}/runs` with a
|
|
9
|
+
* Bearer token — the same contract `glubean run --upload` uses.
|
|
10
|
+
*
|
|
11
|
+
* Credential resolution mirrors the CLI (packages/cli/src/lib/auth.ts) —
|
|
12
|
+
* keep the precedence in sync:
|
|
13
|
+
* 1. explicit tool argument
|
|
14
|
+
* 2. process env (GLUBEAN_TOKEN / GLUBEAN_PROJECT_ID / GLUBEAN_TARGET_ID /
|
|
15
|
+
* GLUBEAN_API_URL)
|
|
16
|
+
* 3. project `.env` + `.env.secrets` vars
|
|
17
|
+
* 4. `~/.glubean/credentials.json` (written by `glubean login`)
|
|
18
|
+
*
|
|
19
|
+
* NOT a direct import of `@glubean/cli`: that package exposes only its bin
|
|
20
|
+
* entry (`exports: { ".": dist/main.js }` — importing it executes the CLI
|
|
21
|
+
* program), so the small resolution/upload surface is mirrored here.
|
|
22
|
+
*/
|
|
23
|
+
import type { GlobalRules } from "@glubean/redaction";
|
|
24
|
+
/** Mirror of packages/cli/src/lib/constants.ts `DEFAULT_API_URL` (the
|
|
25
|
+
* platform/ingest API, `/v1/*`). */
|
|
26
|
+
export declare const DEFAULT_API_URL = "https://api.glubean.com";
|
|
27
|
+
export interface CloudAuthArgs {
|
|
28
|
+
apiUrl?: string;
|
|
29
|
+
token?: string;
|
|
30
|
+
projectId?: string;
|
|
31
|
+
targetId?: string;
|
|
32
|
+
}
|
|
33
|
+
export interface CloudAuthSources {
|
|
34
|
+
/** Merged vars from `.env` + `.env.secrets` (secrets win on collision). */
|
|
35
|
+
envFileVars?: Record<string, string>;
|
|
36
|
+
}
|
|
37
|
+
export interface ResolvedCloudAuth {
|
|
38
|
+
apiUrl: string;
|
|
39
|
+
token?: string;
|
|
40
|
+
projectId?: string;
|
|
41
|
+
targetId?: string;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Resolve Cloud credentials with the CLI's precedence: explicit argument >
|
|
45
|
+
* process env > .env/.env.secrets vars > ~/.glubean/credentials.json.
|
|
46
|
+
* (`||` not `??` — an empty-string env var is treated as absent, matching
|
|
47
|
+
* the CLI's resolveToken.)
|
|
48
|
+
*
|
|
49
|
+
* Two CLI sources are intentionally NOT mirrored (codex GLU-77 R1):
|
|
50
|
+
* - package.json `glubean.cloud` config — dead in the CLI too: the config
|
|
51
|
+
* consolidation (docs/06 P2) stopped reading the legacy package.json
|
|
52
|
+
* `glubean` shape, so `glubeanConfig.cloud` is always the built-in default
|
|
53
|
+
* (undefined) on the upload path.
|
|
54
|
+
* - per-profile `upload.tokenEnv` — profiles are a `glubean run` concept; the
|
|
55
|
+
* MCP server has no profile context to resolve one from.
|
|
56
|
+
*/
|
|
57
|
+
export declare function resolveCloudAuth(args: CloudAuthArgs, sources?: CloudAuthSources): Promise<ResolvedCloudAuth>;
|
|
58
|
+
/** Human-actionable message for a missing credential piece. */
|
|
59
|
+
export declare const MISSING_AUTH_MESSAGES: {
|
|
60
|
+
readonly token: string;
|
|
61
|
+
readonly projectId: string;
|
|
62
|
+
readonly targetId: string;
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* Resolve the project's DEFAULT target id when none is configured. Fast path
|
|
66
|
+
* (no network): a default project's default target id is deterministic.
|
|
67
|
+
* Fallback: list the project's targets and pick the `"default"` slug, or the
|
|
68
|
+
* single target when there is exactly one. Null → the caller asks the user
|
|
69
|
+
* for an explicit target.
|
|
70
|
+
*/
|
|
71
|
+
export declare function resolveDefaultTargetId(apiUrl: string, projectId: string, token: string): Promise<string | null>;
|
|
72
|
+
export declare function runIngestUrl(apiUrl: string, projectId: string, targetId: string): string;
|
|
73
|
+
export declare function runUrl(apiUrl: string, projectId: string, targetId: string, runId: string): string;
|
|
74
|
+
export declare function runTestResultsUrl(apiUrl: string, projectId: string, targetId: string, runId: string): string;
|
|
75
|
+
export declare function runTestEventsUrl(apiUrl: string, projectId: string, targetId: string, runId: string, testId: string): string;
|
|
76
|
+
export declare function cloudFetchJson(url: string, init: RequestInit & {
|
|
77
|
+
token: string;
|
|
78
|
+
timeoutMs?: number;
|
|
79
|
+
}): Promise<unknown>;
|
|
80
|
+
/**
|
|
81
|
+
* Derive the run's environment label from the env file name the way the CLI
|
|
82
|
+
* does: `.env` → "default", `.env.staging` → "staging", `custom.env` →
|
|
83
|
+
* "custom". Keep in sync with the CLI's `envLabelFromEnvFile`.
|
|
84
|
+
*/
|
|
85
|
+
export declare function envLabelFromEnvFile(envFile?: string): string;
|
|
86
|
+
export interface UploadRedaction {
|
|
87
|
+
globalRules: GlobalRules;
|
|
88
|
+
replacementFormat: "simple" | "labeled" | "partial";
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Load the project's upload redaction rules — the built-in baseline
|
|
92
|
+
* (DEFAULT_GLOBAL_RULES + built-in sensitive keys, applied inside
|
|
93
|
+
* `redactValue`) plus any custom `sensitiveKeys` / `customPatterns` /
|
|
94
|
+
* `replacementFormat` from glubean.yaml `defaults.redaction`. Mirror of the
|
|
95
|
+
* CLI's `resolveRedactionConfig` merge semantics (additive on the baseline);
|
|
96
|
+
* without this, projects relying on custom rules would leak matching values
|
|
97
|
+
* through MCP uploads that the CLI would have scrubbed (codex GLU-77 R1).
|
|
98
|
+
* A missing or malformed glubean.yaml falls back to the baseline.
|
|
99
|
+
*/
|
|
100
|
+
export declare function loadUploadRedaction(projectRoot: string): Promise<UploadRedaction>;
|
|
101
|
+
/** Structural view of the fields `buildRunIngestBody` needs from the MCP's
|
|
102
|
+
* `LocalRunSnapshot` (index.ts) — kept structural to avoid an import cycle. */
|
|
103
|
+
export interface SnapshotForUpload {
|
|
104
|
+
/** When the run FINISHED (the snapshot is taken after the run completes). */
|
|
105
|
+
createdAt: string;
|
|
106
|
+
/** When the run STARTED (recorded before execution). Optional for older
|
|
107
|
+
* snapshot shapes; without it, durations fall back to summed test times. */
|
|
108
|
+
startedAt?: string;
|
|
109
|
+
/** Stable per-snapshot idempotency id — re-uploading the SAME snapshot
|
|
110
|
+
* REPLACES the Cloud run (`(targetId, clientRunId)` dedupe) instead of
|
|
111
|
+
* duplicating it. Generated once when the snapshot is taken. */
|
|
112
|
+
clientRunId?: string;
|
|
113
|
+
fileUrl: string;
|
|
114
|
+
projectRoot: string;
|
|
115
|
+
summary: {
|
|
116
|
+
total: number;
|
|
117
|
+
passed: number;
|
|
118
|
+
failed: number;
|
|
119
|
+
skipped: number;
|
|
120
|
+
};
|
|
121
|
+
results: Array<{
|
|
122
|
+
exportName: string;
|
|
123
|
+
id: string;
|
|
124
|
+
name?: string;
|
|
125
|
+
success: boolean;
|
|
126
|
+
skipped?: boolean;
|
|
127
|
+
durationMs: number;
|
|
128
|
+
assertions: Array<{
|
|
129
|
+
passed: boolean;
|
|
130
|
+
message: string;
|
|
131
|
+
actual?: unknown;
|
|
132
|
+
expected?: unknown;
|
|
133
|
+
}>;
|
|
134
|
+
logs: Array<{
|
|
135
|
+
message: string;
|
|
136
|
+
data?: unknown;
|
|
137
|
+
}>;
|
|
138
|
+
error?: {
|
|
139
|
+
message: string;
|
|
140
|
+
stack?: string;
|
|
141
|
+
};
|
|
142
|
+
}>;
|
|
143
|
+
filter?: string;
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Build the `RunIngest` wire body (kind=test, schemaVersion=glubean.test.v1)
|
|
147
|
+
* from a local run snapshot.
|
|
148
|
+
*
|
|
149
|
+
* - The `result` blob is shaped like the CLI's payload (`tests[].events`) so
|
|
150
|
+
* Cloud's per-test events drill-down (`extractTestEvents`) can read it.
|
|
151
|
+
* - Traces are intentionally NOT uploaded: the MCP's local trace view keeps
|
|
152
|
+
* the `authorization` header for AI debugging (DEFAULT_MCP_TRACE_CONFIG) —
|
|
153
|
+
* that must never leave the machine.
|
|
154
|
+
* - The blob is deep-redacted client-side before upload (assertion
|
|
155
|
+
* actual/expected and log data can carry live secrets). The server does a
|
|
156
|
+
* baseline pass too, but the client scrubs first — same policy as the CLI.
|
|
157
|
+
*/
|
|
158
|
+
export declare function buildRunIngestBody(snapshot: SnapshotForUpload, opts?: {
|
|
159
|
+
environment?: string;
|
|
160
|
+
redaction?: UploadRedaction;
|
|
161
|
+
}): Record<string, unknown>;
|
|
162
|
+
//# sourceMappingURL=cloud.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cloud.d.ts","sourceRoot":"","sources":["../src/cloud.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAOH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGtD;qCACqC;AACrC,eAAO,MAAM,eAAe,4BAA4B,CAAC;AAIzD,MAAM,WAAW,aAAa;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,gBAAgB;IAC/B,2EAA2E;IAC3E,WAAW,CAAC,EAAE,MAAM,CA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YAAC,IAAI,CAAC,EAAE,OAAO,CAAA;SAAE,CAAC,CAAC;QACjD,KAAK,CAAC,EAAE;YAAE,OAAO,EAAE,MAAM,CAAC;YAAC,KAAK,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC;KAC7C,CAAC,CAAC;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,iBAAiB,EAC3B,IAAI,CAAC,EAAE;IAAE,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,eAAe,CAAA;CAAE,GAC3D,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CA0FzB"}
|
package/dist/cloud.js
ADDED
|
@@ -0,0 +1,375 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Glubean Cloud client for the MCP open* tools — `/v1/*` ingest contract
|
|
3
|
+
* (GLU-77).
|
|
4
|
+
*
|
|
5
|
+
* The legacy Open Platform (`POST /open/v1/runs` — server-side bundle
|
|
6
|
+
* execution) was retired with the old stack. The new platform API exposes an
|
|
7
|
+
* INGEST model instead: tests execute locally, and the results are POSTed to
|
|
8
|
+
* `POST {apiUrl}/v1/projects/{projectId}/targets/{targetId}/runs` with a
|
|
9
|
+
* Bearer token — the same contract `glubean run --upload` uses.
|
|
10
|
+
*
|
|
11
|
+
* Credential resolution mirrors the CLI (packages/cli/src/lib/auth.ts) —
|
|
12
|
+
* keep the precedence in sync:
|
|
13
|
+
* 1. explicit tool argument
|
|
14
|
+
* 2. process env (GLUBEAN_TOKEN / GLUBEAN_PROJECT_ID / GLUBEAN_TARGET_ID /
|
|
15
|
+
* GLUBEAN_API_URL)
|
|
16
|
+
* 3. project `.env` + `.env.secrets` vars
|
|
17
|
+
* 4. `~/.glubean/credentials.json` (written by `glubean login`)
|
|
18
|
+
*
|
|
19
|
+
* NOT a direct import of `@glubean/cli`: that package exposes only its bin
|
|
20
|
+
* entry (`exports: { ".": dist/main.js }` — importing it executes the CLI
|
|
21
|
+
* program), so the small resolution/upload surface is mirrored here.
|
|
22
|
+
*/
|
|
23
|
+
import { readFile } from "node:fs/promises";
|
|
24
|
+
import { basename, extname, join, resolve } from "node:path";
|
|
25
|
+
import { randomUUID } from "node:crypto";
|
|
26
|
+
import { parse as parseYaml } from "yaml";
|
|
27
|
+
import { DEFAULT_GLOBAL_RULES, redactValue } from "@glubean/redaction";
|
|
28
|
+
import { MCP_PACKAGE_VERSION } from "./version.js";
|
|
29
|
+
/** Mirror of packages/cli/src/lib/constants.ts `DEFAULT_API_URL` (the
|
|
30
|
+
* platform/ingest API, `/v1/*`). */
|
|
31
|
+
export const DEFAULT_API_URL = "https://api.glubean.com";
|
|
32
|
+
async function readCredentialsFile() {
|
|
33
|
+
const home = process.env.HOME || process.env.USERPROFILE;
|
|
34
|
+
if (!home)
|
|
35
|
+
return null;
|
|
36
|
+
try {
|
|
37
|
+
const text = await readFile(join(home, ".glubean", "credentials.json"), "utf-8");
|
|
38
|
+
return JSON.parse(text);
|
|
39
|
+
}
|
|
40
|
+
catch {
|
|
41
|
+
return null;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Resolve Cloud credentials with the CLI's precedence: explicit argument >
|
|
46
|
+
* process env > .env/.env.secrets vars > ~/.glubean/credentials.json.
|
|
47
|
+
* (`||` not `??` — an empty-string env var is treated as absent, matching
|
|
48
|
+
* the CLI's resolveToken.)
|
|
49
|
+
*
|
|
50
|
+
* Two CLI sources are intentionally NOT mirrored (codex GLU-77 R1):
|
|
51
|
+
* - package.json `glubean.cloud` config — dead in the CLI too: the config
|
|
52
|
+
* consolidation (docs/06 P2) stopped reading the legacy package.json
|
|
53
|
+
* `glubean` shape, so `glubeanConfig.cloud` is always the built-in default
|
|
54
|
+
* (undefined) on the upload path.
|
|
55
|
+
* - per-profile `upload.tokenEnv` — profiles are a `glubean run` concept; the
|
|
56
|
+
* MCP server has no profile context to resolve one from.
|
|
57
|
+
*/
|
|
58
|
+
export async function resolveCloudAuth(args, sources) {
|
|
59
|
+
const envFileVars = sources?.envFileVars ?? {};
|
|
60
|
+
const fromEnv = (name) => process.env[name] || envFileVars[name] || undefined;
|
|
61
|
+
// Only hit the credentials file when something is still unresolved.
|
|
62
|
+
let credsCache;
|
|
63
|
+
const creds = async () => {
|
|
64
|
+
if (credsCache === undefined)
|
|
65
|
+
credsCache = await readCredentialsFile();
|
|
66
|
+
return credsCache;
|
|
67
|
+
};
|
|
68
|
+
const token = args.token || fromEnv("GLUBEAN_TOKEN") || (await creds())?.token || undefined;
|
|
69
|
+
const projectId = args.projectId ||
|
|
70
|
+
fromEnv("GLUBEAN_PROJECT_ID") ||
|
|
71
|
+
(await creds())?.projectId ||
|
|
72
|
+
undefined;
|
|
73
|
+
// The credentials file has no target — the target is per-project config.
|
|
74
|
+
const targetId = args.targetId || fromEnv("GLUBEAN_TARGET_ID") || undefined;
|
|
75
|
+
const apiUrl = (args.apiUrl ||
|
|
76
|
+
fromEnv("GLUBEAN_API_URL") ||
|
|
77
|
+
(await creds())?.apiUrl ||
|
|
78
|
+
DEFAULT_API_URL).replace(/\/+$/, "");
|
|
79
|
+
return { apiUrl, token, projectId, targetId };
|
|
80
|
+
}
|
|
81
|
+
/** Human-actionable message for a missing credential piece. */
|
|
82
|
+
export const MISSING_AUTH_MESSAGES = {
|
|
83
|
+
token: "No Glubean Cloud token configured. Pass `token`, set GLUBEAN_TOKEN " +
|
|
84
|
+
"(process env or .env.secrets in the project root), or run `glubean login` " +
|
|
85
|
+
"(writes ~/.glubean/credentials.json).",
|
|
86
|
+
projectId: "No Glubean Cloud project configured. Pass `projectId`, set " +
|
|
87
|
+
"GLUBEAN_PROJECT_ID (process env or .env in the project root), or run " +
|
|
88
|
+
"`glubean login`.",
|
|
89
|
+
targetId: "Could not resolve the target for this project. Pass `targetId` or set " +
|
|
90
|
+
"GLUBEAN_TARGET_ID — the project has no unambiguous default target, or " +
|
|
91
|
+
"the token lacks the targets:read scope needed to list targets.",
|
|
92
|
+
};
|
|
93
|
+
/** A DEFAULT project's id is `proj_default_<orgId>`; its auto-provisioned
|
|
94
|
+
* default target is `tgt_default_<orgId>` (mirror of the CLI's
|
|
95
|
+
* resolveDefaultTargetId — migration-stable id scheme). */
|
|
96
|
+
const DEFAULT_PROJECT_PREFIX = "proj_default_";
|
|
97
|
+
/**
|
|
98
|
+
* Resolve the project's DEFAULT target id when none is configured. Fast path
|
|
99
|
+
* (no network): a default project's default target id is deterministic.
|
|
100
|
+
* Fallback: list the project's targets and pick the `"default"` slug, or the
|
|
101
|
+
* single target when there is exactly one. Null → the caller asks the user
|
|
102
|
+
* for an explicit target.
|
|
103
|
+
*/
|
|
104
|
+
export async function resolveDefaultTargetId(apiUrl, projectId, token) {
|
|
105
|
+
if (projectId.startsWith(DEFAULT_PROJECT_PREFIX)) {
|
|
106
|
+
return `tgt_default_${projectId.slice(DEFAULT_PROJECT_PREFIX.length)}`;
|
|
107
|
+
}
|
|
108
|
+
try {
|
|
109
|
+
const resp = await fetch(`${apiUrl}/v1/projects/${encodeURIComponent(projectId)}/targets`, { headers: { Authorization: `Bearer ${token}` } });
|
|
110
|
+
if (!resp.ok)
|
|
111
|
+
return null;
|
|
112
|
+
const targets = (await resp.json());
|
|
113
|
+
if (!Array.isArray(targets))
|
|
114
|
+
return null;
|
|
115
|
+
const ids = targets.filter((t) => typeof t?.id === "string");
|
|
116
|
+
const def = ids.find((t) => t.slug === "default");
|
|
117
|
+
if (def)
|
|
118
|
+
return def.id;
|
|
119
|
+
return ids.length === 1 ? ids[0].id : null;
|
|
120
|
+
}
|
|
121
|
+
catch {
|
|
122
|
+
return null;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
// ── /v1 endpoint URLs ────────────────────────────────────────────────────────
|
|
126
|
+
function runsBase(apiUrl, projectId, targetId) {
|
|
127
|
+
return (`${apiUrl.replace(/\/+$/, "")}/v1/projects/${encodeURIComponent(projectId)}` +
|
|
128
|
+
`/targets/${encodeURIComponent(targetId)}/runs`);
|
|
129
|
+
}
|
|
130
|
+
export function runIngestUrl(apiUrl, projectId, targetId) {
|
|
131
|
+
return runsBase(apiUrl, projectId, targetId);
|
|
132
|
+
}
|
|
133
|
+
export function runUrl(apiUrl, projectId, targetId, runId) {
|
|
134
|
+
return `${runsBase(apiUrl, projectId, targetId)}/${encodeURIComponent(runId)}`;
|
|
135
|
+
}
|
|
136
|
+
export function runTestResultsUrl(apiUrl, projectId, targetId, runId) {
|
|
137
|
+
return `${runUrl(apiUrl, projectId, targetId, runId)}/test-results`;
|
|
138
|
+
}
|
|
139
|
+
export function runTestEventsUrl(apiUrl, projectId, targetId, runId, testId) {
|
|
140
|
+
return `${runUrl(apiUrl, projectId, targetId, runId)}/tests/${encodeURIComponent(testId)}/events`;
|
|
141
|
+
}
|
|
142
|
+
// ── Fetch with human-actionable error mapping ────────────────────────────────
|
|
143
|
+
/**
|
|
144
|
+
* Scrub bearer-token-shaped strings from server error text before it reaches
|
|
145
|
+
* the MCP client — a misconfigured apiUrl / proxy can echo request headers
|
|
146
|
+
* (including `Authorization: Bearer glb_…`) back in the error body.
|
|
147
|
+
*/
|
|
148
|
+
function scrubTokens(text) {
|
|
149
|
+
return text
|
|
150
|
+
.replace(/glb_[A-Za-z0-9_-]{6,}/g, "glb_[redacted]")
|
|
151
|
+
.replace(/Bearer\s+[A-Za-z0-9._~+/=-]{6,}/gi, "Bearer [redacted]");
|
|
152
|
+
}
|
|
153
|
+
function friendlyHttpError(status, body) {
|
|
154
|
+
const detail = scrubTokens(body.slice(0, 2000));
|
|
155
|
+
switch (status) {
|
|
156
|
+
case 401:
|
|
157
|
+
return (`Unauthorized (401): the Cloud rejected the token. Check GLUBEAN_TOKEN ` +
|
|
158
|
+
`(is it expired or for a different environment?) or run \`glubean login\`. ${detail}`);
|
|
159
|
+
case 403:
|
|
160
|
+
return (`Forbidden (403): the token lacks the required scope (runs:read / ` +
|
|
161
|
+
`runs:write) or its user lost project membership. ${detail}`);
|
|
162
|
+
case 404:
|
|
163
|
+
return (`Not found (404): check projectId / targetId / runId — or the apiUrl ` +
|
|
164
|
+
`points at the wrong service (the ingest API is the platform API, ` +
|
|
165
|
+
`default ${DEFAULT_API_URL}). ${detail}`);
|
|
166
|
+
case 413:
|
|
167
|
+
return `Payload too large (413): the run body exceeds the ingest cap. ${detail}`;
|
|
168
|
+
case 429:
|
|
169
|
+
return `Ingest quota exceeded (429): too many runs in the current window. ${detail}`;
|
|
170
|
+
default:
|
|
171
|
+
return `HTTP ${status}: ${detail}`;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
/** Default request timeout — an MCP tool must not hang on a stalled network
|
|
175
|
+
* call (mirrors the spirit of the CLI's RESULTS_TIMEOUT_MS, slightly wider
|
|
176
|
+
* since ingest bodies can be larger than a status GET). */
|
|
177
|
+
const CLOUD_FETCH_TIMEOUT_MS = 15_000;
|
|
178
|
+
export async function cloudFetchJson(url, init) {
|
|
179
|
+
const { token, timeoutMs, ...fetchInit } = init;
|
|
180
|
+
const budget = timeoutMs ?? CLOUD_FETCH_TIMEOUT_MS;
|
|
181
|
+
const controller = new AbortController();
|
|
182
|
+
const timer = setTimeout(() => controller.abort(), budget);
|
|
183
|
+
let res;
|
|
184
|
+
try {
|
|
185
|
+
res = await fetch(url, {
|
|
186
|
+
...fetchInit,
|
|
187
|
+
signal: controller.signal,
|
|
188
|
+
headers: {
|
|
189
|
+
...(fetchInit.headers ?? {}),
|
|
190
|
+
Authorization: `Bearer ${token}`,
|
|
191
|
+
},
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
catch (err) {
|
|
195
|
+
if (err instanceof DOMException && err.name === "AbortError") {
|
|
196
|
+
throw new Error(`Request to Glubean Cloud timed out after ${budget}ms — check the apiUrl and your network.`);
|
|
197
|
+
}
|
|
198
|
+
throw err;
|
|
199
|
+
}
|
|
200
|
+
finally {
|
|
201
|
+
clearTimeout(timer);
|
|
202
|
+
}
|
|
203
|
+
const text = await res.text();
|
|
204
|
+
if (!res.ok)
|
|
205
|
+
throw new Error(friendlyHttpError(res.status, text));
|
|
206
|
+
if (!text)
|
|
207
|
+
return null;
|
|
208
|
+
try {
|
|
209
|
+
return JSON.parse(text);
|
|
210
|
+
}
|
|
211
|
+
catch {
|
|
212
|
+
return text;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
// ── Upload environment label (mirror of packages/cli/src/lib/upload.ts) ─────
|
|
216
|
+
/**
|
|
217
|
+
* Derive the run's environment label from the env file name the way the CLI
|
|
218
|
+
* does: `.env` → "default", `.env.staging` → "staging", `custom.env` →
|
|
219
|
+
* "custom". Keep in sync with the CLI's `envLabelFromEnvFile`.
|
|
220
|
+
*/
|
|
221
|
+
export function envLabelFromEnvFile(envFile) {
|
|
222
|
+
const fileName = basename(envFile || ".env");
|
|
223
|
+
if (fileName === ".env")
|
|
224
|
+
return "default";
|
|
225
|
+
if (fileName.startsWith(".env.")) {
|
|
226
|
+
return fileName.slice(".env.".length) || "default";
|
|
227
|
+
}
|
|
228
|
+
const ext = extname(fileName);
|
|
229
|
+
const stem = ext ? basename(fileName, ext) : fileName;
|
|
230
|
+
return stem || "default";
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* Load the project's upload redaction rules — the built-in baseline
|
|
234
|
+
* (DEFAULT_GLOBAL_RULES + built-in sensitive keys, applied inside
|
|
235
|
+
* `redactValue`) plus any custom `sensitiveKeys` / `customPatterns` /
|
|
236
|
+
* `replacementFormat` from glubean.yaml `defaults.redaction`. Mirror of the
|
|
237
|
+
* CLI's `resolveRedactionConfig` merge semantics (additive on the baseline);
|
|
238
|
+
* without this, projects relying on custom rules would leak matching values
|
|
239
|
+
* through MCP uploads that the CLI would have scrubbed (codex GLU-77 R1).
|
|
240
|
+
* A missing or malformed glubean.yaml falls back to the baseline.
|
|
241
|
+
*/
|
|
242
|
+
export async function loadUploadRedaction(projectRoot) {
|
|
243
|
+
const rules = structuredClone(DEFAULT_GLOBAL_RULES);
|
|
244
|
+
let replacementFormat = "partial";
|
|
245
|
+
try {
|
|
246
|
+
const parsed = parseYaml(await readFile(resolve(projectRoot, "glubean.yaml"), "utf-8"));
|
|
247
|
+
const input = parsed?.defaults?.redaction;
|
|
248
|
+
if (input) {
|
|
249
|
+
if (Array.isArray(input.sensitiveKeys)) {
|
|
250
|
+
for (const key of input.sensitiveKeys) {
|
|
251
|
+
if (typeof key === "string" && !rules.sensitiveKeys.includes(key)) {
|
|
252
|
+
rules.sensitiveKeys.push(key);
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
if (Array.isArray(input.customPatterns)) {
|
|
257
|
+
for (const pattern of input.customPatterns) {
|
|
258
|
+
const p = pattern;
|
|
259
|
+
if (p && typeof p.name === "string" && typeof p.regex === "string") {
|
|
260
|
+
rules.customPatterns.push({ name: p.name, regex: p.regex });
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
if (input.replacementFormat === "simple" ||
|
|
265
|
+
input.replacementFormat === "labeled" ||
|
|
266
|
+
input.replacementFormat === "partial") {
|
|
267
|
+
replacementFormat = input.replacementFormat;
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
catch {
|
|
272
|
+
// Missing/unreadable glubean.yaml → baseline rules.
|
|
273
|
+
}
|
|
274
|
+
return { globalRules: rules, replacementFormat };
|
|
275
|
+
}
|
|
276
|
+
/**
|
|
277
|
+
* Build the `RunIngest` wire body (kind=test, schemaVersion=glubean.test.v1)
|
|
278
|
+
* from a local run snapshot.
|
|
279
|
+
*
|
|
280
|
+
* - The `result` blob is shaped like the CLI's payload (`tests[].events`) so
|
|
281
|
+
* Cloud's per-test events drill-down (`extractTestEvents`) can read it.
|
|
282
|
+
* - Traces are intentionally NOT uploaded: the MCP's local trace view keeps
|
|
283
|
+
* the `authorization` header for AI debugging (DEFAULT_MCP_TRACE_CONFIG) —
|
|
284
|
+
* that must never leave the machine.
|
|
285
|
+
* - The blob is deep-redacted client-side before upload (assertion
|
|
286
|
+
* actual/expected and log data can carry live secrets). The server does a
|
|
287
|
+
* baseline pass too, but the client scrubs first — same policy as the CLI.
|
|
288
|
+
*/
|
|
289
|
+
export function buildRunIngestBody(snapshot, opts) {
|
|
290
|
+
const summedMs = snapshot.results.reduce((acc, r) => acc + r.durationMs, 0);
|
|
291
|
+
const { total, passed, failed, skipped } = snapshot.summary;
|
|
292
|
+
// `createdAt` is the run's END (the snapshot is taken after the run). When
|
|
293
|
+
// the snapshot carries a real start time, duration is wall-clock; otherwise
|
|
294
|
+
// (older shape) fall back to summed per-test durations from the start.
|
|
295
|
+
const startedAt = snapshot.startedAt ?? snapshot.createdAt;
|
|
296
|
+
const durationMs = snapshot.startedAt
|
|
297
|
+
? Math.max(0, Date.parse(snapshot.createdAt) - Date.parse(snapshot.startedAt))
|
|
298
|
+
: summedMs;
|
|
299
|
+
const completedAt = snapshot.startedAt
|
|
300
|
+
? snapshot.createdAt
|
|
301
|
+
: new Date(Date.parse(startedAt) + summedMs).toISOString();
|
|
302
|
+
const tests = snapshot.results.map((r) => ({
|
|
303
|
+
testId: r.id,
|
|
304
|
+
testName: r.name ?? r.id,
|
|
305
|
+
success: r.success,
|
|
306
|
+
durationMs: r.durationMs,
|
|
307
|
+
events: [
|
|
308
|
+
...r.assertions.map((a) => ({
|
|
309
|
+
type: "assertion",
|
|
310
|
+
passed: a.passed,
|
|
311
|
+
message: a.message,
|
|
312
|
+
...(a.actual !== undefined ? { actual: a.actual } : {}),
|
|
313
|
+
...(a.expected !== undefined ? { expected: a.expected } : {}),
|
|
314
|
+
})),
|
|
315
|
+
...r.logs.map((l) => ({
|
|
316
|
+
type: "log",
|
|
317
|
+
message: l.message,
|
|
318
|
+
...(l.data !== undefined ? { data: l.data } : {}),
|
|
319
|
+
})),
|
|
320
|
+
...(r.error ? [{ type: "error", message: r.error.message }] : []),
|
|
321
|
+
{
|
|
322
|
+
type: "status",
|
|
323
|
+
status: r.skipped ? "skipped" : r.success ? "completed" : "failed",
|
|
324
|
+
},
|
|
325
|
+
],
|
|
326
|
+
}));
|
|
327
|
+
const resultBlob = {
|
|
328
|
+
runAt: startedAt,
|
|
329
|
+
summary: { total, passed, failed, skipped, durationMs },
|
|
330
|
+
context: {
|
|
331
|
+
source: "@glubean/mcp",
|
|
332
|
+
mcpVersion: MCP_PACKAGE_VERSION,
|
|
333
|
+
fileUrl: snapshot.fileUrl,
|
|
334
|
+
...(snapshot.filter ? { filter: snapshot.filter } : {}),
|
|
335
|
+
},
|
|
336
|
+
tests,
|
|
337
|
+
};
|
|
338
|
+
const redaction = opts?.redaction ?? {
|
|
339
|
+
globalRules: DEFAULT_GLOBAL_RULES,
|
|
340
|
+
replacementFormat: "partial",
|
|
341
|
+
};
|
|
342
|
+
const redactedResult = redactValue(resultBlob, {
|
|
343
|
+
globalRules: redaction.globalRules,
|
|
344
|
+
replacementFormat: redaction.replacementFormat,
|
|
345
|
+
maxDepth: 64,
|
|
346
|
+
});
|
|
347
|
+
// Per-test rows → server `test_result` (single-test history / flaky
|
|
348
|
+
// substrate). Clean skip → "skipped" (excluded from flaky denominators).
|
|
349
|
+
const testResults = snapshot.results.map((r) => ({
|
|
350
|
+
testId: r.id,
|
|
351
|
+
name: r.name ?? r.id,
|
|
352
|
+
status: r.skipped ? "skipped" : r.success ? "passed" : "failed",
|
|
353
|
+
durationMs: r.durationMs,
|
|
354
|
+
}));
|
|
355
|
+
return {
|
|
356
|
+
kind: "test",
|
|
357
|
+
schemaVersion: "glubean.test.v1",
|
|
358
|
+
// Stable idempotency id (P1) — re-uploading the same snapshot replaces
|
|
359
|
+
// the run server-side instead of duplicating it. The snapshot carries the
|
|
360
|
+
// id (generated once at snapshot time); randomUUID is only the fallback
|
|
361
|
+
// for older snapshot shapes.
|
|
362
|
+
clientRunId: snapshot.clientRunId ?? randomUUID(),
|
|
363
|
+
status: failed > 0 ? "failed" : "passed",
|
|
364
|
+
startedAt,
|
|
365
|
+
completedAt,
|
|
366
|
+
durationMs,
|
|
367
|
+
summary: { total, passed, failed, skipped, durationMs },
|
|
368
|
+
result: redactedResult,
|
|
369
|
+
...(testResults.length > 0 ? { testResults } : {}),
|
|
370
|
+
trigger: "mcp",
|
|
371
|
+
runnerVersion: MCP_PACKAGE_VERSION,
|
|
372
|
+
...(opts?.environment ? { environment: opts.environment } : {}),
|
|
373
|
+
};
|
|
374
|
+
}
|
|
375
|
+
//# sourceMappingURL=cloud.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cloud.js","sourceRoot":"","sources":["../src/cloud.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,MAAM,CAAC;AAC1C,OAAO,EAAE,oBAAoB,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAEnD;qCACqC;AACrC,MAAM,CAAC,MAAM,eAAe,GAAG,yBAAyB,CAAC;AA6BzD,KAAK,UAAU,mBAAmB;IAChC,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,IAAI,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC;IACzD,IAAI,CAAC,IAAI;QAAE,OAAO,IAAI,CAAC;IACvB,IAAI,CAAC;QACH,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,UAAU,EAAE,kBAAkB,CAAC,EAAE,OAAO,CAAC,CAAC;QACjF,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAoB,CAAC;IAC7C,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E,EAAE,CAAC,CAAC;QAC/C,MAAM,EAAE,CAAC,CAAC,EAAE;QACZ,IAAI,EAAE,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,EAAE;QACpB,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ;QAC/D,UAAU,EAAE,CAAC,CAAC,UAAU;KACzB,CAAC,CAAC,CAAC;IAEJ,OAAO;QACL,IAAI,EAAE,MAAM;QACZ,aAAa,EAAE,iBAAiB;QAChC,uEAAuE;QACvE,0EAA0E;QAC1E,wEAAwE;QACxE,6BAA6B;QAC7B,WAAW,EAAE,QAAQ,CAAC,WAAW,IAAI,UAAU,EAAE;QACjD,MAAM,EAAE,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ;QACxC,SAAS;QACT,WAAW;QACX,UAAU;QACV,OAAO,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE;QACvD,MAAM,EAAE,cAAc;QACtB,GAAG,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAClD,OAAO,EAAE,KAAK;QACd,aAAa,EAAE,mBAAmB;QAClC,GAAG,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAChE,CAAC;AACJ,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -76,7 +76,14 @@ export interface LocalDebugEvent {
|
|
|
76
76
|
};
|
|
77
77
|
}
|
|
78
78
|
export interface LocalRunSnapshot {
|
|
79
|
+
/** When the run finished (the snapshot is taken after completion). */
|
|
79
80
|
createdAt: string;
|
|
81
|
+
/** When the run started (recorded before execution) — the honest
|
|
82
|
+
* `startedAt` for the Cloud upload envelope. */
|
|
83
|
+
startedAt: string;
|
|
84
|
+
/** Stable idempotency id for Cloud upload — re-uploading the SAME snapshot
|
|
85
|
+
* replaces the Cloud run instead of duplicating it. */
|
|
86
|
+
clientRunId: string;
|
|
80
87
|
fileUrl: string;
|
|
81
88
|
projectRoot: string;
|
|
82
89
|
summary: {
|
|
@@ -89,6 +96,8 @@ export interface LocalRunSnapshot {
|
|
|
89
96
|
includeLogs: boolean;
|
|
90
97
|
includeTraces: boolean;
|
|
91
98
|
filter?: string;
|
|
99
|
+
/** The envFile argument the run was executed with (env label provenance). */
|
|
100
|
+
envFile?: string;
|
|
92
101
|
}
|
|
93
102
|
export interface ConfigDiagnostics {
|
|
94
103
|
projectRoot: string;
|
|
@@ -166,6 +175,14 @@ export declare function runLocalTestsFromFile(args: {
|
|
|
166
175
|
failed: number;
|
|
167
176
|
skipped: number;
|
|
168
177
|
};
|
|
178
|
+
/**
|
|
179
|
+
* The RESOLVED env file path this run used (explicit envFile, else
|
|
180
|
+
* `.glubean/active-env`, else `.env`). Recorded on the snapshot so a later
|
|
181
|
+
* Cloud upload sources credentials + the environment label from the env
|
|
182
|
+
* the run ACTUALLY used — even if active-env changes in between (codex
|
|
183
|
+
* GLU-77 R3). Absent only on the version-skew early return (no run).
|
|
184
|
+
*/
|
|
185
|
+
envPath?: string;
|
|
169
186
|
error?: string;
|
|
170
187
|
/** Runner-fallback or protocol warnings emitted by the executor. (Plan 1 AC6) */
|
|
171
188
|
warnings?: string[];
|
|
@@ -188,7 +205,7 @@ export declare const MCP_TOOL_NAMES: {
|
|
|
188
205
|
readonly openapi: "glubean_openapi";
|
|
189
206
|
readonly diagnoseConfig: "glubean_diagnose_config";
|
|
190
207
|
readonly getMetadata: "glubean_get_metadata";
|
|
191
|
-
readonly
|
|
208
|
+
readonly openUploadRun: "glubean_open_upload_run";
|
|
192
209
|
readonly openGetRun: "glubean_open_get_run";
|
|
193
210
|
readonly openGetRunEvents: "glubean_open_get_run_events";
|
|
194
211
|
};
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAmCA,OAAO,EAGL,KAAK,sBAAsB,IAAI,uBAAuB,EACvD,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EAAkB,KAAK,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAexE,KAAK,IAAI,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAuPnC,wBAAsB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAavE;AAMD;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEzD;AAuHD;;;;GAIG;AACH,UAAU,cAAc;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,8EAA8E;IAC9E,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAwBD,wBAAsB,qBAAqB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;IACrE,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB,MAAM,CAAC,EAAE,KAAK,CA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