@koda-sl/baker-cli 0.158.1 → 0.159.0-dev.a0159ea6f
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/README.md +2 -1
- package/dist/{chunk-CG6OTNUU.js → chunk-K424D3CY.js} +4 -4
- package/dist/chunk-K424D3CY.js.map +1 -0
- package/dist/cli.js +62 -12
- package/dist/cli.js.map +1 -1
- package/dist/engine/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-CG6OTNUU.js.map +0 -1
package/dist/cli.js
CHANGED
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
toModelSafeImage,
|
|
37
37
|
ulid,
|
|
38
38
|
validateCanvasDeep
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-K424D3CY.js";
|
|
40
40
|
import {
|
|
41
41
|
csvOrJson,
|
|
42
42
|
daysAgoIso,
|
|
@@ -3501,7 +3501,7 @@ registerSchema({
|
|
|
3501
3501
|
name: { type: "string", description: "Action name (short, action-verb, \u22646 words)", required: true },
|
|
3502
3502
|
description: {
|
|
3503
3503
|
type: "string",
|
|
3504
|
-
description: "Context-complete description: what / why / where / done-when",
|
|
3504
|
+
description: "Context-complete description in markdown: what / why / where / done-when. Use `##` headings for those sections, `-` bullets for lists of items, and `**bold**` for the figures that drive the decision. Anything longer than a couple of sentences needs headings \u2014 it is read in a narrow panel.",
|
|
3505
3505
|
required: false
|
|
3506
3506
|
},
|
|
3507
3507
|
tags: {
|
|
@@ -4154,7 +4154,11 @@ registerSchema({
|
|
|
4154
4154
|
args: {
|
|
4155
4155
|
id: { type: "string", description: "Action ID or tempId (temp_*) of a task staged in this chat", required: true },
|
|
4156
4156
|
name: { type: "string", description: "New name", required: false },
|
|
4157
|
-
description: {
|
|
4157
|
+
description: {
|
|
4158
|
+
type: "string",
|
|
4159
|
+
description: "New description, in markdown \u2014 `##` headings per section, `-` bullets, `**bold**` for the decisive figures. REPLACES the whole description, so carry over anything still true.",
|
|
4160
|
+
required: false
|
|
4161
|
+
},
|
|
4158
4162
|
tags: {
|
|
4159
4163
|
type: "string",
|
|
4160
4164
|
description: "Comma-separated tag slugs \u2014 REPLACES existing tags ('' clears)",
|
|
@@ -4176,7 +4180,7 @@ var updateCommand = defineCommand17({
|
|
|
4176
4180
|
id: { type: "positional", description: "Action ID or tempId (temp_*)", required: false },
|
|
4177
4181
|
"action-id": { type: "string", description: "Action ID or tempId (temp_*)", required: false },
|
|
4178
4182
|
name: { type: "string", description: "New name", required: false },
|
|
4179
|
-
description: { type: "string", description: "New description", required: false },
|
|
4183
|
+
description: { type: "string", description: "New description (markdown)", required: false },
|
|
4180
4184
|
tags: { type: "string", description: "Comma-separated tag slugs \u2014 REPLACES existing ('' clears)", required: false },
|
|
4181
4185
|
priority: { type: "string", description: `Priority: ${ACTION_PRIORITIES.join("|")}|none`, required: false }
|
|
4182
4186
|
},
|
|
@@ -16618,7 +16622,10 @@ function fontFileName(face) {
|
|
|
16618
16622
|
const style = face.style === "italic" ? "italic" : "";
|
|
16619
16623
|
return `${family}-${face.weight}${style}-${face.subset}.woff2`;
|
|
16620
16624
|
}
|
|
16621
|
-
function
|
|
16625
|
+
function fontFaceHref(face) {
|
|
16626
|
+
return `../brand/fonts/${fontFileName(face)}`;
|
|
16627
|
+
}
|
|
16628
|
+
function renderFontFaceCss(faces) {
|
|
16622
16629
|
return faces.map(
|
|
16623
16630
|
(face) => [
|
|
16624
16631
|
"@font-face {",
|
|
@@ -16626,7 +16633,7 @@ function renderFontFaceCss(faces, hrefFor) {
|
|
|
16626
16633
|
` font-style: ${face.style};`,
|
|
16627
16634
|
` font-weight: ${face.weight};`,
|
|
16628
16635
|
" font-display: swap;",
|
|
16629
|
-
` src: url('${
|
|
16636
|
+
` src: url('${fontFaceHref(face)}') format('woff2');`,
|
|
16630
16637
|
...face.unicodeRange ? [` unicode-range: ${face.unicodeRange};`] : [],
|
|
16631
16638
|
"}"
|
|
16632
16639
|
].join("\n")
|
|
@@ -16866,7 +16873,7 @@ var fontsFetchCommand = defineCommand86({
|
|
|
16866
16873
|
explanation: "The font stylesheet resolved but the font files themselves did not download."
|
|
16867
16874
|
});
|
|
16868
16875
|
}
|
|
16869
|
-
const fontFace = renderFontFaceCss(downloaded
|
|
16876
|
+
const fontFace = renderFontFaceCss(downloaded);
|
|
16870
16877
|
const downloadedWeights = [...new Set(downloaded.map((f) => f.weight))].sort((a, b) => a - b);
|
|
16871
16878
|
const incomplete = weights.filter((w) => !downloadedWeights.includes(w));
|
|
16872
16879
|
writeJson({
|
|
@@ -29491,6 +29498,20 @@ function parseScope(raw) {
|
|
|
29491
29498
|
function actingUserId() {
|
|
29492
29499
|
return getEnv().BAKER_ACTING_USER_ID;
|
|
29493
29500
|
}
|
|
29501
|
+
function customEntry(server) {
|
|
29502
|
+
const failed = server.health && !server.health.ok;
|
|
29503
|
+
const problem = server.health?.message ?? "This server's address is not serving tools.";
|
|
29504
|
+
return {
|
|
29505
|
+
name: server.name,
|
|
29506
|
+
scope: server.scope,
|
|
29507
|
+
enabled: server.enabled,
|
|
29508
|
+
...failed && !server.health?.transient ? { usable: false, problem } : {},
|
|
29509
|
+
...failed && server.health?.transient ? { lastCheck: "failed", problem } : {},
|
|
29510
|
+
...failed && server.health?.suggestedUrl ? { suggestedAddress: server.health.suggestedUrl } : {}
|
|
29511
|
+
};
|
|
29512
|
+
}
|
|
29513
|
+
var BROKEN_SERVER_HINT = "A server marked usable=false will NOT answer: its tools are absent from this turn. Say plainly that the tool is not working and relay `problem`; never claim its tools are loading, coming next message, or temporarily unavailable. Fixing it needs a person: the user updates its address in the dashboard (Brain \u2192 Integrations \u2192 MCPs). If `suggestedAddress` is present, that is the address to use.";
|
|
29514
|
+
var LAST_CHECK_FAILED_HINT = "A server with lastCheck=failed was unreachable or erroring when it was last checked \u2014 that may already have passed, and its tools ARE loaded this turn. Try the tool; if it works, say nothing about the check. If it fails, report `problem` as what happened rather than guessing.";
|
|
29494
29515
|
function parseHeaders(raw) {
|
|
29495
29516
|
const list = raw === void 0 ? [] : Array.isArray(raw) ? raw : [raw];
|
|
29496
29517
|
const headers = {};
|
|
@@ -29537,8 +29558,14 @@ A tool the user names that is NOT listed here is simply not connected yet.`
|
|
|
29537
29558
|
...c.accountLabel ? { account: c.accountLabel } : {},
|
|
29538
29559
|
...c.readOnly ? { readOnly: true } : {}
|
|
29539
29560
|
}));
|
|
29540
|
-
const custom = data.custom.map(
|
|
29561
|
+
const custom = data.custom.map(customEntry);
|
|
29541
29562
|
const hints = [];
|
|
29563
|
+
if (data.custom.some((s) => s.health && !s.health.ok && !s.health.transient)) {
|
|
29564
|
+
hints.push(BROKEN_SERVER_HINT);
|
|
29565
|
+
}
|
|
29566
|
+
if (data.custom.some((s) => s.health && !s.health.ok && s.health.transient)) {
|
|
29567
|
+
hints.push(LAST_CHECK_FAILED_HINT);
|
|
29568
|
+
}
|
|
29542
29569
|
if (data.managedDisabled) {
|
|
29543
29570
|
hints.push("Managed integrations are disabled for this company \u2014 only custom MCP servers load.");
|
|
29544
29571
|
}
|
|
@@ -29574,7 +29601,15 @@ var listCommand13 = defineCommand139({
|
|
|
29574
29601
|
"/api/mcp/custom",
|
|
29575
29602
|
user ? { actingUserId: user } : void 0
|
|
29576
29603
|
);
|
|
29577
|
-
writeJson({
|
|
29604
|
+
writeJson({
|
|
29605
|
+
ok: true,
|
|
29606
|
+
// Detail view: the full row (address included) plus the usability verdict.
|
|
29607
|
+
// `health` itself is folded into `usable`/`problem` by `customEntry`.
|
|
29608
|
+
data: data.servers.map((server) => ({ ...server, health: void 0, ...customEntry(server) })),
|
|
29609
|
+
...data.servers.some((s) => s.health && !s.health.ok) ? {
|
|
29610
|
+
hints: data.servers.some((s) => s.health && !s.health.ok && !s.health.transient) ? [BROKEN_SERVER_HINT] : [LAST_CHECK_FAILED_HINT]
|
|
29611
|
+
} : {}
|
|
29612
|
+
});
|
|
29578
29613
|
} catch (err) {
|
|
29579
29614
|
fail6(err);
|
|
29580
29615
|
}
|
|
@@ -29585,7 +29620,11 @@ registerSchema({
|
|
|
29585
29620
|
description: "Register a custom MCP server. Tools appear as mcp__<name>__* on the next message. URL must be HTTPS. Scope: company (default, all chats) | org (org admin key) | user (only the current sender).",
|
|
29586
29621
|
args: {
|
|
29587
29622
|
name: { type: "string", description: "Server name \u2192 tools appear as mcp__<name>__*", required: true },
|
|
29588
|
-
url: {
|
|
29623
|
+
url: {
|
|
29624
|
+
type: "string",
|
|
29625
|
+
description: "Full HTTPS MCP endpoint (commonly ends in /mcp, not just the domain)",
|
|
29626
|
+
required: true
|
|
29627
|
+
},
|
|
29589
29628
|
scope: { type: "string", description: "user | user_org | company | org (default company)", required: false },
|
|
29590
29629
|
header: { type: "string", description: 'Auth header "Key: Value" (repeatable)', required: false }
|
|
29591
29630
|
}
|
|
@@ -29604,7 +29643,11 @@ Examples:
|
|
|
29604
29643
|
},
|
|
29605
29644
|
args: {
|
|
29606
29645
|
name: { type: "string", description: "Server name (mcp__<name>__*)", required: true },
|
|
29607
|
-
url: {
|
|
29646
|
+
url: {
|
|
29647
|
+
type: "string",
|
|
29648
|
+
description: "Full HTTPS MCP endpoint (commonly ends in /mcp, not just the domain)",
|
|
29649
|
+
required: true
|
|
29650
|
+
},
|
|
29608
29651
|
scope: { type: "string", description: "user | user_org | company | org (default company)", required: false },
|
|
29609
29652
|
header: { type: "string", description: 'Auth header "Key: Value" (repeatable)', required: false }
|
|
29610
29653
|
},
|
|
@@ -29620,7 +29663,14 @@ Examples:
|
|
|
29620
29663
|
...user ? { actingUserId: user } : {},
|
|
29621
29664
|
...headers ? { headers } : {}
|
|
29622
29665
|
});
|
|
29623
|
-
writeJson({
|
|
29666
|
+
writeJson({
|
|
29667
|
+
ok: true,
|
|
29668
|
+
data,
|
|
29669
|
+
hints: [
|
|
29670
|
+
"The address must be the full MCP endpoint (commonly ending in /mcp), not just the domain \u2014 a domain on its own usually answers sign-in and then serves no tools.",
|
|
29671
|
+
"The address is checked in the background. Run `baker mcp connected` on the next message to confirm it serves tools before promising the user anything."
|
|
29672
|
+
]
|
|
29673
|
+
});
|
|
29624
29674
|
} catch (err) {
|
|
29625
29675
|
fail6(err);
|
|
29626
29676
|
}
|