@yagni-app/code-staging 1.1.9-staging.1490.1 → 1.2.0-staging.1504.1
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/extension/condensedTools.d.ts +0 -4
- package/dist/extension/condensedTools.js +1 -6
- package/dist/extension/mcp/panel.d.ts +1 -1
- package/dist/extension/mcp/panel.js +2 -2
- package/dist/extension/mcp/render.d.ts +45 -0
- package/dist/extension/mcp/render.js +131 -0
- package/dist/extension/mcp/startup.js +1 -1
- package/dist/extension/mcp/tools.js +47 -0
- package/dist/extension/toolRuns.d.ts +6 -0
- package/dist/extension/toolRuns.js +6 -0
- package/package.json +2 -2
|
@@ -35,10 +35,6 @@ export declare const DIFF_PREVIEW_LINES = 12;
|
|
|
35
35
|
export declare const ERROR_TAIL_LINES = 5;
|
|
36
36
|
/** Output tail lines shown under a still-running shell command. */
|
|
37
37
|
export declare const PARTIAL_TAIL_LINES = 3;
|
|
38
|
-
/** Left/right margin for self-rendered rows, matching pi's `outputPad` (1) so
|
|
39
|
-
* tool rows align with prose. Self-render rows bypass pi's pad (renderShell
|
|
40
|
-
* "self" → unpadded container), so we reapply it here. */
|
|
41
|
-
export declare const OUTPUT_PAD = 1;
|
|
42
38
|
declare const BUILTIN_NAMES: readonly ["read", "bash", "edit", "write", "grep", "find", "ls"];
|
|
43
39
|
type BuiltinName = (typeof BUILTIN_NAMES)[number];
|
|
44
40
|
export type RowStatus = "running" | "ok" | "error";
|
|
@@ -32,7 +32,7 @@ import { logEvent } from "./errorSink.js";
|
|
|
32
32
|
import { EXIT_STATUS_LINE_RE, interpretCommandResult, lastSegmentBaseCommand, splitExitStatusError } from "./bashSemantics.js";
|
|
33
33
|
import { isSandboxDenialOutput } from "./sandbox/bash.js";
|
|
34
34
|
import { ReadStateTracker, READ_FIRST_ERROR, readIsPartial, readTextOf, STALE_ERROR } from "./fileGuards.js";
|
|
35
|
-
import { isQuiet, kindForTool, ToolRunTracker } from "./toolRuns.js";
|
|
35
|
+
import { EXPAND_HINT, isQuiet, kindForTool, OUTPUT_PAD, ToolRunTracker } from "./toolRuns.js";
|
|
36
36
|
/** Lines of write content shown collapsed (mirrors Claude Code's preview). */
|
|
37
37
|
export const WRITE_PREVIEW_LINES = 8;
|
|
38
38
|
/** Visual lines of a diff shown collapsed. */
|
|
@@ -45,10 +45,6 @@ export const PARTIAL_TAIL_LINES = 3;
|
|
|
45
45
|
const EXPANDED_MAX_LINES = 1000;
|
|
46
46
|
/** Title arg preview width. */
|
|
47
47
|
const ARG_PREVIEW_MAX = 96;
|
|
48
|
-
/** Left/right margin for self-rendered rows, matching pi's `outputPad` (1) so
|
|
49
|
-
* tool rows align with prose. Self-render rows bypass pi's pad (renderShell
|
|
50
|
-
* "self" → unpadded container), so we reapply it here. */
|
|
51
|
-
export const OUTPUT_PAD = 1;
|
|
52
48
|
const BUILTIN_NAMES = ["read", "bash", "edit", "write", "grep", "find", "ls"];
|
|
53
49
|
const TITLE_BY_NAME = {
|
|
54
50
|
read: "Read",
|
|
@@ -195,7 +191,6 @@ function countPatchRemovals(patch) {
|
|
|
195
191
|
}
|
|
196
192
|
return removed;
|
|
197
193
|
}
|
|
198
|
-
const EXPAND_HINT = "(ctrl+o to expand)";
|
|
199
194
|
/**
|
|
200
195
|
* `⎿ Wrote N lines to path` + a numbered, syntax-highlighted preview.
|
|
201
196
|
* `highlight` is injectable so tests stay independent of pi's theme state.
|
|
@@ -27,7 +27,7 @@ export interface PanelDeps {
|
|
|
27
27
|
hasUI: boolean;
|
|
28
28
|
}
|
|
29
29
|
/** Wire the /mcp command + subcommands. */
|
|
30
|
-
export declare function registerMcpPanel(pi: ExtensionAPI, manager: McpManager, configErrors: () => string[]): void;
|
|
30
|
+
export declare function registerMcpPanel(pi: ExtensionAPI, manager: McpManager, configErrors: () => string[], env?: NodeJS.ProcessEnv): void;
|
|
31
31
|
/** Read the persisted disabled list for a repo root (exported for tests). */
|
|
32
32
|
export declare function readDisabledServers(repoRoot: string): string[];
|
|
33
33
|
//# sourceMappingURL=panel.d.ts.map
|
|
@@ -67,7 +67,7 @@ export function renderPanelListing(servers, errors) {
|
|
|
67
67
|
return lines.join("\n");
|
|
68
68
|
}
|
|
69
69
|
/** Wire the /mcp command + subcommands. */
|
|
70
|
-
export function registerMcpPanel(pi, manager, configErrors) {
|
|
70
|
+
export function registerMcpPanel(pi, manager, configErrors, env = process.env) {
|
|
71
71
|
const repoRoot = () => resolveProjectRoot(deps.cwd);
|
|
72
72
|
let deps = { cwd: process.cwd(), hasUI: true };
|
|
73
73
|
const persistDisabled = (name, disabled) => {
|
|
@@ -88,7 +88,7 @@ export function registerMcpPanel(pi, manager, configErrors) {
|
|
|
88
88
|
const refreshForServer = async (serverName) => {
|
|
89
89
|
const server = manager.get(serverName);
|
|
90
90
|
if (server?.client) {
|
|
91
|
-
await registerServerTools(pi, manager, serverName);
|
|
91
|
+
await registerServerTools(pi, manager, serverName, env);
|
|
92
92
|
await registerServerPrompts(pi, manager, serverName);
|
|
93
93
|
}
|
|
94
94
|
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Condensed transcript rows for MCP tools (YAG-765).
|
|
3
|
+
*
|
|
4
|
+
* pi renders a tool without `renderCall`/`renderResult` as a bare bold name
|
|
5
|
+
* over the ENTIRE result text, so one Datadog span query dumped kilobytes of
|
|
6
|
+
* `<METADATA>` and JSON into the transcript. These builders give every MCP
|
|
7
|
+
* tool the same shape as the built-ins in condensedTools.ts: a one-line
|
|
8
|
+
* `● server: tool(args)` title, a three-line preview under `⎿` with a
|
|
9
|
+
* "+N lines · size (ctrl+o to expand)" hint, and the full output only when
|
|
10
|
+
* the transcript is expanded. The model still receives the full result; only
|
|
11
|
+
* the transcript is quiet.
|
|
12
|
+
*
|
|
13
|
+
* Pure over {@link RenderTheme} (no pi imports) so tests run on plain text;
|
|
14
|
+
* the pi wiring lives in tools.ts.
|
|
15
|
+
*/
|
|
16
|
+
import type { RenderTheme } from "../subagentRender.js";
|
|
17
|
+
/** Non-empty output lines shown collapsed. */
|
|
18
|
+
export declare const MCP_PREVIEW_LINES = 3;
|
|
19
|
+
/** Width each collapsed preview line is clipped to. */
|
|
20
|
+
export declare const MCP_PREVIEW_WIDTH = 120;
|
|
21
|
+
/** Hard cap on expanded body lines so a huge result cannot stall a repaint. */
|
|
22
|
+
export declare const MCP_EXPANDED_MAX_LINES = 1000;
|
|
23
|
+
/** Output lines kept under a failed call's error line. */
|
|
24
|
+
export declare const MCP_ERROR_TAIL_LINES = 4;
|
|
25
|
+
export type McpRowStatus = "running" | "ok" | "error";
|
|
26
|
+
/** `key: "value", n: 5` — the tool's arguments on one clipped line. */
|
|
27
|
+
export declare function formatMcpArgs(args: unknown, max?: number): string;
|
|
28
|
+
/** `● server: tool(args)` — the row title. */
|
|
29
|
+
export declare function formatMcpTitle(server: string, tool: string, args: unknown, status: McpRowStatus, theme: RenderTheme): string;
|
|
30
|
+
/**
|
|
31
|
+
* The row body. Collapsed: the first {@link MCP_PREVIEW_LINES} non-empty
|
|
32
|
+
* lines, each clipped, then a remainder hint carrying the hidden line count,
|
|
33
|
+
* the byte size, and any image count. Expanded: every line, capped.
|
|
34
|
+
*/
|
|
35
|
+
export declare function formatMcpResultBody(text: string, opts: {
|
|
36
|
+
expanded: boolean;
|
|
37
|
+
images: number;
|
|
38
|
+
}, theme: RenderTheme): string[];
|
|
39
|
+
/**
|
|
40
|
+
* `⎿ error line` + a tail, for a failed call. Collapsed keeps
|
|
41
|
+
* {@link MCP_ERROR_TAIL_LINES} lines and hints at the rest; expanded shows
|
|
42
|
+
* every line, capped like a successful result.
|
|
43
|
+
*/
|
|
44
|
+
export declare function formatMcpErrorBody(text: string, expanded: boolean, theme: RenderTheme): string[];
|
|
45
|
+
//# sourceMappingURL=render.d.ts.map
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Condensed transcript rows for MCP tools (YAG-765).
|
|
3
|
+
*
|
|
4
|
+
* pi renders a tool without `renderCall`/`renderResult` as a bare bold name
|
|
5
|
+
* over the ENTIRE result text, so one Datadog span query dumped kilobytes of
|
|
6
|
+
* `<METADATA>` and JSON into the transcript. These builders give every MCP
|
|
7
|
+
* tool the same shape as the built-ins in condensedTools.ts: a one-line
|
|
8
|
+
* `● server: tool(args)` title, a three-line preview under `⎿` with a
|
|
9
|
+
* "+N lines · size (ctrl+o to expand)" hint, and the full output only when
|
|
10
|
+
* the transcript is expanded. The model still receives the full result; only
|
|
11
|
+
* the transcript is quiet.
|
|
12
|
+
*
|
|
13
|
+
* Pure over {@link RenderTheme} (no pi imports) so tests run on plain text;
|
|
14
|
+
* the pi wiring lives in tools.ts.
|
|
15
|
+
*/
|
|
16
|
+
import { EXPAND_HINT } from "../toolRuns.js";
|
|
17
|
+
/** Non-empty output lines shown collapsed. */
|
|
18
|
+
export const MCP_PREVIEW_LINES = 3;
|
|
19
|
+
/** Width each collapsed preview line is clipped to. */
|
|
20
|
+
export const MCP_PREVIEW_WIDTH = 120;
|
|
21
|
+
/** Hard cap on expanded body lines so a huge result cannot stall a repaint. */
|
|
22
|
+
export const MCP_EXPANDED_MAX_LINES = 1000;
|
|
23
|
+
/** Output lines kept under a failed call's error line. */
|
|
24
|
+
export const MCP_ERROR_TAIL_LINES = 4;
|
|
25
|
+
/** Title arg preview width. */
|
|
26
|
+
const ARGS_PREVIEW_MAX = 80;
|
|
27
|
+
function clip(text, max) {
|
|
28
|
+
const collapsed = text.replace(/\s+/g, " ").trim();
|
|
29
|
+
if (collapsed.length <= max)
|
|
30
|
+
return collapsed;
|
|
31
|
+
return `${collapsed.slice(0, max - 1)}…`;
|
|
32
|
+
}
|
|
33
|
+
function formatBytes(bytes) {
|
|
34
|
+
if (bytes < 1024)
|
|
35
|
+
return `${bytes} B`;
|
|
36
|
+
if (bytes < 1024 * 1024)
|
|
37
|
+
return `${(bytes / 1024).toFixed(1)} KB`;
|
|
38
|
+
return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;
|
|
39
|
+
}
|
|
40
|
+
function previewValue(value) {
|
|
41
|
+
if (typeof value === "string")
|
|
42
|
+
return JSON.stringify(value);
|
|
43
|
+
if (value === null || typeof value !== "object")
|
|
44
|
+
return String(value);
|
|
45
|
+
try {
|
|
46
|
+
return JSON.stringify(value);
|
|
47
|
+
}
|
|
48
|
+
catch {
|
|
49
|
+
return Array.isArray(value) ? "[…]" : "{…}";
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
/** `key: "value", n: 5` — the tool's arguments on one clipped line. */
|
|
53
|
+
export function formatMcpArgs(args, max = ARGS_PREVIEW_MAX) {
|
|
54
|
+
if (!args || typeof args !== "object" || Array.isArray(args))
|
|
55
|
+
return "";
|
|
56
|
+
const pairs = Object.entries(args)
|
|
57
|
+
.filter(([, v]) => v !== undefined)
|
|
58
|
+
.map(([k, v]) => `${k}: ${previewValue(v)}`);
|
|
59
|
+
return clip(pairs.join(", "), max);
|
|
60
|
+
}
|
|
61
|
+
function statusDot(status, theme) {
|
|
62
|
+
if (status === "error")
|
|
63
|
+
return theme.fg("error", "●");
|
|
64
|
+
if (status === "running")
|
|
65
|
+
return theme.fg("accent", "●");
|
|
66
|
+
return theme.fg("success", "●");
|
|
67
|
+
}
|
|
68
|
+
/** `● server: tool(args)` — the row title. */
|
|
69
|
+
export function formatMcpTitle(server, tool, args, status, theme) {
|
|
70
|
+
const title = theme.bold(theme.fg("toolTitle", `${server}: ${tool}`));
|
|
71
|
+
const preview = formatMcpArgs(args);
|
|
72
|
+
const suffix = preview ? `(${theme.fg("accent", preview)})` : "";
|
|
73
|
+
return `${statusDot(status, theme)} ${title}${suffix}`;
|
|
74
|
+
}
|
|
75
|
+
function withElbow(lines, theme) {
|
|
76
|
+
return lines.map((line, i) => (i === 0 ? ` ${theme.fg("muted", "⎿")} ${line}` : ` ${line}`));
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* The row body. Collapsed: the first {@link MCP_PREVIEW_LINES} non-empty
|
|
80
|
+
* lines, each clipped, then a remainder hint carrying the hidden line count,
|
|
81
|
+
* the byte size, and any image count. Expanded: every line, capped.
|
|
82
|
+
*/
|
|
83
|
+
export function formatMcpResultBody(text, opts, theme) {
|
|
84
|
+
const trimmed = text.replace(/\n$/, "");
|
|
85
|
+
if (!trimmed.trim() && opts.images === 0) {
|
|
86
|
+
return withElbow([theme.fg("dim", "(no text content)")], theme);
|
|
87
|
+
}
|
|
88
|
+
if (opts.expanded) {
|
|
89
|
+
const all = trimmed.split("\n");
|
|
90
|
+
const shown = all.slice(0, MCP_EXPANDED_MAX_LINES).map((l) => theme.fg("toolOutput", l));
|
|
91
|
+
if (all.length > MCP_EXPANDED_MAX_LINES) {
|
|
92
|
+
shown.push(theme.fg("muted", `… +${all.length - MCP_EXPANDED_MAX_LINES} lines`));
|
|
93
|
+
}
|
|
94
|
+
return withElbow(shown, theme);
|
|
95
|
+
}
|
|
96
|
+
const nonEmpty = trimmed.split("\n").filter((l) => l.trim().length > 0);
|
|
97
|
+
const shown = nonEmpty.slice(0, MCP_PREVIEW_LINES);
|
|
98
|
+
const hidden = nonEmpty.length - shown.length;
|
|
99
|
+
const clipped = shown.some((l) => l.replace(/\s+/g, " ").trim().length > MCP_PREVIEW_WIDTH);
|
|
100
|
+
const lines = shown.map((l) => theme.fg("toolOutput", clip(l, MCP_PREVIEW_WIDTH)));
|
|
101
|
+
const facts = [];
|
|
102
|
+
if (hidden > 0)
|
|
103
|
+
facts.push(`+${hidden} ${hidden === 1 ? "line" : "lines"} · ${formatBytes(Buffer.byteLength(trimmed, "utf8"))}`);
|
|
104
|
+
if (opts.images > 0)
|
|
105
|
+
facts.push(`${opts.images} ${opts.images === 1 ? "image" : "images"}`);
|
|
106
|
+
if (facts.length > 0 || clipped) {
|
|
107
|
+
lines.push(theme.fg("muted", `… ${[...facts, EXPAND_HINT].join(" ")}`));
|
|
108
|
+
}
|
|
109
|
+
return withElbow(lines, theme);
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* `⎿ error line` + a tail, for a failed call. Collapsed keeps
|
|
113
|
+
* {@link MCP_ERROR_TAIL_LINES} lines and hints at the rest; expanded shows
|
|
114
|
+
* every line, capped like a successful result.
|
|
115
|
+
*/
|
|
116
|
+
export function formatMcpErrorBody(text, expanded, theme) {
|
|
117
|
+
const lines = text.split("\n").filter((l) => l.length > 0);
|
|
118
|
+
if (lines.length === 0)
|
|
119
|
+
return withElbow([theme.fg("error", "Tool call failed")], theme);
|
|
120
|
+
const [first, ...rest] = lines;
|
|
121
|
+
const cap = expanded ? MCP_EXPANDED_MAX_LINES - 1 : MCP_ERROR_TAIL_LINES;
|
|
122
|
+
const tail = rest.slice(0, cap).map((l) => theme.fg("toolOutput", l));
|
|
123
|
+
const hidden = rest.length - tail.length;
|
|
124
|
+
const out = [theme.fg("error", first), ...tail];
|
|
125
|
+
if (hidden > 0) {
|
|
126
|
+
const remainder = `… +${hidden} ${hidden === 1 ? "line" : "lines"}`;
|
|
127
|
+
out.push(theme.fg("muted", expanded ? remainder : `${remainder} ${EXPAND_HINT}`));
|
|
128
|
+
}
|
|
129
|
+
return withElbow(out, theme);
|
|
130
|
+
}
|
|
131
|
+
//# sourceMappingURL=render.js.map
|
|
@@ -54,7 +54,7 @@ export async function startMcp(pi, opts) {
|
|
|
54
54
|
const repoRoot = resolveProjectRoot(opts.cwd);
|
|
55
55
|
const { servers, errors } = loadMcpServers(opts.cwd, env);
|
|
56
56
|
outcome.configErrors = errors.map((e) => (e.serverName ? `${e.serverName}: ${e.message}` : e.message));
|
|
57
|
-
registerMcpPanel(pi, outcome.manager, () => outcome.configErrors);
|
|
57
|
+
registerMcpPanel(pi, outcome.manager, () => outcome.configErrors, env);
|
|
58
58
|
const { state } = readProjectApproval(repoRoot);
|
|
59
59
|
// Claude Code bridge: one line when `~/.claude.json` carries servers,
|
|
60
60
|
// approvals, or claude.ai connectors this install does not have. Computed
|
|
@@ -9,8 +9,12 @@
|
|
|
9
9
|
* eagerly per server — a server exposing 100 tools puts 100 tools into every
|
|
10
10
|
* request. No tool-list deferral / ToolSearch in v1.
|
|
11
11
|
*/
|
|
12
|
+
import { Container, Text } from "@earendil-works/pi-tui";
|
|
13
|
+
import { isDesktopSurface } from "../surface.js";
|
|
14
|
+
import { OUTPUT_PAD } from "../toolRuns.js";
|
|
12
15
|
import { toolTimeoutFromEnv } from "./manager.js";
|
|
13
16
|
import { buildMcpToolName } from "./names.js";
|
|
17
|
+
import { formatMcpErrorBody, formatMcpResultBody, formatMcpTitle, } from "./render.js";
|
|
14
18
|
export const MAX_MCP_DESCRIPTION_LENGTH = 2048;
|
|
15
19
|
export async function registerServerTools(pi, manager, serverName, env = process.env) {
|
|
16
20
|
const server = manager.get(serverName);
|
|
@@ -30,6 +34,10 @@ export async function registerServerTools(pi, manager, serverName, env = process
|
|
|
30
34
|
return result;
|
|
31
35
|
}
|
|
32
36
|
const toolTimeout = toolTimeoutFromEnv(env);
|
|
37
|
+
// The built-ins' condition (index.ts): the classic-rows escape hatch and
|
|
38
|
+
// the desktop surface both keep pi's stock renderers, so a transcript is
|
|
39
|
+
// never half condensed. (Eval mode never registers MCP tools at all.)
|
|
40
|
+
const condensedRows = env.YAGNI_CLASSIC_TOOL_ROWS !== "1" && !isDesktopSurface(env);
|
|
33
41
|
const selectedTools = server.config.type === "http" || server.config.type === "sse"
|
|
34
42
|
? server.config.tools
|
|
35
43
|
: undefined;
|
|
@@ -48,6 +56,7 @@ export async function registerServerTools(pi, manager, serverName, env = process
|
|
|
48
56
|
label: `${serverName}: ${tool.name}`,
|
|
49
57
|
description,
|
|
50
58
|
parameters: schemaFor(tool.inputSchema),
|
|
59
|
+
...(condensedRows ? condensedRenderers(serverName, tool.name) : {}),
|
|
51
60
|
async execute(_toolCallId, params) {
|
|
52
61
|
const active = manager.get(serverName);
|
|
53
62
|
if (!active?.client) {
|
|
@@ -76,6 +85,44 @@ export async function registerServerTools(pi, manager, serverName, env = process
|
|
|
76
85
|
}
|
|
77
86
|
return result;
|
|
78
87
|
}
|
|
88
|
+
function statusFromFlags(flags) {
|
|
89
|
+
if (flags.isError)
|
|
90
|
+
return "error";
|
|
91
|
+
if (flags.isPartial)
|
|
92
|
+
return "running";
|
|
93
|
+
return "ok";
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Condensed transcript rows (YAG-765): a `● server: tool(args)` title plus a
|
|
97
|
+
* clipped preview collapsed, the full output on ctrl+o. Without these pi
|
|
98
|
+
* paints the whole result text under a bare tool name. pi passes `isError`
|
|
99
|
+
* on the render context (a thrown execute becomes an error result), which
|
|
100
|
+
* is the same signal condensedTools reads for a failed bash.
|
|
101
|
+
*/
|
|
102
|
+
function condensedRenderers(serverName, toolName) {
|
|
103
|
+
return {
|
|
104
|
+
renderShell: "self",
|
|
105
|
+
renderCall(args, theme, context) {
|
|
106
|
+
const status = statusFromFlags(context);
|
|
107
|
+
return new Text(formatMcpTitle(serverName, toolName, args, status, theme), OUTPUT_PAD, 0);
|
|
108
|
+
},
|
|
109
|
+
renderResult(result, options, theme, context) {
|
|
110
|
+
if (options.isPartial)
|
|
111
|
+
return new Container();
|
|
112
|
+
const content = (result.content ?? []);
|
|
113
|
+
const text = content
|
|
114
|
+
.filter((c) => c.type === "text" && typeof c.text === "string")
|
|
115
|
+
.map((c) => c.text)
|
|
116
|
+
.join("\n");
|
|
117
|
+
const images = content.filter((c) => c.type === "image").length;
|
|
118
|
+
const t = theme;
|
|
119
|
+
const lines = context.isError
|
|
120
|
+
? formatMcpErrorBody(text, options.expanded, t)
|
|
121
|
+
: formatMcpResultBody(text, { expanded: options.expanded, images }, t);
|
|
122
|
+
return new Text(lines.join("\n"), OUTPUT_PAD, 0);
|
|
123
|
+
},
|
|
124
|
+
};
|
|
125
|
+
}
|
|
79
126
|
export function capDescription(description) {
|
|
80
127
|
return description.length > MAX_MCP_DESCRIPTION_LENGTH
|
|
81
128
|
? description.slice(0, MAX_MCP_DESCRIPTION_LENGTH - 1) + "…"
|
|
@@ -18,6 +18,12 @@
|
|
|
18
18
|
* Everything here is PURE (no pi imports) so tests run against plain objects;
|
|
19
19
|
* the pi wiring lives in condensedTools.ts.
|
|
20
20
|
*/
|
|
21
|
+
/** Left/right margin for self-rendered rows, matching pi's `outputPad` (1) so
|
|
22
|
+
* tool rows align with prose. Self-render rows bypass pi's pad (renderShell
|
|
23
|
+
* "self" → unpadded container), so renderers reapply it. */
|
|
24
|
+
export declare const OUTPUT_PAD = 1;
|
|
25
|
+
/** The remainder hint every condensed row uses. */
|
|
26
|
+
export declare const EXPAND_HINT = "(ctrl+o to expand)";
|
|
21
27
|
/** Aggregation category of one tool row. */
|
|
22
28
|
export type RowKind = "read" | "shell" | "search" | "list" | "write" | "edit";
|
|
23
29
|
/** Facts about one tool row; `quiet` is derived, never stored. */
|
|
@@ -18,6 +18,12 @@
|
|
|
18
18
|
* Everything here is PURE (no pi imports) so tests run against plain objects;
|
|
19
19
|
* the pi wiring lives in condensedTools.ts.
|
|
20
20
|
*/
|
|
21
|
+
/** Left/right margin for self-rendered rows, matching pi's `outputPad` (1) so
|
|
22
|
+
* tool rows align with prose. Self-render rows bypass pi's pad (renderShell
|
|
23
|
+
* "self" → unpadded container), so renderers reapply it. */
|
|
24
|
+
export const OUTPUT_PAD = 1;
|
|
25
|
+
/** The remainder hint every condensed row uses. */
|
|
26
|
+
export const EXPAND_HINT = "(ctrl+o to expand)";
|
|
21
27
|
const KIND_BY_TOOL = {
|
|
22
28
|
read: "read",
|
|
23
29
|
bash: "shell",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yagni-app/code-staging",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0-staging.1504.1",
|
|
4
4
|
"description": "YAGNI Code: a terminal coding agent that already knows your company. One YAGNI login routes the model and grounds the agent in your team's context.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "YAGNI, Inc. <jack@yagni.app> (https://yagni.app)",
|
|
@@ -58,5 +58,5 @@
|
|
|
58
58
|
"turndown": "^7.2.4",
|
|
59
59
|
"typebox": "^1.3.15"
|
|
60
60
|
},
|
|
61
|
-
"yagniSourceSha": "
|
|
61
|
+
"yagniSourceSha": "d8eb82a97faca5a9dfc62f1074741cc70a8b1934"
|
|
62
62
|
}
|