@fungi.computer/parakeet 0.11.11 → 0.11.13
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/components/TimelineItem.js +11 -3
- package/dist/components/ToolGroup.js +5 -3
- package/dist/core/tool-groups.d.ts +1 -1
- package/dist/core/tool-groups.js +32 -5
- package/dist/core/tool-view.d.ts +4 -2
- package/dist/core/tool-view.js +24 -8
- package/dist/host-facts.d.ts +2 -0
- package/dist/host-facts.js +12 -0
- package/dist/store/types.d.ts +3 -1
- package/dist/styles.css +9 -11
- package/docs/api/headless.md +13 -8
- package/docs/api/index.md +10 -5
- package/package.json +2 -2
|
@@ -63,9 +63,17 @@ export const TimelineItem = memo(function TimelineItem({ item, onDismissFailed,
|
|
|
63
63
|
const tries = item.repeatCount ?? 1;
|
|
64
64
|
return (_jsxs("div", { "data-failure": item.id, children: [_jsx(FailureLine, { message: tries > 1
|
|
65
65
|
? `${modelFailure.message} · ${String(tries)} tries`
|
|
66
|
-
: modelFailure.message, ...(
|
|
67
|
-
?
|
|
68
|
-
|
|
66
|
+
: modelFailure.message, ...(modelFailure.toolsUnsupported
|
|
67
|
+
? facts.modelSetup === undefined
|
|
68
|
+
? {}
|
|
69
|
+
: {
|
|
70
|
+
onRetry: facts.modelSetup.fix.onSelect,
|
|
71
|
+
retryLabel: "Choose model",
|
|
72
|
+
retryAriaLabel: "Choose model",
|
|
73
|
+
}
|
|
74
|
+
: onRetry === undefined || modelFailure.setup
|
|
75
|
+
? {}
|
|
76
|
+
: { onRetry, retryAriaLabel: "Retry prompt" }) }), _jsx("div", { className: "px-3 text-xs text-dim", ...(item.providerError === undefined
|
|
69
77
|
? {}
|
|
70
78
|
: { "data-provider-error": item.id }), children: _jsxs("details", { children: [_jsx("summary", { children: "Details" }), _jsx("div", { children: modelFailure.detail }), item.providerError === undefined ? null : (_jsx("pre", { className: "whitespace-pre-wrap", children: item.providerError }))] }) })] }));
|
|
71
79
|
}
|
|
@@ -59,7 +59,7 @@ function CallBody({ call, tool, disclosure, onToggle, mediaClaimed, }) {
|
|
|
59
59
|
const showAll = () => {
|
|
60
60
|
onToggle(fullId, false);
|
|
61
61
|
};
|
|
62
|
-
return (_jsxs("div", { className: "space-y-1.5 py-1.5 pr-2", "data-parakeet-call-body": true, children: [call.error === undefined ? null : (_jsx("p", { className:
|
|
62
|
+
return (_jsxs("div", { className: "space-y-1.5 py-1.5 pr-2", "data-parakeet-call-body": true, children: [call.error === undefined ? null : (_jsx("p", { className: `not-prose m-0 break-words font-mono text-[11px] ${call.recovered === true ? "text-dim" : "text-error"}`, role: call.recovered === true ? undefined : "alert", children: call.error })), call.sections.map((section, index) => (_jsx(SectionView, { full: full, onShowAll: showAll, section: section }, `${section.kind}:${String(index)}`))), (mediaClaimed ? [] : (tool?.result?.content ?? []))
|
|
63
63
|
.filter((part) => part.type === "image")
|
|
64
64
|
.map((part, index) => (_jsx("img", { alt: "Tool result", className: "max-w-full", src: `data:${part.mimeType};base64,${part.data}`, style: { maxHeight: 400 } }, `${call.id}-image-${String(index)}`)))] }));
|
|
65
65
|
}
|
|
@@ -69,7 +69,9 @@ function CallRow({ call, tool, disclosureId, size, disclosure, onToggle, renderT
|
|
|
69
69
|
const running = call.status === "running";
|
|
70
70
|
return (_jsxs("div", { "data-parakeet-call": call.kind, "data-status": call.status, children: [_jsx(Disclosure, { leading: _jsx(Sigil, { name: toolKindSigils[call.kind], size: 16 }), onOpenChange: () => {
|
|
71
71
|
onToggle(disclosureId, defaultOpen);
|
|
72
|
-
}, open: open, size: size, summary: _jsxs(_Fragment, { children: [_jsx("span", { className: "text-base-content", children: running ? call.activeVerb : call.verb }), " ", _jsx("span", { className: "font-mono", children: call.label })] }), tone: call.status === "error"
|
|
72
|
+
}, open: open, size: size, summary: _jsxs(_Fragment, { children: [_jsx("span", { className: "text-base-content", children: running ? call.activeVerb : call.verb }), " ", _jsx("span", { className: "font-mono", children: call.label })] }), tone: call.status === "error" && call.recovered !== true
|
|
73
|
+
? "error"
|
|
74
|
+
: "neutral", trailing: _jsxs(_Fragment, { children: [call.recovered === true ? _jsx("span", { children: "recovered" }) : null, call.exitCode === undefined ? null : (_jsxs(Badge, { size: "sm", tone: call.recovered === true ? "neutral" : "error", children: ["exit ", String(call.exitCode)] })), call.durationMs === undefined ? null : (_jsx("span", { children: formatToolDuration(call.durationMs) })), _jsx(Status, { motion: running ? "bounce" : "none", title: call.status === "unknown" ? "result unavailable" : call.status, tone: statusTone(call.status, call.recovered === true) })] }), children: _jsx(CallBody, { call: call, disclosure: disclosure, onToggle: onToggle, mediaClaimed: tool !== undefined && claimsToolMedia?.(tool) === true, tool: tool }) }), call.live === undefined ? null : (_jsx("pre", { className: monoBlock, "aria-label": "Live tool output", children: toolLiveLines(call, open).map((line, index) => (_jsx("span", { className: "block whitespace-pre", children: line || "\u00a0" }, String(index)))) })), call.status === "completed" && tool?.result !== undefined
|
|
73
75
|
? renderToolActions?.(tool)
|
|
74
76
|
: null] }));
|
|
75
77
|
}
|
|
@@ -84,7 +86,7 @@ export const ToolGroup = memo(function ToolGroup({ group, disclosure, onToggle,
|
|
|
84
86
|
return (_jsx("div", { className: "px-1", children: _jsx(CallRow, { call: single, disclosure: disclosure, disclosureId: single.id, onToggle: onToggle, renderToolActions: renderToolActions, claimsToolMedia: claimsToolMedia, size: "row", tool: group.tools[0] }) }));
|
|
85
87
|
return (_jsxs("div", { className: "px-1", children: [_jsx(Disclosure, { className: "[&>.caps-disclosure-panel]:hidden", leading: _jsx(Sigil, { name: "list", size: 16 }), onOpenChange: () => {
|
|
86
88
|
onToggle(group.id, defaultOpen);
|
|
87
|
-
}, open: open, summary: running && active !== undefined ? (_jsxs(_Fragment, { children: [_jsx("span", { className: "text-base-content", children: active.activeVerb }), " ", _jsx("span", { className: "font-mono", children: active.label }), " \u00B7", " ", String(group.calls.length), " ", group.calls.length === 1 ? "call" : "calls"] })) : (_jsxs("span", { className: "text-base-content", children: [group.summary, " \u00B7 ", String(group.calls.length), " ", group.calls.length === 1 ? "call" : "calls"] })), tone: group.status === "error" ? "error" : "neutral", trailing: _jsxs(_Fragment, { children: [group.failedCount > 0 ? (_jsxs("span", { className: "text-error", children: [String(group.failedCount), " failed"] })) : null, group.durationMs === undefined ? null : (_jsx("span", { children: formatToolDuration(group.durationMs) })), _jsx(Status, { motion: running ? "bounce" : "none", title: group.status === "unknown" ? "result unavailable" : group.status, tone: statusTone(group.status) })] }) }), visibleToolCalls(group, open).map((call) => (_jsx(CallRow, { call: call, disclosure: disclosure, disclosureId: call.id, onToggle: onToggle, renderToolActions: renderToolActions, claimsToolMedia: claimsToolMedia, size: "row", tool: group.tools.find((tool) => tool.id === call.id) }, call.id))), group.status === "completed" && group.calls.length > 3 ? (_jsx("button", { "aria-expanded": open, className: "btn btn-ghost btn-xs text-dim", onClick: () => {
|
|
89
|
+
}, open: open, summary: running && active !== undefined ? (_jsxs(_Fragment, { children: [_jsx("span", { className: "text-base-content", children: active.activeVerb }), " ", _jsx("span", { className: "font-mono", children: active.label }), " \u00B7", " ", String(group.calls.length), " ", group.calls.length === 1 ? "call" : "calls"] })) : (_jsxs("span", { className: "text-base-content", children: [group.summary, " \u00B7 ", String(group.calls.length), " ", group.calls.length === 1 ? "call" : "calls"] })), tone: group.status === "error" ? "error" : "neutral", trailing: _jsxs(_Fragment, { children: [group.failedCount > 0 ? (_jsxs("span", { className: "text-error", children: [String(group.failedCount), " failed"] })) : null, group.recoveredCount > 0 ? (_jsxs("span", { children: [String(group.recoveredCount), " recovered"] })) : null, group.durationMs === undefined ? null : (_jsx("span", { children: formatToolDuration(group.durationMs) })), _jsx(Status, { motion: running ? "bounce" : "none", title: group.status === "unknown" ? "result unavailable" : group.status, tone: statusTone(group.status) })] }) }), visibleToolCalls(group, open).map((call) => (_jsx(CallRow, { call: call, disclosure: disclosure, disclosureId: call.id, onToggle: onToggle, renderToolActions: renderToolActions, claimsToolMedia: claimsToolMedia, size: "row", tool: group.tools.find((tool) => tool.id === call.id) }, call.id))), group.status === "completed" && group.calls.length > 3 ? (_jsx("button", { "aria-expanded": open, className: "btn btn-ghost btn-xs text-dim", onClick: () => {
|
|
88
90
|
onToggle(group.id, defaultOpen);
|
|
89
91
|
}, type: "button", children: open ? "Show less" : `Show all ${String(group.calls.length)} calls` })) : null] }));
|
|
90
92
|
});
|
|
@@ -26,7 +26,7 @@ export declare const initialToolDisclosure: ToolDisclosureState;
|
|
|
26
26
|
export declare function toolGroupDefaultOpen(group: ToolGroupItem): boolean;
|
|
27
27
|
/** Even a folded group shows recent calls, rather than hiding all tool work. */
|
|
28
28
|
export declare function visibleToolCalls(group: ToolGroupItem, open: boolean): readonly ToolCallView[];
|
|
29
|
-
/** A failed call opens by default so its error is visible. */
|
|
29
|
+
/** A failed call opens by default so its error is visible; a recovered one stays compact. */
|
|
30
30
|
export declare function toolCallDefaultOpen(call: ToolCallView): boolean;
|
|
31
31
|
/** Whether a group or call is currently open. */
|
|
32
32
|
export declare function disclosureOpen(state: ToolDisclosureState, id: string, defaultOpen: boolean): boolean;
|
package/dist/core/tool-groups.js
CHANGED
|
@@ -70,7 +70,7 @@ function summarizeToolCalls(calls) {
|
|
|
70
70
|
function groupStatus(calls) {
|
|
71
71
|
if (calls.some((call) => call.status === "running"))
|
|
72
72
|
return "running";
|
|
73
|
-
if (calls.some((call) => call.status === "error"))
|
|
73
|
+
if (calls.some((call) => call.status === "error" && call.recovered !== true))
|
|
74
74
|
return "error";
|
|
75
75
|
if (calls.some((call) => call.status === "unknown"))
|
|
76
76
|
return "unknown";
|
|
@@ -89,18 +89,45 @@ function groupDuration(tools) {
|
|
|
89
89
|
? undefined
|
|
90
90
|
: Math.max(0, end - start);
|
|
91
91
|
}
|
|
92
|
+
/**
|
|
93
|
+
* A failure is recovered when the Agent got past it: the next call of the same
|
|
94
|
+
* kind that did not itself fail (chained through further failures) completed
|
|
95
|
+
* and retried the same target. A script is retried by the next script; any
|
|
96
|
+
* other call needs the same command or a shared path. Other kinds never
|
|
97
|
+
* recover it, so a read of a file does not undo a failed edit of that file.
|
|
98
|
+
*/
|
|
99
|
+
function recoveredBy(calls, index) {
|
|
100
|
+
const call = calls[index];
|
|
101
|
+
if (call?.status !== "error")
|
|
102
|
+
return false;
|
|
103
|
+
const next = calls
|
|
104
|
+
.slice(index + 1)
|
|
105
|
+
.find((other) => other.kind === call.kind && other.status !== "error");
|
|
106
|
+
if (next?.status !== "completed")
|
|
107
|
+
return false;
|
|
108
|
+
return (call.kind === "code" ||
|
|
109
|
+
next.label === call.label ||
|
|
110
|
+
next.paths.some((path) => call.paths.includes(path)));
|
|
111
|
+
}
|
|
92
112
|
/** Build one group from a non-empty run of consecutive calls. */
|
|
93
113
|
export function toolGroup(tools) {
|
|
94
|
-
const
|
|
114
|
+
const first = tools.map((tool) => toolCallView(tool));
|
|
115
|
+
const calls = tools.map((tool, index) => {
|
|
116
|
+
const call = first[index];
|
|
117
|
+
return call !== undefined && recoveredBy(first, index)
|
|
118
|
+
? toolCallView(tool, true)
|
|
119
|
+
: (call ?? toolCallView(tool));
|
|
120
|
+
});
|
|
95
121
|
const status = groupStatus(calls);
|
|
96
122
|
const active = [...calls].reverse().find((call) => call.status === "running");
|
|
97
123
|
return {
|
|
98
124
|
active,
|
|
99
125
|
calls,
|
|
100
126
|
durationMs: status === "running" ? undefined : groupDuration(tools),
|
|
101
|
-
failedCount: calls.filter((call) => call.status === "error").length,
|
|
127
|
+
failedCount: calls.filter((call) => call.status === "error" && call.recovered !== true).length,
|
|
102
128
|
id: `tools:${tools[0].id}`,
|
|
103
129
|
kind: "tool_group",
|
|
130
|
+
recoveredCount: calls.filter((call) => call.recovered === true).length,
|
|
104
131
|
status,
|
|
105
132
|
summary: calls.length === 1 && calls[0] !== undefined
|
|
106
133
|
? `${calls[0].verb} ${calls[0].label}`
|
|
@@ -156,9 +183,9 @@ export function toolGroupDefaultOpen(group) {
|
|
|
156
183
|
export function visibleToolCalls(group, open) {
|
|
157
184
|
return open ? group.calls : group.calls.slice(-3);
|
|
158
185
|
}
|
|
159
|
-
/** A failed call opens by default so its error is visible. */
|
|
186
|
+
/** A failed call opens by default so its error is visible; a recovered one stays compact. */
|
|
160
187
|
export function toolCallDefaultOpen(call) {
|
|
161
|
-
return call.status === "error";
|
|
188
|
+
return call.status === "error" && call.recovered !== true;
|
|
162
189
|
}
|
|
163
190
|
/** Whether a group or call is currently open. */
|
|
164
191
|
export function disclosureOpen(state, id, defaultOpen) {
|
package/dist/core/tool-view.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ToolItem } from "../store/types.js";
|
|
2
2
|
/** Shared tool status meaning, used by the browser and native presentations. */
|
|
3
|
-
export declare function toolStatusTone(status: ToolItem["status"]): "error" | "success" | "info" | "neutral";
|
|
3
|
+
export declare function toolStatusTone(status: ToolItem["status"], recovered?: boolean): "error" | "success" | "info" | "neutral";
|
|
4
4
|
/**
|
|
5
5
|
* Closed presentation vocabulary for one tool call. It is chosen from the typed
|
|
6
6
|
* tool name, never inferred from arguments or result text.
|
|
@@ -171,6 +171,8 @@ export type ToolCallView = Readonly<{
|
|
|
171
171
|
exitCode?: number | undefined;
|
|
172
172
|
/** The failure message, shown before the body, for failed calls. */
|
|
173
173
|
error?: string | undefined;
|
|
174
|
+
/** A failed call that a later completed call in its run recovered from. */
|
|
175
|
+
recovered?: boolean | undefined;
|
|
174
176
|
/** Expanded body sections, in display order. */
|
|
175
177
|
sections: readonly ToolCallSection[];
|
|
176
178
|
/** Replaceable output while the call runs. */
|
|
@@ -183,6 +185,6 @@ export declare function toolLiveLines(call: ToolCallView, open: boolean): readon
|
|
|
183
185
|
/** Items shown before "more" for excerpts, matches, and output. */
|
|
184
186
|
export declare const toolPreviewLineLimit = 12;
|
|
185
187
|
/** Build the renderer-neutral view of one call. */
|
|
186
|
-
export declare function toolCallView(item: ToolItem): ToolCallView;
|
|
188
|
+
export declare function toolCallView(item: ToolItem, recovered?: boolean): ToolCallView;
|
|
187
189
|
/** Compact duration: `340ms`, `1.2s`, `2m 5s`. */
|
|
188
190
|
export declare function formatToolDuration(milliseconds: number): string;
|
package/dist/core/tool-view.js
CHANGED
|
@@ -6,9 +6,9 @@ import stripAnsi from "strip-ansi";
|
|
|
6
6
|
import { reportFailure } from "../lib/failure.js";
|
|
7
7
|
import { sanitizeDisplayText } from "./display-text.js";
|
|
8
8
|
/** Shared tool status meaning, used by the browser and native presentations. */
|
|
9
|
-
export function toolStatusTone(status) {
|
|
9
|
+
export function toolStatusTone(status, recovered = false) {
|
|
10
10
|
if (status === "error")
|
|
11
|
-
return "error";
|
|
11
|
+
return recovered ? "neutral" : "error";
|
|
12
12
|
if (status === "unknown")
|
|
13
13
|
return "neutral";
|
|
14
14
|
return status === "running" ? "info" : "success";
|
|
@@ -137,6 +137,10 @@ const hitPattern = /^(.+?:\d+)[:-]\s?(.*)$/u;
|
|
|
137
137
|
function toolKind(name) {
|
|
138
138
|
return kindByName.get(name) ?? "other";
|
|
139
139
|
}
|
|
140
|
+
/** A label names the work, not the machine: `/home/name/` reads as `~/`. */
|
|
141
|
+
function hideHomePaths(text) {
|
|
142
|
+
return text.replace(/\/(?:home|Users)\/[^/\s"'`]+/gu, "~");
|
|
143
|
+
}
|
|
140
144
|
function firstLine(text) {
|
|
141
145
|
const line = text
|
|
142
146
|
.split("\n")
|
|
@@ -534,7 +538,7 @@ function callTarget(item, kind) {
|
|
|
534
538
|
},
|
|
535
539
|
];
|
|
536
540
|
},
|
|
537
|
-
label: firstLine(code.data.code),
|
|
541
|
+
label: firstLine(hideHomePaths(code.data.code)),
|
|
538
542
|
paths: [],
|
|
539
543
|
}
|
|
540
544
|
: untypedTarget(item);
|
|
@@ -579,7 +583,7 @@ function callTarget(item, kind) {
|
|
|
579
583
|
}
|
|
580
584
|
}
|
|
581
585
|
/** Build the renderer-neutral view of one call. */
|
|
582
|
-
export function toolCallView(item) {
|
|
586
|
+
export function toolCallView(item, recovered = false) {
|
|
583
587
|
const kind = toolKind(item.name);
|
|
584
588
|
const target = callTarget(item, kind);
|
|
585
589
|
const [verb, activeVerb] = verbs[kind];
|
|
@@ -599,13 +603,24 @@ export function toolCallView(item) {
|
|
|
599
603
|
const value = resultValue(item.result);
|
|
600
604
|
const body = resultBody(value, kind);
|
|
601
605
|
const failed = item.status === "error" || refused;
|
|
602
|
-
const
|
|
606
|
+
const failure = failed
|
|
603
607
|
? (body.failure ?? "The tool reported an error.")
|
|
604
608
|
: undefined;
|
|
609
|
+
// The failure line is the first line of the result text, shortened. When
|
|
610
|
+
// the result is that one line, show it once and in full.
|
|
611
|
+
const echoLine = (section) => {
|
|
612
|
+
if (section.kind === "text" && section.lines.length === 1)
|
|
613
|
+
return section.lines[0];
|
|
614
|
+
if (section.kind === "output" && section.lines.length === 1)
|
|
615
|
+
return section.lines[0]?.text;
|
|
616
|
+
return undefined;
|
|
617
|
+
};
|
|
618
|
+
const echo = failure === undefined
|
|
619
|
+
? undefined
|
|
620
|
+
: body.sections.find((section) => firstLine(echoLine(section) ?? "") === failure);
|
|
621
|
+
const error = echo === undefined ? failure : (echoLine(echo)?.trim() ?? failure);
|
|
605
622
|
const resultHasDiff = body.sections.some((section) => section.kind === "diff");
|
|
606
|
-
const resultSections = (kind === "edit" && !failed && !resultHasDiff ? [] : body.sections).filter((section) =>
|
|
607
|
-
section.lines.length === 1 &&
|
|
608
|
-
section.lines[0] === error));
|
|
623
|
+
const resultSections = (kind === "edit" && !failed && !resultHasDiff ? [] : body.sections).filter((section) => section !== echo);
|
|
609
624
|
details = {
|
|
610
625
|
error,
|
|
611
626
|
exitCode: body.exitCode,
|
|
@@ -634,6 +649,7 @@ export function toolCallView(item) {
|
|
|
634
649
|
name: item.name,
|
|
635
650
|
live: item.status === "running" ? item.live : undefined,
|
|
636
651
|
paths: target.paths,
|
|
652
|
+
recovered: failed && recovered,
|
|
637
653
|
get sections() {
|
|
638
654
|
return getDetails().sections;
|
|
639
655
|
},
|
package/dist/host-facts.d.ts
CHANGED
|
@@ -33,6 +33,8 @@ export type PlainModelFailure = Readonly<{
|
|
|
33
33
|
unreachable: boolean;
|
|
34
34
|
/** No model provider is connected: the fix is setup, not a retry. */
|
|
35
35
|
setup: boolean;
|
|
36
|
+
/** The saved choice cannot run Agent tools; changing models is the fix. */
|
|
37
|
+
toolsUnsupported: boolean;
|
|
36
38
|
message: string;
|
|
37
39
|
detail: string;
|
|
38
40
|
}>;
|
package/dist/host-facts.js
CHANGED
|
@@ -9,6 +9,7 @@ export function plainModelFailure(text) {
|
|
|
9
9
|
return {
|
|
10
10
|
unreachable: false,
|
|
11
11
|
setup: false,
|
|
12
|
+
toolsUnsupported: false,
|
|
12
13
|
message: "The run couldn’t finish",
|
|
13
14
|
detail: text,
|
|
14
15
|
};
|
|
@@ -19,19 +20,30 @@ export function plainModelFailure(text) {
|
|
|
19
20
|
return {
|
|
20
21
|
unreachable: false,
|
|
21
22
|
setup: true,
|
|
23
|
+
toolsUnsupported: false,
|
|
22
24
|
message: "No model is connected",
|
|
23
25
|
detail: text,
|
|
24
26
|
};
|
|
27
|
+
if (code === "tools_unsupported")
|
|
28
|
+
return {
|
|
29
|
+
unreachable: false,
|
|
30
|
+
setup: false,
|
|
31
|
+
toolsUnsupported: true,
|
|
32
|
+
message: "This model can’t use tools here. Pick one marked tools.",
|
|
33
|
+
detail: text,
|
|
34
|
+
};
|
|
25
35
|
return code === "provider_unavailable"
|
|
26
36
|
? {
|
|
27
37
|
unreachable: true,
|
|
28
38
|
setup: false,
|
|
39
|
+
toolsUnsupported: false,
|
|
29
40
|
message: "Couldn’t reach the model",
|
|
30
41
|
detail: text,
|
|
31
42
|
}
|
|
32
43
|
: {
|
|
33
44
|
unreachable: false,
|
|
34
45
|
setup: false,
|
|
46
|
+
toolsUnsupported: false,
|
|
35
47
|
message: "The model request failed",
|
|
36
48
|
detail: text,
|
|
37
49
|
};
|
package/dist/store/types.d.ts
CHANGED
|
@@ -126,8 +126,10 @@ export type ToolGroupItem = Readonly<{
|
|
|
126
126
|
calls: readonly ToolCallView[];
|
|
127
127
|
/** First call to last result, once no call is running. */
|
|
128
128
|
durationMs?: number | undefined;
|
|
129
|
-
/** Calls whose joined result reports an error. */
|
|
129
|
+
/** Calls whose joined result reports an error and were not followed by a completed call. */
|
|
130
130
|
failedCount: number;
|
|
131
|
+
/** Failed calls that a later completed call in the same run recovered from. */
|
|
132
|
+
recoveredCount: number;
|
|
131
133
|
/** Stable identity derived from the first call, kept as calls append. */
|
|
132
134
|
id: string;
|
|
133
135
|
/** Tool-group timeline discriminator. */
|
package/dist/styles.css
CHANGED
|
@@ -12332,7 +12332,7 @@
|
|
|
12332
12332
|
box-shadow: none;
|
|
12333
12333
|
}
|
|
12334
12334
|
}
|
|
12335
|
-
.caps-card {
|
|
12335
|
+
.caps-card, .empty-state-panel {
|
|
12336
12336
|
--caps-card-edge: var(--color-base-content);
|
|
12337
12337
|
@supports (color: color-mix(in lab, red, red)) {
|
|
12338
12338
|
--caps-card-edge: color-mix(
|
|
@@ -12349,6 +12349,8 @@
|
|
|
12349
12349
|
var(--color-base-content) calc(var(--depth) * 3%)
|
|
12350
12350
|
);
|
|
12351
12351
|
}
|
|
12352
|
+
}
|
|
12353
|
+
.caps-card {
|
|
12352
12354
|
background: var(--caps-card-resting-face);
|
|
12353
12355
|
background-image: var(--caps-card-image, none);
|
|
12354
12356
|
background-size: var(--caps-print-texture-size, auto);
|
|
@@ -12877,7 +12879,6 @@
|
|
|
12877
12879
|
.caps-card[data-state="empty"] {
|
|
12878
12880
|
--caps-card-edge: var(--caps-card-empty-edge, var(--color-base-300));
|
|
12879
12881
|
border-width: var(--caps-card-empty-width, var(--border));
|
|
12880
|
-
border-style: dashed;
|
|
12881
12882
|
background: var(--caps-card-empty-face, var(--caps-card-resting-face));
|
|
12882
12883
|
box-shadow: var(--caps-card-empty-shadow, var(--caps-card-resting-shadow));
|
|
12883
12884
|
}
|
|
@@ -16516,18 +16517,15 @@
|
|
|
16516
16517
|
justify-items: center;
|
|
16517
16518
|
gap: var(--spacing-xs);
|
|
16518
16519
|
padding: var(--spacing-xl) var(--spacing-lg);
|
|
16519
|
-
border: var(--border)
|
|
16520
|
-
@supports (color: color-mix(in lab, red, red)) {
|
|
16521
|
-
border: var(--border) dashed color-mix(in oklab, var(--color-base-content) 16%, transparent);
|
|
16522
|
-
}
|
|
16520
|
+
border: var(--border) solid var(--caps-card-edge);
|
|
16523
16521
|
border-radius: var(--radius-box);
|
|
16524
|
-
background: var(--
|
|
16525
|
-
@supports (color: color-mix(in lab, red, red)) {
|
|
16526
|
-
background: color-mix( in oklab, var(--color-base-content) calc(2% + var(--depth) * 2%), transparent );
|
|
16527
|
-
}
|
|
16528
|
-
box-shadow: var( --stipe-shadow-inset, inset 0 1px 2px rgb(0 0 0 / calc(var(--depth) * 0.06)) );
|
|
16522
|
+
background: var(--caps-card-resting-face);
|
|
16529
16523
|
text-align: center;
|
|
16530
16524
|
}
|
|
16525
|
+
.caps-card .empty-state-panel {
|
|
16526
|
+
border: 0;
|
|
16527
|
+
background: transparent;
|
|
16528
|
+
}
|
|
16531
16529
|
.empty-state-panel > .empty-state-visual {
|
|
16532
16530
|
display: grid;
|
|
16533
16531
|
min-width: 3.5rem;
|
package/docs/api/headless.md
CHANGED
|
@@ -2602,16 +2602,20 @@ Coarse activity for a view state: what the composer gates on.
|
|
|
2602
2602
|
### toolStatusTone()
|
|
2603
2603
|
|
|
2604
2604
|
```ts
|
|
2605
|
-
function toolStatusTone(
|
|
2605
|
+
function toolStatusTone(
|
|
2606
|
+
status,
|
|
2607
|
+
recovered?,
|
|
2608
|
+
): "error" | "success" | "info" | "neutral";
|
|
2606
2609
|
```
|
|
2607
2610
|
|
|
2608
2611
|
Shared tool status meaning, used by the browser and native presentations.
|
|
2609
2612
|
|
|
2610
2613
|
#### Parameters
|
|
2611
2614
|
|
|
2612
|
-
| Parameter
|
|
2613
|
-
|
|
|
2614
|
-
| `status`
|
|
2615
|
+
| Parameter | Type | Default value |
|
|
2616
|
+
| ----------- | -------------------------------------------------------- | ------------- |
|
|
2617
|
+
| `status` | `"error"` \| `"unknown"` \| `"running"` \| `"completed"` | `undefined` |
|
|
2618
|
+
| `recovered` | `boolean` | `false` |
|
|
2615
2619
|
|
|
2616
2620
|
#### Returns
|
|
2617
2621
|
|
|
@@ -2643,16 +2647,17 @@ readonly `string`[]
|
|
|
2643
2647
|
### toolCallView()
|
|
2644
2648
|
|
|
2645
2649
|
```ts
|
|
2646
|
-
function toolCallView(item): ParakeetToolCallView;
|
|
2650
|
+
function toolCallView(item, recovered?): ParakeetToolCallView;
|
|
2647
2651
|
```
|
|
2648
2652
|
|
|
2649
2653
|
Build the renderer-neutral view of one call.
|
|
2650
2654
|
|
|
2651
2655
|
#### Parameters
|
|
2652
2656
|
|
|
2653
|
-
| Parameter
|
|
2654
|
-
|
|
|
2655
|
-
| `item`
|
|
2657
|
+
| Parameter | Type | Default value |
|
|
2658
|
+
| ----------- | ----------------------------------------------- | ------------- |
|
|
2659
|
+
| `item` | [`ParakeetToolItem`](index.md#parakeettoolitem) | `undefined` |
|
|
2660
|
+
| `recovered` | `boolean` | `false` |
|
|
2656
2661
|
|
|
2657
2662
|
#### Returns
|
|
2658
2663
|
|
package/docs/api/index.md
CHANGED
|
@@ -522,6 +522,7 @@ type ParakeetToolCallView = Readonly<{
|
|
|
522
522
|
durationMs?: number;
|
|
523
523
|
exitCode?: number;
|
|
524
524
|
error?: string;
|
|
525
|
+
recovered?: boolean;
|
|
525
526
|
sections: readonly ParakeetToolCallSection[];
|
|
526
527
|
live?: ParakeetToolItem["live"];
|
|
527
528
|
}>;
|
|
@@ -894,6 +895,7 @@ type ParakeetToolGroupItem = Readonly<{
|
|
|
894
895
|
calls: readonly ParakeetToolCallView[];
|
|
895
896
|
durationMs?: number;
|
|
896
897
|
failedCount: number;
|
|
898
|
+
recoveredCount: number;
|
|
897
899
|
id: string;
|
|
898
900
|
kind: "tool_group";
|
|
899
901
|
status: "completed" | "error" | "running" | "unknown";
|
|
@@ -1360,6 +1362,7 @@ function visibleToolCalls(
|
|
|
1360
1362
|
durationMs?: number;
|
|
1361
1363
|
exitCode?: number;
|
|
1362
1364
|
error?: string;
|
|
1365
|
+
recovered?: boolean;
|
|
1363
1366
|
sections: readonly ParakeetToolCallSection[];
|
|
1364
1367
|
live?: Readonly<{
|
|
1365
1368
|
lines: readonly string[];
|
|
@@ -1384,10 +1387,11 @@ readonly `Readonly`\<\{ `id`: `string`; `kind`:
|
|
|
1384
1387
|
[`ParakeetToolKind`](#parakeettoolkind); `name`: `string`; `verb`: `string`;
|
|
1385
1388
|
`activeVerb`: `string`; `label`: `string`; `paths`: readonly `string`[];
|
|
1386
1389
|
`status`: `"error"` \| `"unknown"` \| `"running"` \| `"completed"`;
|
|
1387
|
-
`durationMs?`: `number`; `exitCode?`: `number`; `error?`: `string`;
|
|
1388
|
-
|
|
1389
|
-
`
|
|
1390
|
-
`
|
|
1390
|
+
`durationMs?`: `number`; `exitCode?`: `number`; `error?`: `string`;
|
|
1391
|
+
`recovered?`: `boolean`; `sections`: readonly
|
|
1392
|
+
[`ParakeetToolCallSection`](#parakeettoolcallsection)[]; `live?`: `Readonly`\<\{
|
|
1393
|
+
`lines`: readonly `string`[]; `droppedBytes`: `number`; `revision`: `number`;
|
|
1394
|
+
\}\>; \}\>[]
|
|
1391
1395
|
|
|
1392
1396
|
---
|
|
1393
1397
|
|
|
@@ -1397,7 +1401,8 @@ readonly [`ParakeetToolCallSection`](#parakeettoolcallsection)[]; `live?`:
|
|
|
1397
1401
|
function toolCallDefaultOpen(call): boolean;
|
|
1398
1402
|
```
|
|
1399
1403
|
|
|
1400
|
-
A failed call opens by default so its error is visible
|
|
1404
|
+
A failed call opens by default so its error is visible; a recovered one stays
|
|
1405
|
+
compact.
|
|
1401
1406
|
|
|
1402
1407
|
#### Parameters
|
|
1403
1408
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fungi.computer/parakeet",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.13",
|
|
4
4
|
"author": "Levi <levi@technomancy.dev>",
|
|
5
5
|
"private": false,
|
|
6
6
|
"description": "Standalone React composer for a typed Shiitake Session",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"@fungi.computer/agar": "0.9.1",
|
|
64
64
|
"@fungi.computer/bird-dog": "0.3.6",
|
|
65
65
|
"@fungi.computer/cairn": "0.1.0",
|
|
66
|
-
"@fungi.computer/caps": "0.10.
|
|
66
|
+
"@fungi.computer/caps": "0.10.6",
|
|
67
67
|
"@fungi.computer/gills": "0.3.0",
|
|
68
68
|
"@fungi.computer/knapsack": "0.4.9",
|
|
69
69
|
"@fungi.computer/shiitake": "0.13.0",
|