buildpartner 0.11.0-dev.20260705230710 → 0.11.0-dev.20260803211229
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/src/api-client.d.ts +10 -6
- package/dist/src/api-client.js +21 -5
- package/dist/src/api-client.js.map +1 -1
- package/dist/src/commands/login.d.ts +7 -1
- package/dist/src/commands/login.js +39 -8
- package/dist/src/commands/login.js.map +1 -1
- package/dist/src/mcp/server.d.ts +0 -1
- package/dist/src/mcp/server.js +32 -50
- package/dist/src/mcp/server.js.map +1 -1
- package/dist/src/store/local-store.d.ts +0 -10
- package/dist/src/store/local-store.js +0 -15
- package/dist/src/store/local-store.js.map +1 -1
- package/package.json +1 -1
package/dist/src/api-client.d.ts
CHANGED
|
@@ -3,18 +3,22 @@
|
|
|
3
3
|
* All API calls from the CLI go through this module.
|
|
4
4
|
* Handles auth headers, timeouts, and error logging automatically.
|
|
5
5
|
*/
|
|
6
|
+
/** Default (production) API base used when nothing else is configured. */
|
|
7
|
+
export declare const DEFAULT_API_BASE = "https://www.buildpartner.ai";
|
|
6
8
|
export declare const API_BASE: string;
|
|
9
|
+
/**
|
|
10
|
+
* True when a base URL points at production. We only persist api_base in
|
|
11
|
+
* auth.json for non-prod bases, so a normal user's file stays clean and the
|
|
12
|
+
* default resolution (which already falls back to prod) applies. Mirrors the
|
|
13
|
+
* prod check in plugin/scripts/install.sh.
|
|
14
|
+
*/
|
|
15
|
+
export declare function isProdApiBase(base: string): boolean;
|
|
7
16
|
/**
|
|
8
17
|
* Make an authenticated request to the BuildPartner API.
|
|
9
18
|
* Returns the raw Response, or null if offline/unauthenticated.
|
|
10
19
|
* Callers should check res.status for specific error handling (e.g. 403 = trial expired).
|
|
11
20
|
*/
|
|
12
|
-
export
|
|
13
|
-
/** Override the default 5s timeout. Use a longer value for slow upstream
|
|
14
|
-
* operations like worker delegation. */
|
|
15
|
-
timeoutMs?: number;
|
|
16
|
-
}
|
|
17
|
-
export declare function apiFetch(path: string, options?: ApiFetchOptions): Promise<Response | null>;
|
|
21
|
+
export declare function apiFetch(path: string, options?: RequestInit): Promise<Response | null>;
|
|
18
22
|
/**
|
|
19
23
|
* GET from the API and parse JSON. Returns null on any failure.
|
|
20
24
|
* Use apiFetch() directly when you need to check specific status codes.
|
package/dist/src/api-client.js
CHANGED
|
@@ -4,29 +4,45 @@
|
|
|
4
4
|
* Handles auth headers, timeouts, and error logging automatically.
|
|
5
5
|
*/
|
|
6
6
|
import { readAuth, logError } from "./store/local-store.js";
|
|
7
|
+
/** Default (production) API base used when nothing else is configured. */
|
|
8
|
+
export const DEFAULT_API_BASE = "https://www.buildpartner.ai";
|
|
7
9
|
function getApiBase() {
|
|
8
10
|
if (process.env.BP_API_BASE)
|
|
9
11
|
return process.env.BP_API_BASE;
|
|
10
12
|
const auth = readAuth();
|
|
11
13
|
if (auth?.api_base)
|
|
12
14
|
return auth.api_base;
|
|
13
|
-
return
|
|
15
|
+
return DEFAULT_API_BASE;
|
|
14
16
|
}
|
|
15
17
|
export const API_BASE = getApiBase();
|
|
18
|
+
/**
|
|
19
|
+
* True when a base URL points at production. We only persist api_base in
|
|
20
|
+
* auth.json for non-prod bases, so a normal user's file stays clean and the
|
|
21
|
+
* default resolution (which already falls back to prod) applies. Mirrors the
|
|
22
|
+
* prod check in plugin/scripts/install.sh.
|
|
23
|
+
*/
|
|
24
|
+
export function isProdApiBase(base) {
|
|
25
|
+
const host = base.replace(/^https?:\/\//, "").replace(/\/.*$/, "");
|
|
26
|
+
return host === "buildpartner.ai" || host === "www.buildpartner.ai";
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Make an authenticated request to the BuildPartner API.
|
|
30
|
+
* Returns the raw Response, or null if offline/unauthenticated.
|
|
31
|
+
* Callers should check res.status for specific error handling (e.g. 403 = trial expired).
|
|
32
|
+
*/
|
|
16
33
|
export async function apiFetch(path, options) {
|
|
17
34
|
const auth = readAuth();
|
|
18
35
|
if (!auth?.token)
|
|
19
36
|
return null;
|
|
20
|
-
const { timeoutMs, ...rest } = options || {};
|
|
21
37
|
try {
|
|
22
38
|
const res = await fetch(`${API_BASE}${path}`, {
|
|
23
|
-
...
|
|
39
|
+
...options,
|
|
24
40
|
headers: {
|
|
25
41
|
"Authorization": `Bearer ${auth.token}`,
|
|
26
42
|
"Content-Type": "application/json",
|
|
27
|
-
...
|
|
43
|
+
...options?.headers,
|
|
28
44
|
},
|
|
29
|
-
signal: AbortSignal.timeout(
|
|
45
|
+
signal: AbortSignal.timeout(5000),
|
|
30
46
|
});
|
|
31
47
|
return res;
|
|
32
48
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-client.js","sourceRoot":"","sources":["../../src/api-client.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAE5D,SAAS,UAAU;IACjB,IAAI,OAAO,CAAC,GAAG,CAAC,WAAW;QAAE,OAAO,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC;IAC5D,MAAM,IAAI,GAAG,QAAQ,EAAE,CAAC;IACxB,IAAI,IAAI,EAAE,QAAQ;QAAE,OAAO,IAAI,CAAC,QAAQ,CAAC;IACzC,OAAO,
|
|
1
|
+
{"version":3,"file":"api-client.js","sourceRoot":"","sources":["../../src/api-client.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAE5D,0EAA0E;AAC1E,MAAM,CAAC,MAAM,gBAAgB,GAAG,6BAA6B,CAAC;AAE9D,SAAS,UAAU;IACjB,IAAI,OAAO,CAAC,GAAG,CAAC,WAAW;QAAE,OAAO,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC;IAC5D,MAAM,IAAI,GAAG,QAAQ,EAAE,CAAC;IACxB,IAAI,IAAI,EAAE,QAAQ;QAAE,OAAO,IAAI,CAAC,Q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B,CAAC;AAClC,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,OAAO,CAAI,IAAY,EAAE,IAAa;IAC1D,MAAM,GAAG,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE;QAC/B,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;KAC3B,CAAC,CAAC;IACH,IAAI,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE;QAAE,OAAO,IAAI,CAAC;IACjC,OAAO,GAAG,CAAC,IAAI,EAAgB,CAAC;AAClC,CAAC"}
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `buildpartner login <token
|
|
2
|
+
* `buildpartner login <token> [--api <url>]` - Connect an existing account on a new machine.
|
|
3
3
|
*
|
|
4
4
|
* Takes an sk_ token (provided by the dashboard after OTP verification),
|
|
5
5
|
* verifies it against the API, and saves it locally.
|
|
6
|
+
*
|
|
7
|
+
* `--api <url>` (or the BP_API_BASE env var) points the CLI at a non-prod
|
|
8
|
+
* environment. When set to a non-prod base, we persist it as `api_base` in
|
|
9
|
+
* auth.json so every later call sticks to that environment. The dashboard's
|
|
10
|
+
* login page injects this flag automatically when it is not on prod, so a dev
|
|
11
|
+
* user's copy-pasted command just works. Mirrors plugin/scripts/install.sh.
|
|
6
12
|
*/
|
|
7
13
|
export declare function login(): Promise<void>;
|
|
@@ -1,15 +1,43 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `buildpartner login <token
|
|
2
|
+
* `buildpartner login <token> [--api <url>]` - Connect an existing account on a new machine.
|
|
3
3
|
*
|
|
4
4
|
* Takes an sk_ token (provided by the dashboard after OTP verification),
|
|
5
5
|
* verifies it against the API, and saves it locally.
|
|
6
|
+
*
|
|
7
|
+
* `--api <url>` (or the BP_API_BASE env var) points the CLI at a non-prod
|
|
8
|
+
* environment. When set to a non-prod base, we persist it as `api_base` in
|
|
9
|
+
* auth.json so every later call sticks to that environment. The dashboard's
|
|
10
|
+
* login page injects this flag automatically when it is not on prod, so a dev
|
|
11
|
+
* user's copy-pasted command just works. Mirrors plugin/scripts/install.sh.
|
|
6
12
|
*/
|
|
7
13
|
import chalk from "chalk";
|
|
8
14
|
import { writeAuth } from "../store/local-store.js";
|
|
9
|
-
import {
|
|
15
|
+
import { DEFAULT_API_BASE, isProdApiBase } from "../api-client.js";
|
|
10
16
|
const orange = chalk.hex("#E47025");
|
|
17
|
+
/** Pull the token and an optional --api base out of the login argv. */
|
|
18
|
+
function parseArgs(argv) {
|
|
19
|
+
let token;
|
|
20
|
+
let apiFlag;
|
|
21
|
+
// argv here is process.argv.slice(3) -> everything after `login`.
|
|
22
|
+
for (let i = 0; i < argv.length; i++) {
|
|
23
|
+
const arg = argv[i];
|
|
24
|
+
if (arg === "--api") {
|
|
25
|
+
apiFlag = argv[i + 1];
|
|
26
|
+
i++;
|
|
27
|
+
}
|
|
28
|
+
else if (arg.startsWith("--api=")) {
|
|
29
|
+
apiFlag = arg.slice("--api=".length);
|
|
30
|
+
}
|
|
31
|
+
else if (!arg.startsWith("-") && !token) {
|
|
32
|
+
token = arg;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
const apiBase = (apiFlag || process.env.BP_API_BASE || DEFAULT_API_BASE).replace(/\/$/, "");
|
|
36
|
+
return { token, apiBase };
|
|
37
|
+
}
|
|
11
38
|
export async function login() {
|
|
12
|
-
const token = process.argv
|
|
39
|
+
const { token, apiBase } = parseArgs(process.argv.slice(3));
|
|
40
|
+
const domain = apiBase.replace(/^https?:\/\//, "");
|
|
13
41
|
if (!token || !token.startsWith("sk_")) {
|
|
14
42
|
console.log();
|
|
15
43
|
console.log(chalk.red(" ✗ Missing or invalid token."));
|
|
@@ -17,14 +45,14 @@ export async function login() {
|
|
|
17
45
|
console.log(" Usage: npx buildpartner login sk_your_token_here");
|
|
18
46
|
console.log();
|
|
19
47
|
console.log(chalk.dim(" Get your token by signing in at:"));
|
|
20
|
-
console.log(chalk.dim(` ${
|
|
48
|
+
console.log(chalk.dim(` ${apiBase}/dashboard/login?connect=1`));
|
|
21
49
|
console.log();
|
|
22
50
|
process.exit(1);
|
|
23
51
|
}
|
|
24
52
|
console.log();
|
|
25
53
|
console.log(chalk.dim(" Verifying token..."));
|
|
26
54
|
try {
|
|
27
|
-
const res = await fetch(`${
|
|
55
|
+
const res = await fetch(`${apiBase}/api/buildpartner/verify-token`, {
|
|
28
56
|
headers: { Authorization: `Bearer ${token}` },
|
|
29
57
|
signal: AbortSignal.timeout(10000),
|
|
30
58
|
});
|
|
@@ -32,7 +60,7 @@ export async function login() {
|
|
|
32
60
|
console.log(chalk.red(" ✗ Invalid token. It may have expired or been reset."));
|
|
33
61
|
console.log();
|
|
34
62
|
console.log(chalk.dim(" Sign in again at:"));
|
|
35
|
-
console.log(chalk.dim(` ${
|
|
63
|
+
console.log(chalk.dim(` ${apiBase}/dashboard/login?connect=1`));
|
|
36
64
|
console.log();
|
|
37
65
|
process.exit(1);
|
|
38
66
|
}
|
|
@@ -41,8 +69,11 @@ export async function login() {
|
|
|
41
69
|
email: data.email,
|
|
42
70
|
username: data.username,
|
|
43
71
|
token,
|
|
44
|
-
profile_url: data.profile_url ||
|
|
72
|
+
profile_url: data.profile_url || `${domain}/${data.username}`,
|
|
45
73
|
created_at: data.created_at || new Date().toISOString(),
|
|
74
|
+
// Only persist api_base for non-prod, so a normal user's auth.json stays
|
|
75
|
+
// clean and the default (prod) resolution applies.
|
|
76
|
+
...(isProdApiBase(apiBase) ? {} : { api_base: apiBase }),
|
|
46
77
|
});
|
|
47
78
|
console.log(chalk.green(` ✓ Logged in as ${data.email}`));
|
|
48
79
|
console.log();
|
|
@@ -52,7 +83,7 @@ export async function login() {
|
|
|
52
83
|
console.log();
|
|
53
84
|
}
|
|
54
85
|
catch {
|
|
55
|
-
console.log(chalk.red(
|
|
86
|
+
console.log(chalk.red(` ✗ Could not reach ${domain}. Check your connection and try again.`));
|
|
56
87
|
console.log();
|
|
57
88
|
process.exit(1);
|
|
58
89
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"login.js","sourceRoot":"","sources":["../../../src/commands/login.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"login.js","sourceRoot":"","sources":["../../../src/commands/login.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEnE,MAAM,MAAM,GAAG,KAAK,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;AAEpC,uEAAuE;AACvE,SAAS,SAAS,CAAC,IAAc;IAC/B,IAAI,KAAyB,CAAC;IAC9B,IAAI,OAA2B,CAAC;IAEhC,kEAAkE;IAClE,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACrC,MAAM,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QACpB,IAAI,GAAG,KAAK,OAAO,EAAE,CAAC;YACpB,OAAO,GAAG,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;YACtB,CAAC,EAAE,CAAC;QACN,CAAC;aAAM,IAAI,GAAG,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;YACpC,OAAO,GAAG,GAAG,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;QACvC,CAAC;aAAM,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;YAC1C,KAAK,GAAG,GAAG,CAAC;QACd,CAAC;IACH,CAAC;IAED,MAAM,OAAO,GAAG,CAAC,OAAO,IAAI,OAAO,CAAC,GAAG,CAAC,WAAW,IAAI,gBAAgB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CAAC,GAAG,CAAC,KAAK,MAAM,CAAC,2BAA2B,CAAC,EAAE,CAAC,CAAC;QACxD,OAAO,CAAC,GAAG,EAAE,CAAC;IAChB,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,uBAAuB,MAAM,wCAAwC,CAAC,CAAC,CAAC;QAC9F,OAAO,CAAC,GAAG,EAAE,CAAC;QACd,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC"}
|
package/dist/src/mcp/server.d.ts
CHANGED
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
*
|
|
7
7
|
* Tools:
|
|
8
8
|
* get_expert_knowledge - search expert frameworks with personalized context
|
|
9
|
-
* bp_delegate - route mechanical tasks to cheaper models via OpenRouter
|
|
10
9
|
*/
|
|
11
10
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
12
11
|
export declare function createServer(): McpServer;
|
package/dist/src/mcp/server.js
CHANGED
|
@@ -6,12 +6,11 @@
|
|
|
6
6
|
*
|
|
7
7
|
* Tools:
|
|
8
8
|
* get_expert_knowledge - search expert frameworks with personalized context
|
|
9
|
-
* bp_delegate - route mechanical tasks to cheaper models via OpenRouter
|
|
10
9
|
*/
|
|
11
10
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
12
11
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
13
12
|
import { z } from "zod";
|
|
14
|
-
import { apiFetch } from "../api-client.js";
|
|
13
|
+
import { apiFetch, API_BASE } from "../api-client.js";
|
|
15
14
|
import { readAuth } from "../store/local-store.js";
|
|
16
15
|
import { readFileSync } from "fs";
|
|
17
16
|
import { join, dirname } from "path";
|
|
@@ -31,7 +30,14 @@ function getCliVersion() {
|
|
|
31
30
|
}
|
|
32
31
|
/** Helper to format a text response for MCP */
|
|
33
32
|
const textResponse = (text) => ({ content: [{ type: "text", text }] });
|
|
34
|
-
|
|
33
|
+
/**
|
|
34
|
+
* Where we send someone whose machine has no usable token. This page verifies
|
|
35
|
+
* their email and hands back the `buildpartner login` command, which is one hop
|
|
36
|
+
* instead of routing them through the installer only to be told the email is
|
|
37
|
+
* already registered. Env-aware via API_BASE so dev installs stay on dev.
|
|
38
|
+
*/
|
|
39
|
+
const CONNECT_URL = `${API_BASE}/dashboard/login?connect=1`;
|
|
40
|
+
const NOT_SIGNED_IN = `Not signed in. If you're new, run: curl -fsSL https://buildpartner.ai/install.sh | sh — if you already have an account, reconnect this machine at ${CONNECT_URL}`;
|
|
35
41
|
/** Check if the user has auth. Returns an error response if not, null if OK. */
|
|
36
42
|
function requireLocalAuth() {
|
|
37
43
|
const auth = readAuth();
|
|
@@ -42,16 +48,16 @@ function requireLocalAuth() {
|
|
|
42
48
|
/** Turn an HTTP error status into a message the user can act on. */
|
|
43
49
|
function friendlyError(status) {
|
|
44
50
|
if (status === 401)
|
|
45
|
-
return
|
|
51
|
+
return `Not logged in. Reconnect this machine at ${CONNECT_URL} — verify your email there and it gives you the command to paste.`;
|
|
46
52
|
if (status === 404)
|
|
47
|
-
return
|
|
53
|
+
return `Account not found. Your login may be out of date. Reconnect this machine at ${CONNECT_URL}.`;
|
|
48
54
|
if (status === 403)
|
|
49
55
|
return ""; // handled separately (subscription block)
|
|
50
56
|
if (status === 503)
|
|
51
57
|
return "BuildPartner is temporarily unavailable. Try again in a minute.";
|
|
52
58
|
if (status >= 500)
|
|
53
59
|
return "BuildPartner's server hit an error. Try again in a minute. If it keeps happening, visit buildpartner.ai for status updates.";
|
|
54
|
-
return `Something went wrong (${status}).
|
|
60
|
+
return `Something went wrong (${status}). Try again shortly, or reconnect this machine at ${CONNECT_URL}.`;
|
|
55
61
|
}
|
|
56
62
|
/**
|
|
57
63
|
* Handle a 403 (subscription limit) gracefully.
|
|
@@ -94,57 +100,33 @@ export function createServer() {
|
|
|
94
100
|
return textResponse(JSON.stringify({ error: friendlyError(res.status) }));
|
|
95
101
|
return textResponse(JSON.stringify(await res.json(), null, 2));
|
|
96
102
|
});
|
|
97
|
-
server.tool("
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
103
|
+
server.tool("get_build", "Fetch BuildPartner build content to walk a user through it one step at a time. No args: index of all builds plus which slug is current. current=true (or slug): the build's ORIENTATION (benefit, summary, stepCount, outcome) but NOT the steps. slug+step=N (1-indexed): a single step with its prompt/inputs/verify. Open a build with orientation, then pull steps one by one using the slug it returns. Locked archive builds return a stub unless the user's plan unlocks them.", {
|
|
104
|
+
current: z.boolean().optional().describe("Return the current featured build's orientation (no steps)"),
|
|
105
|
+
slug: z.string().optional().describe("Return a specific build's orientation by slug"),
|
|
106
|
+
step: z
|
|
107
|
+
.number()
|
|
108
|
+
.int()
|
|
109
|
+
.positive()
|
|
110
|
+
.optional()
|
|
111
|
+
.describe("With slug (or current), return just this step (1-indexed). Walk one step at a time."),
|
|
112
|
+
}, async ({ current, slug, step }) => {
|
|
102
113
|
const authErr = requireLocalAuth();
|
|
103
114
|
if (authErr)
|
|
104
115
|
return authErr;
|
|
105
|
-
const
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
116
|
+
const params = new URLSearchParams();
|
|
117
|
+
if (current)
|
|
118
|
+
params.set("current", "1");
|
|
119
|
+
if (slug)
|
|
120
|
+
params.set("slug", slug);
|
|
121
|
+
if (step)
|
|
122
|
+
params.set("step", String(step));
|
|
123
|
+
const queryString = params.toString();
|
|
124
|
+
const path = queryString ? `/api/builds?${queryString}` : "/api/builds";
|
|
125
|
+
const res = await apiFetch(path);
|
|
110
126
|
if (!res)
|
|
111
127
|
return textResponse(JSON.stringify({ error: "Could not reach BuildPartner. Check your internet connection." }));
|
|
112
|
-
if (res.status === 402) {
|
|
113
|
-
const data = await res.json().catch(() => ({}));
|
|
114
|
-
return textResponse(JSON.stringify({
|
|
115
|
-
out_of_credits: true,
|
|
116
|
-
message: data.error || "Out of BuildPartner worker credits.",
|
|
117
|
-
action: "Tell the user their worker credits are exhausted and offer to open the dashboard so they can upgrade.",
|
|
118
|
-
}));
|
|
119
|
-
}
|
|
120
128
|
if (res.status === 403)
|
|
121
129
|
return handleSubscriptionBlock(res);
|
|
122
|
-
if (res.status === 503) {
|
|
123
|
-
const data = await res.json().catch(() => ({}));
|
|
124
|
-
if (data.error_type === "feature_unavailable") {
|
|
125
|
-
return textResponse(JSON.stringify({
|
|
126
|
-
feature_unavailable: true,
|
|
127
|
-
message: data.error || "Workers feature not yet enabled for your account.",
|
|
128
|
-
action: "Tell the user that BuildPartner Workers is not yet enabled for their account. Do not retry. Hand the task back to Claude.",
|
|
129
|
-
}));
|
|
130
|
-
}
|
|
131
|
-
return textResponse(JSON.stringify({
|
|
132
|
-
upstream_unavailable: true,
|
|
133
|
-
message: data.error || "Workers temporarily unavailable.",
|
|
134
|
-
action: "BuildPartner's worker service is briefly unavailable. Do not retry now; hand the task back to Claude.",
|
|
135
|
-
}));
|
|
136
|
-
}
|
|
137
|
-
if (res.status === 500) {
|
|
138
|
-
const data = await res.json().catch(() => ({}));
|
|
139
|
-
return textResponse(JSON.stringify({
|
|
140
|
-
error: data.error || "Delegation failed",
|
|
141
|
-
error_type: data.error_type || "unknown",
|
|
142
|
-
retry_eligible: data.retry_eligible ?? false,
|
|
143
|
-
action: data.retry_eligible
|
|
144
|
-
? "Worker upstream failed. Retry once with smaller max_tokens (e.g. 2000) or a lower complexity; if it fails again, do the task inline on Claude."
|
|
145
|
-
: "Worker tracking failed or unrecoverable. Do not retry; hand the task back to Claude.",
|
|
146
|
-
}));
|
|
147
|
-
}
|
|
148
130
|
if (!res.ok)
|
|
149
131
|
return textResponse(JSON.stringify({ error: friendlyError(res.status) }));
|
|
150
132
|
return textResponse(JSON.stringify(await res.json(), null, 2));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../../../src/mcp/server.ts"],"names":[],"mappings":"AAAA
|
|
1
|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,CAAC,IAAI,CAAC,CAAC;QACjC,IAAI,CAAC,GAAG;YAAE,OAAO,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,+DAA+D,EAAE,CAAC,CAAC,CAAC;QAC1H,IAAI,GAAG,CAAC,MAAM,KAAK,GAAG;YAAE,OAAO,uBAAuB,CAAC,GAAG,CAAC,CAAC;QAC5D,IAAI,CAAC,GAAG,CAAC,EAAE;YAAE,OAAO,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,aAAa,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC;QACvF,OAAO,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;IACjE,CAAC,CACF,CAAC;IAEF,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,WAAW;IAC/B,MAAM,MAAM,GAAG,YAAY,EAAE,CAAC;IAC9B,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAE7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;AAClC,CAAC"}
|
|
@@ -21,15 +21,5 @@ export declare function readAuth(): AuthData | null;
|
|
|
21
21
|
export declare function writeAuth(auth: AuthData): void;
|
|
22
22
|
/** Append an error to the local error log for diagnostics. */
|
|
23
23
|
export declare function logError(error: unknown): void;
|
|
24
|
-
export interface AccessState {
|
|
25
|
-
has_access: boolean;
|
|
26
|
-
remaining: number;
|
|
27
|
-
plan: "free" | "pro";
|
|
28
|
-
checked_at: string;
|
|
29
|
-
}
|
|
30
|
-
/** Read cached access state from disk. Returns null on failure. */
|
|
31
|
-
export declare function readAccess(): AccessState | null;
|
|
32
|
-
/** Write access state to disk. */
|
|
33
|
-
export declare function writeAccess(access: AccessState): void;
|
|
34
24
|
/** Append one event as a JSON line to the spool file. */
|
|
35
25
|
export declare function appendSpool(event: Record<string, unknown>): void;
|
|
@@ -45,22 +45,7 @@ export function logError(error) {
|
|
|
45
45
|
// If we can't even log errors, silently fail
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
|
-
const ACCESS_FILE = join(BUILDPARTNER_DIR, "access.json");
|
|
49
48
|
const SPOOL_FILE = join(BUILDPARTNER_DIR, "spool.ndjson");
|
|
50
|
-
/** Read cached access state from disk. Returns null on failure. */
|
|
51
|
-
export function readAccess() {
|
|
52
|
-
try {
|
|
53
|
-
return JSON.parse(readFileSync(ACCESS_FILE, "utf-8").replace(/^\uFEFF/, ""));
|
|
54
|
-
}
|
|
55
|
-
catch {
|
|
56
|
-
return null;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
/** Write access state to disk. */
|
|
60
|
-
export function writeAccess(access) {
|
|
61
|
-
ensureDir();
|
|
62
|
-
writeFileSync(ACCESS_FILE, JSON.stringify(access, null, 2) + "\n");
|
|
63
|
-
}
|
|
64
49
|
/** Append one event as a JSON line to the spool file. */
|
|
65
50
|
export function appendSpool(event) {
|
|
66
51
|
ensureDir();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local-store.js","sourceRoot":"","sources":["../../../src/store/local-store.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AACxF,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAE7B,MAAM,gBAAgB,GAAG,IAAI,CAAC,OAAO,EAAE,EAAE,eAAe,CAAC,CAAC;AAC1D,MAAM,SAAS,GAAG,IAAI,CAAC,gBAAgB,EAAE,WAAW,CAAC,CAAC;AACtD,MAAM,SAAS,GAAG,IAAI,CAAC,gBAAgB,EAAE,YAAY,CAAC,CAAC;AAWvD,+CAA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