@locusgraph/loop 0.0.0-stage → 0.2.0
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/LICENSE +21 -0
- package/README.md +37 -2
- package/dist/agent/index.d.ts +5 -0
- package/dist/agent/index.js +5 -0
- package/dist/agent/pulse/gradient-label.d.ts +7 -0
- package/dist/agent/pulse/gradient-label.js +94 -0
- package/dist/agent/pulse/marks/bars-mark.d.ts +1 -0
- package/dist/agent/pulse/marks/bars-mark.js +51 -0
- package/dist/agent/pulse/marks/glyph-mark.d.ts +4 -0
- package/dist/agent/pulse/marks/glyph-mark.js +62 -0
- package/dist/agent/pulse/marks/locus-mark.d.ts +1 -0
- package/dist/agent/pulse/marks/locus-mark.js +73 -0
- package/dist/agent/pulse/marks/orb-mark.d.ts +1 -0
- package/dist/agent/pulse/marks/orb-mark.js +34 -0
- package/dist/agent/pulse/marks/spinner-mark.d.ts +1 -0
- package/dist/agent/pulse/marks/spinner-mark.js +32 -0
- package/dist/agent/pulse/pulse-tone.d.ts +1 -0
- package/dist/agent/pulse/pulse-tone.js +1 -0
- package/dist/agent/pulse/pulse.d.ts +12 -0
- package/dist/agent/pulse/pulse.js +166 -0
- package/dist/agent/pulse/use-loop-animation.d.ts +2 -0
- package/dist/agent/pulse/use-loop-animation.js +40 -0
- package/dist/agent/shared/status-dot.d.ts +1 -0
- package/dist/agent/shared/status-dot.js +1 -0
- package/dist/agent/steps/step-icon.d.ts +8 -0
- package/dist/agent/steps/step-icon.js +117 -0
- package/dist/agent/steps/steps.d.ts +7 -0
- package/dist/agent/steps/steps.js +249 -0
- package/dist/agent/thinking/thinking.d.ts +6 -0
- package/dist/agent/thinking/thinking.js +211 -0
- package/dist/agent/thinking/thought-duration.d.ts +2 -0
- package/dist/agent/thinking/thought-duration.js +11 -0
- package/dist/agent/tool/json-block.d.ts +5 -0
- package/dist/agent/tool/json-block.js +42 -0
- package/dist/agent/tool/tool-status.d.ts +6 -0
- package/dist/agent/tool/tool-status.js +59 -0
- package/dist/agent/tool/tool.d.ts +7 -0
- package/dist/agent/tool/tool.js +192 -0
- package/dist/approval/inbox/inbox-row.d.ts +12 -0
- package/dist/approval/inbox/inbox-row.js +328 -0
- package/dist/approval/inbox/inbox-selection.d.ts +6 -0
- package/dist/approval/inbox/inbox-selection.js +15 -0
- package/dist/approval/inbox/inbox.d.ts +12 -0
- package/dist/approval/inbox/inbox.js +258 -0
- package/dist/approval/inbox/virtual-inbox-list.d.ts +13 -0
- package/dist/approval/inbox/virtual-inbox-list.js +129 -0
- package/dist/approval/index.d.ts +9 -0
- package/dist/approval/index.js +8 -0
- package/dist/approval/memory/memory-choices.d.ts +10 -0
- package/dist/approval/memory/memory-choices.js +35 -0
- package/dist/approval/memory/memory-review.d.ts +11 -0
- package/dist/approval/memory/memory-review.js +256 -0
- package/dist/approval/memory/memory-row.d.ts +9 -0
- package/dist/approval/memory/memory-row.js +226 -0
- package/dist/approval/plan/plan-review.d.ts +13 -0
- package/dist/approval/plan/plan-review.js +289 -0
- package/dist/approval/plan/plan-step-row.d.ts +13 -0
- package/dist/approval/plan/plan-step-row.js +201 -0
- package/dist/approval/plan/plan-steps.d.ts +8 -0
- package/dist/approval/plan/plan-steps.js +30 -0
- package/dist/approval/plan/question-choices.d.ts +10 -0
- package/dist/approval/plan/question-choices.js +166 -0
- package/dist/approval/plan/question.d.ts +18 -0
- package/dist/approval/plan/question.js +232 -0
- package/dist/approval/run/run-bar.d.ts +13 -0
- package/dist/approval/run/run-bar.js +189 -0
- package/dist/approval/shared/decision-line.d.ts +1 -0
- package/dist/approval/shared/decision-line.js +1 -0
- package/dist/approval/shared/risk-badge.d.ts +10 -0
- package/dist/approval/shared/risk-badge.js +57 -0
- package/dist/approval/shared/time.d.ts +3 -0
- package/dist/approval/shared/time.js +12 -0
- package/dist/approval/shared/use-focus-on-mount.d.ts +2 -0
- package/dist/approval/shared/use-focus-on-mount.js +26 -0
- package/dist/approval/spend/raise-cap-form.d.ts +8 -0
- package/dist/approval/spend/raise-cap-form.js +244 -0
- package/dist/approval/spend/spend-gate.d.ts +16 -0
- package/dist/approval/spend/spend-gate.js +250 -0
- package/dist/approval/spend/spend-math.d.ts +5 -0
- package/dist/approval/spend/spend-math.js +17 -0
- package/dist/approval/spend/spend-meter.d.ts +10 -0
- package/dist/approval/spend/spend-meter.js +377 -0
- package/dist/approval/tool/approval.d.ts +14 -0
- package/dist/approval/tool/approval.js +290 -0
- package/dist/approval/tool/args/args-editor.d.ts +16 -0
- package/dist/approval/tool/args/args-editor.js +273 -0
- package/dist/approval/tool/args/args-field.d.ts +11 -0
- package/dist/approval/tool/args/args-field.js +268 -0
- package/dist/approval/tool/args/args-validation.d.ts +8 -0
- package/dist/approval/tool/args/args-validation.js +50 -0
- package/dist/approval/tool/deny-form.d.ts +6 -0
- package/dist/approval/tool/deny-form.js +135 -0
- package/dist/approval/tool/tool-inputs.d.ts +6 -0
- package/dist/approval/tool/tool-inputs.js +142 -0
- package/dist/approval/types.d.ts +59 -0
- package/dist/approval/types.js +1 -0
- package/dist/chat/chat/chat-item-spacing.d.ts +3 -0
- package/dist/chat/chat/chat-item-spacing.js +19 -0
- package/dist/chat/chat/chat.d.ts +8 -0
- package/dist/chat/chat/chat.js +187 -0
- package/dist/chat/chat/use-stick-to-bottom.d.ts +7 -0
- package/dist/chat/chat/use-stick-to-bottom.js +133 -0
- package/dist/chat/chat/virtual-chat-items.d.ts +8 -0
- package/dist/chat/chat/virtual-chat-items.js +153 -0
- package/dist/chat/composer/composer-actions.d.ts +15 -0
- package/dist/chat/composer/composer-actions.js +158 -0
- package/dist/chat/composer/composer.d.ts +20 -0
- package/dist/chat/composer/composer.js +340 -0
- package/dist/chat/composer/use-auto-grow.d.ts +2 -0
- package/dist/chat/composer/use-auto-grow.js +29 -0
- package/dist/chat/files/file-meta.d.ts +13 -0
- package/dist/chat/files/file-meta.js +30 -0
- package/dist/chat/files/files.d.ts +9 -0
- package/dist/chat/files/files.js +327 -0
- package/dist/chat/index.d.ts +7 -0
- package/dist/chat/index.js +7 -0
- package/dist/chat/reply/fenced-code.d.ts +8 -0
- package/dist/chat/reply/fenced-code.js +53 -0
- package/dist/chat/reply/markdown-components.d.ts +2 -0
- package/dist/chat/reply/markdown-components.js +142 -0
- package/dist/chat/reply/reply.d.ts +8 -0
- package/dist/chat/reply/reply.js +116 -0
- package/dist/chat/turn/group-parts.d.ts +24 -0
- package/dist/chat/turn/group-parts.js +49 -0
- package/dist/chat/turn/turn.d.ts +11 -0
- package/dist/chat/turn/turn.js +253 -0
- package/dist/cost/context.d.ts +13 -0
- package/dist/cost/context.js +333 -0
- package/dist/cost/cost-steps.d.ts +17 -0
- package/dist/cost/cost-steps.js +230 -0
- package/dist/cost/cost.d.ts +8 -0
- package/dist/cost/cost.js +531 -0
- package/dist/cost/index.d.ts +4 -0
- package/dist/cost/index.js +4 -0
- package/dist/cost/model-picker.d.ts +11 -0
- package/dist/cost/model-picker.js +184 -0
- package/dist/cost/shared/context-breakdown.d.ts +15 -0
- package/dist/cost/shared/context-breakdown.js +306 -0
- package/dist/cost/shared/meter-marks.d.ts +9 -0
- package/dist/cost/shared/meter-marks.js +114 -0
- package/dist/cost/shared/model-option-row.d.ts +14 -0
- package/dist/cost/shared/model-option-row.js +189 -0
- package/dist/cost/shared/step-cost-row.d.ts +15 -0
- package/dist/cost/shared/step-cost-row.js +262 -0
- package/dist/cost/shared/usage-totals.d.ts +11 -0
- package/dist/cost/shared/usage-totals.js +30 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +7 -0
- package/dist/memory/cite.d.ts +8 -0
- package/dist/memory/cite.js +190 -0
- package/dist/memory/index.d.ts +5 -0
- package/dist/memory/index.js +4 -0
- package/dist/memory/memorized.d.ts +14 -0
- package/dist/memory/memorized.js +225 -0
- package/dist/memory/recall.d.ts +9 -0
- package/dist/memory/recall.js +303 -0
- package/dist/memory/shared/disclosure.d.ts +6 -0
- package/dist/memory/shared/disclosure.js +6 -0
- package/dist/memory/shared/host-label.d.ts +6 -0
- package/dist/memory/shared/host-label.js +31 -0
- package/dist/memory/shared/source-mark.d.ts +5 -0
- package/dist/memory/shared/source-mark.js +42 -0
- package/dist/memory/sources.d.ts +9 -0
- package/dist/memory/sources.js +264 -0
- package/dist/shared/decision-summary.d.ts +18 -0
- package/dist/shared/decision-summary.js +144 -0
- package/dist/shared/panel-empty.d.ts +8 -0
- package/dist/shared/panel-empty.js +80 -0
- package/dist/shared/panel.d.ts +19 -0
- package/dist/shared/panel.js +251 -0
- package/dist/shared/status-dot.d.ts +6 -0
- package/dist/shared/status-dot.js +42 -0
- package/dist/shared/virtual/use-list-virtualizer.d.ts +24 -0
- package/dist/shared/virtual/use-list-virtualizer.js +68 -0
- package/dist/sources.css +1 -0
- package/dist/thread/actions/action-button.d.ts +8 -0
- package/dist/thread/actions/action-button.js +67 -0
- package/dist/thread/actions/actions.d.ts +13 -0
- package/dist/thread/actions/actions.js +192 -0
- package/dist/thread/actions/branch-switcher.d.ts +10 -0
- package/dist/thread/actions/branch-switcher.js +104 -0
- package/dist/thread/canvas/canvas.d.ts +14 -0
- package/dist/thread/canvas/canvas.js +212 -0
- package/dist/thread/canvas/version-switcher.d.ts +12 -0
- package/dist/thread/canvas/version-switcher.js +152 -0
- package/dist/thread/code/code.d.ts +10 -0
- package/dist/thread/code/code.js +195 -0
- package/dist/thread/code/copy-code-button.d.ts +6 -0
- package/dist/thread/code/copy-code-button.js +66 -0
- package/dist/thread/code/highlight.d.ts +1 -0
- package/dist/thread/code/highlight.js +40 -0
- package/dist/thread/history/history-rows.d.ts +16 -0
- package/dist/thread/history/history-rows.js +23 -0
- package/dist/thread/history/history.d.ts +16 -0
- package/dist/thread/history/history.js +179 -0
- package/dist/thread/history/row/history-row.d.ts +15 -0
- package/dist/thread/history/row/history-row.js +137 -0
- package/dist/thread/history/row/thread-item-menu.d.ts +7 -0
- package/dist/thread/history/row/thread-item-menu.js +84 -0
- package/dist/thread/history/row/thread-title-editor.d.ts +7 -0
- package/dist/thread/history/row/thread-title-editor.js +81 -0
- package/dist/thread/history/thread-groups.d.ts +8 -0
- package/dist/thread/history/thread-groups.js +52 -0
- package/dist/thread/history/virtual-history-list.d.ts +11 -0
- package/dist/thread/history/virtual-history-list.js +107 -0
- package/dist/thread/index.d.ts +8 -0
- package/dist/thread/index.js +5 -0
- package/dist/thread/starters/starters.d.ts +12 -0
- package/dist/thread/starters/starters.js +100 -0
- package/dist/thread/use-copied.d.ts +5 -0
- package/dist/thread/use-copied.js +52 -0
- package/dist/types.d.ts +70 -0
- package/dist/types.js +3 -0
- package/package.json +59 -3
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from "./actions/actions.js";
|
|
2
|
+
export type { MessageBranch } from "./actions/branch-switcher.js";
|
|
3
|
+
export * from "./canvas/canvas.js";
|
|
4
|
+
export type { CanvasVersion } from "./canvas/version-switcher.js";
|
|
5
|
+
export * from "./code/code.js";
|
|
6
|
+
export * from "./history/history.js";
|
|
7
|
+
export type { HistoryItem } from "./history/row/history-row.js";
|
|
8
|
+
export * from "./starters/starters.js";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ComponentProps } from "react";
|
|
2
|
+
export type Starter = string | {
|
|
3
|
+
text: string;
|
|
4
|
+
label?: string;
|
|
5
|
+
};
|
|
6
|
+
type StartersProps = Omit<ComponentProps<"div">, "onSelect"> & {
|
|
7
|
+
suggestions: Starter[];
|
|
8
|
+
onSelect: (text: string) => void;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
};
|
|
11
|
+
export declare function Starters({ suggestions, onSelect, disabled, className, ...props }: StartersProps): import("react").JSX.Element | null;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { c as _c } from "react/compiler-runtime";
|
|
2
|
+
import { ArrowUpRight as ArrowUpRightIcon } from "@carbon/icons-react";
|
|
3
|
+
import { cn } from "@locusgraph/components";
|
|
4
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
|
+
function textOf(suggestion) {
|
|
6
|
+
return typeof suggestion === "string" ? suggestion : suggestion.text;
|
|
7
|
+
}
|
|
8
|
+
function labelOf(suggestion) {
|
|
9
|
+
return typeof suggestion === "string" ? suggestion : suggestion.label ?? suggestion.text;
|
|
10
|
+
}
|
|
11
|
+
export function Starters(t0) {
|
|
12
|
+
const $ = _c(19);
|
|
13
|
+
let className;
|
|
14
|
+
let onSelect;
|
|
15
|
+
let props;
|
|
16
|
+
let suggestions;
|
|
17
|
+
let t1;
|
|
18
|
+
if ($[0] !== t0) {
|
|
19
|
+
({
|
|
20
|
+
suggestions,
|
|
21
|
+
onSelect,
|
|
22
|
+
disabled: t1,
|
|
23
|
+
className,
|
|
24
|
+
...props
|
|
25
|
+
} = t0);
|
|
26
|
+
$[0] = t0;
|
|
27
|
+
$[1] = className;
|
|
28
|
+
$[2] = onSelect;
|
|
29
|
+
$[3] = props;
|
|
30
|
+
$[4] = suggestions;
|
|
31
|
+
$[5] = t1;
|
|
32
|
+
} else {
|
|
33
|
+
className = $[1];
|
|
34
|
+
onSelect = $[2];
|
|
35
|
+
props = $[3];
|
|
36
|
+
suggestions = $[4];
|
|
37
|
+
t1 = $[5];
|
|
38
|
+
}
|
|
39
|
+
const disabled = t1 === undefined ? false : t1;
|
|
40
|
+
if (suggestions.length === 0) {
|
|
41
|
+
return null;
|
|
42
|
+
}
|
|
43
|
+
let t2;
|
|
44
|
+
if ($[6] !== className) {
|
|
45
|
+
t2 = cn("flex flex-col divide-y bg-card ring-1 ring-border", className);
|
|
46
|
+
$[6] = className;
|
|
47
|
+
$[7] = t2;
|
|
48
|
+
} else {
|
|
49
|
+
t2 = $[7];
|
|
50
|
+
}
|
|
51
|
+
let t3;
|
|
52
|
+
if ($[8] !== disabled || $[9] !== onSelect || $[10] !== suggestions) {
|
|
53
|
+
let t4;
|
|
54
|
+
if ($[12] !== disabled || $[13] !== onSelect) {
|
|
55
|
+
t4 = suggestion => /*#__PURE__*/_jsxs("button", {
|
|
56
|
+
type: "button",
|
|
57
|
+
disabled: disabled,
|
|
58
|
+
onClick: () => onSelect(textOf(suggestion)),
|
|
59
|
+
className: "group flex w-full items-center gap-3 px-3 py-2.5 text-left text-sm outline-none hover:bg-accent/50 focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 motion-safe:transition-colors",
|
|
60
|
+
children: [/*#__PURE__*/_jsx("span", {
|
|
61
|
+
className: "min-w-0 flex-1 text-pretty",
|
|
62
|
+
children: labelOf(suggestion)
|
|
63
|
+
}), /*#__PURE__*/_jsx(ArrowUpRightIcon, {
|
|
64
|
+
"aria-hidden": true,
|
|
65
|
+
className: "size-3.5 shrink-0 text-muted-foreground opacity-0 group-hover:opacity-100 group-focus-visible:opacity-100 motion-safe:transition-opacity"
|
|
66
|
+
})]
|
|
67
|
+
}, textOf(suggestion));
|
|
68
|
+
$[12] = disabled;
|
|
69
|
+
$[13] = onSelect;
|
|
70
|
+
$[14] = t4;
|
|
71
|
+
} else {
|
|
72
|
+
t4 = $[14];
|
|
73
|
+
}
|
|
74
|
+
t3 = suggestions.map(t4);
|
|
75
|
+
$[8] = disabled;
|
|
76
|
+
$[9] = onSelect;
|
|
77
|
+
$[10] = suggestions;
|
|
78
|
+
$[11] = t3;
|
|
79
|
+
} else {
|
|
80
|
+
t3 = $[11];
|
|
81
|
+
}
|
|
82
|
+
let t4;
|
|
83
|
+
if ($[15] !== props || $[16] !== t2 || $[17] !== t3) {
|
|
84
|
+
t4 = /*#__PURE__*/_jsx("div", {
|
|
85
|
+
"data-slot": "starters",
|
|
86
|
+
role: "group",
|
|
87
|
+
"aria-label": "Suggested prompts",
|
|
88
|
+
className: t2,
|
|
89
|
+
...props,
|
|
90
|
+
children: t3
|
|
91
|
+
});
|
|
92
|
+
$[15] = props;
|
|
93
|
+
$[16] = t2;
|
|
94
|
+
$[17] = t3;
|
|
95
|
+
$[18] = t4;
|
|
96
|
+
} else {
|
|
97
|
+
t4 = $[18];
|
|
98
|
+
}
|
|
99
|
+
return t4;
|
|
100
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { c as _c } from "react/compiler-runtime";
|
|
2
|
+
import { useEffect, useRef, useState } from "react";
|
|
3
|
+
const copiedDurationMs = 1500;
|
|
4
|
+
export function useCopied() {
|
|
5
|
+
const $ = _c(5);
|
|
6
|
+
const [copied, setCopied] = useState(false);
|
|
7
|
+
const timer = useRef(undefined);
|
|
8
|
+
let t0;
|
|
9
|
+
let t1;
|
|
10
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
11
|
+
t0 = () => () => clearTimeout(timer.current);
|
|
12
|
+
t1 = [];
|
|
13
|
+
$[0] = t0;
|
|
14
|
+
$[1] = t1;
|
|
15
|
+
} else {
|
|
16
|
+
t0 = $[0];
|
|
17
|
+
t1 = $[1];
|
|
18
|
+
}
|
|
19
|
+
useEffect(t0, t1);
|
|
20
|
+
let t2;
|
|
21
|
+
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
22
|
+
t2 = () => {
|
|
23
|
+
setCopied(true);
|
|
24
|
+
clearTimeout(timer.current);
|
|
25
|
+
timer.current = setTimeout(() => setCopied(false), copiedDurationMs);
|
|
26
|
+
};
|
|
27
|
+
$[2] = t2;
|
|
28
|
+
} else {
|
|
29
|
+
t2 = $[2];
|
|
30
|
+
}
|
|
31
|
+
const markCopied = t2;
|
|
32
|
+
let t3;
|
|
33
|
+
if ($[3] !== copied) {
|
|
34
|
+
t3 = {
|
|
35
|
+
copied,
|
|
36
|
+
markCopied
|
|
37
|
+
};
|
|
38
|
+
$[3] = copied;
|
|
39
|
+
$[4] = t3;
|
|
40
|
+
} else {
|
|
41
|
+
t3 = $[4];
|
|
42
|
+
}
|
|
43
|
+
return t3;
|
|
44
|
+
}
|
|
45
|
+
export async function writeToClipboard(text) {
|
|
46
|
+
try {
|
|
47
|
+
await navigator.clipboard.writeText(text);
|
|
48
|
+
return true;
|
|
49
|
+
} catch {
|
|
50
|
+
return false;
|
|
51
|
+
}
|
|
52
|
+
}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
export type AgentRole = "user" | "assistant" | "system";
|
|
2
|
+
export type StreamState = "streaming" | "done";
|
|
3
|
+
export type TextPart = {
|
|
4
|
+
type: "text";
|
|
5
|
+
text: string;
|
|
6
|
+
state?: StreamState;
|
|
7
|
+
};
|
|
8
|
+
export type ReasoningPart = {
|
|
9
|
+
type: "reasoning";
|
|
10
|
+
text: string;
|
|
11
|
+
state?: StreamState;
|
|
12
|
+
durationMs?: number;
|
|
13
|
+
};
|
|
14
|
+
export type ToolState = "input-streaming" | "input-available" | "approval-requested" | "approval-responded" | "output-available" | "output-error" | "output-denied";
|
|
15
|
+
export type ToolPart = {
|
|
16
|
+
type: `tool-${string}` | "dynamic-tool";
|
|
17
|
+
toolCallId: string;
|
|
18
|
+
toolName?: string;
|
|
19
|
+
state: ToolState;
|
|
20
|
+
input?: unknown;
|
|
21
|
+
output?: unknown;
|
|
22
|
+
errorText?: string;
|
|
23
|
+
};
|
|
24
|
+
export type SourceUrlPart = {
|
|
25
|
+
type: "source-url";
|
|
26
|
+
sourceId: string;
|
|
27
|
+
url: string;
|
|
28
|
+
title?: string;
|
|
29
|
+
};
|
|
30
|
+
export type FilePart = {
|
|
31
|
+
type: "file";
|
|
32
|
+
mediaType: string;
|
|
33
|
+
url: string;
|
|
34
|
+
filename?: string;
|
|
35
|
+
};
|
|
36
|
+
export type MessagePart = TextPart | ReasoningPart | ToolPart | SourceUrlPart | FilePart;
|
|
37
|
+
export type AgentMessage = {
|
|
38
|
+
id: string;
|
|
39
|
+
role: AgentRole;
|
|
40
|
+
parts: MessagePart[];
|
|
41
|
+
};
|
|
42
|
+
export type RiskLevel = "read" | "write" | "destructive";
|
|
43
|
+
export type StepStatus = "pending" | "running" | "done" | "failed" | "skipped";
|
|
44
|
+
export type AgentStep = {
|
|
45
|
+
id: string;
|
|
46
|
+
title: string;
|
|
47
|
+
status: StepStatus;
|
|
48
|
+
detail?: string;
|
|
49
|
+
};
|
|
50
|
+
export type Citation = {
|
|
51
|
+
index: number;
|
|
52
|
+
title: string;
|
|
53
|
+
url?: string;
|
|
54
|
+
snippet?: string;
|
|
55
|
+
};
|
|
56
|
+
export type MemoryRef = {
|
|
57
|
+
id: string;
|
|
58
|
+
label: string;
|
|
59
|
+
kind?: string;
|
|
60
|
+
relevance?: number;
|
|
61
|
+
snippet?: string;
|
|
62
|
+
};
|
|
63
|
+
export type RunUsage = {
|
|
64
|
+
inputTokens: number;
|
|
65
|
+
outputTokens: number;
|
|
66
|
+
costMicroUsd: number;
|
|
67
|
+
model?: string;
|
|
68
|
+
failed?: boolean;
|
|
69
|
+
};
|
|
70
|
+
export declare function toolNameOf(part: ToolPart): string;
|
package/dist/types.js
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,62 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@locusgraph/loop",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "Agent components for LocusGraph apps: chat, agent steps, human-in-the-loop approvals, memory and cost. Takes Vercel AI SDK UIMessage parts; never calls a model.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/locusgraph/design.git",
|
|
9
|
+
"directory": "packages/loop"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://design.locusgraph.com",
|
|
12
|
+
"type": "module",
|
|
13
|
+
"sideEffects": [
|
|
14
|
+
"**/*.css"
|
|
15
|
+
],
|
|
16
|
+
"files": [
|
|
17
|
+
"dist"
|
|
18
|
+
],
|
|
19
|
+
"exports": {
|
|
20
|
+
".": {
|
|
21
|
+
"types": "./dist/index.d.ts",
|
|
22
|
+
"default": "./dist/index.js"
|
|
23
|
+
},
|
|
24
|
+
"./sources.css": "./dist/sources.css"
|
|
25
|
+
},
|
|
26
|
+
"publishConfig": {
|
|
27
|
+
"registry": "https://registry.npmjs.org",
|
|
28
|
+
"access": "public",
|
|
29
|
+
"provenance": true
|
|
30
|
+
},
|
|
31
|
+
"peerDependencies": {
|
|
32
|
+
"@locusgraph/components": "^0.2.1",
|
|
33
|
+
"react": "^19.2.0",
|
|
34
|
+
"react-dom": "^19.2.0"
|
|
35
|
+
},
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"@carbon/icons-react": "11.89.0",
|
|
38
|
+
"@locusgraph/brand": "0.2.0",
|
|
39
|
+
"@locusgraph/utils": "0.1.1",
|
|
40
|
+
"@tanstack/react-virtual": "3.14.13",
|
|
41
|
+
"react-markdown": "^10.1.0",
|
|
42
|
+
"remark-gfm": "^4.0.1",
|
|
43
|
+
"shiki": "^4.5.0"
|
|
44
|
+
},
|
|
45
|
+
"devDependencies": {
|
|
46
|
+
"@locusgraph/components": "0.2.1",
|
|
47
|
+
"@locusgraph/config": "0.1.1",
|
|
48
|
+
"@types/node": "^22.0.0",
|
|
49
|
+
"@types/react": "^19.2.0",
|
|
50
|
+
"@types/react-dom": "^19.2.0",
|
|
51
|
+
"happy-dom": "20.14.5",
|
|
52
|
+
"react": "19.2.8",
|
|
53
|
+
"react-dom": "19.2.8",
|
|
54
|
+
"typescript": "^7.0.2",
|
|
55
|
+
"vitest": "^5.0.3"
|
|
56
|
+
},
|
|
57
|
+
"scripts": {
|
|
58
|
+
"build": "rm -rf dist && tsc -p tsconfig.build.json && cp src/sources.css dist/sources.css && node ../../scripts/react-compiler.mjs dist && node ../../scripts/esm-extensions.mjs dist",
|
|
59
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
60
|
+
"test": "vitest run"
|
|
61
|
+
}
|
|
6
62
|
}
|