@agent-native/dispatch 0.14.11 → 0.14.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/actions/ask_app.d.ts +4 -0
- package/dist/actions/ask_app_status.d.ts +4 -0
- package/dist/actions/provider-api-catalog.d.ts +1 -1
- package/dist/routes/pages/dreams.js +3 -3
- package/dist/routes/pages/dreams.js.map +1 -1
- package/dist/server/lib/mcp-gateway.d.ts +8 -2
- package/dist/server/lib/mcp-gateway.d.ts.map +1 -1
- package/dist/server/lib/mcp-gateway.js +94 -3
- package/dist/server/lib/mcp-gateway.js.map +1 -1
- package/dist/server/lib/provider-api.d.ts +2 -2
- package/dist/server/lib/provider-api.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/routes/pages/dreams.tsx +9 -9
- package/src/server/lib/mcp-gateway.spec.ts +71 -0
- package/src/server/lib/mcp-gateway.ts +131 -13
|
@@ -11,6 +11,10 @@ declare const _default: import("@agent-native/core").ActionDefinition<{
|
|
|
11
11
|
response?: string;
|
|
12
12
|
error?: string;
|
|
13
13
|
inputRequired?: string;
|
|
14
|
+
statusRead?: "unavailable";
|
|
15
|
+
retryable?: true;
|
|
16
|
+
errorCategory?: "rate_limited" | "timeout" | "transport" | "upstream_5xx";
|
|
17
|
+
attempts?: number;
|
|
14
18
|
pollAfterMs?: number;
|
|
15
19
|
poll?: {
|
|
16
20
|
tool: "ask_app_status";
|
|
@@ -9,6 +9,10 @@ declare const _default: import("@agent-native/core").ActionDefinition<{
|
|
|
9
9
|
response?: string;
|
|
10
10
|
error?: string;
|
|
11
11
|
inputRequired?: string;
|
|
12
|
+
statusRead?: "unavailable";
|
|
13
|
+
retryable?: true;
|
|
14
|
+
errorCategory?: "rate_limited" | "timeout" | "transport" | "upstream_5xx";
|
|
15
|
+
attempts?: number;
|
|
12
16
|
pollAfterMs?: number;
|
|
13
17
|
poll?: {
|
|
14
18
|
tool: "ask_app_status";
|
|
@@ -2,7 +2,7 @@ declare const _default: import("@agent-native/core").ActionDefinition<{
|
|
|
2
2
|
provider?: string | undefined;
|
|
3
3
|
}, {
|
|
4
4
|
providers: unknown[] | {
|
|
5
|
-
id: "amplitude" | "apollo" | "bigquery" | "clay" | "commonroom" | "dataforseo" | "figma" | "ga4" | "gcloud" | "github" | "gmail" | "gong" | "google_calendar" | "google_drive" | "grafana" | "granola" | "hubspot" | "jira" | "mixpanel" | "notion" | "posthog" | "prometheus" | "pylon" | "sentry" | "slack" | "stripe" | "twitter";
|
|
5
|
+
id: "amplitude" | "apollo" | "bigquery" | "clay" | "commonroom" | "dataforseo" | "figma" | "ga4" | "gcloud" | "github" | "gmail" | "gong" | "google_calendar" | "google_drive" | "google_slides" | "grafana" | "granola" | "hubspot" | "jira" | "mixpanel" | "notion" | "posthog" | "prometheus" | "pylon" | "sentry" | "slack" | "stripe" | "twitter";
|
|
6
6
|
label: string;
|
|
7
7
|
defaultBaseUrl: string;
|
|
8
8
|
baseUrlCredentialKey: string;
|
|
@@ -201,7 +201,7 @@ function ProposalSkeleton() {
|
|
|
201
201
|
return (_jsx("div", { className: "space-y-3", children: Array.from({ length: 3 }).map((_, index) => (_jsxs("div", { className: "rounded-lg border p-4", children: [_jsx(Skeleton, { className: "h-4 w-1/2" }), _jsx(Skeleton, { className: "mt-3 h-3 w-full" }), _jsx(Skeleton, { className: "mt-2 h-3 w-3/4" })] }, index))) }));
|
|
202
202
|
}
|
|
203
203
|
function StatTile({ label, value, icon: Icon, }) {
|
|
204
|
-
return (_jsx("div", { className: "rounded-lg border bg-card px-3 py-2.5", children: _jsxs("div", { className: "flex items-center justify-between gap-
|
|
204
|
+
return (_jsx("div", { className: "rounded-lg border bg-card px-3 py-2.5", children: _jsxs("div", { className: "flex items-center justify-between gap-2", children: [_jsxs("div", { className: "min-w-0 flex-1", children: [_jsx("div", { className: "truncate text-[11px] font-medium uppercase tracking-wide text-muted-foreground", children: label }), _jsx("div", { className: "mt-1 text-xl font-semibold tabular-nums text-foreground", children: value })] }), _jsx(Icon, { size: 18, className: "shrink-0 text-muted-foreground" })] }) }));
|
|
205
205
|
}
|
|
206
206
|
function DreamSettingsSheet({ open, onOpenChange, draft, onDraftChange, onSave, saving, loading, }) {
|
|
207
207
|
const sourceIds = splitSourceIds(draft.sourceIdsText);
|
|
@@ -415,14 +415,14 @@ export default function DreamsRoute() {
|
|
|
415
415
|
minCandidateCount: dreamSettings?.minCandidateCount ?? 1,
|
|
416
416
|
});
|
|
417
417
|
}
|
|
418
|
-
return (_jsx(DispatchShell, { title: "Dreams", description: "Review agent runs, propose memory improvements, and apply evidence-backed learning changes.", children: _jsxs("div", { className: "space-y-4", children: [_jsxs("div", { className: "flex flex-col gap-3
|
|
418
|
+
return (_jsx(DispatchShell, { title: "Dreams", description: "Review agent runs, propose memory improvements, and apply evidence-backed learning changes.", children: _jsxs("div", { className: "space-y-4", children: [_jsxs("div", { className: "flex flex-col gap-3", children: [_jsxs("div", { className: "grid grid-cols-2 gap-2 md:grid-cols-4", children: [_jsx(StatTile, { label: "Dream passes", value: dreams.length, icon: IconBrain }), _jsx(StatTile, { label: "Pending proposals", value: pendingProposalCount, icon: IconCircleDashed }), _jsx(StatTile, { label: "Candidate runs", value: candidates.length, icon: IconClock }), _jsx(StatTile, { label: "Inspected threads", value: selectedDream ? dreamInspectedCount(selectedDream) : 0, icon: IconCheck })] }), _jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [dreamSettings ? (_jsxs(Badge, { variant: "outline", className: "h-9 max-w-full truncate px-3", children: [dreamSettings.enabled ? "Enabled" : "Paused", " \u00B7", " ", dreamSettings.allSources
|
|
419
419
|
? "All sources"
|
|
420
420
|
: dreamSettings.sourceId, " ", "\u00B7 ", dreamSettings.schedule] })) : null, _jsx(DreamSettingsSheet, { open: settingsOpen, onOpenChange: handleSettingsOpenChange, draft: settingsDraft, onDraftChange: setSettingsDraft, onSave: saveSettings, saving: saveDreamSettings.isPending, loading: dreamSettingsQuery.isLoading }), _jsxs(Button, { variant: "outline", onClick: () => {
|
|
421
421
|
dreamsQuery.refetch();
|
|
422
422
|
candidatesQuery.refetch();
|
|
423
423
|
if (selectedDreamId)
|
|
424
424
|
dreamDetailQuery.refetch();
|
|
425
|
-
}, children: [_jsx(IconRefresh, { size: 15, className: "mr-1.5" }), "Refresh"] }), _jsxs(Button, { variant: "outline", onClick: ensureSchedule, disabled: ensureDreamSchedule.isPending, children: [ensureDreamSchedule.isPending ? (_jsx(Spinner, { className: "mr-1.5 size-3.5" })) : (_jsx(IconCalendarTime, { size: 15, className: "mr-1.5" })), "Ensure schedule"] }), _jsxs(Button, { variant: "outline", onClick: () => runDream(true), disabled: createDream.isPending, children: [createDream.isPending ? (_jsx(Spinner, { className: "mr-1.5 size-3.5" })) : (_jsx(IconDatabase, { size: 15, className: "mr-1.5" })), "Run all sources"] }), _jsxs(Button, { onClick: () => runDream(false), disabled: createDream.isPending, children: [createDream.isPending ? (_jsx(Spinner, { className: "mr-1.5 size-3.5" })) : (_jsx(IconPlayerPlay, { size: 15, className: "mr-1.5" })), "Run dream"] })] })] }), _jsxs("div", { className: "grid gap-4 xl:grid-cols-[280px_minmax(0,1fr)_380px]", children: [_jsxs("section", { className: "rounded-lg border bg-card", children: [_jsxs("div", { className: "border-b px-4 py-3", children: [_jsx("div", { className: "text-sm font-semibold text-foreground", children: "Recent passes" }), _jsx("div", { className: "mt-1 text-xs text-muted-foreground", children: "Reports generated from prior agent activity." })] }), _jsxs("div", { className: "max-h-[720px] overflow-auto p-3", children: [_jsx(QueryState, { error: dreamsQuery.error, label: "Could not load dream passes" }), dreamsQuery.isLoading ? _jsx(DreamListSkeleton, {}) : null, !dreamsQuery.isLoading && !dreamsQuery.error ? (dreams.length > 0 ? (_jsx("div", { className: "space-y-2", children: dreams.map((dream, index) => {
|
|
425
|
+
}, children: [_jsx(IconRefresh, { size: 15, className: "mr-1.5" }), "Refresh"] }), _jsxs(Button, { variant: "outline", onClick: ensureSchedule, disabled: ensureDreamSchedule.isPending, children: [ensureDreamSchedule.isPending ? (_jsx(Spinner, { className: "mr-1.5 size-3.5" })) : (_jsx(IconCalendarTime, { size: 15, className: "mr-1.5" })), "Ensure schedule"] }), _jsxs(Button, { variant: "outline", onClick: () => runDream(true), disabled: createDream.isPending, children: [createDream.isPending ? (_jsx(Spinner, { className: "mr-1.5 size-3.5" })) : (_jsx(IconDatabase, { size: 15, className: "mr-1.5" })), "Run all sources"] }), _jsxs(Button, { onClick: () => runDream(false), disabled: createDream.isPending, children: [createDream.isPending ? (_jsx(Spinner, { className: "mr-1.5 size-3.5" })) : (_jsx(IconPlayerPlay, { size: 15, className: "mr-1.5" })), "Run dream"] })] })] }), _jsxs("div", { className: "grid gap-4 lg:grid-cols-2 xl:grid-cols-[280px_minmax(0,1fr)_380px]", children: [_jsxs("section", { className: "rounded-lg border bg-card", children: [_jsxs("div", { className: "border-b px-4 py-3", children: [_jsx("div", { className: "text-sm font-semibold text-foreground", children: "Recent passes" }), _jsx("div", { className: "mt-1 text-xs text-muted-foreground", children: "Reports generated from prior agent activity." })] }), _jsxs("div", { className: "max-h-[720px] overflow-auto p-3", children: [_jsx(QueryState, { error: dreamsQuery.error, label: "Could not load dream passes" }), dreamsQuery.isLoading ? _jsx(DreamListSkeleton, {}) : null, !dreamsQuery.isLoading && !dreamsQuery.error ? (dreams.length > 0 ? (_jsx("div", { className: "space-y-2", children: dreams.map((dream, index) => {
|
|
426
426
|
const selected = dream.id === selectedDreamId;
|
|
427
427
|
return (_jsxs("button", { type: "button", onClick: () => selectDream(dream.id), className: cn("w-full rounded-lg border px-3 py-3 text-left transition-colors", selected
|
|
428
428
|
? "border-foreground bg-muted"
|