@arkitektio/bsx 4.1.0 → 4.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/dist/ports/dependencies/DependenciesContainer.d.ts +13 -8
- package/dist/ports/dependencies/DependenciesContainer.d.ts.map +1 -1
- package/dist/ports/dependencies/DependenciesContainer.js +130 -118
- package/dist/ports/dependencies/DependenciesContainer.js.map +1 -1
- package/dist/ports/dependencies/DependencyTreeNotice.d.ts +3 -2
- package/dist/ports/dependencies/DependencyTreeNotice.d.ts.map +1 -1
- package/dist/ports/dependencies/DependencyTreeNotice.js +7 -6
- package/dist/ports/dependencies/DependencyTreeNotice.js.map +1 -1
- package/dist/ports/dependencies/tree.d.ts +24 -0
- package/dist/ports/dependencies/tree.d.ts.map +1 -1
- package/dist/ports/dependencies/tree.js +52 -0
- package/dist/ports/dependencies/tree.js.map +1 -1
- package/dist/ports/dependencies/useDependencyTree.d.ts +5 -0
- package/dist/ports/dependencies/useDependencyTree.d.ts.map +1 -1
- package/dist/ports/dependencies/useDependencyTree.js +11 -5
- package/dist/ports/dependencies/useDependencyTree.js.map +1 -1
- package/package.json +1 -1
- package/src/ports/dependencies/DependenciesContainer.test.tsx +176 -0
- package/src/ports/dependencies/DependenciesContainer.tsx +341 -304
- package/src/ports/dependencies/DependencyTreeNotice.tsx +7 -15
- package/src/ports/dependencies/tree.test.ts +75 -0
- package/src/ports/dependencies/tree.ts +54 -0
- package/src/ports/dependencies/useDependencyTree.test.tsx +55 -0
- package/src/ports/dependencies/useDependencyTree.ts +11 -5
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
import { portHash } from "../engine/utils";
|
|
2
1
|
import type { ListDependencyFragment } from "../rekuest";
|
|
3
2
|
import { type DependencyNode, type ResolvedDependencyInput } from "./tree";
|
|
4
|
-
import type { ArgPort, PortGroup } from "../engine/types";
|
|
5
|
-
export type FilledGroup = PortGroup & {
|
|
6
|
-
filledPorts: ArgPort[];
|
|
7
|
-
};
|
|
8
|
-
export { portHash };
|
|
9
|
-
export declare const NanaContainer: () => import("react").JSX.Element;
|
|
10
3
|
/** Whose dependency the id names: an implementation's, or a blok's. */
|
|
11
4
|
export type DependencyOwner = "implementation" | "blok";
|
|
12
5
|
export type DependencyFieldProps = {
|
|
@@ -20,6 +13,12 @@ export type DependencyFieldProps = {
|
|
|
20
13
|
/** The form's own complaint about this pin. */
|
|
21
14
|
error?: string;
|
|
22
15
|
};
|
|
16
|
+
/**
|
|
17
|
+
* One dependency on one line: what it is called, and what will serve it. The
|
|
18
|
+
* line is the picker's trigger: "Automatic" (whoever fits when it runs) or the
|
|
19
|
+
* agents pinned by name. What the agents it reaches need themselves follows
|
|
20
|
+
* below, folded until something there is pinned or unmet.
|
|
21
|
+
*/
|
|
23
22
|
export declare const DependencySearchField: ({ dependency, owner, pin, onPin, node, error: fieldError, }: DependencyFieldProps) => import("react").JSX.Element;
|
|
24
23
|
export type DependencyContainerProps = {
|
|
25
24
|
dependencies: ListDependencyFragment[];
|
|
@@ -28,5 +27,11 @@ export type DependencyContainerProps = {
|
|
|
28
27
|
/** The assign's dry run (`useDependencyTree`): without it only the root level shows. */
|
|
29
28
|
tree?: DependencyNode[] | null;
|
|
30
29
|
};
|
|
31
|
-
|
|
30
|
+
/**
|
|
31
|
+
* "Runs with": the agents a run reaches besides its own. One line while they
|
|
32
|
+
* resolve by themselves, which is most runs; it opens to one line per
|
|
33
|
+
* dependency when something is pinned, unmet or waiting to be picked, or when
|
|
34
|
+
* asked. Once open it stays open.
|
|
35
|
+
*/
|
|
36
|
+
export declare const DependenciesContainer: ({ dependencies, owner, tree, }: DependencyContainerProps) => import("react").JSX.Element | null;
|
|
32
37
|
//# sourceMappingURL=DependenciesContainer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DependenciesContainer.d.ts","sourceRoot":"","sources":["../../../src/ports/dependencies/DependenciesContainer.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DependenciesContainer.d.ts","sourceRoot":"","sources":["../../../src/ports/dependencies/DependenciesContainer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AACzD,OAAO,EAaL,KAAK,cAAc,EACnB,KAAK,uBAAuB,EAC7B,MAAM,QAAQ,CAAC;AAyChB,uEAAuE;AACvE,MAAM,MAAM,eAAe,GAAG,gBAAgB,GAAG,MAAM,CAAC;AAExD,MAAM,MAAM,oBAAoB,GAAG;IACjC,UAAU,EAAE,sBAAsB,CAAC;IACnC,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,yDAAyD;IACzD,GAAG,EAAE,uBAAuB,GAAG,SAAS,CAAC;IACzC,KAAK,EAAE,CAAC,GAAG,EAAE,uBAAuB,GAAG,SAAS,KAAK,IAAI,CAAC;IAC1D,oFAAoF;IACpF,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,+CAA+C;IAC/C,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AA0BF;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,GAAI,6DAOnC,oBAAoB,gCAqQtB,CAAC;AA+FF,MAAM,MAAM,wBAAwB,GAAG;IACrC,YAAY,EAAE,sBAAsB,EAAE,CAAC;IACvC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,wFAAwF;IACxF,IAAI,CAAC,EAAE,cAAc,EAAE,GAAG,IAAI,CAAC;CAChC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,GAAI,gCAInC,wBAAwB,uCA+E1B,CAAC"}
|
|
@@ -1,19 +1,13 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { portHash } from "../engine/utils.js";
|
|
3
2
|
import { portHost } from "../host.js";
|
|
4
|
-
import { levelBelow, withLevelBelow, withPin, } from "./tree.js";
|
|
5
|
-
import { Command,
|
|
6
|
-
import {
|
|
7
|
-
import { cn } from "../../vendor/core/util/utils.js";
|
|
8
|
-
import { Bot, CheckIcon, ChevronRight, Circle, SearchIcon, X, Zap } from "lucide-react";
|
|
9
|
-
import { useEffect, useMemo, useRef, useState } from "react";
|
|
10
|
-
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "../../vendor/core/ui/collapsible.js";
|
|
3
|
+
import { agentLabel, agentsOf, awaitsPick, levelBelow, namesAgents, pickHint, pickLimits, unmetDependencies, withLevelBelow, withPin, } from "./tree.js";
|
|
4
|
+
import { Command, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, } from "../../vendor/core/ui/command.js";
|
|
5
|
+
import { Popover, PopoverContent, PopoverTrigger } from "../../vendor/core/ui/popover.js";
|
|
11
6
|
import { useDebouncedCallback } from "../../vendor/core/util/hooks/useDebouncedCallback.js";
|
|
7
|
+
import { cn } from "../../vendor/core/util/utils.js";
|
|
8
|
+
import { AlertCircle, ChevronRight, ChevronsUpDown, CircleSlash, Zap } from "lucide-react";
|
|
9
|
+
import { useEffect, useId, useMemo, useRef, useState } from "react";
|
|
12
10
|
import { useFormContext, useWatch } from "react-hook-form";
|
|
13
|
-
import { Badge } from "../../vendor/core/ui/badge.js";
|
|
14
|
-
import { Button } from "../../vendor/core/ui/button.js";
|
|
15
|
-
import { FormDescription, FormLabel } from "../../vendor/core/ui/form.js";
|
|
16
|
-
import { InputGroup, InputGroupAddon } from "../../vendor/core/ui/input-group.js";
|
|
17
11
|
/**
|
|
18
12
|
* What can bind a dependency. `dependency` narrows to an implementation's, `blokDependency` to a
|
|
19
13
|
* blok's, `values` resolves ones already picked. As text: it goes through the host's service query.
|
|
@@ -33,20 +27,27 @@ query AgentForDependency($search: String, $values: [ID!], $dependency: ID, $blok
|
|
|
33
27
|
}
|
|
34
28
|
}
|
|
35
29
|
`;
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
30
|
+
/** How many agents the closed field names before it counts the rest. */
|
|
31
|
+
const SHOWN_AGENTS = 3;
|
|
32
|
+
const PresenceDot = ({ connected }) => (_jsx("span", { "aria-label": connected ? "Connected" : "Offline", className: cn("size-2 shrink-0 rounded-full", connected ? "bg-green-500" : "bg-muted-foreground/40") }));
|
|
33
|
+
/** Agents on one line: a presence dot and a name each, the rest counted. */
|
|
34
|
+
const AgentNames = ({ agents, className }) => (_jsxs("span", { className: cn("flex min-w-0 items-center gap-2.5", className), children: [agents.slice(0, SHOWN_AGENTS).map(({ id, agent }) => (_jsxs("span", { className: "flex min-w-0 items-center gap-1.5", children: [_jsx(PresenceDot, { connected: agent?.connected }), _jsx("span", { className: "truncate", children: agentLabel(agent, id) })] }, id))), agents.length > SHOWN_AGENTS && (_jsxs("span", { className: "shrink-0 text-muted-foreground", children: ["+", agents.length - SHOWN_AGENTS] }))] }));
|
|
35
|
+
/**
|
|
36
|
+
* One dependency on one line: what it is called, and what will serve it. The
|
|
37
|
+
* line is the picker's trigger: "Automatic" (whoever fits when it runs) or the
|
|
38
|
+
* agents pinned by name. What the agents it reaches need themselves follows
|
|
39
|
+
* below, folded until something there is pinned or unmet.
|
|
40
|
+
*/
|
|
43
41
|
export const DependencySearchField = ({ dependency, owner = "implementation", pin, onPin, node, error: fieldError, }) => {
|
|
44
42
|
const [agents, setAgents] = useState([]);
|
|
45
43
|
const [agentCache, setAgentCache] = useState({});
|
|
46
|
-
const [
|
|
47
|
-
const
|
|
44
|
+
const [loaded, setLoaded] = useState(false);
|
|
45
|
+
const [failed, setFailed] = useState(false);
|
|
48
46
|
const [open, setOpen] = useState(false);
|
|
49
47
|
const [inputValue, setInputValue] = useState("");
|
|
48
|
+
const labelId = useId();
|
|
49
|
+
// A late answer to an earlier search must not replace a newer one.
|
|
50
|
+
const requestRef = useRef(0);
|
|
50
51
|
const host = portHost();
|
|
51
52
|
const { StructureDisplay } = host;
|
|
52
53
|
const run = host.useServiceQuery("rekuest");
|
|
@@ -54,58 +55,40 @@ export const DependencySearchField = ({ dependency, owner = "implementation", pi
|
|
|
54
55
|
const dependencyFilter = owner === "blok" ? { blokDependency: dependency.id } : { dependency: dependency.id };
|
|
55
56
|
// The pin is the selection: it lives in the form, at this level.
|
|
56
57
|
const selectedIds = useMemo(() => pin?.mappedAgents.map((mapped) => mapped.agent) ?? [], [pin]);
|
|
57
|
-
const
|
|
58
|
-
const
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
key: dependency.key,
|
|
66
|
-
autoResolve: autoResolve,
|
|
67
|
-
// An agent that stays keeps what is pinned below it.
|
|
68
|
-
mappedAgents: agentIds.map((id) => pin?.mappedAgents.find((mapped) => mapped.agent === id) ?? { agent: id, key: dependency.key }),
|
|
69
|
-
});
|
|
70
|
-
};
|
|
71
|
-
const toggleAutoResolve = () => {
|
|
72
|
-
onPin({
|
|
73
|
-
key: dependency.key,
|
|
74
|
-
autoResolve: !autoResolve,
|
|
75
|
-
mappedAgents: pin?.mappedAgents ?? [],
|
|
76
|
-
});
|
|
77
|
-
};
|
|
78
|
-
const queryAgents = useDebouncedCallback((searchStr) => {
|
|
79
|
-
if (!dependency.id)
|
|
58
|
+
const pinned = selectedIds.length > 0;
|
|
59
|
+
const automatic = !pinned && (pin?.autoResolve ?? false);
|
|
60
|
+
const { max } = pickLimits(dependency);
|
|
61
|
+
const single = max === 1;
|
|
62
|
+
const remember = (found) => setAgentCache((known) => ({ ...known, ...Object.fromEntries(found.map((agent) => [agent.id, agent])) }));
|
|
63
|
+
const load = (term) => {
|
|
64
|
+
if (!dependency.id) {
|
|
65
|
+
setLoaded(true);
|
|
80
66
|
return;
|
|
81
|
-
|
|
67
|
+
}
|
|
68
|
+
const request = ++requestRef.current;
|
|
69
|
+
search({ search: term, ...dependencyFilter })
|
|
82
70
|
.then((found) => {
|
|
71
|
+
if (requestRef.current !== request)
|
|
72
|
+
return;
|
|
83
73
|
setAgents(found);
|
|
84
74
|
remember(found);
|
|
85
|
-
|
|
86
|
-
setError(null);
|
|
75
|
+
setFailed(false);
|
|
87
76
|
})
|
|
88
|
-
.catch((
|
|
89
|
-
|
|
77
|
+
.catch(() => {
|
|
78
|
+
if (requestRef.current !== request)
|
|
79
|
+
return;
|
|
90
80
|
setAgents([]);
|
|
91
|
-
|
|
92
|
-
});
|
|
93
|
-
// Load initial options
|
|
94
|
-
useEffect(() => {
|
|
95
|
-
if (!dependency.id)
|
|
96
|
-
return;
|
|
97
|
-
search({ search: "", ...dependencyFilter })
|
|
98
|
-
.then((found) => {
|
|
99
|
-
setAgents(found);
|
|
100
|
-
remember(found);
|
|
101
|
-
setError(null);
|
|
81
|
+
setFailed(true);
|
|
102
82
|
})
|
|
103
|
-
.
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
83
|
+
.finally(() => requestRef.current === request && setLoaded(true));
|
|
84
|
+
};
|
|
85
|
+
const query = useDebouncedCallback(load);
|
|
86
|
+
// Asked when the list is opened, not when the form mounts: most runs never open it.
|
|
87
|
+
useEffect(() => {
|
|
88
|
+
if (open)
|
|
89
|
+
load(inputValue);
|
|
107
90
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
108
|
-
}, [dependency.id]);
|
|
91
|
+
}, [open, dependency.id]);
|
|
109
92
|
// The agents the dry run bound are known without asking.
|
|
110
93
|
const boundAgents = useMemo(() => {
|
|
111
94
|
const bound = {};
|
|
@@ -125,60 +108,69 @@ export const DependencySearchField = ({ dependency, owner = "implementation", pi
|
|
|
125
108
|
.catch(() => { });
|
|
126
109
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
127
110
|
}, [unknown]);
|
|
128
|
-
const
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
111
|
+
const pinAgents = (agentIds) => {
|
|
112
|
+
// Nobody named: back to "whoever fits", where the dependency allows it.
|
|
113
|
+
if (agentIds.length === 0) {
|
|
114
|
+
onPin(dependency.autoResolvable ? { key: dependency.key, autoResolve: true, mappedAgents: [] } : undefined);
|
|
115
|
+
return;
|
|
133
116
|
}
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
117
|
+
onPin({
|
|
118
|
+
key: dependency.key,
|
|
119
|
+
autoResolve: false,
|
|
120
|
+
// An agent that stays keeps what is pinned below it.
|
|
121
|
+
mappedAgents: agentIds.map((id) => pin?.mappedAgents.find((mapped) => mapped.agent === id) ?? { agent: id, key: dependency.key }),
|
|
122
|
+
});
|
|
123
|
+
};
|
|
124
|
+
const toggleAgent = (agentId) => {
|
|
125
|
+
if (single) {
|
|
126
|
+
pinAgents(selectedIds.includes(agentId) ? [] : [agentId]);
|
|
127
|
+
setOpen(false);
|
|
128
|
+
return;
|
|
140
129
|
}
|
|
141
|
-
|
|
142
|
-
|
|
130
|
+
pinAgents(selectedIds.includes(agentId) ? selectedIds.filter((id) => id !== agentId) : [...selectedIds, agentId]);
|
|
131
|
+
};
|
|
132
|
+
const chooseAutomatic = () => {
|
|
133
|
+
onPin({ key: dependency.key, autoResolve: true, mappedAgents: [] });
|
|
134
|
+
setOpen(false);
|
|
143
135
|
};
|
|
144
|
-
const
|
|
145
|
-
|
|
136
|
+
const chooseNone = () => {
|
|
137
|
+
onPin(undefined);
|
|
138
|
+
setOpen(false);
|
|
146
139
|
};
|
|
147
|
-
//
|
|
148
|
-
const
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
140
|
+
// What an assign reaches: the agents named, else what the dry run resolved by itself.
|
|
141
|
+
const named = selectedIds.map((id) => ({ id, agent: agentCache[id] ?? boundAgents[id] }));
|
|
142
|
+
const resolved = pinned
|
|
143
|
+
? []
|
|
144
|
+
: (node?.mappedAgents ?? []).map((binding) => ({ id: binding.agentId, agent: binding.agent }));
|
|
145
|
+
const complaint = fieldError || node?.unmet || undefined;
|
|
146
|
+
const hint = pickHint(dependency);
|
|
147
|
+
const only = [dependency.appFilter, dependency.versionFilter].filter(Boolean).join(" ");
|
|
148
|
+
const full = !single && selectedIds.length >= max;
|
|
149
|
+
return (_jsxs("div", { className: "grid grid-cols-[minmax(0,11rem)_minmax(0,1fr)] items-start gap-x-3 gap-y-1.5", children: [_jsxs("div", { className: "flex min-h-8 min-w-0 flex-col justify-center", children: [_jsxs("span", { id: labelId, className: "flex min-w-0 items-baseline gap-1.5 text-sm", children: [_jsx("span", { className: "truncate font-medium", children: dependency.key }), dependency.optional && _jsx("span", { className: "shrink-0 text-xs text-muted-foreground", children: "optional" })] }), dependency.description && (_jsx("span", { className: "line-clamp-2 text-xs text-muted-foreground", title: dependency.description, children: dependency.description }))] }), _jsxs("div", { className: "flex min-w-0 flex-col gap-1", children: [_jsxs(Popover, { open: open, onOpenChange: setOpen, children: [_jsx(PopoverTrigger, { asChild: true, children: _jsxs("button", { type: "button", "aria-labelledby": labelId, "aria-invalid": complaint ? true : undefined, className: cn("flex h-8 w-full items-center gap-2 rounded-md border border-input bg-transparent px-2.5 text-left text-xs ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2", complaint && "border-destructive/60"), children: [pinned ? (_jsx(AgentNames, { agents: named, className: "flex-1" })) : resolved.length > 0 ? (_jsxs(_Fragment, { children: [_jsx(Zap, { "aria-label": "Chosen automatically", className: "size-3.5 shrink-0 text-muted-foreground" }), _jsx(AgentNames, { agents: resolved, className: "flex-1" })] })) : automatic ? (_jsxs(_Fragment, { children: [_jsx(Zap, { className: "size-3.5 shrink-0 text-muted-foreground" }), _jsx("span", { className: "flex-1 truncate", children: "Automatic" })] })) : (_jsx("span", { className: "flex-1 truncate text-muted-foreground", children: dependency.optional ? "None" : single ? "Pick an agent…" : "Pick agents…" })), _jsx(ChevronsUpDown, { className: "size-3.5 shrink-0 text-muted-foreground" })] }) }), _jsx(PopoverContent, { side: "bottom", align: "start", className: "w-[max(var(--radix-popover-trigger-width),20rem)] p-0", children: _jsxs(Command, { shouldFilter: false, className: "bg-transparent", children: [_jsx(CommandInput, { placeholder: "Search agents\u2026", value: inputValue, onValueChange: (term) => {
|
|
150
|
+
setInputValue(term);
|
|
151
|
+
query(term);
|
|
152
|
+
} }), (hint || only) && (_jsx("div", { className: "px-3.5 pt-2 text-[11px] text-muted-foreground", children: [hint, only && `only ${only}`].filter(Boolean).join(" · ") })), _jsxs(CommandList, { children: [(dependency.autoResolvable || dependency.optional) && (_jsxs(_Fragment, { children: [_jsxs(CommandGroup, { children: [dependency.autoResolvable && (_jsxs(CommandItem, { value: "__automatic", "data-checked": automatic, onSelect: chooseAutomatic, children: [_jsx(Zap, { className: "text-muted-foreground" }), _jsxs("span", { className: "flex min-w-0 flex-col", children: [_jsx("span", { children: "Automatic" }), _jsx("span", { className: "text-[11px] text-muted-foreground", children: "Whoever fits when it runs" })] })] })), dependency.optional && (_jsxs(CommandItem, { value: "__none", "data-checked": !pinned && !automatic, onSelect: chooseNone, children: [_jsx(CircleSlash, { className: "text-muted-foreground" }), _jsx("span", { children: "None" })] }))] }), _jsx(CommandSeparator, {})] })), failed && (_jsxs("div", { className: "flex items-center gap-2 px-3.5 py-3 text-xs text-destructive", children: [_jsx(AlertCircle, { className: "size-3.5 shrink-0" }), "The agents could not be loaded."] })), loaded && !failed && agents.length === 0 && (_jsx("div", { className: "px-3.5 py-4 text-center text-xs text-muted-foreground", children: inputValue ? `No agent matches “${inputValue}”.` : "No agent provides this." })), agents.length > 0 && (_jsx(CommandGroup, { heading: full ? `Agents · ${max} picked, unpick one to change` : "Agents", children: agents.map((agent) => {
|
|
153
|
+
const isSelected = selectedIds.includes(agent.id);
|
|
154
|
+
return (_jsxs(CommandItem, { value: agent.id, "data-checked": isSelected, disabled: full && !isSelected, onSelect: () => toggleAgent(agent.id), children: [_jsx(PresenceDot, { connected: agent.connected }), _jsxs("span", { className: "flex min-w-0 flex-1 flex-col", children: [_jsx("span", { className: "truncate", children: agentLabel(agent, agent.id) }), _jsxs("span", { className: "truncate text-[11px] text-muted-foreground", children: [agent.app.identifier, " \u00B7 ", agent.release.version, !agent.connected && " · offline"] })] }), _jsx(StructureDisplay, { identifier: "@lok/user", id: agent.user.sub, variant: "avatar", className: "size-5" })] }, agent.id));
|
|
155
|
+
}) }))] })] }) })] }), complaint && _jsx("p", { className: "text-xs text-destructive", children: complaint })] }), node?.mappedAgents.map((binding) => (_jsx(LevelBelow, { binding: binding, pins: pin?.mappedAgents.find((mapped) => mapped.agent === binding.agentId)?.dependencies ?? NO_PINS, onChange: (next) => onPin(withLevelBelow(pin, node, binding.agentId, next)) }, binding.agentId)))] }));
|
|
156
|
+
};
|
|
157
|
+
const NO_PINS = [];
|
|
158
|
+
/**
|
|
159
|
+
* What one bound agent needs itself: a line naming it, the level under it.
|
|
160
|
+
* Folded while it takes care of itself; open once something below is pinned
|
|
161
|
+
* or unmet, and it then stays open.
|
|
162
|
+
*/
|
|
163
|
+
const LevelBelow = ({ binding, pins, onChange, }) => {
|
|
164
|
+
const below = useMemo(() => levelBelow(binding), [binding]);
|
|
165
|
+
const needsLook = namesAgents(pins) || unmetDependencies(below).length > 0;
|
|
166
|
+
const [open, setOpen] = useState(needsLook);
|
|
167
|
+
useEffect(() => {
|
|
168
|
+
if (needsLook)
|
|
169
|
+
setOpen(true);
|
|
170
|
+
}, [needsLook]);
|
|
171
|
+
if (below.length === 0)
|
|
159
172
|
return null;
|
|
160
|
-
})();
|
|
161
|
-
// What resolved without a pin: shown, so it is clear what an assign reaches.
|
|
162
|
-
const resolvedByItself = selectedIds.length === 0 ? (node?.mappedAgents ?? []) : [];
|
|
163
|
-
return (_jsxs("div", { className: "flex flex-col gap-1.5", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsxs("div", { className: "flex items-center gap-2", children: [dependency.key != null && (_jsx(FormLabel, { className: "text-sm", children: dependency.key })), dependency.optional && (_jsx("span", { className: "text-[10px] text-muted-foreground", children: "optional" })), countHint && (_jsxs("span", { className: "text-[10px] text-muted-foreground", children: ["(", selectedIds.length, autoResolve ? "+auto" : "", " / ", countHint, ")"] })), !countHint && selectedIds.length > 0 && (_jsxs("span", { className: "text-[10px] text-muted-foreground", children: ["(", selectedIds.length, " selected", autoResolve ? " +auto" : "", ")"] }))] }), dependency.autoResolvable && (_jsxs(Button, { type: "button", variant: autoResolve ? "default" : "outline", size: "sm", className: "h-6 text-[10px] px-2 gap-1", onClick: toggleAutoResolve, children: [_jsx(Zap, { className: cn("h-3 w-3", autoResolve && "text-yellow-300") }), autoResolve ? "Auto" : "Auto-resolve"] }))] }), !autoResolve && (_jsxs(Command, { shouldFilter: false, className: "overflow-visible bg-transparent relative w-full", children: [_jsx("div", { className: "rounded-md text-sm ring-offset-background focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2 flex flex-row w-full", children: _jsx("div", { className: "relative w-full", children: _jsx(CommandInputWithBadges, { ref: inputRef, placeholder: "Search for an agent...", onValueChange: (e) => {
|
|
164
|
-
setInputValue(e);
|
|
165
|
-
queryAgents(e);
|
|
166
|
-
}, value: inputValue, onBlur: () => setOpen(false), onFocus: () => setOpen(true), className: "w-full flex-grow", children: _jsx(_Fragment, { children: selectedIds.map((id) => {
|
|
167
|
-
const agent = agentCache[id] ?? boundAgents[id];
|
|
168
|
-
return (_jsxs(Badge, { variant: "secondary", className: "cursor-pointer text-[10px] px-1.5 py-0 h-5 flex-shrink-0 gap-1", onClick: () => removeAgent(id), children: [agent ? (_jsxs(_Fragment, { children: [_jsx(Circle, { className: cn("h-2 w-2 fill-current", agent.connected ? "text-green-500" : "text-muted-foreground/40") }), agent.app.identifier] })) : (_jsxs(_Fragment, { children: [_jsx(Bot, { className: "h-2.5 w-2.5" }), id] })), _jsx(X, { className: "h-2.5 w-2.5 opacity-60" })] }, id));
|
|
169
|
-
}) }) }) }) }), _jsx("div", { className: "relative mt-1", children: open && (_jsx(CommandList, { className: "w-full", children: _jsxs("div", { className: "absolute top-0 z-10 w-full rounded-md border bg-popover text-popover-foreground shadow-md outline-none animate-in", children: [_jsx(CommandEmpty, { children: "No matching agent found" }), error && (_jsx(CommandGroup, { heading: "Error", children: _jsx(CommandItem, { children: error }) })), agents.length > 0 && (_jsx(CommandGroup, { heading: "Agents", children: agents.map((agent) => {
|
|
170
|
-
const isSelected = selectedIds.includes(agent.id);
|
|
171
|
-
return (_jsxs(CommandItem, { value: agent.id, onMouseDown: (e) => {
|
|
172
|
-
e.preventDefault();
|
|
173
|
-
e.stopPropagation();
|
|
174
|
-
}, onSelect: () => toggleAgent(agent.id), className: "flex items-center gap-3 py-2", children: [_jsxs("div", { className: "relative flex-shrink-0", children: [_jsx(StructureDisplay, { identifier: "@lok/user", id: agent.user.sub, variant: "avatar", className: "h-7 w-7" }), _jsx(Circle, { className: cn("absolute -bottom-0.5 -right-0.5 h-2.5 w-2.5 rounded-full fill-current ring-2 ring-popover", agent.connected ? "text-green-500" : "text-muted-foreground/40") })] }), _jsxs("div", { className: "flex flex-col min-w-0 flex-1", children: [_jsx("span", { className: "text-sm font-medium truncate", children: agent.app.identifier }), _jsxs("span", { className: "text-[10px] text-muted-foreground truncate", children: ["v", agent.release.version] })] }), _jsx(CheckIcon, { className: cn("ml-auto h-4 w-4 flex-shrink-0", isSelected ? "opacity-100" : "opacity-0") })] }, agent.id));
|
|
175
|
-
}) }))] }) })) })] })), resolvedByItself.length > 0 && (_jsxs("div", { className: "flex flex-wrap items-center gap-1 text-[10px] text-muted-foreground", children: ["resolves to", resolvedByItself.map((binding) => (_jsxs(Badge, { variant: "outline", className: "text-[10px] px-1.5 py-0 h-5 gap-1 font-normal", children: [_jsx(Circle, { className: cn("h-2 w-2 fill-current", binding.agent?.connected ? "text-green-500" : "text-muted-foreground/40") }), binding.agent?.app.identifier ?? binding.agentId] }, binding.agentId)))] })), (fieldError || node?.unmet) && (_jsx("p", { className: "text-destructive text-xs", children: fieldError || node?.unmet })), dependency.description && (_jsx(FormDescription, { children: dependency.description })), node?.mappedAgents.map((binding) => {
|
|
176
|
-
const below = levelBelow(binding);
|
|
177
|
-
if (below.length === 0)
|
|
178
|
-
return null;
|
|
179
|
-
const pinned = pin?.mappedAgents.find((mapped) => mapped.agent === binding.agentId);
|
|
180
|
-
return (_jsxs(Collapsible, { defaultOpen: true, className: "ml-1 border-l pl-3", children: [_jsxs(CollapsibleTrigger, { className: "group flex items-center gap-1 py-1 text-xs text-muted-foreground", children: [_jsx(ChevronRight, { className: "h-3 w-3 transition-transform group-data-[state=open]:rotate-90" }), binding.agent?.app.identifier ?? binding.agentId, " depends on"] }), _jsx(CollapsibleContent, { className: "pt-1 pb-2", children: _jsx(DependencyLevel, { dependencies: below.map((inner) => inner.dependency ?? undeclared(inner.key)), nodes: below, value: pinned?.dependencies ?? [], onChange: (next) => onPin(withLevelBelow(pin, node, binding.agentId, next)) }) })] }, binding.agentId));
|
|
181
|
-
})] }));
|
|
173
|
+
return (_jsxs("div", { className: "col-span-2 flex flex-col gap-2", children: [_jsxs("button", { type: "button", "aria-expanded": open, onClick: () => setOpen((was) => !was), className: "flex min-w-0 items-center gap-1 self-start text-xs text-muted-foreground hover:text-foreground", children: [_jsx(ChevronRight, { className: cn("size-3 shrink-0 transition-transform", open && "rotate-90") }), _jsxs("span", { className: "truncate", children: [agentLabel(binding.agent, binding.agentId), " needs ", below.map((inner) => inner.key).join(", ")] })] }), open && (_jsx("div", { className: "ml-1.5 border-l pl-3", children: _jsx(DependencyLevel, { dependencies: below.map((inner) => inner.dependency ?? undeclared(inner.key)), nodes: below, value: pins, onChange: onChange }) }))] }));
|
|
182
174
|
};
|
|
183
175
|
/** A dependency a task still carries although its implementation no longer declares it. */
|
|
184
176
|
const undeclared = (key) => ({
|
|
@@ -194,7 +186,13 @@ const undeclared = (key) => ({
|
|
|
194
186
|
singular: false,
|
|
195
187
|
});
|
|
196
188
|
/** One level of the dependency tree: its dependencies, each with the levels below what it binds. */
|
|
197
|
-
const DependencyLevel = ({ dependencies, nodes, value, onChange, owner, errors }) => (_jsx("div", { className: "
|
|
189
|
+
const DependencyLevel = ({ dependencies, nodes, value, onChange, owner, errors }) => (_jsx("div", { className: "flex flex-col gap-2.5", children: dependencies.map((dep) => (_jsx(DependencySearchField, { dependency: dep, owner: owner, pin: value.find((pin) => pin.key === dep.key), onPin: (pin) => onChange(withPin(value, dep.key, pin)), node: nodes?.find((node) => node.key === dep.key), error: errors?.[dep.key]?.message }, dep.key))) }));
|
|
190
|
+
/**
|
|
191
|
+
* "Runs with": the agents a run reaches besides its own. One line while they
|
|
192
|
+
* resolve by themselves, which is most runs; it opens to one line per
|
|
193
|
+
* dependency when something is pinned, unmet or waiting to be picked, or when
|
|
194
|
+
* asked. Once open it stays open.
|
|
195
|
+
*/
|
|
198
196
|
export const DependenciesContainer = ({ dependencies, owner, tree, }) => {
|
|
199
197
|
const form = useFormContext();
|
|
200
198
|
const watched = useWatch({ control: form.control, name: "dependencies" });
|
|
@@ -216,8 +214,22 @@ export const DependenciesContainer = ({ dependencies, owner, tree, }) => {
|
|
|
216
214
|
}
|
|
217
215
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
218
216
|
}, []);
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
217
|
+
// Per-dependency form errors (path: dependencies.{dep.key})
|
|
218
|
+
const errors = form.formState.errors?.dependencies;
|
|
219
|
+
const unmet = useMemo(() => unmetDependencies(tree), [tree]);
|
|
220
|
+
const waiting = dependencies.filter((dep) => awaitsPick(dep, value.find((pin) => pin.key === dep.key)));
|
|
221
|
+
const refused = dependencies.filter((dep) => errors?.[dep.key]?.message);
|
|
222
|
+
const troubled = unmet.length > 0 || refused.length > 0;
|
|
223
|
+
const needsLook = troubled || waiting.length > 0 || namesAgents(value);
|
|
224
|
+
const [open, setOpen] = useState(needsLook);
|
|
225
|
+
useEffect(() => {
|
|
226
|
+
if (needsLook)
|
|
227
|
+
setOpen(true);
|
|
228
|
+
}, [needsLook]);
|
|
229
|
+
if (dependencies.length === 0)
|
|
230
|
+
return null;
|
|
231
|
+
const reached = agentsOf(tree);
|
|
232
|
+
return (_jsxs("div", { className: "flex flex-col gap-3", children: [_jsxs("button", { type: "button", "aria-expanded": open, onClick: () => setOpen((was) => !was), className: "flex min-w-0 items-center gap-1.5 text-left text-sm", children: [_jsx(ChevronRight, { className: cn("size-3.5 shrink-0 text-muted-foreground transition-transform", open && "rotate-90") }), _jsx("span", { className: "shrink-0 font-medium", children: "Runs with" }), !open &&
|
|
233
|
+
(troubled ? (_jsxs("span", { className: "flex items-center gap-1 text-xs text-destructive", children: [_jsx(AlertCircle, { className: "size-3.5" }), Math.max(unmet.length, refused.length), " not met"] })) : reached.length > 0 ? (_jsx(AgentNames, { agents: reached, className: "text-xs text-muted-foreground" })) : (_jsxs("span", { className: "truncate text-xs text-muted-foreground", children: [dependencies.length, " ", dependencies.length === 1 ? "other agent" : "other agents", ", chosen automatically"] })))] }), open && (_jsx(DependencyLevel, { dependencies: dependencies, nodes: tree, value: value, onChange: (next) => form.setValue("dependencies", next, { shouldValidate: true }), owner: owner, errors: errors }))] }));
|
|
222
234
|
};
|
|
223
235
|
//# sourceMappingURL=DependenciesContainer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DependenciesContainer.js","sourceRoot":"","sources":["../../../src/ports/dependencies/DependenciesContainer.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEnC,OAAO,EACL,UAAU,EACV,cAAc,EACd,OAAO,GAIR,MAAM,QAAQ,CAAC;AAGhB,OAAO,EACL,OAAO,EACP,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,WAAW,GACZ,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,MAAM,CAAA;AAClD,OAAO,EAAE,EAAE,EAAE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C,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,KAAK,GAAG,CAAC,GAAG,CAAC,CACxE,CAAC;QACF,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACtB,MAAM,MAAM,GAA8B;gBACxC,GAAG,QAAQ;gBACX,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;oBACtB,GAAG,EAAE,GAAG,CAAC,GAAG;oBACZ,WAAW,EAAE,IAAI;oBACjB,YAAY,EAAE,EAAE;iBACjB,CAAC,CAAC;aACJ,CAAC;YACF,IAAI,CAAC,QAAQ,CAAC,cAAc,EAAE,MAAM,EAAE,EAAE,cAAc,EAAE,IAAI,EAAE,CAAC,CAAC;QAClE,CAAC;QACD,uDAAuD;IACzD,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,CACL,KAAC,eAAe,IACd,YAAY,EAAE,YAAY,EAC1B,KAAK,EAAE,IAAI,EACX,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,cAAc,EAAE,IAAI,EAAE,EAAE,cAAc,EAAE,IAAI,EAAE,CAAC,EACjF,KAAK,EAAE,KAAK;QACZ,4DAA4D;QAC5D,MAAM,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,YAAgE,GAC/F,CACH,CAAC;AACJ,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"DependenciesContainer.js","sourceRoot":"","sources":["../../../src/ports/dependencies/DependenciesContainer.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEnC,OAAO,EACL,UAAU,EACV,QAAQ,EACR,UAAU,EACV,UAAU,EACV,WAAW,EACX,QAAQ,EACR,UAAU,EACV,iBAAiB,EACjB,cAAc,EACd,OAAO,GAKR,MAAM,QAAQ,CAAC;AAEhB,OAAO,EACL,OAAO,EACP,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Ac,EAAE,IAAI,EAAE,CAAC,EACjF,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,GACd,CACH,IACG,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* What
|
|
3
|
-
*
|
|
2
|
+
* What the dependency rows cannot say themselves: that the dry run could not
|
|
3
|
+
* be asked, or that it refuses without naming a dependency. An unmet
|
|
4
|
+
* dependency is said at its own row (`DependenciesContainer`), once.
|
|
4
5
|
*/
|
|
5
6
|
export declare const DependencyTreeNotice: ({ tree, }: {
|
|
6
7
|
tree: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DependencyTreeNotice.d.ts","sourceRoot":"","sources":["../../../src/ports/dependencies/DependencyTreeNotice.tsx"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"DependencyTreeNotice.d.ts","sourceRoot":"","sources":["../../../src/ports/dependencies/DependencyTreeNotice.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,GAAI,WAElC;IACD,IAAI,EAAE;QACJ,SAAS,CAAC,EAAE,OAAO,CAAC;QACpB,KAAK,EAAE;YAAE,IAAI,EAAE,MAAM,EAAE,CAAC;YAAC,MAAM,EAAE,MAAM,CAAA;SAAE,EAAE,CAAC;QAC5C,KAAK,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC;KACtB,CAAC;CACH,uCAUA,CAAC"}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
/**
|
|
3
|
-
* What
|
|
4
|
-
*
|
|
3
|
+
* What the dependency rows cannot say themselves: that the dry run could not
|
|
4
|
+
* be asked, or that it refuses without naming a dependency. An unmet
|
|
5
|
+
* dependency is said at its own row (`DependenciesContainer`), once.
|
|
5
6
|
*/
|
|
6
7
|
export const DependencyTreeNotice = ({ tree, }) => {
|
|
7
8
|
if (tree.error) {
|
|
8
|
-
return (
|
|
9
|
+
return (_jsx("p", { className: "text-xs text-muted-foreground", children: "Which agents this reaches could not be previewed; starting it will tell." }));
|
|
9
10
|
}
|
|
10
|
-
if (tree.satisfied !== false)
|
|
11
|
+
if (tree.satisfied !== false || tree.unmet.length > 0)
|
|
11
12
|
return null;
|
|
12
|
-
return (
|
|
13
|
+
return _jsx("p", { className: "text-xs text-destructive", children: "A dependency is not met yet." });
|
|
13
14
|
};
|
|
14
15
|
//# sourceMappingURL=DependencyTreeNotice.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DependencyTreeNotice.js","sourceRoot":"","sources":["../../../src/ports/dependencies/DependencyTreeNotice.tsx"],"names":[],"mappings":";AAAA
|
|
1
|
+
{"version":3,"file":"DependencyTreeNotice.js","sourceRoot":"","sources":["../../../src/ports/dependencies/DependencyTreeNotice.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,EACnC,IAAI,GAOL,EAAE,EAAE;IACH,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;QACf,OAAO,CACL,YAAG,SAAS,EAAC,+BAA+B,yFAExC,CACL,CAAC;IACJ,CAAC;IACD,IAAI,IAAI,CAAC,SAAS,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO,IAAI,CAAC;IACnE,OAAO,YAAG,SAAS,EAAC,0BAA0B,6CAAiC,CAAC;AAClF,CAAC,CAAC"}
|
|
@@ -99,5 +99,29 @@ export type FrozenDependency = {
|
|
|
99
99
|
* reaches the same agents instead of resolving anew.
|
|
100
100
|
*/
|
|
101
101
|
export declare const pinsFromFrozen: (frozen: readonly FrozenDependency[] | null | undefined) => Pin[];
|
|
102
|
+
/** How many agents a dependency takes. */
|
|
103
|
+
export declare const pickLimits: (dependency: ListDependencyFragment) => {
|
|
104
|
+
min: number;
|
|
105
|
+
max: number;
|
|
106
|
+
};
|
|
107
|
+
/** The same, as the picker says it; nothing when any number will do. */
|
|
108
|
+
export declare const pickHint: (dependency: ListDependencyFragment) => string | null;
|
|
109
|
+
/** An agent as people call it: its name, else the app it runs. */
|
|
110
|
+
export declare const agentLabel: (agent: DependencyAgent | null | undefined, id: string) => string;
|
|
111
|
+
/**
|
|
112
|
+
* Whether these pins name an agent: the user chose, where the default is
|
|
113
|
+
* "whoever is there". Pins below sit under a named agent, so this level tells.
|
|
114
|
+
*/
|
|
115
|
+
export declare const namesAgents: (level: readonly Pin[] | null | undefined) => boolean;
|
|
116
|
+
/** The agents a level reaches, each once, in the order they are bound. */
|
|
117
|
+
export declare const agentsOf: (nodes: readonly DependencyNode[] | null | undefined) => {
|
|
118
|
+
id: string;
|
|
119
|
+
agent?: DependencyAgent | null;
|
|
120
|
+
}[];
|
|
121
|
+
/**
|
|
122
|
+
* Whether a dependency still waits for the user: it is required, it may not
|
|
123
|
+
* resolve by itself, and no agent is pinned. The form refuses to submit it.
|
|
124
|
+
*/
|
|
125
|
+
export declare const awaitsPick: (dependency: ListDependencyFragment, pin: Pin | undefined) => boolean;
|
|
102
126
|
export {};
|
|
103
127
|
//# sourceMappingURL=tree.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tree.d.ts","sourceRoot":"","sources":["../../../src/ports/dependencies/tree.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAEzD,6DAA6D;AAC7D,MAAM,MAAM,uBAAuB,GAAG;IACpC,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,YAAY,CAAC,EAAE,uBAAuB,EAAE,GAAG,IAAI,CAAA;KAAE,EAAE,CAAC;CACjG,CAAC;AAEF,yCAAyC;AAC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AAC;KACV,EAAE,CAAC;CACL,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,cAAc,GAAI,QAAQ,SAAS,gBAAgB,EAAE,GAAG,IAAI,GAAG,SAAS,KAAG,GAAG,EAgBtF,CAAC;AAEN,0CAA0C;AAC1C,eAAO,MAAM,UAAU,GAAI,YAAY,sBAAsB,KAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAMzF,CAAC;AAEF,wEAAwE;AACxE,eAAO,MAAM,QAAQ,GAAI,YAAY,sBAAsB,KAAG,MAAM,GAAG,IAQtE,CAAC;AAEF,kEAAkE;AAClE,eAAO,MAAM,UAAU,GAAI,OAAO,eAAe,GAAG,IAAI,GAAG,SAAS,EAAE,IAAI,MAAM,KAAG,MAC/B,CAAC;AAErD;;;GAGG;AACH,eAAO,MAAM,WAAW,GAAI,OAAO,SAAS,GAAG,EAAE,GAAG,IAAI,GAAG,SAAS,KAAG,OACL,CAAC;AAEnE,0EAA0E;AAC1E,eAAO,MAAM,QAAQ,GACnB,OAAO,SAAS,cAAc,EAAE,GAAG,IAAI,GAAG,SAAS,KAClD;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,eAAe,GAAG,IAAI,CAAA;CAAE,EAQhD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,UAAU,GAAI,YAAY,sBAAsB,EAAE,KAAK,GAAG,GAAG,SAAS,KAAG,OAIrF,CAAC"}
|
|
@@ -82,4 +82,56 @@ export const pinsFromFrozen = (frozen) => (frozen ?? []).map((dependency) => ({
|
|
|
82
82
|
return [{ key: dependency.key, agent, ...(dependencies.length > 0 ? { dependencies } : {}) }];
|
|
83
83
|
}),
|
|
84
84
|
}));
|
|
85
|
+
/** How many agents a dependency takes. */
|
|
86
|
+
export const pickLimits = (dependency) => {
|
|
87
|
+
if (dependency.singular)
|
|
88
|
+
return { min: dependency.optional ? 0 : 1, max: 1 };
|
|
89
|
+
return {
|
|
90
|
+
min: dependency.minViableInstances ?? (dependency.optional ? 0 : 1),
|
|
91
|
+
max: dependency.maxViableInstances ?? Infinity,
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
/** The same, as the picker says it; nothing when any number will do. */
|
|
95
|
+
export const pickHint = (dependency) => {
|
|
96
|
+
if (dependency.singular)
|
|
97
|
+
return "One agent";
|
|
98
|
+
const min = dependency.minViableInstances;
|
|
99
|
+
const max = dependency.maxViableInstances;
|
|
100
|
+
if (min != null && max != null)
|
|
101
|
+
return min === max ? `${min} agents` : `${min}–${max} agents`;
|
|
102
|
+
if (min != null)
|
|
103
|
+
return `At least ${min} agents`;
|
|
104
|
+
if (max != null)
|
|
105
|
+
return `Up to ${max} agents`;
|
|
106
|
+
return null;
|
|
107
|
+
};
|
|
108
|
+
/** An agent as people call it: its name, else the app it runs. */
|
|
109
|
+
export const agentLabel = (agent, id) => agent?.name?.trim() || agent?.app.identifier || id;
|
|
110
|
+
/**
|
|
111
|
+
* Whether these pins name an agent: the user chose, where the default is
|
|
112
|
+
* "whoever is there". Pins below sit under a named agent, so this level tells.
|
|
113
|
+
*/
|
|
114
|
+
export const namesAgents = (level) => (level ?? []).some((pin) => (pin.mappedAgents ?? []).length > 0);
|
|
115
|
+
/** The agents a level reaches, each once, in the order they are bound. */
|
|
116
|
+
export const agentsOf = (nodes) => {
|
|
117
|
+
const seen = new Map();
|
|
118
|
+
for (const node of nodes ?? []) {
|
|
119
|
+
for (const binding of node.mappedAgents) {
|
|
120
|
+
if (!seen.has(binding.agentId))
|
|
121
|
+
seen.set(binding.agentId, { id: binding.agentId, agent: binding.agent });
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
return [...seen.values()];
|
|
125
|
+
};
|
|
126
|
+
/**
|
|
127
|
+
* Whether a dependency still waits for the user: it is required, it may not
|
|
128
|
+
* resolve by itself, and no agent is pinned. The form refuses to submit it.
|
|
129
|
+
*/
|
|
130
|
+
export const awaitsPick = (dependency, pin) => {
|
|
131
|
+
if (dependency.optional)
|
|
132
|
+
return false;
|
|
133
|
+
if ((pin?.mappedAgents ?? []).length > 0)
|
|
134
|
+
return false;
|
|
135
|
+
return !(dependency.autoResolvable && (pin?.autoResolve || !pin));
|
|
136
|
+
};
|
|
85
137
|
//# sourceMappingURL=tree.js.map
|