@talgent/workbench-ui 0.2.2 → 0.2.4
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/components/analytics/work-usage/turn-timeline.tsx +1 -1
- package/components/analytics/work-usage/turns.ts +1 -1
- package/components/analytics/work-usage/work-usage-reader.tsx +1 -1
- package/components/composer/permission-mode-list.tsx +1 -1
- package/components/composer/prompt-bar-controls.tsx +1 -1
- package/components/marketplace/connector-pages.tsx +1 -1
- package/components/marketplace/parameter-fields.tsx +1 -1
- package/components/marketplace/plugin-list.tsx +1 -1
- package/components/marketplace/plugin-page.tsx +1 -1
- package/components/marketplace/provider-pages.tsx +1 -1
- package/components/session/startup-progress.tsx +3 -3
- package/components/session/work-permission-control.tsx +2 -2
- package/components/session/work-thinking-control.tsx +1 -1
- package/components/shell/core-reading-views.tsx +1 -1
- package/components/shell/reading-context.ts +1 -1
- package/components/work/tool-message-detail.tsx +2 -2
- package/components/work/tool-output-preview.tsx +1 -1
- package/components/work/work-conversation.tsx +4 -4
- package/components/work/work-interaction.tsx +1 -1
- package/components/work/work-message-flow.tsx +1 -1
- package/components/work/work-prompt-bar.tsx +2 -2
- package/components/work/work-question-record.tsx +1 -1
- package/components/work-start/start-work-launch-state.ts +1 -1
- package/components/work-start/work-start-catalog.tsx +1 -1
- package/components/work-start/work-start-tray.tsx +1 -1
- package/hooks/use-work-conversation.ts +4 -4
- package/hooks/use-work-lifecycle-controls.ts +1 -1
- package/hooks/use-work-stream.ts +2 -2
- package/lib/client.ts +8 -8
- package/lib/computer-service.ts +1 -1
- package/lib/marketplace-catalog.ts +1 -1
- package/lib/marketplace-plugins.ts +1 -1
- package/lib/model-vendors.ts +1 -1
- package/lib/permission-modes.ts +1 -1
- package/lib/personal-work-service.ts +1 -1
- package/lib/plugin-parameters.ts +1 -1
- package/lib/preview-verdict.ts +1 -1
- package/lib/start-work-request.ts +1 -1
- package/lib/startup-progress.ts +1 -1
- package/lib/subagents.ts +1 -1
- package/lib/work-conversation.ts +1 -1
- package/lib/work-file-service.ts +1 -1
- package/lib/work-model.ts +1 -1
- package/lib/work-notices.ts +1 -1
- package/lib/work-projection.ts +1 -1
- package/lib/work-start-loadout.ts +2 -2
- package/lib/work-start-source.ts +2 -2
- package/lib/work-stream-source.ts +1 -1
- package/package.json +6 -3
- package/pages/workbench/library-page.tsx +2 -2
- package/pages/workbench/person.tsx +1 -1
- package/pages/workbench/personal-work-context.tsx +1 -1
- package/pages/workbench/personal-work-page.tsx +1 -1
- package/test-support/backend.ts +8 -8
- package/test-support/plugin-summary.ts +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useState } from "react";
|
|
2
2
|
import { Button, Tooltip } from "@heroui/react";
|
|
3
3
|
import { useQuery } from "@tanstack/react-query";
|
|
4
|
-
import { UnifiedMessageKind } from "@talgent/
|
|
4
|
+
import { UnifiedMessageKind } from "@talgent/contracts/dispatcher/public/v1/unified_message_pb";
|
|
5
5
|
import { streamClient } from "../../../lib/client";
|
|
6
6
|
import { formatCompactTokenCount } from "../../../lib/trace-view-model";
|
|
7
7
|
import { tokenCategories, tokenTotal } from "../../../lib/token-usage";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { timestampDate } from "@bufbuild/protobuf/wkt";
|
|
2
|
-
import type { Span } from "@talgent/
|
|
2
|
+
import type { Span } from "@talgent/contracts/trace/public/v1/trace_pb";
|
|
3
3
|
import { addTokenUsage, emptyTokenUsage, tokenUsageFromAttributes, type TokenUsage } from "../../../lib/token-usage";
|
|
4
4
|
|
|
5
5
|
export type TimeRange = { start: number; end: number };
|
|
@@ -4,7 +4,7 @@ import { Alert, Button, Chip, Disclosure, Skeleton, Tooltip } from "@heroui/reac
|
|
|
4
4
|
import { useInfiniteQuery, useQuery } from "@tanstack/react-query";
|
|
5
5
|
import { timestampFromDate } from "@bufbuild/protobuf/wkt";
|
|
6
6
|
import { Download, RefreshCw } from "lucide-react";
|
|
7
|
-
import type { Span } from "@talgent/
|
|
7
|
+
import type { Span } from "@talgent/contracts/trace/public/v1/trace_pb";
|
|
8
8
|
import { traceClient } from "../../../lib/client";
|
|
9
9
|
import { formatCompactTokenCount, traceMetricKinds } from "../../../lib/trace-view-model";
|
|
10
10
|
import { cacheHitRate, formatHitRate, tokenCategories, tokenTotal, tokenUsageFromMeasurements } from "../../../lib/token-usage";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Label, ListBox } from "@heroui/react";
|
|
2
|
-
import type { PermissionMode } from "@talgent/
|
|
2
|
+
import type { PermissionMode } from "@talgent/contracts/agent/public/v1/harness_pb";
|
|
3
3
|
import { permissionModes } from "../../lib/permission-modes";
|
|
4
4
|
|
|
5
5
|
/** The permission modes as one single choice, each with what it does. Both
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useState, type ReactNode } from "react";
|
|
2
2
|
import { Button, Dropdown, Kbd, Label, ListBox, Popover, SearchField, ToggleButton, ToggleButtonGroup } from "@heroui/react";
|
|
3
3
|
import { Brain, BrainCircuit, ChevronDown, Gauge, Paperclip, Plus, SquareSlash, Zap } from "lucide-react";
|
|
4
|
-
import type { ModelVendor } from "@talgent/
|
|
4
|
+
import type { ModelVendor } from "@talgent/contracts/agent/public/v1/model_pb";
|
|
5
5
|
import { modelVendors } from "../../lib/model-vendors";
|
|
6
6
|
import { thinkingLevelName as levelName } from "../../lib/thinking-levels";
|
|
7
7
|
import { startModelKey, type StartModel } from "../../lib/work-model";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useState } from "react";
|
|
2
2
|
import { Alert, Button, Card, Dropdown, Label, Switch, Tooltip } from "@heroui/react";
|
|
3
|
-
import type { Connector } from "@talgent/
|
|
3
|
+
import type { Connector } from "@talgent/contracts/marketplace/public/v1/marketplace_pb";
|
|
4
4
|
import { ChevronRight, KeyRound, Lock, MoreHorizontal, Plus } from "lucide-react";
|
|
5
5
|
import { Link, useLocation, useNavigate } from "react-router-dom";
|
|
6
6
|
import { installStatusLabel, pluginStatus, connectorStatus, useConnector, useConnectorActions, useConnectors, useInstalledPlugins, usePluginCatalog } from "../../lib/marketplace-catalog";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { toJson } from "@bufbuild/protobuf";
|
|
2
2
|
import { ValueSchema } from "@bufbuild/protobuf/wkt";
|
|
3
3
|
import { Description, FieldError, Input, Label, ListBox, Select, Switch, TextArea, TextField } from "@heroui/react";
|
|
4
|
-
import type { ParameterDeclaration } from "@talgent/
|
|
4
|
+
import type { ParameterDeclaration } from "@talgent/contracts/marketplace/public/v1/marketplace_pb";
|
|
5
5
|
import { hasDefault, parameterLabel, type ParameterDrafts, type ParameterErrors } from "../../lib/plugin-parameters";
|
|
6
6
|
|
|
7
7
|
function defaultText(declaration: ParameterDeclaration) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useState } from "react";
|
|
2
2
|
import { Button, Dropdown, Label, Tooltip } from "@heroui/react";
|
|
3
|
-
import type { InstalledPlugin, PluginSummary } from "@talgent/
|
|
3
|
+
import type { InstalledPlugin, PluginSummary } from "@talgent/contracts/marketplace/public/v1/marketplace_pb";
|
|
4
4
|
import { AlertTriangle, ChevronRight, Lock, MoreHorizontal, Plus } from "lucide-react";
|
|
5
5
|
import { Link, useNavigate } from "react-router-dom";
|
|
6
6
|
import { useInstalledPlugins, usePluginActions, usePluginCatalog } from "../../lib/marketplace-catalog";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useRef, useState } from "react";
|
|
2
2
|
import { Alert, Button, Card, Chip, Dropdown, Label, Link as HeroLink, Switch } from "@heroui/react";
|
|
3
|
-
import type { InstalledPlugin, PluginRelease } from "@talgent/
|
|
3
|
+
import type { InstalledPlugin, PluginRelease } from "@talgent/contracts/marketplace/public/v1/marketplace_pb";
|
|
4
4
|
import { ChevronRight, Lock, MoreHorizontal } from "lucide-react";
|
|
5
5
|
import { Link } from "react-router-dom";
|
|
6
6
|
import { useInstalledPlugins, usePluginActions } from "../../lib/marketplace-catalog";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useState } from "react";
|
|
2
2
|
import { Alert, Button, Card, Link as HeroLink, Spinner } from "@heroui/react";
|
|
3
|
-
import type { ProviderAccount } from "@talgent/
|
|
3
|
+
import type { ProviderAccount } from "@talgent/contracts/marketplace/public/v1/connections_pb";
|
|
4
4
|
import { Check, ChevronRight, ExternalLink, RefreshCw } from "lucide-react";
|
|
5
5
|
import { Link, useLocation } from "react-router-dom";
|
|
6
6
|
import { connectorStatus, installStatusLabel, useConnectors } from "../../lib/marketplace-catalog";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { useEffect, useState } from "react";
|
|
2
2
|
import { Alert, Button, Spinner } from "@heroui/react";
|
|
3
3
|
import { Check, ChevronDown, CircleAlert, Cloud, Monitor, RotateCcw, Square, X } from "lucide-react";
|
|
4
|
-
import type { StartupProgress } from "@talgent/
|
|
5
|
-
import type { WorkStartupRequest } from "@talgent/
|
|
6
|
-
import type { WorkModelOption } from "@talgent/
|
|
4
|
+
import type { StartupProgress } from "@talgent/contracts/agent/public/v1/startup_pb";
|
|
5
|
+
import type { WorkStartupRequest } from "@talgent/contracts/agent/public/v1/work_pb";
|
|
6
|
+
import type { WorkModelOption } from "@talgent/contracts/agent/public/v1/model_pb";
|
|
7
7
|
import { modelVendors } from "../../lib/model-vendors";
|
|
8
8
|
import type { WorkComputer } from "../../lib/computer-service";
|
|
9
9
|
import "./startup-progress.css";
|
|
@@ -2,8 +2,8 @@ import { useState } from "react";
|
|
|
2
2
|
import { useMutation, useQueryClient } from "@tanstack/react-query";
|
|
3
3
|
import { Button, Popover } from "@heroui/react";
|
|
4
4
|
import { ChevronDown, Lock, Shield } from "lucide-react";
|
|
5
|
-
import type { PermissionMode } from "@talgent/
|
|
6
|
-
import type { GetWorkResponse } from "@talgent/
|
|
5
|
+
import type { PermissionMode } from "@talgent/contracts/agent/public/v1/harness_pb";
|
|
6
|
+
import type { GetWorkResponse } from "@talgent/contracts/agent/public/v1/work_pb";
|
|
7
7
|
import { PermissionModeList } from "../composer/permission-mode-list";
|
|
8
8
|
import { PopoverFootnote } from "../composer/prompt-bar-controls";
|
|
9
9
|
import { agentWorkClient } from "../../lib/client";
|
|
@@ -2,7 +2,7 @@ import { useState } from "react";
|
|
|
2
2
|
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
|
3
3
|
import { Button, Popover, Tooltip } from "@heroui/react";
|
|
4
4
|
import { Lock } from "lucide-react";
|
|
5
|
-
import type { WorkModelOption } from "@talgent/
|
|
5
|
+
import type { WorkModelOption } from "@talgent/contracts/agent/public/v1/model_pb";
|
|
6
6
|
import { ModelTrigger, ModelVendorIcon, ThinkingEffort } from "../composer/prompt-bar-controls";
|
|
7
7
|
import { agentWorkClient } from "../../lib/client";
|
|
8
8
|
import { modelVendors } from "../../lib/model-vendors";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { WorkFile } from "@talgent/
|
|
1
|
+
import type { WorkFile } from "@talgent/contracts/agent/public/v1/work_file_pb";
|
|
2
2
|
import { useCurrentUser } from "../../lib/account-service";
|
|
3
3
|
import { requestWorkFilePreview, useDownloadWorkFile, workFileKey, workFilePreview } from "../../lib/work-file-service";
|
|
4
4
|
import { useOwnWorkUsageStatus } from "../analytics/work-usage/work-status";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createContext, useContext, type ReactNode } from "react";
|
|
2
|
-
import type { WorkFile } from "@talgent/
|
|
2
|
+
import type { WorkFile } from "@talgent/contracts/agent/public/v1/work_file_pb";
|
|
3
3
|
import type { ToolPreview } from "../work/work-message-flow";
|
|
4
4
|
|
|
5
5
|
/** What the reading area can show, by kind. `label` names what the reading
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useState } from "react";
|
|
2
2
|
import { useQuery } from "@tanstack/react-query";
|
|
3
3
|
import { Alert, Button } from "@heroui/react";
|
|
4
|
-
import { MessageDetailFormat } from "@talgent/
|
|
5
|
-
import type { GetMessageDetailResponse } from "@talgent/
|
|
4
|
+
import { MessageDetailFormat } from "@talgent/contracts/dispatcher/public/v1/unified_message_pb";
|
|
5
|
+
import type { GetMessageDetailResponse } from "@talgent/contracts/streamgateway/public/v1/streamgateway_pb";
|
|
6
6
|
import { useWorkStreamSource } from "../../lib/work-stream-source";
|
|
7
7
|
|
|
8
8
|
export const detailPageSize = 16384;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Alert } from "@heroui/react";
|
|
2
|
-
import type { ToolOutputPreview as Preview } from "@talgent/
|
|
2
|
+
import type { ToolOutputPreview as Preview } from "@talgent/contracts/dispatcher/public/v1/unified_message_pb";
|
|
3
3
|
import { DiffView, SourcePreview, TextPreview } from "../preview/text-preview";
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { StartupProgress } from "@talgent/
|
|
2
|
-
import type { WorkStartupRequest } from "@talgent/
|
|
3
|
-
import type { WorkModelOption, WorkModelSelection } from "@talgent/
|
|
4
|
-
import { PermissionMode } from "@talgent/
|
|
1
|
+
import type { StartupProgress } from "@talgent/contracts/agent/public/v1/startup_pb";
|
|
2
|
+
import type { WorkStartupRequest } from "@talgent/contracts/agent/public/v1/work_pb";
|
|
3
|
+
import type { WorkModelOption, WorkModelSelection } from "@talgent/contracts/agent/public/v1/model_pb";
|
|
4
|
+
import { PermissionMode } from "@talgent/contracts/agent/public/v1/harness_pb";
|
|
5
5
|
import { timestampDate } from "@bufbuild/protobuf/wkt";
|
|
6
6
|
import { Code, ConnectError } from "@connectrpc/connect";
|
|
7
7
|
import { Alert, Button } from "@heroui/react";
|
|
@@ -2,7 +2,7 @@ import { useEffect, useId, useRef, useState } from "react";
|
|
|
2
2
|
import { Alert, Button, Tooltip } from "@heroui/react";
|
|
3
3
|
import { useQuery } from "@tanstack/react-query";
|
|
4
4
|
import { ArrowRight, ChevronLeft, ChevronRight, CornerDownLeft, MessageCircleQuestion, Pencil, Terminal, X } from "lucide-react";
|
|
5
|
-
import { MessageDetailFormat, UnifiedMessageKind, type PendingInteraction } from "@talgent/
|
|
5
|
+
import { MessageDetailFormat, UnifiedMessageKind, type PendingInteraction } from "@talgent/contracts/dispatcher/public/v1/unified_message_pb";
|
|
6
6
|
import { agentWorkClient } from "../../lib/client";
|
|
7
7
|
import { useWorkStreamSource } from "../../lib/work-stream-source";
|
|
8
8
|
import { parseWorkQuestions } from "../../lib/work-questions";
|
|
@@ -2,7 +2,7 @@ import { Fragment, memo, useCallback, useEffect, useId, useLayoutEffect, useRef,
|
|
|
2
2
|
import { Button, Tooltip } from "@heroui/react";
|
|
3
3
|
import { ArrowDown, Check, ChevronDown, Copy, FilePenLine, FileSearch, Search, Terminal, Wrench } from "lucide-react";
|
|
4
4
|
import { timestampDate } from "@bufbuild/protobuf/wkt";
|
|
5
|
-
import { ContentBlockType, MessageDetailFormat, ResultStatus, UnifiedMessageKind, type UnifiedMessage } from "@talgent/
|
|
5
|
+
import { ContentBlockType, MessageDetailFormat, ResultStatus, UnifiedMessageKind, type UnifiedMessage } from "@talgent/contracts/dispatcher/public/v1/unified_message_pb";
|
|
6
6
|
import { Markdown } from "../markdown";
|
|
7
7
|
import { ToolMessageDetail } from "./tool-message-detail";
|
|
8
8
|
import { ToolReadingContent } from "./tool-reading-content";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useEffect, useRef, useState } from "react";
|
|
2
2
|
import { useQuery } from "@tanstack/react-query";
|
|
3
3
|
import { Alert, CloseButton } from "@heroui/react";
|
|
4
|
-
import { PluginPreparationStatus, type WorkPluginResult } from "@talgent/
|
|
5
|
-
import type { WorkStartupRepository } from "@talgent/
|
|
4
|
+
import { PluginPreparationStatus, type WorkPluginResult } from "@talgent/contracts/agent/public/v1/plugin_pb";
|
|
5
|
+
import type { WorkStartupRepository } from "@talgent/contracts/agent/public/v1/work_pb";
|
|
6
6
|
import { MessageInput, type MessageInputProps } from "../chat/message-input";
|
|
7
7
|
import type { SlashCandidate } from "../composer/use-slash-completion";
|
|
8
8
|
import { agentWorkClient } from "../../lib/client";
|
|
@@ -2,7 +2,7 @@ import { useId, useState } from "react";
|
|
|
2
2
|
import { useQuery } from "@tanstack/react-query";
|
|
3
3
|
import { Alert, Button } from "@heroui/react";
|
|
4
4
|
import { ChevronDown } from "lucide-react";
|
|
5
|
-
import { InteractionPhase, UnifiedMessageKind, type UnifiedMessage } from "@talgent/
|
|
5
|
+
import { InteractionPhase, UnifiedMessageKind, type UnifiedMessage } from "@talgent/contracts/dispatcher/public/v1/unified_message_pb";
|
|
6
6
|
import { useWorkStreamSource } from "../../lib/work-stream-source";
|
|
7
7
|
import { parseWorkQuestions } from "../../lib/work-questions";
|
|
8
8
|
import { ToolMessageDetail } from "./tool-message-detail";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Code, ConnectError } from "@connectrpc/connect";
|
|
2
|
-
import { ComputerOutdatedSchema, SandboxUnavailableSchema } from "@talgent/
|
|
2
|
+
import { ComputerOutdatedSchema, SandboxUnavailableSchema } from "@talgent/contracts/agent/public/v1/harness_pb";
|
|
3
3
|
|
|
4
4
|
/** Why a start failed; computer is the one it was started on. A full Managed
|
|
5
5
|
* Computer, one without Claude Code's sandbox, or one below the Minimum
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useState, type ReactNode } from "react";
|
|
2
2
|
import { Button, ListBox } from "@heroui/react";
|
|
3
|
-
import type { PluginSummary } from "@talgent/
|
|
3
|
+
import type { PluginSummary } from "@talgent/contracts/marketplace/public/v1/marketplace_pb";
|
|
4
4
|
import { AlertTriangle, ArrowLeft, Plug, Puzzle, Settings2 } from "lucide-react";
|
|
5
5
|
import { providerName, serviceLabel, useConnectProvider } from "../../lib/marketplace-connections";
|
|
6
6
|
import { pluginDisplayName, pluginPresentation } from "../../lib/marketplace-plugins";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useState, type ReactNode } from "react";
|
|
2
2
|
import { Button, Checkbox, Description, Label, ListBox, Popover, SearchField, Switch } from "@heroui/react";
|
|
3
|
-
import type { WorkStartRepository } from "@talgent/
|
|
3
|
+
import type { WorkStartRepository } from "@talgent/contracts/agent/public/v1/work_start_options_pb";
|
|
4
4
|
import { AlertTriangle, Bot, Cloud, GitBranch, Server, Shield } from "lucide-react";
|
|
5
5
|
import type { UsableComputer } from "../../lib/computer-service";
|
|
6
6
|
import { permissionModeOption } from "../../lib/permission-modes";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useCallback, useEffect, useMemo, useState, useSyncExternalStore } from "react";
|
|
2
2
|
import { useInfiniteQuery, useQuery } from "@tanstack/react-query";
|
|
3
|
-
import type { MessageHistoryCursor, WorkStateFrame } from "@talgent/
|
|
4
|
-
import { ContentBlockType, UnifiedMessageKind, type UnifiedMessage } from "@talgent/
|
|
3
|
+
import type { MessageHistoryCursor, WorkStateFrame } from "@talgent/contracts/streamgateway/public/v1/streamgateway_pb";
|
|
4
|
+
import { ContentBlockType, UnifiedMessageKind, type UnifiedMessage } from "@talgent/contracts/dispatcher/public/v1/unified_message_pb";
|
|
5
5
|
import { useWorkStreamSource } from "../lib/work-stream-source";
|
|
6
6
|
import { WorkConversation } from "../lib/work-conversation";
|
|
7
7
|
import { compareMessageCursor, useWorkStream } from "./use-work-stream";
|
|
@@ -13,7 +13,7 @@ function turnAnchor(message: UnifiedMessage): TurnAnchor[] {
|
|
|
13
13
|
const title = message.payload.value.content.filter(block => block.type === ContentBlockType.TEXT).map(block => block.text.slice(0, 160)).join("\n\n").slice(0, 160) || "Image attachment";
|
|
14
14
|
return [{ id: message.id, turnId: message.turnId, timestamp: message.timestamp, title }];
|
|
15
15
|
}
|
|
16
|
-
const cursorFor = (anchor: { id: string; timestamp: TurnAnchor["timestamp"] }): MessageHistoryCursor => ({ $typeName: "
|
|
16
|
+
const cursorFor = (anchor: { id: string; timestamp: TurnAnchor["timestamp"] }): MessageHistoryCursor => ({ $typeName: "streamgateway.public.v1.MessageHistoryCursor", id: anchor.id, timestamp: anchor.timestamp });
|
|
17
17
|
|
|
18
18
|
export function useWorkConversation(workId: string | undefined, onWorkState?: (state: WorkStateFrame) => void, onReconnect?: () => void, onActivity?: () => void, onAccessWithdrawn?: () => void) {
|
|
19
19
|
const streamClient = useWorkStreamSource();
|
|
@@ -111,7 +111,7 @@ export function useWorkConversation(workId: string | undefined, onWorkState?: (s
|
|
|
111
111
|
loadOlder: () => {
|
|
112
112
|
const oldest = conversation.getOldest();
|
|
113
113
|
if (!workId || history.isFetching || !hasMore || !oldest?.timestamp) return;
|
|
114
|
-
setNavigation({ workId, generation, before: { $typeName: "
|
|
114
|
+
setNavigation({ workId, generation, before: { $typeName: "streamgateway.public.v1.MessageHistoryCursor", timestamp: oldest.timestamp, id: oldest.id } });
|
|
115
115
|
},
|
|
116
116
|
hasLaterMessages: browsingHistory && (Boolean(before) || Boolean(history.data?.hasMore)),
|
|
117
117
|
loadNewer: () => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useRef, useState } from "react";
|
|
2
|
-
import type { WorkInfo } from "@talgent/
|
|
2
|
+
import type { WorkInfo } from "@talgent/contracts/agent/public/v1/work_pb";
|
|
3
3
|
import { agentWorkClient } from "../lib/client";
|
|
4
4
|
import { isStaleWorkControl, workControlErrorMessage } from "../lib/work-projection";
|
|
5
5
|
|
package/hooks/use-work-stream.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useEffect, useRef } from "react";
|
|
2
2
|
import type { Timestamp } from "@bufbuild/protobuf/wkt";
|
|
3
|
-
import { UnifiedMessageKind, type UnifiedMessage } from "@talgent/
|
|
4
|
-
import type { StreamDiagnosticFrame, WorkStateFrame, WatchStreamResponse } from "@talgent/
|
|
3
|
+
import { UnifiedMessageKind, type UnifiedMessage } from "@talgent/contracts/dispatcher/public/v1/unified_message_pb";
|
|
4
|
+
import type { StreamDiagnosticFrame, WorkStateFrame, WatchStreamResponse } from "@talgent/contracts/streamgateway/public/v1/streamgateway_pb";
|
|
5
5
|
import { useWorkStreamSource } from "../lib/work-stream-source";
|
|
6
6
|
|
|
7
7
|
interface WorkStreamOptions {
|
package/lib/client.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { createClient } from "@connectrpc/connect";
|
|
2
|
-
import { AgentWorkService } from "@talgent/
|
|
3
|
-
import { PersonalWorkService } from "@talgent/
|
|
4
|
-
import { WorkFileService } from "@talgent/
|
|
5
|
-
import { StreamGatewayService } from "@talgent/
|
|
6
|
-
import { TraceQueryService } from "@talgent/
|
|
7
|
-
import { MarketplaceService } from "@talgent/
|
|
8
|
-
import { SessionService } from "@talgent/
|
|
9
|
-
import { ComputerService } from "@talgent/
|
|
2
|
+
import { AgentWorkService } from "@talgent/contracts/agent/public/v1/work_pb";
|
|
3
|
+
import { PersonalWorkService } from "@talgent/contracts/agent/public/v1/personal_work_pb";
|
|
4
|
+
import { WorkFileService } from "@talgent/contracts/agent/public/v1/work_file_pb";
|
|
5
|
+
import { StreamGatewayService } from "@talgent/contracts/streamgateway/public/v1/streamgateway_pb";
|
|
6
|
+
import { TraceQueryService } from "@talgent/contracts/trace/public/v1/trace_pb";
|
|
7
|
+
import { MarketplaceService } from "@talgent/contracts/marketplace/public/v1/marketplace_pb";
|
|
8
|
+
import { SessionService } from "@talgent/contracts/account/public/v1/session_pb";
|
|
9
|
+
import { ComputerService } from "@talgent/contracts/computer/public/v1/computer_pb";
|
|
10
10
|
import { transport, streamTransport, traceTransport } from "./transport";
|
|
11
11
|
|
|
12
12
|
// The Agent Workbench core's clients.
|
package/lib/computer-service.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Code, ConnectError } from "@connectrpc/connect";
|
|
2
2
|
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
|
3
|
-
import { AdmissionPolicy as AdmissionPolicyMessage, UsableComputerKind, type ManagedComputer as ManagedComputerMessage } from "@talgent/
|
|
3
|
+
import { AdmissionPolicy as AdmissionPolicyMessage, UsableComputerKind, type ManagedComputer as ManagedComputerMessage } from "@talgent/contracts/computer/public/v1/computer_pb";
|
|
4
4
|
import { useCurrentUser } from "./account-service";
|
|
5
5
|
import { computerClient } from "./client";
|
|
6
6
|
import { timeAgo } from "./relative-time";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { JsonObject } from "@bufbuild/protobuf";
|
|
2
2
|
import { queryOptions, useMutation, useQueries, useQuery, useQueryClient } from "@tanstack/react-query";
|
|
3
|
-
import type { Connector, InstalledPlugin, PluginSummary } from "@talgent/
|
|
3
|
+
import type { Connector, InstalledPlugin, PluginSummary } from "@talgent/contracts/marketplace/public/v1/marketplace_pb";
|
|
4
4
|
import { marketplaceClient } from "./client";
|
|
5
5
|
import { useCurrentUser } from "./account-service";
|
|
6
6
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { PluginRelease } from "@talgent/
|
|
1
|
+
import type { PluginRelease } from "@talgent/contracts/marketplace/public/v1/marketplace_pb";
|
|
2
2
|
|
|
3
3
|
/** What presenting a Plugin needs; a full release and a catalog summary both carry it. */
|
|
4
4
|
export type PresentablePlugin = Pick<PluginRelease, "slug" | "source" | "nativeEntry">;
|
package/lib/model-vendors.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ModelVendor } from "@talgent/
|
|
1
|
+
import { ModelVendor } from "@talgent/contracts/agent/public/v1/model_pb";
|
|
2
2
|
|
|
3
3
|
// Each Model Vendor the platform knows has a bundled mark; see product-icons/README.md.
|
|
4
4
|
export const modelVendors: Record<ModelVendor, { label: string; icon?: string }> = {
|
package/lib/permission-modes.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PermissionMode } from "@talgent/
|
|
1
|
+
import { PermissionMode } from "@talgent/contracts/agent/public/v1/harness_pb";
|
|
2
2
|
|
|
3
3
|
// How much a Managed Work's Harness asks before it acts, as the person picks
|
|
4
4
|
// it at start and while the Work runs. A Cloud Work has no permission mode.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { timestampDate, timestampFromDate } from "@bufbuild/protobuf/wkt";
|
|
2
2
|
import { useRef } from "react";
|
|
3
3
|
import { keepPreviousData, useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
|
4
|
-
import type { DirectoryUser, LibraryFile, LibraryWork, PersonalWorkSummary } from "@talgent/
|
|
4
|
+
import type { DirectoryUser, LibraryFile, LibraryWork, PersonalWorkSummary } from "@talgent/contracts/agent/public/v1/personal_work_pb";
|
|
5
5
|
import { useCurrentUser } from "./account-service";
|
|
6
6
|
import { agentWorkQueryKey } from "./agent-work-service";
|
|
7
7
|
import { agentWorkClient, personalWorkClient } from "./client";
|
package/lib/plugin-parameters.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { JsonObject, JsonValue } from "@bufbuild/protobuf";
|
|
2
|
-
import type { InstalledPlugin, ParameterDeclaration } from "@talgent/
|
|
2
|
+
import type { InstalledPlugin, ParameterDeclaration } from "@talgent/contracts/marketplace/public/v1/marketplace_pb";
|
|
3
3
|
|
|
4
4
|
// Form values are text as typed; they become typed manual values only after
|
|
5
5
|
// validation against the release's declarations. Blank means "not set here",
|
package/lib/preview-verdict.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { WorkFilePreviewDisplay as Display, WorkFilePreviewMode as Mode, WorkFilePreviewRefusal as Refusal } from "@talgent/
|
|
1
|
+
import { WorkFilePreviewDisplay as Display, WorkFilePreviewMode as Mode, WorkFilePreviewRefusal as Refusal } from "@talgent/contracts/agent/public/v1/work_file_pb";
|
|
2
2
|
import type { PreviewVerdict } from "../components/preview/preview-verdict";
|
|
3
3
|
|
|
4
4
|
// Storage's file preview as a context relays it. Agent's preview contract
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { JsonObject } from "@bufbuild/protobuf";
|
|
2
|
-
import type { PermissionMode } from "@talgent/
|
|
2
|
+
import type { PermissionMode } from "@talgent/contracts/agent/public/v1/harness_pb";
|
|
3
3
|
|
|
4
4
|
/** What the person chose for a new Work, whatever the Work is for. */
|
|
5
5
|
export interface WorkStartInput {
|
package/lib/startup-progress.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { StartupProgress } from "@talgent/
|
|
1
|
+
import type { StartupProgress } from "@talgent/contracts/agent/public/v1/startup_pb";
|
|
2
2
|
|
|
3
3
|
// Revisions order committed Work projections, including completed progress.
|
|
4
4
|
// They do not establish native feedback ownership or ordering across processes.
|
package/lib/subagents.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { SubAgent as ProtoSubAgent } from "@talgent/
|
|
1
|
+
import type { SubAgent as ProtoSubAgent } from "@talgent/contracts/agent/public/v1/subagents_pb";
|
|
2
2
|
|
|
3
3
|
// The SubAgents the main Agent of the Work's current Harness process delegated
|
|
4
4
|
// to, as the Work reports them; the page never derives a state itself.
|
package/lib/work-conversation.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { equals } from "@bufbuild/protobuf";
|
|
2
|
-
import { UnifiedMessageKind, UnifiedMessageSchema, type UnifiedMessage } from "@talgent/
|
|
2
|
+
import { UnifiedMessageKind, UnifiedMessageSchema, type UnifiedMessage } from "@talgent/contracts/dispatcher/public/v1/unified_message_pb";
|
|
3
3
|
|
|
4
4
|
export interface WorkTurn {
|
|
5
5
|
key: string;
|
package/lib/work-file-service.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Code, ConnectError } from "@connectrpc/connect";
|
|
2
2
|
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
|
3
|
-
import { WorkFileAccessDisposition, WorkFileKind, type WorkFile } from "@talgent/
|
|
3
|
+
import { WorkFileAccessDisposition, WorkFileKind, type WorkFile } from "@talgent/contracts/agent/public/v1/work_file_pb";
|
|
4
4
|
import { useCurrentUser } from "./account-service";
|
|
5
5
|
import { workFileClient } from "./client";
|
|
6
6
|
import { NameTakenError } from "./name-taken-error";
|
package/lib/work-model.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { create } from "@bufbuild/protobuf";
|
|
2
|
-
import { ModelVendor, WorkModelOptionSchema, type WorkModelOption, type WorkModelSelection } from "@talgent/
|
|
2
|
+
import { ModelVendor, WorkModelOptionSchema, type WorkModelOption, type WorkModelSelection } from "@talgent/contracts/agent/public/v1/model_pb";
|
|
3
3
|
|
|
4
4
|
// What a Work's conversation uses for its model: a Model Configuration the
|
|
5
5
|
// platform provides, or, on a Managed Computer, the machine's own Claude login.
|
package/lib/work-notices.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { StreamDiagnosticFrame } from "@talgent/
|
|
1
|
+
import type { StreamDiagnosticFrame } from "@talgent/contracts/streamgateway/public/v1/streamgateway_pb";
|
|
2
2
|
import { notify } from "./notifications";
|
|
3
3
|
|
|
4
4
|
// Model provider refusals the Harness or a SubAgent recovers from are told live
|
package/lib/work-projection.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Code, ConnectError } from "@connectrpc/connect";
|
|
2
|
-
import type { StartupProgress } from "@talgent/
|
|
2
|
+
import type { StartupProgress } from "@talgent/contracts/agent/public/v1/startup_pb";
|
|
3
3
|
import { isTerminalWorkLifecycle } from "./work-state-presentation";
|
|
4
4
|
import { newestStartupProgress } from "./startup-progress";
|
|
5
5
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { JsonObject } from "@bufbuild/protobuf";
|
|
2
|
-
import type { WorkStartConnector, WorkStartPlugin } from "@talgent/
|
|
3
|
-
import type { Connector, InstalledPlugin, PluginRelease, PluginSummary } from "@talgent/
|
|
2
|
+
import type { WorkStartConnector, WorkStartPlugin } from "@talgent/contracts/agent/public/v1/work_start_options_pb";
|
|
3
|
+
import type { Connector, InstalledPlugin, PluginRelease, PluginSummary } from "@talgent/contracts/marketplace/public/v1/marketplace_pb";
|
|
4
4
|
import { pluginDisplayName, pluginPresentation } from "./marketplace-plugins";
|
|
5
5
|
import { missingRequired, parseParameters, parameterLabel } from "./plugin-parameters";
|
|
6
6
|
import type { WorkStartDraft } from "./work-start-draft";
|
package/lib/work-start-source.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { WorkModelOption } from "@talgent/
|
|
2
|
-
import type { WorkStartConnector, WorkStartPlugin, WorkStartRepositories } from "@talgent/
|
|
1
|
+
import type { WorkModelOption } from "@talgent/contracts/agent/public/v1/model_pb";
|
|
2
|
+
import type { WorkStartConnector, WorkStartPlugin, WorkStartRepositories } from "@talgent/contracts/agent/public/v1/work_start_options_pb";
|
|
3
3
|
import type { WorkStartDraftScope } from "./work-start-draft";
|
|
4
4
|
|
|
5
5
|
/** Where a new Work's choices come from: the options and repositories offered
|
|
@@ -4,7 +4,7 @@ import type { CallOptions } from "@connectrpc/connect";
|
|
|
4
4
|
import {
|
|
5
5
|
GetMessageDetailRequestSchema, GetToolDetailRequestSchema, ListMessagesBySessionRequestSchema, WatchStreamRequestSchema,
|
|
6
6
|
type GetMessageDetailResponse, type GetToolDetailResponse, type ListMessagesBySessionResponse, type WatchStreamResponse,
|
|
7
|
-
} from "@talgent/
|
|
7
|
+
} from "@talgent/contracts/streamgateway/public/v1/streamgateway_pb";
|
|
8
8
|
import { streamClient } from "./client";
|
|
9
9
|
|
|
10
10
|
/** Where a Work's message stream is read from: Streamgateway for its owner
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@talgent/workbench-ui",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.4",
|
|
4
4
|
"description": "The Talgent Workbench's pages and components, published as TypeScript source for web apps built with Vite.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -56,12 +56,15 @@
|
|
|
56
56
|
"react": "^19.2.4",
|
|
57
57
|
"react-dom": "^19.2.4",
|
|
58
58
|
"react-router-dom": "^7.18.2",
|
|
59
|
-
"streamdown": "2.6.0"
|
|
60
|
-
|
|
59
|
+
"streamdown": "2.6.0"
|
|
60
|
+
},
|
|
61
|
+
"peerDependencies": {
|
|
62
|
+
"@talgent/contracts": "*"
|
|
61
63
|
},
|
|
62
64
|
"devDependencies": {
|
|
63
65
|
"@eslint/js": "^9.39.4",
|
|
64
66
|
"@tailwindcss/vite": "^4.2.2",
|
|
67
|
+
"@talgent/contracts": "github:talgent-work/contracts#v0.2.1&path:/gen/ts",
|
|
65
68
|
"@testing-library/jest-dom": "^6.9.1",
|
|
66
69
|
"@testing-library/react": "^16.3.2",
|
|
67
70
|
"@testing-library/user-event": "^14.6.1",
|
|
@@ -2,8 +2,8 @@ import { useState } from "react";
|
|
|
2
2
|
import { create } from "@bufbuild/protobuf";
|
|
3
3
|
import { timestampDate } from "@bufbuild/protobuf/wkt";
|
|
4
4
|
import { Alert, Button, Label, ListBox, SearchField, Select, Table } from "@heroui/react";
|
|
5
|
-
import { WorkFileKind, WorkFileSchema } from "@talgent/
|
|
6
|
-
import type { LibraryFile, LibraryWork } from "@talgent/
|
|
5
|
+
import { WorkFileKind, WorkFileSchema } from "@talgent/contracts/agent/public/v1/work_file_pb";
|
|
6
|
+
import type { LibraryFile, LibraryWork } from "@talgent/contracts/agent/public/v1/personal_work_pb";
|
|
7
7
|
import { FileText } from "lucide-react";
|
|
8
8
|
import { Link } from "react-router-dom";
|
|
9
9
|
import { formatAgo } from "../../components/analytics/work-usage/work-status";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Avatar, Label } from "@heroui/react";
|
|
2
|
-
import type { DirectoryUser } from "@talgent/
|
|
2
|
+
import type { DirectoryUser } from "@talgent/contracts/agent/public/v1/personal_work_pb";
|
|
3
3
|
import { avatarInitial, personName, safeAvatarUrl } from "../../lib/user-display";
|
|
4
4
|
|
|
5
5
|
/** A person of the User Directory: avatar, name and username. */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useRef, useState, type ReactNode } from "react";
|
|
2
2
|
import { timestampDate } from "@bufbuild/protobuf/wkt";
|
|
3
3
|
import { Alert, Button } from "@heroui/react";
|
|
4
|
-
import { WorkFileKind, type WorkFile } from "@talgent/
|
|
4
|
+
import { WorkFileKind, type WorkFile } from "@talgent/contracts/agent/public/v1/work_file_pb";
|
|
5
5
|
import { Plus } from "lucide-react";
|
|
6
6
|
import { AttachmentConflictDialog, FileSection, type FileRow } from "../../components/files/file-section";
|
|
7
7
|
import { useReadingArea } from "../../components/shell/reading-context";
|
|
@@ -2,7 +2,7 @@ import { useWorkComputer } from "../../lib/computer-service";
|
|
|
2
2
|
import { useCallback, useState } from "react";
|
|
3
3
|
import { Code, ConnectError } from "@connectrpc/connect";
|
|
4
4
|
import { timestampDate } from "@bufbuild/protobuf/wkt";
|
|
5
|
-
import type { StartupProgress } from "@talgent/
|
|
5
|
+
import type { StartupProgress } from "@talgent/contracts/agent/public/v1/startup_pb";
|
|
6
6
|
import { useParams } from "react-router-dom";
|
|
7
7
|
import { PageLayout } from "../../components/shell/page-layout";
|
|
8
8
|
import { ConversationUnavailable } from "../../components/work/conversation-unavailable";
|
package/test-support/backend.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import type { DescService } from "@bufbuild/protobuf";
|
|
2
2
|
import { Code, ConnectError, createRouterTransport, type ConnectRouter, type HandlerContext } from "@connectrpc/connect";
|
|
3
|
-
import { AgentWorkService } from "@talgent/
|
|
4
|
-
import { PersonalWorkService } from "@talgent/
|
|
5
|
-
import { WorkFileService } from "@talgent/
|
|
6
|
-
import { SessionService } from "@talgent/
|
|
7
|
-
import { ComputerService } from "@talgent/
|
|
8
|
-
import { MarketplaceService } from "@talgent/
|
|
9
|
-
import { StreamGatewayService } from "@talgent/
|
|
10
|
-
import { TraceQueryService } from "@talgent/
|
|
3
|
+
import { AgentWorkService } from "@talgent/contracts/agent/public/v1/work_pb";
|
|
4
|
+
import { PersonalWorkService } from "@talgent/contracts/agent/public/v1/personal_work_pb";
|
|
5
|
+
import { WorkFileService } from "@talgent/contracts/agent/public/v1/work_file_pb";
|
|
6
|
+
import { SessionService } from "@talgent/contracts/account/public/v1/session_pb";
|
|
7
|
+
import { ComputerService } from "@talgent/contracts/computer/public/v1/computer_pb";
|
|
8
|
+
import { MarketplaceService } from "@talgent/contracts/marketplace/public/v1/marketplace_pb";
|
|
9
|
+
import { StreamGatewayService } from "@talgent/contracts/streamgateway/public/v1/streamgateway_pb";
|
|
10
|
+
import { TraceQueryService } from "@talgent/contracts/trace/public/v1/trace_pb";
|
|
11
11
|
import { vi } from "vitest";
|
|
12
12
|
|
|
13
13
|
// The single frontend test boundary: pages render through the real
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { create } from "@bufbuild/protobuf";
|
|
2
|
-
import { PluginSummarySchema, type PluginRelease } from "@talgent/
|
|
2
|
+
import { PluginSummarySchema, type PluginRelease } from "@talgent/contracts/marketplace/public/v1/marketplace_pb";
|
|
3
3
|
|
|
4
4
|
// ListPlugins lists summaries; fixtures describe full releases and list them through this.
|
|
5
5
|
export const summaryOf = (release: PluginRelease) => create(PluginSummarySchema, {
|