mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-09-14 23:22:51 +00:00
Add demo API server and wire React app to fetch from API
Expand the OpenAPI spec from 11 to 39 endpoints covering Runs, Workflows, Verifications, Retros, Sessions, Insights, Settings, and Projects with ~45 schemas. Add `--demo` flag to `arc serve` that serves static demo data for all endpoints (auth disabled, read-only). Non-demo mode returns 501 for new endpoints while existing run handlers continue working. Regenerate the TypeScript API client and add `apiJson` helper. Wire all 19 React route files with server-side loaders that fetch from the API and map snake_case responses to camelCase UI types. Mock data kept as fallback. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
331dad98ec
commit
49364b0843
94 changed files with 7577 additions and 491 deletions
|
|
@ -34,12 +34,23 @@ export async function apiFetch(
|
|||
throw new Error("ARC_API_BASE_URL environment variable is not set");
|
||||
}
|
||||
|
||||
const token = await signToken();
|
||||
const headers = new Headers(init?.headers);
|
||||
headers.set("Authorization", `Bearer ${token}`);
|
||||
if (ARC_JWT_PRIVATE_KEY) {
|
||||
const token = await signToken();
|
||||
headers.set("Authorization", `Bearer ${token}`);
|
||||
}
|
||||
|
||||
return fetch(`${ARC_API_BASE_URL}${path}`, {
|
||||
...init,
|
||||
headers,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Typed JSON fetch helper. Calls apiFetch and parses the JSON response.
|
||||
*/
|
||||
export async function apiJson<T>(path: string, init?: RequestInit): Promise<T> {
|
||||
const res = await apiFetch(path, init);
|
||||
if (!res.ok) throw new Error(`API ${res.status}: ${await res.text()}`);
|
||||
return res.json() as Promise<T>;
|
||||
}
|
||||
|
|
|
|||
35
apps/arc-web/app/lib/format.ts
Normal file
35
apps/arc-web/app/lib/format.ts
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
/**
|
||||
* Format a number of seconds into a human-readable duration string.
|
||||
* Examples: "23s", "7m", "2h 15m", "3d"
|
||||
*/
|
||||
export function formatElapsedSecs(secs: number): string {
|
||||
if (secs < 60) return `${Math.round(secs)}s`;
|
||||
const minutes = Math.floor(secs / 60);
|
||||
if (minutes < 60) {
|
||||
const remainSecs = Math.round(secs % 60);
|
||||
return remainSecs > 0 ? `${minutes}m ${remainSecs}s` : `${minutes}m`;
|
||||
}
|
||||
const hours = Math.floor(minutes / 60);
|
||||
if (hours < 24) {
|
||||
const remainMin = minutes % 60;
|
||||
return remainMin > 0 ? `${hours}h ${remainMin}m` : `${hours}h`;
|
||||
}
|
||||
const days = Math.floor(hours / 24);
|
||||
const remainHrs = hours % 24;
|
||||
return remainHrs > 0 ? `${days}d ${remainHrs}h` : `${days}d`;
|
||||
}
|
||||
|
||||
/**
|
||||
* Format seconds into a duration string for display (e.g., "1m 12s", "23s").
|
||||
*/
|
||||
export function formatDurationSecs(secs: number): string {
|
||||
if (secs < 60) return `${Math.round(secs)}s`;
|
||||
const minutes = Math.floor(secs / 60);
|
||||
const remainSecs = Math.round(secs % 60);
|
||||
if (minutes < 60) {
|
||||
return remainSecs > 0 ? `${minutes}m ${remainSecs}s` : `${minutes}m`;
|
||||
}
|
||||
const hours = Math.floor(minutes / 60);
|
||||
const remainMin = minutes % 60;
|
||||
return remainMin > 0 ? `${hours}h ${remainMin}m` : `${hours}h`;
|
||||
}
|
||||
|
|
@ -1,5 +1,7 @@
|
|||
import { Link, Outlet, useNavigate } from "react-router";
|
||||
import { PlusIcon } from "@heroicons/react/24/outline";
|
||||
import { apiJson } from "../api-client";
|
||||
import type { SavedQuery as ApiSavedQuery, HistoryEntry as ApiHistoryEntry } from "@qltysh/arc-api-client";
|
||||
import type { Route } from "./+types/insights";
|
||||
|
||||
export function meta({}: Route.MetaArgs) {
|
||||
|
|
@ -26,35 +28,28 @@ export interface HistoryEntry {
|
|||
rowsReturned: number;
|
||||
}
|
||||
|
||||
// ── Mock data ──
|
||||
export async function loader() {
|
||||
const [apiQueries, apiHistory] = await Promise.all([
|
||||
apiJson<ApiSavedQuery[]>("/insights/queries"),
|
||||
apiJson<ApiHistoryEntry[]>("/insights/history"),
|
||||
]);
|
||||
const savedQueries: SavedQuery[] = apiQueries.map((q) => ({
|
||||
id: q.id,
|
||||
name: q.name,
|
||||
sql: q.sql,
|
||||
}));
|
||||
const historyEntries: HistoryEntry[] = apiHistory.map((h) => ({
|
||||
id: h.id,
|
||||
sql: h.sql,
|
||||
timestamp: h.timestamp,
|
||||
elapsed: h.elapsed,
|
||||
rowsReturned: h.row_count,
|
||||
}));
|
||||
return { savedQueries, historyEntries };
|
||||
}
|
||||
|
||||
export const savedQueries: SavedQuery[] = [
|
||||
{
|
||||
id: "1",
|
||||
name: "Run duration by workflow",
|
||||
sql: "SELECT workflow_name, AVG(duration_seconds) as avg_duration,\n COUNT(*) as run_count\nFROM runs\nGROUP BY workflow_name\nORDER BY avg_duration DESC\nLIMIT 20",
|
||||
},
|
||||
{
|
||||
id: "2",
|
||||
name: "Daily failure rate",
|
||||
sql: "SELECT date_trunc('day', created_at) as day,\n COUNT(*) FILTER (WHERE status = 'failed') as failures,\n COUNT(*) as total,\n ROUND(100.0 * COUNT(*) FILTER (WHERE status = 'failed') / COUNT(*), 1) as failure_rate\nFROM runs\nGROUP BY 1\nORDER BY 1 DESC\nLIMIT 30",
|
||||
},
|
||||
{
|
||||
id: "3",
|
||||
name: "Top repos by activity",
|
||||
sql: "SELECT repo, COUNT(*) as runs, SUM(additions) as total_additions,\n SUM(deletions) as total_deletions\nFROM runs\nGROUP BY repo\nORDER BY runs DESC",
|
||||
},
|
||||
];
|
||||
|
||||
export const historyEntries: HistoryEntry[] = [
|
||||
{ id: "h1", sql: "SELECT workflow_name, COUNT(*) FROM runs GROUP BY 1", timestamp: "2 min ago", elapsed: 0.342, rowsReturned: 6 },
|
||||
{ id: "h2", sql: "SELECT * FROM runs WHERE status = 'failed' LIMIT 100", timestamp: "8 min ago", elapsed: 0.127, rowsReturned: 23 },
|
||||
{ id: "h3", sql: "SELECT date_trunc('day', created_at) as d, COUNT(*) FROM runs GROUP BY 1 ORDER BY 1", timestamp: "15 min ago", elapsed: 0.531, rowsReturned: 30 },
|
||||
{ id: "h4", sql: "SELECT repo, AVG(duration_seconds) FROM runs GROUP BY repo", timestamp: "1 hr ago", elapsed: 0.089, rowsReturned: 12 },
|
||||
{ id: "h5", sql: "DESCRIBE runs", timestamp: "1 hr ago", elapsed: 0.003, rowsReturned: 18 },
|
||||
];
|
||||
|
||||
export default function InsightsLayout() {
|
||||
export default function InsightsLayout({ loaderData }: Route.ComponentProps) {
|
||||
const { savedQueries, historyEntries } = loaderData;
|
||||
const navigate = useNavigate();
|
||||
|
||||
return (
|
||||
|
|
|
|||
|
|
@ -1,10 +1,36 @@
|
|||
import { useState } from "react";
|
||||
import { useNavigate } from "react-router";
|
||||
import { MagnifyingGlassIcon, ChevronDownIcon } from "@heroicons/react/24/outline";
|
||||
import { allRetros, smoothnessConfig, formatDuration } from "../data/retros";
|
||||
import type { Retro, SmoothnessRating } from "../data/retros";
|
||||
import { smoothnessConfig, formatDuration } from "../data/retros";
|
||||
import type { SmoothnessRating } from "../data/retros";
|
||||
import { apiJson } from "../api-client";
|
||||
import type { RetroListItem } from "@qltysh/arc-api-client";
|
||||
import type { Route } from "./+types/retros";
|
||||
|
||||
interface RetroRow {
|
||||
run_id: string;
|
||||
workflow_name: string;
|
||||
goal: string;
|
||||
timestamp: string;
|
||||
smoothness?: SmoothnessRating;
|
||||
total_duration_ms: number;
|
||||
friction_point_count: number;
|
||||
}
|
||||
|
||||
export async function loader() {
|
||||
const apiRetros = await apiJson<RetroListItem[]>("/retros");
|
||||
const retros: RetroRow[] = apiRetros.map((r) => ({
|
||||
run_id: r.run_id,
|
||||
workflow_name: r.workflow_name,
|
||||
goal: r.goal,
|
||||
timestamp: r.timestamp,
|
||||
smoothness: r.smoothness as SmoothnessRating | undefined,
|
||||
total_duration_ms: r.stats.total_duration_ms,
|
||||
friction_point_count: r.friction_point_count,
|
||||
}));
|
||||
return { retros };
|
||||
}
|
||||
|
||||
export function meta({}: Route.MetaArgs) {
|
||||
return [{ title: "Retros \u2014 Arc" }];
|
||||
}
|
||||
|
|
@ -17,7 +43,7 @@ const smoothnessOptions: Array<{ value: SmoothnessRating; label: string }> = [
|
|||
{ value: "failed", label: "Failed" },
|
||||
];
|
||||
|
||||
function SmoothnesssBadge({ smoothness }: { smoothness: Retro["smoothness"] }) {
|
||||
function SmoothnesssBadge({ smoothness }: { smoothness: SmoothnessRating | undefined }) {
|
||||
if (!smoothness) {
|
||||
return <span className="text-xs text-fg-muted">--</span>;
|
||||
}
|
||||
|
|
@ -45,8 +71,8 @@ function truncate(text: string, maxLength: number): string {
|
|||
return text.slice(0, maxLength) + "\u2026";
|
||||
}
|
||||
|
||||
export default function Retros() {
|
||||
const retros = allRetros();
|
||||
export default function Retros({ loaderData }: Route.ComponentProps) {
|
||||
const { retros } = loaderData;
|
||||
const navigate = useNavigate();
|
||||
const [query, setQuery] = useState("");
|
||||
const [smoothnessFilter, setSmoothnessFilter] = useState<SmoothnessRating | "all">("all");
|
||||
|
|
@ -116,10 +142,10 @@ export default function Retros() {
|
|||
<SmoothnesssBadge smoothness={retro.smoothness} />
|
||||
</td>
|
||||
<td className="px-4 py-3 text-right font-mono text-xs tabular-nums text-fg-3">
|
||||
{formatDuration(retro.stats.total_duration_ms)}
|
||||
{formatDuration(retro.total_duration_ms)}
|
||||
</td>
|
||||
<td className="px-4 py-3 text-right font-mono text-xs tabular-nums text-fg-3">
|
||||
{retro.friction_points?.length ?? 0}
|
||||
{retro.friction_point_count}
|
||||
</td>
|
||||
<td className="px-4 py-3 text-right font-mono text-xs text-fg-muted">
|
||||
{formatTimestamp(retro.timestamp)}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,11 @@
|
|||
import { Link, useParams } from "react-router";
|
||||
import { CheckCircleIcon, ArrowPathIcon, PauseCircleIcon, XCircleIcon } from "@heroicons/react/24/solid";
|
||||
import { DocumentTextIcon, MapIcon } from "@heroicons/react/24/outline";
|
||||
import { findRun } from "../data/runs";
|
||||
import { workflowData } from "./workflow-detail";
|
||||
import { CollapsibleFile } from "../components/collapsible-file";
|
||||
import { apiFetch, apiJson } from "../api-client";
|
||||
import { formatDurationSecs } from "../lib/format";
|
||||
import type { RunStage } from "@qltysh/arc-api-client";
|
||||
import type { Route } from "./+types/run-configuration";
|
||||
|
||||
export const handle = { wide: true };
|
||||
|
||||
|
|
@ -16,13 +18,6 @@ interface Stage {
|
|||
duration: string;
|
||||
}
|
||||
|
||||
const stages: Stage[] = [
|
||||
{ id: "detect-drift", name: "Detect Drift", status: "completed", duration: "1m 12s" },
|
||||
{ id: "propose-changes", name: "Propose Changes", status: "completed", duration: "2m 34s" },
|
||||
{ id: "review-changes", name: "Review Changes", status: "completed", duration: "0m 45s" },
|
||||
{ id: "apply-changes", name: "Apply Changes", status: "running", duration: "1m 58s" },
|
||||
];
|
||||
|
||||
const statusConfig: Record<StageStatus, { icon: typeof CheckCircleIcon; color: string }> = {
|
||||
completed: { icon: CheckCircleIcon, color: "text-mint" },
|
||||
running: { icon: ArrowPathIcon, color: "text-teal-500" },
|
||||
|
|
@ -30,10 +25,24 @@ const statusConfig: Record<StageStatus, { icon: typeof CheckCircleIcon; color: s
|
|||
failed: { icon: XCircleIcon, color: "text-coral" },
|
||||
};
|
||||
|
||||
export default function RunConfiguration() {
|
||||
export async function loader({ params }: Route.LoaderArgs) {
|
||||
const [apiStages, configRes] = await Promise.all([
|
||||
apiJson<RunStage[]>(`/runs/${params.id}/stages`),
|
||||
apiFetch(`/runs/${params.id}/configuration`),
|
||||
]);
|
||||
const stages: Stage[] = apiStages.map((s) => ({
|
||||
id: s.id,
|
||||
name: s.name,
|
||||
status: s.status as StageStatus,
|
||||
duration: s.duration_secs != null ? formatDurationSecs(s.duration_secs) : "--",
|
||||
}));
|
||||
const configText = configRes.ok ? await configRes.text() : null;
|
||||
return { stages, configText };
|
||||
}
|
||||
|
||||
export default function RunConfiguration({ loaderData }: Route.ComponentProps) {
|
||||
const { id } = useParams();
|
||||
const run = findRun(id ?? "");
|
||||
const workflow = run ? workflowData[run.workflow] : undefined;
|
||||
const { stages, configText } = loaderData;
|
||||
|
||||
return (
|
||||
<div className="flex gap-6">
|
||||
|
|
@ -60,37 +69,35 @@ export default function RunConfiguration() {
|
|||
</ul>
|
||||
</div>
|
||||
|
||||
{workflow && (
|
||||
<div>
|
||||
<h3 className="px-2 text-xs font-medium uppercase tracking-wider text-fg-muted">Workflow</h3>
|
||||
<ul className="mt-2 space-y-0.5">
|
||||
<li>
|
||||
<Link
|
||||
to={`/runs/${id}/configuration`}
|
||||
className="flex items-center gap-2 rounded-md bg-overlay px-2 py-1.5 text-sm text-fg transition-colors"
|
||||
>
|
||||
<DocumentTextIcon className="size-4 shrink-0 text-fg-muted" />
|
||||
Run Configuration
|
||||
</Link>
|
||||
</li>
|
||||
<li>
|
||||
<Link
|
||||
to={`/runs/${id}/graph`}
|
||||
className="flex items-center gap-2 rounded-md px-2 py-1.5 text-sm text-fg-3 transition-colors hover:bg-overlay hover:text-fg"
|
||||
>
|
||||
<MapIcon className="size-4 shrink-0 text-fg-muted" />
|
||||
Workflow Graph
|
||||
</Link>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
)}
|
||||
<div>
|
||||
<h3 className="px-2 text-xs font-medium uppercase tracking-wider text-fg-muted">Workflow</h3>
|
||||
<ul className="mt-2 space-y-0.5">
|
||||
<li>
|
||||
<Link
|
||||
to={`/runs/${id}/configuration`}
|
||||
className="flex items-center gap-2 rounded-md bg-overlay px-2 py-1.5 text-sm text-fg transition-colors"
|
||||
>
|
||||
<DocumentTextIcon className="size-4 shrink-0 text-fg-muted" />
|
||||
Run Configuration
|
||||
</Link>
|
||||
</li>
|
||||
<li>
|
||||
<Link
|
||||
to={`/runs/${id}/graph`}
|
||||
className="flex items-center gap-2 rounded-md px-2 py-1.5 text-sm text-fg-3 transition-colors hover:bg-overlay hover:text-fg"
|
||||
>
|
||||
<MapIcon className="size-4 shrink-0 text-fg-muted" />
|
||||
Workflow Graph
|
||||
</Link>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div className="min-w-0 flex-1">
|
||||
{workflow ? (
|
||||
{configText ? (
|
||||
<CollapsibleFile
|
||||
file={{ name: "task.toml", contents: workflow.config, lang: "toml" }}
|
||||
file={{ name: "task.toml", contents: configText, lang: "toml" }}
|
||||
/>
|
||||
) : (
|
||||
<p className="text-sm text-fg-muted">No configuration found.</p>
|
||||
|
|
|
|||
|
|
@ -1,14 +1,17 @@
|
|||
import { ChevronDownIcon, ChevronRightIcon } from "@heroicons/react/20/solid";
|
||||
import { Menu, MenuButton, MenuItem, MenuItems } from "@headlessui/react";
|
||||
import { Link, Outlet, useLocation } from "react-router";
|
||||
import { findRun, statusColors } from "../data/runs";
|
||||
import { workflowData } from "./workflow-detail";
|
||||
import { statusColors } from "../data/runs";
|
||||
import type { ColumnStatus } from "../data/runs";
|
||||
import { apiJson } from "../api-client";
|
||||
import { formatElapsedSecs, formatDurationSecs } from "../lib/format";
|
||||
import type { RunListItem } from "@qltysh/arc-api-client";
|
||||
import type { Route } from "./+types/run-detail";
|
||||
|
||||
const tabs = [
|
||||
{ name: "Overview", path: "", count: null },
|
||||
{ name: "Stages", path: "/stages/detect-drift", count: 4 },
|
||||
{ name: "Files Changed", path: "/files", count: 3 },
|
||||
{ name: "Stages", path: "/stages/detect-drift", count: null },
|
||||
{ name: "Files Changed", path: "/files", count: null },
|
||||
{ name: "Verifications", path: "/verifications", count: null },
|
||||
{ name: "Retro", path: "/retro", count: null },
|
||||
{ name: "Usage", path: "/usage", count: null },
|
||||
|
|
@ -16,13 +19,32 @@ const tabs = [
|
|||
|
||||
export const handle = { hideHeader: true };
|
||||
|
||||
export function meta({ params }: Route.MetaArgs) {
|
||||
const run = findRun(params.id);
|
||||
export async function loader({ params }: Route.LoaderArgs) {
|
||||
const apiRuns = await apiJson<RunListItem[]>("/runs");
|
||||
const apiRun = apiRuns.find((r) => r.id === params.id);
|
||||
if (!apiRun) return { run: null };
|
||||
return {
|
||||
run: {
|
||||
id: apiRun.id,
|
||||
repo: apiRun.repo,
|
||||
title: apiRun.title,
|
||||
workflow: apiRun.workflow,
|
||||
status: apiRun.status as ColumnStatus,
|
||||
statusLabel: apiRun.status === "working" ? "Working" : apiRun.status === "pending" ? "Pending" : apiRun.status === "review" ? "Verify" : "Merge",
|
||||
elapsed: apiRun.elapsed_secs != null ? formatElapsedSecs(apiRun.elapsed_secs) : undefined,
|
||||
elapsedWarning: apiRun.elapsed_warning,
|
||||
sandboxId: apiRun.sandbox_id,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
export function meta({ data }: Route.MetaArgs) {
|
||||
const run = data?.run;
|
||||
return [{ title: run ? `${run.title} — Arc` : "Run — Arc" }];
|
||||
}
|
||||
|
||||
export default function RunDetail({ params }: Route.ComponentProps) {
|
||||
const run = findRun(params.id);
|
||||
export default function RunDetail({ loaderData, params }: Route.ComponentProps) {
|
||||
const { run } = loaderData;
|
||||
const { pathname } = useLocation();
|
||||
const basePath = `/runs/${params.id}`;
|
||||
|
||||
|
|
@ -38,7 +60,7 @@ export default function RunDetail({ params }: Route.ComponentProps) {
|
|||
<Link to="/runs" className="text-fg-3 hover:text-fg">Runs</Link>
|
||||
<ChevronRightIcon className="size-3" />
|
||||
<Link to={`/workflows/${run.workflow}`} className="text-fg-3 hover:text-fg">
|
||||
{workflowData[run.workflow]?.title ?? run.workflow}
|
||||
{run.workflow}
|
||||
</Link>
|
||||
<ChevronRightIcon className="size-3" />
|
||||
<span>{run.title}</span>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import { useCallback, useEffect, useRef, useState } from "react";
|
||||
import { useParams } from "react-router";
|
||||
import { ChevronDownIcon, Cog6ToothIcon } from "@heroicons/react/24/outline";
|
||||
import {
|
||||
MultiFileDiff,
|
||||
|
|
@ -6,18 +7,18 @@ import {
|
|||
type DiffLineAnnotation,
|
||||
} from "@pierre/diffs/react";
|
||||
import { useTheme } from "../lib/theme";
|
||||
import { apiJson } from "../api-client";
|
||||
import type { RunFiles } from "@qltysh/arc-api-client";
|
||||
import type { Route } from "./+types/run-files-changed";
|
||||
|
||||
export const handle = { wide: true };
|
||||
|
||||
const checkpoints = [
|
||||
{ id: "all", label: "All changes" },
|
||||
{ id: "cp-4", label: "Checkpoint 4 — Apply Changes" },
|
||||
{ id: "cp-3", label: "Checkpoint 3 — Review Changes" },
|
||||
{ id: "cp-2", label: "Checkpoint 2 — Propose Changes" },
|
||||
{ id: "cp-1", label: "Checkpoint 1 — Detect Drift" },
|
||||
];
|
||||
export async function loader({ params }: Route.LoaderArgs) {
|
||||
const data = await apiJson<RunFiles>(`/runs/${params.id}/files?checkpoint=all`);
|
||||
return data;
|
||||
}
|
||||
|
||||
const files = [
|
||||
const fallbackFiles = [
|
||||
{
|
||||
oldFile: {
|
||||
name: "src/commands/run.ts",
|
||||
|
|
@ -507,7 +508,20 @@ function buildAnnotationsForFile(
|
|||
return annotations;
|
||||
}
|
||||
|
||||
export default function RunFilesChanged() {
|
||||
export default function RunFilesChanged({ loaderData }: Route.ComponentProps) {
|
||||
const runFiles = loaderData;
|
||||
const checkpoints = [
|
||||
{ id: "all", label: "All changes" },
|
||||
...runFiles.checkpoints.map((cp) => ({ id: cp.id, label: cp.label })),
|
||||
];
|
||||
const files = runFiles.files.length > 0
|
||||
? runFiles.files.map((f) => ({
|
||||
oldFile: { name: f.old_file.name, contents: f.old_file.contents },
|
||||
newFile: { name: f.new_file.name, contents: f.new_file.contents },
|
||||
}))
|
||||
: fallbackFiles;
|
||||
const diffStats = runFiles.stats;
|
||||
|
||||
const [checkpoint, setCheckpoint] = useState(checkpoints[0].id);
|
||||
const [openSteers, setOpenSteers] = useState(
|
||||
() => new Map<string, SteerAnnotation>(),
|
||||
|
|
@ -560,7 +574,7 @@ export default function RunFilesChanged() {
|
|||
<ChevronDownIcon className="pointer-events-none absolute right-2 top-1/2 size-4 -translate-y-1/2 text-fg-muted" />
|
||||
</div>
|
||||
<div className="ml-auto flex items-center gap-3">
|
||||
<DiffStat additions={567} deletions={234} />
|
||||
<DiffStat additions={diffStats.additions} deletions={diffStats.deletions} />
|
||||
<button
|
||||
type="button"
|
||||
title="Settings"
|
||||
|
|
|
|||
|
|
@ -3,10 +3,12 @@ import { Link, useParams } from "react-router";
|
|||
import { ArrowDownIcon, ArrowRightIcon, MinusIcon, PlusIcon } from "@heroicons/react/20/solid";
|
||||
import { CheckCircleIcon, ArrowPathIcon, PauseCircleIcon, XCircleIcon } from "@heroicons/react/24/solid";
|
||||
import { DocumentTextIcon, MapIcon } from "@heroicons/react/24/outline";
|
||||
import { findRun } from "../data/runs";
|
||||
import { workflowData } from "./workflow-detail";
|
||||
import { useTheme } from "../lib/theme";
|
||||
import { getGraphTheme } from "../lib/graph-theme";
|
||||
import { apiFetch, apiJson } from "../api-client";
|
||||
import { formatDurationSecs } from "../lib/format";
|
||||
import type { RunStage } from "@qltysh/arc-api-client";
|
||||
import type { Route } from "./+types/run-graph";
|
||||
|
||||
export const handle = { wide: true };
|
||||
|
||||
|
|
@ -20,12 +22,21 @@ interface Stage {
|
|||
duration: string;
|
||||
}
|
||||
|
||||
const stages: Stage[] = [
|
||||
{ id: "detect-drift", name: "Detect Drift", dotId: "detect", status: "completed", duration: "1m 12s" },
|
||||
{ id: "propose-changes", name: "Propose Changes", dotId: "propose", status: "completed", duration: "2m 34s" },
|
||||
{ id: "review-changes", name: "Review Changes", dotId: "review", status: "completed", duration: "0m 45s" },
|
||||
{ id: "apply-changes", name: "Apply Changes", dotId: "apply", status: "running", duration: "1m 58s" },
|
||||
];
|
||||
export async function loader({ params }: Route.LoaderArgs) {
|
||||
const [apiStages, graphRes] = await Promise.all([
|
||||
apiJson<RunStage[]>(`/runs/${params.id}/stages`),
|
||||
apiFetch(`/runs/${params.id}/graph`),
|
||||
]);
|
||||
const stages: Stage[] = apiStages.map((s) => ({
|
||||
id: s.id,
|
||||
name: s.name,
|
||||
dotId: s.dot_id ?? s.id,
|
||||
status: s.status as StageStatus,
|
||||
duration: s.duration_secs != null ? formatDurationSecs(s.duration_secs) : "--",
|
||||
}));
|
||||
const graphSvg = graphRes.ok ? await graphRes.text() : null;
|
||||
return { stages, graphSvg };
|
||||
}
|
||||
|
||||
const statusConfig: Record<StageStatus, { icon: typeof CheckCircleIcon; color: string }> = {
|
||||
completed: { icon: CheckCircleIcon, color: "text-mint" },
|
||||
|
|
@ -91,12 +102,12 @@ function stripGraphTitle(svg: SVGSVGElement) {
|
|||
title.remove();
|
||||
}
|
||||
|
||||
function annotateRunningNodes(svg: SVGSVGElement, gt: ReturnType<typeof getGraphTheme>) {
|
||||
function annotateRunningNodes(svg: SVGSVGElement, gt: ReturnType<typeof getGraphTheme>, stageList: Stage[]) {
|
||||
const runningDotIds = new Set(
|
||||
stages.filter((s) => s.status === "running").map((s) => s.dotId),
|
||||
stageList.filter((s) => s.status === "running").map((s) => s.dotId),
|
||||
);
|
||||
const completedDotIds = new Set(
|
||||
stages.filter((s) => s.status === "completed").map((s) => s.dotId),
|
||||
stageList.filter((s) => s.status === "completed").map((s) => s.dotId),
|
||||
);
|
||||
|
||||
const nodeGroups = svg.querySelectorAll(".node");
|
||||
|
|
@ -178,10 +189,9 @@ function annotateRunningNodes(svg: SVGSVGElement, gt: ReturnType<typeof getGraph
|
|||
const ZOOM_STEPS = [25, 50, 75, 100, 150, 200];
|
||||
const DEFAULT_ZOOM_INDEX = 2;
|
||||
|
||||
export default function RunGraph() {
|
||||
export default function RunGraph({ loaderData }: Route.ComponentProps) {
|
||||
const { id } = useParams();
|
||||
const run = findRun(id ?? "");
|
||||
const workflow = run ? workflowData[run.workflow] : undefined;
|
||||
const { stages, graphSvg } = loaderData;
|
||||
const containerRef = useRef<HTMLDivElement>(null);
|
||||
const innerRef = useRef<HTMLDivElement>(null);
|
||||
const svgRef = useRef<SVGSVGElement | null>(null);
|
||||
|
|
@ -205,7 +215,7 @@ export default function RunGraph() {
|
|||
try {
|
||||
const svg = viz.renderSVGElement(buildDot(direction, graphTheme));
|
||||
stripGraphTitle(svg);
|
||||
annotateRunningNodes(svg, graphTheme);
|
||||
annotateRunningNodes(svg, graphTheme, stages);
|
||||
|
||||
svgRef.current = svg;
|
||||
if (innerRef.current) {
|
||||
|
|
@ -289,31 +299,29 @@ export default function RunGraph() {
|
|||
</ul>
|
||||
</div>
|
||||
|
||||
{workflow && (
|
||||
<div>
|
||||
<h3 className="px-2 text-xs font-medium uppercase tracking-wider text-fg-muted">Workflow</h3>
|
||||
<ul className="mt-2 space-y-0.5">
|
||||
<li>
|
||||
<Link
|
||||
to={`/runs/${id}/configuration`}
|
||||
className="flex items-center gap-2 rounded-md px-2 py-1.5 text-sm text-fg-3 transition-colors hover:bg-overlay hover:text-fg"
|
||||
>
|
||||
<DocumentTextIcon className="size-4 shrink-0 text-fg-muted" />
|
||||
Run Configuration
|
||||
</Link>
|
||||
</li>
|
||||
<li>
|
||||
<Link
|
||||
to={`/runs/${id}/graph`}
|
||||
className="flex items-center gap-2 rounded-md bg-overlay px-2 py-1.5 text-sm text-fg transition-colors"
|
||||
>
|
||||
<MapIcon className="size-4 shrink-0 text-fg-muted" />
|
||||
Workflow Graph
|
||||
</Link>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
)}
|
||||
<div>
|
||||
<h3 className="px-2 text-xs font-medium uppercase tracking-wider text-fg-muted">Workflow</h3>
|
||||
<ul className="mt-2 space-y-0.5">
|
||||
<li>
|
||||
<Link
|
||||
to={`/runs/${id}/configuration`}
|
||||
className="flex items-center gap-2 rounded-md px-2 py-1.5 text-sm text-fg-3 transition-colors hover:bg-overlay hover:text-fg"
|
||||
>
|
||||
<DocumentTextIcon className="size-4 shrink-0 text-fg-muted" />
|
||||
Run Configuration
|
||||
</Link>
|
||||
</li>
|
||||
<li>
|
||||
<Link
|
||||
to={`/runs/${id}/graph`}
|
||||
className="flex items-center gap-2 rounded-md bg-overlay px-2 py-1.5 text-sm text-fg transition-colors"
|
||||
>
|
||||
<MapIcon className="size-4 shrink-0 text-fg-muted" />
|
||||
Workflow Graph
|
||||
</Link>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div className="min-w-0 flex-1">
|
||||
|
|
|
|||
|
|
@ -3,10 +3,12 @@ import { Link, useParams } from "react-router";
|
|||
import { ArrowDownIcon, ArrowRightIcon, MinusIcon, PlusIcon } from "@heroicons/react/20/solid";
|
||||
import { CheckCircleIcon, ArrowPathIcon, PauseCircleIcon, XCircleIcon } from "@heroicons/react/24/solid";
|
||||
import { DocumentTextIcon, MapIcon } from "@heroicons/react/24/outline";
|
||||
import { findRun } from "../data/runs";
|
||||
import { workflowData } from "./workflow-detail";
|
||||
import { useTheme } from "../lib/theme";
|
||||
import { getGraphTheme } from "../lib/graph-theme";
|
||||
import { apiJson } from "../api-client";
|
||||
import { formatDurationSecs } from "../lib/format";
|
||||
import type { RunStage, RunListItem, WorkflowDetail } from "@qltysh/arc-api-client";
|
||||
import type { Route } from "./+types/run-overview";
|
||||
|
||||
export const handle = { wide: true };
|
||||
|
||||
|
|
@ -19,12 +21,29 @@ interface Stage {
|
|||
duration: string;
|
||||
}
|
||||
|
||||
const stages: Stage[] = [
|
||||
{ id: "detect-drift", name: "Detect Drift", status: "completed", duration: "1m 12s" },
|
||||
{ id: "propose-changes", name: "Propose Changes", status: "completed", duration: "2m 34s" },
|
||||
{ id: "review-changes", name: "Review Changes", status: "completed", duration: "0m 45s" },
|
||||
{ id: "apply-changes", name: "Apply Changes", status: "running", duration: "1m 58s" },
|
||||
];
|
||||
export async function loader({ params }: Route.LoaderArgs) {
|
||||
const [apiStages, runs] = await Promise.all([
|
||||
apiJson<RunStage[]>(`/runs/${params.id}/stages`),
|
||||
apiJson<RunListItem[]>("/runs"),
|
||||
]);
|
||||
const stages: Stage[] = apiStages.map((s) => ({
|
||||
id: s.id,
|
||||
name: s.name,
|
||||
status: s.status as StageStatus,
|
||||
duration: s.duration_secs != null ? formatDurationSecs(s.duration_secs) : "--",
|
||||
}));
|
||||
const run = runs.find((r) => r.id === params.id);
|
||||
let graphDot: string | null = null;
|
||||
if (run) {
|
||||
try {
|
||||
const workflow = await apiJson<WorkflowDetail>(`/workflows/${run.workflow}`);
|
||||
graphDot = workflow.graph;
|
||||
} catch {
|
||||
// workflow not found — leave graphDot null
|
||||
}
|
||||
}
|
||||
return { stages, graphDot };
|
||||
}
|
||||
|
||||
const statusConfig: Record<StageStatus, { icon: typeof CheckCircleIcon; color: string }> = {
|
||||
completed: { icon: CheckCircleIcon, color: "text-mint" },
|
||||
|
|
@ -35,6 +54,7 @@ const statusConfig: Record<StageStatus, { icon: typeof CheckCircleIcon; color: s
|
|||
|
||||
function buildThemeAttrs(gt: ReturnType<typeof getGraphTheme>) {
|
||||
return `
|
||||
rankdir=LR
|
||||
bgcolor="transparent"
|
||||
pad=0.5
|
||||
fontname="ui-monospace, monospace"
|
||||
|
|
@ -265,10 +285,9 @@ function DotDiagram({ dot }: { dot: string }) {
|
|||
);
|
||||
}
|
||||
|
||||
export default function RunOverview() {
|
||||
export default function RunOverview({ loaderData }: Route.ComponentProps) {
|
||||
const { id } = useParams();
|
||||
const run = findRun(id ?? "");
|
||||
const workflow = run ? workflowData[run.workflow] : undefined;
|
||||
const { stages, graphDot } = loaderData;
|
||||
|
||||
return (
|
||||
<div className="flex gap-6">
|
||||
|
|
@ -295,37 +314,35 @@ export default function RunOverview() {
|
|||
</ul>
|
||||
</div>
|
||||
|
||||
{workflow && (
|
||||
<div>
|
||||
<h3 className="px-2 text-xs font-medium uppercase tracking-wider text-fg-muted">Workflow</h3>
|
||||
<ul className="mt-2 space-y-0.5">
|
||||
<li>
|
||||
<Link
|
||||
to={`/runs/${id}/configuration`}
|
||||
className="flex items-center gap-2 rounded-md px-2 py-1.5 text-sm text-fg-3 transition-colors hover:bg-overlay hover:text-fg"
|
||||
>
|
||||
<DocumentTextIcon className="size-4 shrink-0 text-fg-muted" />
|
||||
Run Configuration
|
||||
</Link>
|
||||
</li>
|
||||
<li>
|
||||
<Link
|
||||
to={`/runs/${id}/graph`}
|
||||
className="flex items-center gap-2 rounded-md px-2 py-1.5 text-sm text-fg-3 transition-colors hover:bg-overlay hover:text-fg"
|
||||
>
|
||||
<MapIcon className="size-4 shrink-0 text-fg-muted" />
|
||||
Workflow Graph
|
||||
</Link>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
)}
|
||||
<div>
|
||||
<h3 className="px-2 text-xs font-medium uppercase tracking-wider text-fg-muted">Workflow</h3>
|
||||
<ul className="mt-2 space-y-0.5">
|
||||
<li>
|
||||
<Link
|
||||
to={`/runs/${id}/configuration`}
|
||||
className="flex items-center gap-2 rounded-md px-2 py-1.5 text-sm text-fg-3 transition-colors hover:bg-overlay hover:text-fg"
|
||||
>
|
||||
<DocumentTextIcon className="size-4 shrink-0 text-fg-muted" />
|
||||
Run Configuration
|
||||
</Link>
|
||||
</li>
|
||||
<li>
|
||||
<Link
|
||||
to={`/runs/${id}/graph`}
|
||||
className="flex items-center gap-2 rounded-md px-2 py-1.5 text-sm text-fg-3 transition-colors hover:bg-overlay hover:text-fg"
|
||||
>
|
||||
<MapIcon className="size-4 shrink-0 text-fg-muted" />
|
||||
Workflow Graph
|
||||
</Link>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div className="min-w-0 flex-1">
|
||||
{workflow ? (
|
||||
{graphDot ? (
|
||||
<div className="rounded-md border border-line bg-panel-alt/40 overflow-hidden">
|
||||
<DotDiagram dot={workflow.graph} />
|
||||
<DotDiagram dot={graphDot} />
|
||||
</div>
|
||||
) : (
|
||||
<p className="text-sm text-fg-muted">No workflow graph available.</p>
|
||||
|
|
|
|||
|
|
@ -1,16 +1,22 @@
|
|||
import { Link } from "react-router";
|
||||
import {
|
||||
findRetro,
|
||||
smoothnessConfig,
|
||||
learningCategoryConfig,
|
||||
frictionKindConfig,
|
||||
openItemKindConfig,
|
||||
formatDuration,
|
||||
} from "../data/retros";
|
||||
import type { Retro } from "../data/retros";
|
||||
import { apiJson } from "../api-client";
|
||||
import type { Route } from "./+types/run-retro";
|
||||
|
||||
export function meta({ params }: Route.MetaArgs) {
|
||||
const retro = findRetro(params.id);
|
||||
export async function loader({ params }: Route.LoaderArgs) {
|
||||
const retro = await apiJson<Retro>(`/runs/${params.id}/retro`);
|
||||
return { retro };
|
||||
}
|
||||
|
||||
export function meta({ data }: Route.MetaArgs) {
|
||||
const retro = data?.retro;
|
||||
return [{ title: retro ? `Retro: ${retro.goal} \u2014 Arc` : "Retro \u2014 Arc" }];
|
||||
}
|
||||
|
||||
|
|
@ -19,8 +25,8 @@ function formatCost(cost: number | undefined): string {
|
|||
return `$${cost.toFixed(2)}`;
|
||||
}
|
||||
|
||||
export default function RunRetro({ params }: Route.ComponentProps) {
|
||||
const retro = findRetro(params.id);
|
||||
export default function RunRetro({ loaderData }: Route.ComponentProps) {
|
||||
const { retro } = loaderData;
|
||||
|
||||
if (!retro) {
|
||||
return <p className="py-8 text-center text-sm text-fg-muted">No retrospective found for this run.</p>;
|
||||
|
|
|
|||
|
|
@ -3,8 +3,10 @@ import { Link, useParams } from "react-router";
|
|||
import { ChevronRightIcon } from "@heroicons/react/20/solid";
|
||||
import { CheckCircleIcon, ArrowPathIcon, PauseCircleIcon, XCircleIcon } from "@heroicons/react/24/solid";
|
||||
import { DocumentTextIcon, MapIcon, CommandLineIcon, ChatBubbleLeftIcon, WrenchScrewdriverIcon } from "@heroicons/react/24/outline";
|
||||
import { findRun } from "../data/runs";
|
||||
import { workflowData } from "./workflow-detail";
|
||||
import { apiJson } from "../api-client";
|
||||
import { formatDurationSecs } from "../lib/format";
|
||||
import type { RunStage, StageTurn as ApiStageTurn } from "@qltysh/arc-api-client";
|
||||
import type { Route } from "./+types/run-stages";
|
||||
|
||||
export const handle = { wide: true };
|
||||
|
||||
|
|
@ -17,12 +19,24 @@ interface Stage {
|
|||
duration: string;
|
||||
}
|
||||
|
||||
const stages: Stage[] = [
|
||||
{ id: "detect-drift", name: "Detect Drift", status: "completed", duration: "1m 12s" },
|
||||
{ id: "propose-changes", name: "Propose Changes", status: "completed", duration: "2m 34s" },
|
||||
{ id: "review-changes", name: "Review Changes", status: "completed", duration: "0m 45s" },
|
||||
{ id: "apply-changes", name: "Apply Changes", status: "running", duration: "1m 58s" },
|
||||
];
|
||||
export async function loader({ params }: Route.LoaderArgs) {
|
||||
const apiStages = await apiJson<RunStage[]>(`/runs/${params.id}/stages`);
|
||||
const stages: Stage[] = apiStages.map((s) => ({
|
||||
id: s.id,
|
||||
name: s.name,
|
||||
status: s.status as StageStatus,
|
||||
duration: s.duration_secs != null ? formatDurationSecs(s.duration_secs) : "--",
|
||||
}));
|
||||
|
||||
// Fetch turns for the selected stage (first stage if none specified)
|
||||
const selectedStageId = params.stageId ?? stages[0]?.id;
|
||||
let turns: ApiStageTurn[] = [];
|
||||
if (selectedStageId) {
|
||||
turns = await apiJson<ApiStageTurn[]>(`/runs/${params.id}/stages/${selectedStageId}/turns`);
|
||||
}
|
||||
|
||||
return { stages, turns };
|
||||
}
|
||||
|
||||
const statusConfig: Record<StageStatus, { icon: typeof CheckCircleIcon; color: string }> = {
|
||||
completed: { icon: CheckCircleIcon, color: "text-mint" },
|
||||
|
|
@ -44,41 +58,6 @@ type TurnType =
|
|||
|
||||
// selectedStage is resolved from the URL param in RunStages below
|
||||
|
||||
const turns: TurnType[] = [
|
||||
{
|
||||
kind: "system",
|
||||
content: `You are a drift detection agent. Compare the production and staging environments and identify any configuration or code drift.\n\nSource: production\nTarget: staging\nThreshold: warn`,
|
||||
},
|
||||
{
|
||||
kind: "assistant",
|
||||
content: "I'll start by loading the environment configurations for both production and staging to compare them.",
|
||||
},
|
||||
{
|
||||
kind: "tool",
|
||||
tools: [
|
||||
{
|
||||
toolName: "read_file",
|
||||
args: `{ "path": "environments/production/config.toml" }`,
|
||||
result: `[redis]\nhost = "redis-prod.internal"\nport = 6379\nmax_connections = 200\ntls = true\n\n[iam]\nrole_arn = "arn:aws:iam::123456:role/prod-api"\nsession_duration = 3600`,
|
||||
},
|
||||
{
|
||||
toolName: "read_file",
|
||||
args: `{ "path": "environments/staging/config.toml" }`,
|
||||
result: `[redis]\nhost = "redis-staging.internal"\nport = 6379\nmax_connections = 100\ntls = false\n\n[iam]\nrole_arn = "arn:aws:iam::123456:role/staging-api"\nsession_duration = 1800`,
|
||||
},
|
||||
{
|
||||
toolName: "diff_configs",
|
||||
args: `{ "source": "environments/production/config.toml", "target": "environments/staging/config.toml" }`,
|
||||
result: `3 differences found:\n redis.max_connections: 200 → 100\n redis.tls: true → false\n iam.session_duration: 3600 → 1800`,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
kind: "assistant",
|
||||
content: "I've detected drift in 3 resources between production and staging:\n\n1. **redis.max_connections** — production has 200, staging has 100\n2. **redis.tls** — enabled in production, disabled in staging\n3. **iam.session_duration** — production uses 3600s, staging uses 1800s\n\nThe TLS mismatch is the most critical — staging should match production's TLS configuration for accurate testing. The connection pool and session duration differences may be intentional for cost reasons but should be verified.",
|
||||
},
|
||||
];
|
||||
|
||||
function ToolRow({ tool }: { tool: ToolUse }) {
|
||||
const [open, setOpen] = useState(false);
|
||||
|
||||
|
|
@ -148,10 +127,24 @@ function AssistantBlock({ content }: { content: string }) {
|
|||
);
|
||||
}
|
||||
|
||||
export default function RunStages() {
|
||||
export default function RunStages({ loaderData }: Route.ComponentProps) {
|
||||
const { id, stageId } = useParams();
|
||||
const run = findRun(id ?? "");
|
||||
const workflow = run ? workflowData[run.workflow] : undefined;
|
||||
const { stages, turns: apiTurns } = loaderData;
|
||||
|
||||
const mappedTurns: TurnType[] = apiTurns.map((t) => {
|
||||
if (t.kind === "tool" && t.tools) {
|
||||
return {
|
||||
kind: "tool" as const,
|
||||
tools: t.tools.map((tu) => ({
|
||||
toolName: tu.tool_name,
|
||||
args: tu.args,
|
||||
result: tu.result,
|
||||
})),
|
||||
};
|
||||
}
|
||||
return { kind: t.kind as "system" | "assistant", content: t.content ?? "" };
|
||||
});
|
||||
|
||||
const selectedStage = stages.find((s) => s.id === stageId) ?? stages[0];
|
||||
const selectedConfig = statusConfig[selectedStage.status];
|
||||
const SelectedIcon = selectedConfig.icon;
|
||||
|
|
@ -186,31 +179,29 @@ export default function RunStages() {
|
|||
</ul>
|
||||
</div>
|
||||
|
||||
{workflow && (
|
||||
<div>
|
||||
<h3 className="px-2 text-xs font-medium uppercase tracking-wider text-fg-muted">Workflow</h3>
|
||||
<ul className="mt-2 space-y-0.5">
|
||||
<li>
|
||||
<Link
|
||||
to={`/runs/${id}/configuration`}
|
||||
className="flex items-center gap-2 rounded-md px-2 py-1.5 text-sm text-fg-3 transition-colors hover:bg-overlay hover:text-fg"
|
||||
>
|
||||
<DocumentTextIcon className="size-4 shrink-0 text-fg-muted" />
|
||||
Run Configuration
|
||||
</Link>
|
||||
</li>
|
||||
<li>
|
||||
<Link
|
||||
to={`/runs/${id}/graph`}
|
||||
className="flex items-center gap-2 rounded-md px-2 py-1.5 text-sm text-fg-3 transition-colors hover:bg-overlay hover:text-fg"
|
||||
>
|
||||
<MapIcon className="size-4 shrink-0 text-fg-muted" />
|
||||
Workflow Graph
|
||||
</Link>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
)}
|
||||
<div>
|
||||
<h3 className="px-2 text-xs font-medium uppercase tracking-wider text-fg-muted">Workflow</h3>
|
||||
<ul className="mt-2 space-y-0.5">
|
||||
<li>
|
||||
<Link
|
||||
to={`/runs/${id}/configuration`}
|
||||
className="flex items-center gap-2 rounded-md px-2 py-1.5 text-sm text-fg-3 transition-colors hover:bg-overlay hover:text-fg"
|
||||
>
|
||||
<DocumentTextIcon className="size-4 shrink-0 text-fg-muted" />
|
||||
Run Configuration
|
||||
</Link>
|
||||
</li>
|
||||
<li>
|
||||
<Link
|
||||
to={`/runs/${id}/graph`}
|
||||
className="flex items-center gap-2 rounded-md px-2 py-1.5 text-sm text-fg-3 transition-colors hover:bg-overlay hover:text-fg"
|
||||
>
|
||||
<MapIcon className="size-4 shrink-0 text-fg-muted" />
|
||||
Workflow Graph
|
||||
</Link>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div className="min-w-0 flex-1 space-y-3">
|
||||
|
|
@ -220,7 +211,7 @@ export default function RunStages() {
|
|||
<span className="font-mono text-xs text-fg-muted">{selectedStage.duration}</span>
|
||||
</div>
|
||||
|
||||
{turns.map((turn, i) => {
|
||||
{mappedTurns.map((turn, i) => {
|
||||
switch (turn.kind) {
|
||||
case "system":
|
||||
return <SystemBlock key={i} content={turn.content} />;
|
||||
|
|
|
|||
|
|
@ -1,35 +1,40 @@
|
|||
const stages = [
|
||||
{ stage: "Detect Drift", model: "Opus 4.6", inputTokens: 12_480, outputTokens: 3_210, runtime: "1m 12s", cost: 0.48 },
|
||||
{ stage: "Propose Changes", model: "Gemini 3.1", inputTokens: 28_640, outputTokens: 8_750, runtime: "2m 34s", cost: 0.72 },
|
||||
{ stage: "Review Changes", model: "Codex 5.3", inputTokens: 9_120, outputTokens: 2_640, runtime: "0m 45s", cost: 0.19 },
|
||||
{ stage: "Apply Changes", model: "Opus 4.6", inputTokens: 21_300, outputTokens: 6_480, runtime: "1m 58s", cost: 0.87 },
|
||||
];
|
||||
import { apiJson } from "../api-client";
|
||||
import { formatDurationSecs } from "../lib/format";
|
||||
import type { RunUsage } from "@qltysh/arc-api-client";
|
||||
import type { Route } from "./+types/run-usage";
|
||||
|
||||
const totalRuntime = "6m 29s";
|
||||
const totalCost = stages.reduce((sum, s) => sum + s.cost, 0);
|
||||
const totalInput = stages.reduce((sum, s) => sum + s.inputTokens, 0);
|
||||
const totalOutput = stages.reduce((sum, s) => sum + s.outputTokens, 0);
|
||||
|
||||
const modelBreakdown = Object.values(
|
||||
stages.reduce<Record<string, { model: string; inputTokens: number; outputTokens: number; cost: number; stages: number }>>(
|
||||
(acc, s) => {
|
||||
const entry = acc[s.model] ?? { model: s.model, inputTokens: 0, outputTokens: 0, cost: 0, stages: 0 };
|
||||
entry.inputTokens += s.inputTokens;
|
||||
entry.outputTokens += s.outputTokens;
|
||||
entry.cost += s.cost;
|
||||
entry.stages += 1;
|
||||
acc[s.model] = entry;
|
||||
return acc;
|
||||
},
|
||||
{},
|
||||
),
|
||||
).sort((a, b) => b.cost - a.cost);
|
||||
export async function loader({ params }: Route.LoaderArgs) {
|
||||
const usage = await apiJson<RunUsage>(`/runs/${params.id}/usage`);
|
||||
const stages = usage.stages.map((s) => ({
|
||||
stage: s.stage,
|
||||
model: s.model,
|
||||
inputTokens: s.input_tokens,
|
||||
outputTokens: s.output_tokens,
|
||||
runtime: formatDurationSecs(s.runtime_secs),
|
||||
cost: s.cost,
|
||||
}));
|
||||
const totalRuntime = formatDurationSecs(usage.totals.runtime_secs);
|
||||
const totalCost = usage.totals.cost;
|
||||
const totalInput = usage.totals.input_tokens;
|
||||
const totalOutput = usage.totals.output_tokens;
|
||||
const modelBreakdown = usage.by_model
|
||||
.map((m) => ({
|
||||
model: m.model,
|
||||
stages: m.stages,
|
||||
inputTokens: m.input_tokens,
|
||||
outputTokens: m.output_tokens,
|
||||
cost: m.cost,
|
||||
}))
|
||||
.sort((a, b) => b.cost - a.cost);
|
||||
return { stages, totalRuntime, totalCost, totalInput, totalOutput, modelBreakdown };
|
||||
}
|
||||
|
||||
function formatTokens(n: number) {
|
||||
return `${(n / 1000).toFixed(1)}k`;
|
||||
}
|
||||
|
||||
export default function RunUsage() {
|
||||
export default function RunUsage({ loaderData }: Route.ComponentProps) {
|
||||
const { stages, totalRuntime, totalCost, totalInput, totalOutput, modelBreakdown } = loaderData;
|
||||
return (
|
||||
<div className="space-y-6">
|
||||
<div className="rounded-md border border-line overflow-hidden">
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ import {
|
|||
ChevronRightIcon,
|
||||
} from "@heroicons/react/20/solid";
|
||||
import {
|
||||
verificationCategories,
|
||||
statusConfig,
|
||||
typeConfig,
|
||||
getCriteriaSummary,
|
||||
|
|
@ -20,6 +19,25 @@ import type {
|
|||
VerificationType,
|
||||
VerificationCategory,
|
||||
} from "../data/verifications";
|
||||
import { apiJson } from "../api-client";
|
||||
import type { RunVerification } from "@qltysh/arc-api-client";
|
||||
import type { Route } from "./+types/run-verifications";
|
||||
|
||||
export async function loader({ params }: Route.LoaderArgs) {
|
||||
const apiCategories = await apiJson<RunVerification[]>(`/runs/${params.id}/verifications`);
|
||||
const categories: VerificationCategory[] = apiCategories.map((cat) => ({
|
||||
name: cat.name,
|
||||
question: cat.question,
|
||||
status: cat.status as VerificationStatus,
|
||||
criteria: cat.controls.map((c) => ({
|
||||
name: c.name,
|
||||
description: c.description,
|
||||
type: (c.type ?? null) as VerificationType | null,
|
||||
status: c.status as VerificationStatus,
|
||||
})),
|
||||
}));
|
||||
return { categories };
|
||||
}
|
||||
|
||||
function StatusIcon({
|
||||
status,
|
||||
|
|
@ -117,10 +135,11 @@ function CategoryCard({ category }: { category: VerificationCategory }) {
|
|||
);
|
||||
}
|
||||
|
||||
export default function RunVerifications() {
|
||||
export default function RunVerifications({ loaderData }: Route.ComponentProps) {
|
||||
const { categories } = loaderData;
|
||||
return (
|
||||
<div className="space-y-3">
|
||||
{verificationCategories.map((category) => (
|
||||
{categories.map((category) => (
|
||||
<CategoryCard key={category.name} category={category} />
|
||||
))}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -18,14 +18,77 @@ import {
|
|||
arrayMove,
|
||||
} from "@dnd-kit/sortable";
|
||||
import { CSS } from "@dnd-kit/utilities";
|
||||
import { columns as staticColumns, ciConfig, statusColors, deriveCiStatus } from "../data/runs";
|
||||
import type { CiStatus, CheckRun, CheckStatus, RunItem, RunWithStatus } from "../data/runs";
|
||||
import { ciConfig, statusColors, deriveCiStatus } from "../data/runs";
|
||||
import type { CiStatus, CheckRun, CheckStatus, RunItem, RunWithStatus, ColumnStatus } from "../data/runs";
|
||||
import { apiJson } from "../api-client";
|
||||
import { formatElapsedSecs, formatDurationSecs } from "../lib/format";
|
||||
import type { RunListItem } from "@qltysh/arc-api-client";
|
||||
import type { Route } from "./+types/runs";
|
||||
|
||||
export function meta({}: Route.MetaArgs) {
|
||||
return [{ title: "Runs — Arc" }];
|
||||
}
|
||||
|
||||
function mapRunListItem(item: RunListItem): RunItem {
|
||||
return {
|
||||
id: item.id,
|
||||
repo: item.repo,
|
||||
title: item.title,
|
||||
workflow: item.workflow,
|
||||
number: item.number,
|
||||
additions: item.additions,
|
||||
deletions: item.deletions,
|
||||
checks: item.checks?.map((c) => ({
|
||||
name: c.name,
|
||||
status: c.status,
|
||||
duration: c.duration_secs != null ? formatDurationSecs(c.duration_secs) : undefined,
|
||||
})),
|
||||
elapsed: item.elapsed_secs != null ? formatElapsedSecs(item.elapsed_secs) : undefined,
|
||||
elapsedWarning: item.elapsed_warning,
|
||||
resources: item.resources,
|
||||
comments: item.comments,
|
||||
question: item.question,
|
||||
sandboxId: item.sandbox_id,
|
||||
};
|
||||
}
|
||||
|
||||
const columnConfig: {
|
||||
id: ColumnStatus;
|
||||
name: string;
|
||||
accent: string;
|
||||
iconColor: string;
|
||||
iconType: "branch" | "pr";
|
||||
actions: string[];
|
||||
}[] = [
|
||||
{ id: "working", name: "Working", accent: "bg-teal-500", iconColor: "text-teal-500", iconType: "branch", actions: ["Watch", "Steer"] },
|
||||
{ id: "pending", name: "Pending", accent: "bg-amber", iconColor: "text-amber", iconType: "branch", actions: ["Answer Question"] },
|
||||
{ id: "review", name: "Verify", accent: "bg-mint", iconColor: "text-mint", iconType: "pr", actions: ["Resolve"] },
|
||||
{ id: "merge", name: "Merge", accent: "bg-teal-300", iconColor: "text-teal-300", iconType: "pr", actions: ["Merge"] },
|
||||
];
|
||||
|
||||
export async function loader() {
|
||||
const apiRuns = await apiJson<RunListItem[]>("/runs");
|
||||
const items = apiRuns.map(mapRunListItem);
|
||||
|
||||
const grouped = new Map<ColumnStatus, RunItem[]>();
|
||||
for (const cfg of columnConfig) {
|
||||
grouped.set(cfg.id, []);
|
||||
}
|
||||
for (const item of items) {
|
||||
const status = apiRuns.find((r) => r.id === item.id)?.status;
|
||||
if (status && grouped.has(status)) {
|
||||
grouped.get(status)?.push(item);
|
||||
}
|
||||
}
|
||||
|
||||
const columns = columnConfig.map((cfg) => ({
|
||||
...cfg,
|
||||
items: grouped.get(cfg.id) ?? [],
|
||||
}));
|
||||
|
||||
return { columns };
|
||||
}
|
||||
|
||||
|
||||
function GitBranchIcon({ className }: { className?: string }) {
|
||||
return (
|
||||
|
|
@ -186,24 +249,8 @@ function ChecksStatus({ checks }: { checks: CheckRun[] }) {
|
|||
);
|
||||
}
|
||||
|
||||
const totalCards = staticColumns.reduce((sum, col) => sum + col.items.length, 0);
|
||||
const totalPrs = staticColumns.reduce(
|
||||
(sum, col) => sum + col.items.filter((item) => item.number != null).length,
|
||||
0,
|
||||
);
|
||||
|
||||
export const handle = {
|
||||
wide: true,
|
||||
headerExtra: (
|
||||
<div className="flex items-center gap-4 font-mono text-xs text-fg-3">
|
||||
<span>
|
||||
<span className="text-fg">{totalCards}</span> runs
|
||||
</span>
|
||||
<span>
|
||||
<span className="text-fg">{totalPrs}</span> PRs
|
||||
</span>
|
||||
</div>
|
||||
),
|
||||
};
|
||||
|
||||
function PrCard({
|
||||
|
|
@ -359,7 +406,17 @@ function SortablePrCard({
|
|||
);
|
||||
}
|
||||
|
||||
function BoardColumn({ column }: { column: (typeof staticColumns)[number] }) {
|
||||
type Column = {
|
||||
id: ColumnStatus;
|
||||
name: string;
|
||||
accent: string;
|
||||
iconColor: string;
|
||||
iconType: "branch" | "pr";
|
||||
actions: string[];
|
||||
items: RunItem[];
|
||||
};
|
||||
|
||||
function BoardColumn({ column }: { column: Column }) {
|
||||
const Icon = iconMap[column.iconType];
|
||||
return (
|
||||
<div className="flex min-w-[280px] flex-1 flex-col">
|
||||
|
|
@ -463,14 +520,14 @@ function SortableRunRow({ run }: { run: RunWithStatus }) {
|
|||
);
|
||||
}
|
||||
|
||||
const allRepos = [...new Set(staticColumns.flatMap((col) => col.items.map((item) => item.repo)))].sort();
|
||||
|
||||
export default function Runs() {
|
||||
export default function Runs({ loaderData }: Route.ComponentProps) {
|
||||
const initialColumns = loaderData.columns;
|
||||
const allRepos = [...new Set(initialColumns.flatMap((col: Column) => col.items.map((item: RunItem) => item.repo)))].sort();
|
||||
const [query, setQuery] = useState("");
|
||||
const [repoFilter, setRepoFilter] = useState("all");
|
||||
const [view, setView] = useState<ViewMode>("columns");
|
||||
const [collapsed, setCollapsed] = useState<Set<string>>(new Set());
|
||||
const [columns, setColumns] = useState(staticColumns);
|
||||
const [columns, setColumns] = useState(initialColumns);
|
||||
const lowerQuery = query.toLowerCase();
|
||||
|
||||
const sensors = useSensors(
|
||||
|
|
|
|||
|
|
@ -9,6 +9,8 @@ import {
|
|||
UserIcon,
|
||||
WrenchScrewdriverIcon,
|
||||
} from "@heroicons/react/24/outline";
|
||||
import { apiJson } from "../api-client";
|
||||
import type { SessionDetail as ApiSessionDetail, SessionGroup } from "@qltysh/arc-api-client";
|
||||
import type { Route } from "./+types/session-detail";
|
||||
|
||||
export const handle = { hideHeader: true, wide: true };
|
||||
|
|
@ -17,6 +19,43 @@ export function meta({}: Route.MetaArgs) {
|
|||
return [{ title: "Session — Arc" }];
|
||||
}
|
||||
|
||||
export async function loader({ params }: Route.LoaderArgs) {
|
||||
const [apiSession, apiGroups] = await Promise.all([
|
||||
apiJson<ApiSessionDetail>(`/sessions/${params.sessionId}`),
|
||||
apiJson<SessionGroup[]>("/sessions"),
|
||||
]);
|
||||
const session: Session = {
|
||||
id: apiSession.id,
|
||||
title: apiSession.title,
|
||||
repo: apiSession.repo,
|
||||
model: apiSession.model,
|
||||
time: "",
|
||||
turns: apiSession.turns.map((t) => {
|
||||
if (t.kind === "tool" && t.tools) {
|
||||
return {
|
||||
kind: "tool" as const,
|
||||
tools: t.tools.map((tu) => ({
|
||||
toolName: tu.tool_name,
|
||||
args: tu.args,
|
||||
result: tu.result,
|
||||
})),
|
||||
};
|
||||
}
|
||||
return { kind: t.kind as "user" | "assistant", content: t.content ?? "", date: t.date };
|
||||
}),
|
||||
};
|
||||
const sessionGroups = apiGroups.map((g) => ({
|
||||
label: g.label,
|
||||
sessions: g.sessions.map((s) => ({
|
||||
id: s.id,
|
||||
title: s.title,
|
||||
repo: s.repo,
|
||||
time: s.time,
|
||||
})),
|
||||
}));
|
||||
return { session, sessionGroups };
|
||||
}
|
||||
|
||||
interface ToolUse {
|
||||
toolName: string;
|
||||
args: string;
|
||||
|
|
@ -37,6 +76,7 @@ interface Session {
|
|||
turns: Turn[];
|
||||
}
|
||||
|
||||
// Keep hardcoded sessions as fallback
|
||||
const sessions: Record<string, Session> = {
|
||||
s1: {
|
||||
id: "s1",
|
||||
|
|
@ -191,7 +231,7 @@ function makeFallbackSession(id: string): Session {
|
|||
};
|
||||
}
|
||||
|
||||
interface SessionGroup {
|
||||
interface SessionGroupType {
|
||||
label: string;
|
||||
sessions: { id: string; title: string; repo: string; time: string }[];
|
||||
}
|
||||
|
|
@ -326,7 +366,7 @@ function AssistantBlock({ content, showCopy }: { content: string; showCopy: bool
|
|||
);
|
||||
}
|
||||
|
||||
function SessionSidebar({ activeId }: { activeId: string }) {
|
||||
function SessionSidebar({ activeId, groups }: { activeId: string; groups: SessionGroupType[] }) {
|
||||
return (
|
||||
<aside className="w-64 shrink-0 border-r border-line flex flex-col h-[calc(100vh-4rem)]">
|
||||
<div className="p-3">
|
||||
|
|
@ -339,26 +379,26 @@ function SessionSidebar({ activeId }: { activeId: string }) {
|
|||
</Link>
|
||||
</div>
|
||||
<nav className="flex-1 overflow-y-auto px-3 pb-4">
|
||||
{sessionGroups.map((group) => (
|
||||
{groups.map((group) => (
|
||||
<div key={group.label} className="mt-4 first:mt-1">
|
||||
<p className="px-2 mb-1.5 text-[11px] font-medium uppercase tracking-wider text-fg-muted">
|
||||
{group.label}
|
||||
</p>
|
||||
<ul className="space-y-0.5">
|
||||
{group.sessions.map((session) => (
|
||||
<li key={session.id}>
|
||||
{group.sessions.map((s) => (
|
||||
<li key={s.id}>
|
||||
<Link
|
||||
to={`/sessions/${session.id}`}
|
||||
to={`/sessions/${s.id}`}
|
||||
className={`flex w-full flex-col rounded-lg px-2.5 py-2 text-left transition-colors ${
|
||||
activeId === session.id
|
||||
activeId === s.id
|
||||
? "bg-overlay text-fg-2"
|
||||
: "text-fg-3 hover:bg-overlay"
|
||||
}`}
|
||||
>
|
||||
<span className="truncate text-sm">{session.title}</span>
|
||||
<span className="truncate text-sm">{s.title}</span>
|
||||
<span className="flex items-center gap-1.5 mt-0.5">
|
||||
<span className="font-mono text-[11px] text-teal-500">{session.repo}</span>
|
||||
<span className="text-[11px] text-fg-muted">{session.time}</span>
|
||||
<span className="font-mono text-[11px] text-teal-500">{s.repo}</span>
|
||||
<span className="text-[11px] text-fg-muted">{s.time}</span>
|
||||
</span>
|
||||
</Link>
|
||||
</li>
|
||||
|
|
@ -371,13 +411,12 @@ function SessionSidebar({ activeId }: { activeId: string }) {
|
|||
);
|
||||
}
|
||||
|
||||
export default function SessionDetail() {
|
||||
const { sessionId } = useParams();
|
||||
const session = sessions[sessionId ?? ""] ?? makeFallbackSession(sessionId ?? "");
|
||||
export default function SessionDetail({ loaderData }: Route.ComponentProps) {
|
||||
const { session, sessionGroups: loaderGroups } = loaderData;
|
||||
|
||||
return (
|
||||
<div className="flex -mx-4 sm:-mx-6 lg:-mx-8 -my-6">
|
||||
<SessionSidebar activeId={session.id} />
|
||||
<SessionSidebar activeId={session.id} groups={loaderGroups} />
|
||||
|
||||
<div className="flex-1 flex flex-col min-h-[calc(100vh-4rem)]">
|
||||
<div className="border-b border-line px-6 py-3 flex items-center gap-3">
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@ import {
|
|||
BellIcon,
|
||||
ShieldCheckIcon,
|
||||
} from "@heroicons/react/24/outline";
|
||||
import { apiJson } from "../api-client";
|
||||
import type { SettingGroup as ApiSettingGroup } from "@qltysh/arc-api-client";
|
||||
import type { Route } from "./+types/settings";
|
||||
|
||||
export function meta({}: Route.MetaArgs) {
|
||||
|
|
@ -14,6 +16,59 @@ export function meta({}: Route.MetaArgs) {
|
|||
|
||||
export const handle = { hideHeader: true };
|
||||
|
||||
function getGroupIcon(id: string): React.ComponentType<{ className?: string }> {
|
||||
return groupIcons[id] ?? Cog6ToothIcon;
|
||||
}
|
||||
|
||||
const groupIcons: Record<string, React.ComponentType<{ className?: string }>> = {
|
||||
general: Cog6ToothIcon,
|
||||
git: CodeBracketIcon,
|
||||
models: CpuChipIcon,
|
||||
notifications: BellIcon,
|
||||
security: ShieldCheckIcon,
|
||||
};
|
||||
|
||||
const groupAccentColors: Record<string, string> = {
|
||||
general: "teal",
|
||||
git: "mint",
|
||||
models: "amber",
|
||||
notifications: "teal",
|
||||
security: "coral",
|
||||
};
|
||||
|
||||
interface SettingGroupData {
|
||||
id: string;
|
||||
name: string;
|
||||
description: string;
|
||||
fields: SettingField[];
|
||||
}
|
||||
|
||||
export async function loader() {
|
||||
const apiGroups = await apiJson<ApiSettingGroup[]>("/settings");
|
||||
const settingGroups: SettingGroupData[] = apiGroups.map((g) => ({
|
||||
id: g.id,
|
||||
name: g.name,
|
||||
description: g.description,
|
||||
fields: g.fields.map((f) => ({
|
||||
key: f.key,
|
||||
label: f.label,
|
||||
value: f.value,
|
||||
type: f.type as "text" | "select" | "toggle",
|
||||
options: f.options,
|
||||
description: f.description,
|
||||
})),
|
||||
}));
|
||||
return { settingGroups };
|
||||
}
|
||||
|
||||
function enrichGroups(data: SettingGroupData[]): SettingGroup[] {
|
||||
return data.map((g) => ({
|
||||
...g,
|
||||
icon: getGroupIcon(g.id),
|
||||
accentColor: groupAccentColors[g.id] ?? "teal",
|
||||
}));
|
||||
}
|
||||
|
||||
interface SettingField {
|
||||
key: string;
|
||||
label: string;
|
||||
|
|
@ -226,14 +281,14 @@ function SettingsSection({ group, isActive, onVisible }: { group: SettingGroup;
|
|||
);
|
||||
}
|
||||
|
||||
function SidebarNav({ activeId }: { activeId: string }) {
|
||||
function SidebarNav({ activeId, groups }: { activeId: string; groups: SettingGroup[] }) {
|
||||
return (
|
||||
<nav className="sticky top-8 w-44 shrink-0 hidden lg:block">
|
||||
<p className="px-3 mb-3 text-[11px] font-medium uppercase tracking-wider text-fg-muted">
|
||||
Settings
|
||||
</p>
|
||||
<ul className="space-y-0.5">
|
||||
{settingGroups.map((group) => {
|
||||
{groups.map((group) => {
|
||||
const colors = accentMap[group.accentColor];
|
||||
const Icon = group.icon;
|
||||
const active = activeId === group.id;
|
||||
|
|
@ -262,12 +317,13 @@ function SidebarNav({ activeId }: { activeId: string }) {
|
|||
);
|
||||
}
|
||||
|
||||
export default function Settings() {
|
||||
export default function Settings({ loaderData }: Route.ComponentProps) {
|
||||
const settingGroups = enrichGroups(loaderData.settingGroups);
|
||||
const [activeSection, setActiveSection] = useState(settingGroups[0].id);
|
||||
|
||||
return (
|
||||
<div className="flex gap-10 items-start">
|
||||
<SidebarNav activeId={activeSection} />
|
||||
<SidebarNav activeId={activeSection} groups={settingGroups} />
|
||||
<div className="flex-1 min-w-0 space-y-5">
|
||||
{settingGroups.map((group) => (
|
||||
<SettingsSection
|
||||
|
|
|
|||
|
|
@ -20,6 +20,8 @@ import {
|
|||
XMarkIcon,
|
||||
} from "@heroicons/react/24/outline";
|
||||
import { Link } from "react-router";
|
||||
import { apiJson } from "../api-client";
|
||||
import type { Project, SessionGroup } from "@qltysh/arc-api-client";
|
||||
import type { Route } from "./+types/start";
|
||||
|
||||
export const handle = { hideHeader: true, wide: true };
|
||||
|
|
@ -28,11 +30,23 @@ export function meta({}: Route.MetaArgs) {
|
|||
return [{ title: "Start — Arc" }];
|
||||
}
|
||||
|
||||
const projects = [
|
||||
{ id: "arc-web", name: "arc-web" },
|
||||
{ id: "arc-workflows", name: "arc-workflows" },
|
||||
{ id: "arc-cli", name: "arc-cli" },
|
||||
];
|
||||
export async function loader() {
|
||||
const [apiProjects, apiSessions] = await Promise.all([
|
||||
apiJson<Project[]>("/projects"),
|
||||
apiJson<SessionGroup[]>("/sessions"),
|
||||
]);
|
||||
const projects = apiProjects.map((p) => ({ id: p.id, name: p.name }));
|
||||
const sessionGroups = apiSessions.map((g) => ({
|
||||
label: g.label,
|
||||
sessions: g.sessions.map((s) => ({
|
||||
id: s.id,
|
||||
title: s.title,
|
||||
repo: s.repo,
|
||||
time: s.time,
|
||||
})),
|
||||
}));
|
||||
return { projects, sessionGroups };
|
||||
}
|
||||
|
||||
const branches = [
|
||||
{ id: "main", name: "main" },
|
||||
|
|
@ -40,32 +54,6 @@ const branches = [
|
|||
{ id: "feature/start-page", name: "feature/start-page" },
|
||||
];
|
||||
|
||||
const sessionGroups = [
|
||||
{
|
||||
label: "Today",
|
||||
sessions: [
|
||||
{ id: "s1", title: "Add rate limiting to auth endpoints", repo: "api-server", time: "2h ago" },
|
||||
{ id: "s2", title: "Fix config parsing for nested values", repo: "cli-tools", time: "4h ago" },
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "Yesterday",
|
||||
sessions: [
|
||||
{ id: "s3", title: "Migrate to React Router v7", repo: "web-dashboard", time: "1d ago" },
|
||||
{ id: "s4", title: "Add dark mode toggle", repo: "web-dashboard", time: "1d ago" },
|
||||
{ id: "s5", title: "Update OpenAPI spec for v3", repo: "api-server", time: "1d ago" },
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "Previous 7 days",
|
||||
sessions: [
|
||||
{ id: "s6", title: "Terraform module for Redis cluster", repo: "infrastructure", time: "3d ago" },
|
||||
{ id: "s7", title: "Add workflow run event types", repo: "shared-types", time: "5d ago" },
|
||||
{ id: "s8", title: "Implement webhook retry logic", repo: "api-server", time: "6d ago" },
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
function BranchIcon({ className }: { className?: string }) {
|
||||
return (
|
||||
<svg viewBox="0 0 16 16" fill="currentColor" className={className}>
|
||||
|
|
@ -74,7 +62,7 @@ function BranchIcon({ className }: { className?: string }) {
|
|||
);
|
||||
}
|
||||
|
||||
function SessionSidebar() {
|
||||
function SessionSidebar({ groups }: { groups: { label: string; sessions: { id: string; title: string; repo: string; time: string }[] }[] }) {
|
||||
return (
|
||||
<aside className="w-64 shrink-0 border-r border-line flex flex-col h-[calc(100vh-4rem)]">
|
||||
<div className="p-3">
|
||||
|
|
@ -84,7 +72,7 @@ function SessionSidebar() {
|
|||
</div>
|
||||
</div>
|
||||
<nav className="flex-1 overflow-y-auto px-3 pb-4">
|
||||
{sessionGroups.map((group) => (
|
||||
{groups.map((group) => (
|
||||
<div key={group.label} className="mt-4 first:mt-1">
|
||||
<p className="px-2 mb-1.5 text-[11px] font-medium uppercase tracking-wider text-fg-muted">
|
||||
{group.label}
|
||||
|
|
@ -112,7 +100,8 @@ function SessionSidebar() {
|
|||
);
|
||||
}
|
||||
|
||||
export default function Start() {
|
||||
export default function Start({ loaderData }: Route.ComponentProps) {
|
||||
const { projects, sessionGroups } = loaderData;
|
||||
const [prompt, setPrompt] = useState("");
|
||||
const [project, setProject] = useState(projects[0]);
|
||||
const [branch, setBranch] = useState(branches[0]);
|
||||
|
|
@ -144,7 +133,7 @@ export default function Start() {
|
|||
|
||||
return (
|
||||
<div className="flex -mx-4 sm:-mx-6 lg:-mx-8 -my-6">
|
||||
<SessionSidebar />
|
||||
<SessionSidebar groups={sessionGroups} />
|
||||
|
||||
<div className="flex-1 flex flex-col items-center pt-[12vh] px-4">
|
||||
<div className="w-full max-w-2xl">
|
||||
|
|
|
|||
|
|
@ -44,14 +44,10 @@ import {
|
|||
MinusCircleIcon,
|
||||
} from "@heroicons/react/20/solid";
|
||||
import {
|
||||
findCriterionBySlug,
|
||||
slugify,
|
||||
typeConfig,
|
||||
modeConfig,
|
||||
statusConfig,
|
||||
criterionPerformance,
|
||||
controlDetails,
|
||||
getRecentResults,
|
||||
} from "../data/verifications";
|
||||
import type {
|
||||
VerificationType,
|
||||
|
|
@ -59,13 +55,19 @@ import type {
|
|||
EvaluationResult,
|
||||
VerificationStatus,
|
||||
} from "../data/verifications";
|
||||
import { apiJson } from "../api-client";
|
||||
import type { VerificationDetailResponse } from "@qltysh/arc-api-client";
|
||||
import type { Route } from "./+types/verification-detail";
|
||||
|
||||
export const handle = { hideHeader: true };
|
||||
|
||||
export function meta({ params }: Route.MetaArgs) {
|
||||
const match = findCriterionBySlug(params.slug ?? "");
|
||||
const name = match?.criterion.name ?? "Verification";
|
||||
export async function loader({ params }: Route.LoaderArgs) {
|
||||
const data = await apiJson<VerificationDetailResponse>(`/verifications/${params.slug}`);
|
||||
return { data };
|
||||
}
|
||||
|
||||
export function meta({ data }: Route.MetaArgs) {
|
||||
const name = data?.data?.control?.name ?? "Verification";
|
||||
return [{ title: `${name} — Verifications — Arc` }];
|
||||
}
|
||||
|
||||
|
|
@ -202,20 +204,44 @@ function ResultIcon({ result }: { result: VerificationStatus }) {
|
|||
return <MinusCircleIcon className={`size-4 ${config.color}`} />;
|
||||
}
|
||||
|
||||
export default function VerificationDetail() {
|
||||
const { slug } = useParams();
|
||||
const match = findCriterionBySlug(slug ?? "");
|
||||
export default function VerificationDetail({ loaderData }: Route.ComponentProps) {
|
||||
const { data } = loaderData;
|
||||
const { control: controlInfo, performance: apiPerf, control_detail: apiDetail, recent_results: apiRecentResults, siblings: apiSiblings } = data;
|
||||
|
||||
if (!match) {
|
||||
return <p className="py-8 text-center text-sm text-fg-muted">Verification not found.</p>;
|
||||
}
|
||||
const criterion = {
|
||||
name: controlInfo.name,
|
||||
description: controlInfo.description,
|
||||
type: (controlInfo.type ?? null) as VerificationType | null,
|
||||
};
|
||||
const categoryName = controlInfo.category;
|
||||
const performance = {
|
||||
f1: apiPerf.f1 ?? null,
|
||||
passAt1: apiPerf.pass_at_1 ?? null,
|
||||
mode: apiPerf.mode as VerificationMode,
|
||||
evaluations: apiPerf.evaluations as EvaluationResult[],
|
||||
};
|
||||
const detail = apiDetail ? {
|
||||
description: apiDetail.description,
|
||||
checks: apiDetail.checks,
|
||||
passExample: apiDetail.pass_example,
|
||||
failExample: apiDetail.fail_example,
|
||||
} : null;
|
||||
const recentResults = apiRecentResults.map((r) => ({
|
||||
runId: r.run_id,
|
||||
runTitle: r.run_title,
|
||||
workflow: r.workflow,
|
||||
result: r.result as VerificationStatus,
|
||||
timestamp: r.timestamp,
|
||||
}));
|
||||
const siblings = apiSiblings.map((s) => ({
|
||||
name: s.name,
|
||||
slug: s.slug,
|
||||
type: (s.type ?? null) as VerificationType | null,
|
||||
mode: (s.mode ?? "disabled") as VerificationMode,
|
||||
}));
|
||||
|
||||
const { criterion, category, performance } = match;
|
||||
const Icon = criterionIcons[criterion.name];
|
||||
const CatIcon = categoryIcons[category.name];
|
||||
const detail = controlDetails[criterion.name];
|
||||
const recentResults = getRecentResults(criterion.name);
|
||||
const siblings = category.criteria.filter((c) => c.name !== criterion.name);
|
||||
const CatIcon = categoryIcons[categoryName];
|
||||
|
||||
const passRate = performance.evaluations.length > 0
|
||||
? (performance.evaluations.filter((e) => e === "pass").length / performance.evaluations.length * 100).toFixed(0)
|
||||
|
|
@ -227,7 +253,7 @@ export default function VerificationDetail() {
|
|||
<nav className="flex items-center gap-1 text-sm text-fg-muted">
|
||||
<Link to="/verifications" className="text-fg-3 hover:text-fg">Verifications</Link>
|
||||
<ChevronRightIcon className="size-3" />
|
||||
<span className="text-fg-3">{category.name}</span>
|
||||
<span className="text-fg-3">{categoryName}</span>
|
||||
<ChevronRightIcon className="size-3" />
|
||||
<span>{criterion.name}</span>
|
||||
</nav>
|
||||
|
|
@ -331,14 +357,13 @@ export default function VerificationDetail() {
|
|||
<div>
|
||||
<h3 className="mb-3 text-sm font-semibold text-fg">
|
||||
{CatIcon && <CatIcon className="mr-1.5 inline size-4 text-fg-3" />}
|
||||
Other {category.name} Controls
|
||||
Other {categoryName} Controls
|
||||
</h3>
|
||||
<div className="rounded-md border border-line overflow-hidden">
|
||||
<table className="w-full text-sm">
|
||||
<tbody>
|
||||
{siblings.map((sibling) => {
|
||||
const SibIcon = criterionIcons[sibling.name];
|
||||
const sibPerf = criterionPerformance[sibling.name];
|
||||
return (
|
||||
<tr key={sibling.name} className="border-b border-line last:border-b-0 cursor-pointer transition-colors hover:bg-overlay">
|
||||
<td className="w-8 py-2.5 pl-4 pr-0">
|
||||
|
|
@ -346,20 +371,18 @@ export default function VerificationDetail() {
|
|||
</td>
|
||||
<td className="py-2.5 pl-2 pr-3">
|
||||
<Link
|
||||
to={`/verifications/${slugify(sibling.name)}`}
|
||||
to={`/verifications/${sibling.slug}`}
|
||||
className="font-medium text-fg-2 hover:text-fg"
|
||||
>
|
||||
{sibling.name}
|
||||
</Link>
|
||||
</td>
|
||||
<td className="py-2.5 px-3 text-fg-muted">
|
||||
{sibling.description || <span className="italic">Not configured</span>}
|
||||
</td>
|
||||
<td className="py-2.5 px-3 text-fg-muted" />
|
||||
<td className="whitespace-nowrap py-2.5 px-3 text-right">
|
||||
<TypeBadge type={sibling.type} />
|
||||
</td>
|
||||
<td className="whitespace-nowrap py-2.5 pl-3 pr-4">
|
||||
{sibPerf && <ModeBadge mode={sibPerf.mode} />}
|
||||
<ModeBadge mode={sibling.mode} />
|
||||
</td>
|
||||
</tr>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -51,10 +51,8 @@ import {
|
|||
ChevronDownIcon,
|
||||
} from "@heroicons/react/24/outline";
|
||||
import {
|
||||
verificationCategories,
|
||||
typeConfig,
|
||||
modeConfig,
|
||||
criterionPerformance,
|
||||
slugify,
|
||||
} from "../data/verifications";
|
||||
import type {
|
||||
|
|
@ -62,9 +60,40 @@ import type {
|
|||
VerificationMode,
|
||||
EvaluationResult,
|
||||
VerificationCategory,
|
||||
CriterionPerformance,
|
||||
} from "../data/verifications";
|
||||
import { apiJson } from "../api-client";
|
||||
import type { VerificationCategory as ApiVerificationCategory } from "@qltysh/arc-api-client";
|
||||
import type { Route } from "./+types/verifications";
|
||||
|
||||
export async function loader() {
|
||||
const apiCategories = await apiJson<ApiVerificationCategory[]>("/verifications");
|
||||
const categories: VerificationCategory[] = apiCategories.map((cat) => ({
|
||||
name: cat.name,
|
||||
question: cat.question,
|
||||
status: "pass" as const,
|
||||
criteria: cat.controls.map((c) => ({
|
||||
name: c.name,
|
||||
description: c.description,
|
||||
type: (c.type ?? null) as VerificationType | null,
|
||||
status: "pass" as const,
|
||||
})),
|
||||
}));
|
||||
// Build a performance map from API data
|
||||
const criterionPerformance: Record<string, CriterionPerformance> = {};
|
||||
for (const cat of apiCategories) {
|
||||
for (const ctrl of cat.controls) {
|
||||
criterionPerformance[ctrl.name] = {
|
||||
f1: ctrl.f1 ?? null,
|
||||
passAt1: ctrl.pass_at_1 ?? null,
|
||||
mode: (ctrl.mode ?? "disabled") as VerificationMode,
|
||||
evaluations: (ctrl.evaluations ?? []) as EvaluationResult[],
|
||||
};
|
||||
}
|
||||
}
|
||||
return { categories, criterionPerformance };
|
||||
}
|
||||
|
||||
export const handle = { wide: true };
|
||||
|
||||
export function meta({}: Route.MetaArgs) {
|
||||
|
|
@ -156,7 +185,7 @@ function CriterionRow({ slug, children }: { slug: string; children: React.ReactN
|
|||
);
|
||||
}
|
||||
|
||||
function CategoryCard({ category }: { category: VerificationCategory }) {
|
||||
function CategoryCard({ category, perfMap }: { category: VerificationCategory; perfMap: Record<string, CriterionPerformance> }) {
|
||||
return (
|
||||
<Disclosure
|
||||
as="div"
|
||||
|
|
@ -192,7 +221,7 @@ function CategoryCard({ category }: { category: VerificationCategory }) {
|
|||
<tbody>
|
||||
{category.criteria.map((criterion) => {
|
||||
const Icon = criterionIcons[criterion.name];
|
||||
const perf = criterionPerformance[criterion.name];
|
||||
const perf = perfMap[criterion.name];
|
||||
return (
|
||||
<CriterionRow key={criterion.name} slug={slugify(criterion.name)}>
|
||||
<td className="w-8 py-2.5 pl-5 pr-0">
|
||||
|
|
@ -226,11 +255,11 @@ function CategoryCard({ category }: { category: VerificationCategory }) {
|
|||
);
|
||||
}
|
||||
|
||||
function GroupedView({ categories }: { categories: readonly VerificationCategory[] }) {
|
||||
function GroupedView({ categories, perfMap }: { categories: readonly VerificationCategory[]; perfMap: Record<string, CriterionPerformance> }) {
|
||||
return (
|
||||
<div className="space-y-3">
|
||||
{categories.map((category) => (
|
||||
<CategoryCard key={category.name} category={category} />
|
||||
<CategoryCard key={category.name} category={category} perfMap={perfMap} />
|
||||
))}
|
||||
</div>
|
||||
);
|
||||
|
|
@ -269,7 +298,7 @@ function EvaluationDots({ evaluations }: { evaluations: readonly EvaluationResul
|
|||
);
|
||||
}
|
||||
|
||||
function UngroupedView({ categories }: { categories: readonly VerificationCategory[] }) {
|
||||
function UngroupedView({ categories, perfMap }: { categories: readonly VerificationCategory[]; perfMap: Record<string, CriterionPerformance> }) {
|
||||
return (
|
||||
<div className="rounded-md border border-line overflow-hidden">
|
||||
<table className="w-full text-sm">
|
||||
|
|
@ -290,7 +319,7 @@ function UngroupedView({ categories }: { categories: readonly VerificationCatego
|
|||
{categories.flatMap((category) =>
|
||||
category.criteria.map((criterion) => {
|
||||
const Icon = criterionIcons[criterion.name];
|
||||
const perf = criterionPerformance[criterion.name];
|
||||
const perf = perfMap[criterion.name];
|
||||
return (
|
||||
<CriterionRow key={`${category.name}-${criterion.name}`} slug={slugify(criterion.name)}>
|
||||
<td className="w-8 py-2.5 pl-4 pr-0">
|
||||
|
|
@ -336,12 +365,13 @@ function filterCategories(
|
|||
categories: readonly VerificationCategory[],
|
||||
query: string,
|
||||
modeFilter: VerificationMode | "all",
|
||||
perfMap: Record<string, CriterionPerformance>,
|
||||
): VerificationCategory[] {
|
||||
const lowerQuery = query.toLowerCase();
|
||||
return categories
|
||||
.map((category) => {
|
||||
const filtered = category.criteria.filter((c) => {
|
||||
const perf = criterionPerformance[c.name];
|
||||
const perf = perfMap[c.name];
|
||||
const matchesMode = modeFilter === "all" || perf?.mode === modeFilter;
|
||||
const matchesQuery =
|
||||
lowerQuery === "" ||
|
||||
|
|
@ -355,12 +385,13 @@ function filterCategories(
|
|||
.filter((category) => category.criteria.length > 0);
|
||||
}
|
||||
|
||||
export default function Verifications() {
|
||||
export default function Verifications({ loaderData }: Route.ComponentProps) {
|
||||
const { categories: verificationCategories, criterionPerformance } = loaderData;
|
||||
const [view, setView] = useState<ViewMode>("grouped");
|
||||
const [query, setQuery] = useState("");
|
||||
const [modeFilter, setModeFilter] = useState<VerificationMode | "all">("all");
|
||||
|
||||
const filtered = filterCategories(verificationCategories, query, modeFilter);
|
||||
const filtered = filterCategories(verificationCategories, query, modeFilter, criterionPerformance);
|
||||
|
||||
return (
|
||||
<div className="space-y-4">
|
||||
|
|
@ -413,7 +444,7 @@ export default function Verifications() {
|
|||
</div>
|
||||
</div>
|
||||
|
||||
{view === "grouped" ? <GroupedView categories={filtered} /> : <UngroupedView categories={filtered} />}
|
||||
{view === "grouped" ? <GroupedView categories={filtered} perfMap={criterionPerformance} /> : <UngroupedView categories={filtered} perfMap={criterionPerformance} />}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,18 +1,24 @@
|
|||
import { ChevronRightIcon } from "@heroicons/react/20/solid";
|
||||
import { Link, Outlet, useLocation, useParams } from "react-router";
|
||||
import { apiJson } from "../api-client";
|
||||
import type { WorkflowDetail as ApiWorkflowDetail } from "@qltysh/arc-api-client";
|
||||
import type { Route } from "./+types/workflow-detail";
|
||||
|
||||
interface WorkflowEntry {
|
||||
export interface WorkflowEntry {
|
||||
title: string;
|
||||
slug: string;
|
||||
description: string;
|
||||
filename: string;
|
||||
config: string;
|
||||
graph: string;
|
||||
}
|
||||
|
||||
// Keep this exported for backward compatibility with other routes that import it.
|
||||
// It will be populated by the loader, but the static version is kept as fallback.
|
||||
export const workflowData: Record<string, WorkflowEntry> = {
|
||||
fix_build: {
|
||||
title: "Fix Build",
|
||||
slug: "fix_build",
|
||||
filename: "fix_build.dot",
|
||||
description: "Automatically diagnoses and fixes CI build failures by analyzing error logs, identifying root causes, and applying targeted code changes.",
|
||||
config: `version = 1
|
||||
|
|
@ -64,6 +70,7 @@ disk = 10
|
|||
},
|
||||
implement: {
|
||||
title: "Implement Feature",
|
||||
slug: "implement",
|
||||
filename: "implement.dot",
|
||||
description: "Generates production-ready code from a technical blueprint, including tests, documentation, and a pull request ready for review.",
|
||||
config: `version = 1
|
||||
|
|
@ -134,6 +141,7 @@ disk = 20
|
|||
},
|
||||
sync_drift: {
|
||||
title: "Sync Drift",
|
||||
slug: "sync_drift",
|
||||
filename: "sync_drift.dot",
|
||||
description: "Detects configuration and code drift between environments, then generates reconciliation patches to bring everything back in sync.",
|
||||
config: `version = 1
|
||||
|
|
@ -200,6 +208,7 @@ WORKDIR /home/daytona
|
|||
},
|
||||
expand: {
|
||||
title: "Expand Product",
|
||||
slug: "expand",
|
||||
filename: "expand.dot",
|
||||
description: "Evolves the product by analyzing usage patterns and specifications to propose and implement incremental improvements.",
|
||||
config: `version = 1
|
||||
|
|
@ -260,22 +269,30 @@ const tabs = [
|
|||
|
||||
export const handle = { hideHeader: true };
|
||||
|
||||
export function meta({ params }: Route.MetaArgs) {
|
||||
const workflow = workflowData[params.name ?? ""];
|
||||
const title = workflow?.title ?? params.name;
|
||||
export async function loader({ params }: Route.LoaderArgs) {
|
||||
const apiWorkflow = await apiJson<ApiWorkflowDetail>(`/workflows/${params.name}`);
|
||||
const workflow: WorkflowEntry = {
|
||||
title: apiWorkflow.title,
|
||||
slug: apiWorkflow.slug,
|
||||
description: apiWorkflow.description,
|
||||
filename: apiWorkflow.filename,
|
||||
config: apiWorkflow.config,
|
||||
graph: apiWorkflow.graph,
|
||||
};
|
||||
return { workflow };
|
||||
}
|
||||
|
||||
export function meta({ data }: Route.MetaArgs) {
|
||||
const title = data?.workflow?.title ?? "Workflow";
|
||||
return [{ title: `${title} — Arc` }];
|
||||
}
|
||||
|
||||
export default function WorkflowDetail() {
|
||||
export default function WorkflowDetail({ loaderData }: Route.ComponentProps) {
|
||||
const { name } = useParams();
|
||||
const { pathname } = useLocation();
|
||||
const workflow = workflowData[name ?? ""];
|
||||
const workflow = loaderData.workflow;
|
||||
const basePath = `/workflows/${name}`;
|
||||
|
||||
if (workflow == null) {
|
||||
return <p className="text-sm text-fg-3">Workflow not found.</p>;
|
||||
}
|
||||
|
||||
return (
|
||||
<div>
|
||||
<nav className="mb-4 flex items-center gap-1 text-sm text-fg-muted">
|
||||
|
|
|
|||
|
|
@ -1,10 +1,44 @@
|
|||
import { useState } from "react";
|
||||
import { ChevronDownIcon, MagnifyingGlassIcon } from "@heroicons/react/24/outline";
|
||||
import { Link } from "react-router";
|
||||
import { allRunsFlat, ciConfig, columns, deriveCiStatus, statusColors } from "../data/runs";
|
||||
import { Link, useParams } from "react-router";
|
||||
import { ciConfig, deriveCiStatus, statusColors } from "../data/runs";
|
||||
import type { ColumnStatus, RunWithStatus } from "../data/runs";
|
||||
import { apiJson } from "../api-client";
|
||||
import { formatElapsedSecs, formatDurationSecs } from "../lib/format";
|
||||
import type { RunListItem } from "@qltysh/arc-api-client";
|
||||
import type { Route } from "./+types/workflow-runs";
|
||||
|
||||
const runs = allRunsFlat();
|
||||
const columnNames: Record<ColumnStatus, string> = {
|
||||
working: "Working",
|
||||
pending: "Pending",
|
||||
review: "Verify",
|
||||
merge: "Merge",
|
||||
};
|
||||
|
||||
export async function loader({ params }: Route.LoaderArgs) {
|
||||
const apiRuns = await apiJson<RunListItem[]>(`/workflows/${params.name}/runs`);
|
||||
const runs: RunWithStatus[] = apiRuns.map((r) => ({
|
||||
id: r.id,
|
||||
repo: r.repo,
|
||||
title: r.title,
|
||||
workflow: r.workflow,
|
||||
number: r.number,
|
||||
additions: r.additions,
|
||||
deletions: r.deletions,
|
||||
checks: r.checks?.map((c) => ({
|
||||
name: c.name,
|
||||
status: c.status,
|
||||
duration: c.duration_secs != null ? formatDurationSecs(c.duration_secs) : undefined,
|
||||
})),
|
||||
elapsed: r.elapsed_secs != null ? formatElapsedSecs(r.elapsed_secs) : undefined,
|
||||
elapsedWarning: r.elapsed_warning,
|
||||
comments: r.comments,
|
||||
sandboxId: r.sandbox_id,
|
||||
status: r.status as ColumnStatus,
|
||||
statusLabel: columnNames[r.status as ColumnStatus] ?? r.status,
|
||||
}));
|
||||
return { runs };
|
||||
}
|
||||
|
||||
function GitPullRequestIcon({ className }: { className?: string }) {
|
||||
return (
|
||||
|
|
@ -57,7 +91,8 @@ function RunRow({ run }: { run: RunWithStatus }) {
|
|||
);
|
||||
}
|
||||
|
||||
export default function WorkflowRuns() {
|
||||
export default function WorkflowRuns({ loaderData }: Route.ComponentProps) {
|
||||
const { runs } = loaderData;
|
||||
const [query, setQuery] = useState("");
|
||||
const [statusFilter, setStatusFilter] = useState<ColumnStatus | "all">("all");
|
||||
const filtered = runs.filter(
|
||||
|
|
@ -88,8 +123,8 @@ export default function WorkflowRuns() {
|
|||
className="appearance-none rounded-md border border-line bg-panel/80 py-2 pl-3 pr-8 text-sm text-fg-2 outline-none transition-colors focus:border-focus focus:ring-0"
|
||||
>
|
||||
<option value="all">All statuses</option>
|
||||
{columns.map((col) => (
|
||||
<option key={col.id} value={col.id}>{col.name}</option>
|
||||
{(Object.entries(columnNames) as [ColumnStatus, string][]).map(([id, name]) => (
|
||||
<option key={id} value={id}>{name}</option>
|
||||
))}
|
||||
</select>
|
||||
<ChevronDownIcon className="pointer-events-none absolute right-2 top-1/2 size-4 -translate-y-1/2 text-fg-muted" />
|
||||
|
|
|
|||
|
|
@ -13,6 +13,8 @@ import {
|
|||
WrenchIcon,
|
||||
} from "@heroicons/react/24/outline";
|
||||
import { Link } from "react-router";
|
||||
import { apiJson } from "../api-client";
|
||||
import type { WorkflowListItem } from "@qltysh/arc-api-client";
|
||||
import type { Route } from "./+types/workflows";
|
||||
|
||||
export function meta({}: Route.MetaArgs) {
|
||||
|
|
@ -70,14 +72,58 @@ interface Workflow {
|
|||
nextRun?: string;
|
||||
}
|
||||
|
||||
const workflows: Workflow[] = [
|
||||
{ name: "Fix Build", slug: "fix_build", filename: "fix_build.dot", lastRun: "2 hours ago", icon: WrenchIcon, color: "var(--color-amber)" },
|
||||
{ name: "Implement Feature", slug: "implement", filename: "implement.dot", lastRun: "4 days ago", icon: CodeBracketIcon, color: "var(--color-teal-500)" },
|
||||
{ name: "Sync Drift", slug: "sync_drift", filename: "sync_drift.dot", lastRun: "1 day ago", icon: ArrowsRightLeftIcon, color: "var(--color-mint)" },
|
||||
{ name: "Expand Product", slug: "expand", filename: "expand.dot", lastRun: "2 weeks ago", icon: RocketLaunchIcon, color: "var(--color-coral)" },
|
||||
{ name: "Security Scan", slug: "security_scan", filename: "security_scan.dot", lastRun: "9 hours ago", icon: ShieldCheckIcon, color: "var(--color-teal-500)", schedule: "Daily at 09:00", nextRun: "Starts in 3 hours" },
|
||||
{ name: "Dependency Audit", slug: "dep_audit", filename: "dep_audit.dot", lastRun: "1 day ago", icon: ClockIcon, color: "var(--color-amber)", schedule: "Weekly on Mon 08:00", nextRun: "Starts in 2 days" },
|
||||
];
|
||||
function getSlugIcon(slug: string): ComponentType<{ className?: string }> {
|
||||
return slugIconMap[slug] ?? CodeBracketIcon;
|
||||
}
|
||||
|
||||
const slugIconMap: Record<string, ComponentType<{ className?: string }>> = {
|
||||
fix_build: WrenchIcon,
|
||||
implement: CodeBracketIcon,
|
||||
sync_drift: ArrowsRightLeftIcon,
|
||||
expand: RocketLaunchIcon,
|
||||
security_scan: ShieldCheckIcon,
|
||||
dep_audit: ClockIcon,
|
||||
};
|
||||
|
||||
const slugColorMap: Record<string, string> = {
|
||||
fix_build: "var(--color-amber)",
|
||||
implement: "var(--color-teal-500)",
|
||||
sync_drift: "var(--color-mint)",
|
||||
expand: "var(--color-coral)",
|
||||
security_scan: "var(--color-teal-500)",
|
||||
dep_audit: "var(--color-amber)",
|
||||
};
|
||||
|
||||
interface WorkflowData {
|
||||
name: string;
|
||||
slug: string;
|
||||
filename: string;
|
||||
lastRun: string;
|
||||
color: string;
|
||||
schedule?: string;
|
||||
nextRun?: string;
|
||||
}
|
||||
|
||||
export async function loader() {
|
||||
const apiWorkflows = await apiJson<WorkflowListItem[]>("/workflows");
|
||||
const workflows: WorkflowData[] = apiWorkflows.map((w) => ({
|
||||
name: w.name,
|
||||
slug: w.slug,
|
||||
filename: w.filename,
|
||||
lastRun: w.last_run ?? "never",
|
||||
color: slugColorMap[w.slug] ?? "var(--color-teal-500)",
|
||||
schedule: w.schedule,
|
||||
nextRun: w.next_run,
|
||||
}));
|
||||
return { workflows };
|
||||
}
|
||||
|
||||
function enrichWorkflows(data: WorkflowData[]): Workflow[] {
|
||||
return data.map((w) => ({
|
||||
...w,
|
||||
icon: getSlugIcon(w.slug),
|
||||
}));
|
||||
}
|
||||
|
||||
function PlayIcon({ className }: { className?: string }) {
|
||||
return (
|
||||
|
|
@ -155,7 +201,8 @@ function WorkflowCard({ workflow }: { workflow: Workflow }) {
|
|||
|
||||
type TriggerFilter = "all" | "scheduled" | "manual";
|
||||
|
||||
export default function Workflows() {
|
||||
export default function Workflows({ loaderData }: Route.ComponentProps) {
|
||||
const workflows = enrichWorkflows(loaderData.workflows);
|
||||
const [query, setQuery] = useState("");
|
||||
const [triggerFilter, setTriggerFilter] = useState<TriggerFilter>("all");
|
||||
const filtered = workflows.filter(
|
||||
|
|
|
|||
1225
crates/arc-api/src/demo/mod.rs
Normal file
1225
crates/arc-api/src/demo/mod.rs
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -1,4 +1,5 @@
|
|||
pub mod app_config;
|
||||
mod demo;
|
||||
pub mod jwt_auth;
|
||||
pub mod serve;
|
||||
pub mod server;
|
||||
|
|
|
|||
|
|
@ -38,6 +38,10 @@ pub struct ServeArgs {
|
|||
/// Execution environment for agent tools
|
||||
#[arg(long, value_enum)]
|
||||
pub execution_env: Option<ExecutionEnvKind>,
|
||||
|
||||
/// Serve static demo data (disables auth, read-only)
|
||||
#[arg(long)]
|
||||
pub demo: bool,
|
||||
}
|
||||
|
||||
/// Start the HTTP API server.
|
||||
|
|
@ -116,9 +120,13 @@ pub async fn serve_command(args: ServeArgs, styles: &'static Styles) -> anyhow::
|
|||
let db = arc_db::connect(&data_dir.join("arc.db")).await?;
|
||||
arc_db::initialize_db(&db).await?;
|
||||
|
||||
let auth_mode = crate::jwt_auth::resolve_auth_mode();
|
||||
let auth_mode = if args.demo {
|
||||
crate::jwt_auth::AuthMode::Disabled
|
||||
} else {
|
||||
crate::jwt_auth::resolve_auth_mode()
|
||||
};
|
||||
|
||||
let state = create_app_state_with_options(db, factory, dry_run_mode);
|
||||
let state = create_app_state_with_options(db, factory, dry_run_mode, args.demo);
|
||||
let router = build_router(state, auth_mode);
|
||||
|
||||
let addr = format!("{}:{}", args.host, args.port);
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ use axum::extract::{Path, State};
|
|||
use axum::http::StatusCode;
|
||||
use axum::response::sse::{Event, Sse};
|
||||
use axum::response::{IntoResponse, Response};
|
||||
use axum::routing::{get, post};
|
||||
use axum::routing::{get, post, put};
|
||||
use axum::{Json, Router};
|
||||
use tokio::sync::broadcast;
|
||||
use tokio_stream::wrappers::BroadcastStream;
|
||||
|
|
@ -30,6 +30,7 @@ pub use arc_types::{
|
|||
StartRunResponse, SubmitAnswerRequest, SubmitAnswerResponse,
|
||||
};
|
||||
|
||||
|
||||
/// Snapshot of a managed run.
|
||||
struct ManagedRun {
|
||||
dot_source: String,
|
||||
|
|
@ -49,29 +50,99 @@ pub struct AppState {
|
|||
runs: Mutex<HashMap<String, ManagedRun>>,
|
||||
registry_factory: Box<dyn Fn(Arc<dyn Interviewer>) -> HandlerRegistry + Send + Sync>,
|
||||
dry_run: bool,
|
||||
pub is_demo: bool,
|
||||
pub db: sqlx::SqlitePool,
|
||||
}
|
||||
|
||||
/// Build the axum Router with all run endpoints.
|
||||
pub fn build_router(state: Arc<AppState>, auth_mode: AuthMode) -> Router {
|
||||
Router::new()
|
||||
.route("/runs", get(list_runs).post(start_run))
|
||||
.route("/runs/{id}", get(get_run_status))
|
||||
.route("/runs/{id}/questions", get(get_questions))
|
||||
.route(
|
||||
"/runs/{id}/questions/{qid}/answer",
|
||||
post(submit_answer),
|
||||
)
|
||||
.route("/runs/{id}/events", get(get_events))
|
||||
.route("/runs/{id}/checkpoint", get(get_checkpoint))
|
||||
.route("/runs/{id}/context", get(get_context))
|
||||
.route("/runs/{id}/cancel", post(cancel_run))
|
||||
.route("/runs/{id}/graph", get(get_graph))
|
||||
.route("/runs/{id}/retro", get(get_retro))
|
||||
let is_demo = state.is_demo;
|
||||
|
||||
let mut router = Router::new();
|
||||
|
||||
if is_demo {
|
||||
router = router
|
||||
.route("/runs", get(crate::demo::list_runs).post(crate::demo::start_run_stub))
|
||||
.route("/runs/{id}", get(crate::demo::get_run_status))
|
||||
.route("/runs/{id}/questions", get(crate::demo::get_questions_stub))
|
||||
.route("/runs/{id}/questions/{qid}/answer", post(crate::demo::answer_stub))
|
||||
.route("/runs/{id}/events", get(crate::demo::run_events_stub))
|
||||
.route("/runs/{id}/checkpoint", get(crate::demo::checkpoint_stub))
|
||||
.route("/runs/{id}/context", get(crate::demo::context_stub))
|
||||
.route("/runs/{id}/cancel", post(crate::demo::cancel_stub))
|
||||
.route("/runs/{id}/graph", get(crate::demo::get_run_graph))
|
||||
.route("/runs/{id}/retro", get(crate::demo::get_run_retro))
|
||||
.route("/runs/{id}/stages", get(crate::demo::get_run_stages))
|
||||
.route("/runs/{id}/stages/{stageId}/turns", get(crate::demo::get_stage_turns))
|
||||
.route("/runs/{id}/files", get(crate::demo::get_run_files))
|
||||
.route("/runs/{id}/usage", get(crate::demo::get_run_usage))
|
||||
.route("/runs/{id}/verifications", get(crate::demo::get_run_verifications))
|
||||
.route("/runs/{id}/configuration", get(crate::demo::get_run_configuration))
|
||||
.route("/runs/{id}/steer", post(crate::demo::steer_run_stub))
|
||||
.route("/workflows", get(crate::demo::list_workflows))
|
||||
.route("/workflows/{name}", get(crate::demo::get_workflow))
|
||||
.route("/workflows/{name}/runs", get(crate::demo::list_workflow_runs).post(crate::demo::trigger_workflow_run_stub))
|
||||
.route("/verifications", get(crate::demo::list_verifications))
|
||||
.route("/verifications/{slug}", get(crate::demo::get_verification_detail))
|
||||
.route("/retros", get(crate::demo::list_retros))
|
||||
.route("/sessions", get(crate::demo::list_sessions).post(crate::demo::create_session_stub))
|
||||
.route("/sessions/{id}", get(crate::demo::get_session))
|
||||
.route("/sessions/{id}/messages", post(crate::demo::send_message_stub))
|
||||
.route("/sessions/{id}/events", get(crate::demo::session_events_stub))
|
||||
.route("/insights/queries", get(crate::demo::list_saved_queries).post(crate::demo::save_query_stub))
|
||||
.route("/insights/queries/{id}", put(crate::demo::update_query_stub).delete(crate::demo::delete_query_stub))
|
||||
.route("/insights/execute", post(crate::demo::execute_query_stub))
|
||||
.route("/insights/history", get(crate::demo::list_query_history))
|
||||
.route("/settings", get(crate::demo::get_settings))
|
||||
.route("/projects", get(crate::demo::list_projects))
|
||||
.route("/projects/{id}/branches", get(crate::demo::list_branches));
|
||||
} else {
|
||||
router = router
|
||||
.route("/runs", get(list_runs).post(start_run))
|
||||
.route("/runs/{id}", get(get_run_status))
|
||||
.route("/runs/{id}/questions", get(get_questions))
|
||||
.route("/runs/{id}/questions/{qid}/answer", post(submit_answer))
|
||||
.route("/runs/{id}/events", get(get_events))
|
||||
.route("/runs/{id}/checkpoint", get(get_checkpoint))
|
||||
.route("/runs/{id}/context", get(get_context))
|
||||
.route("/runs/{id}/cancel", post(cancel_run))
|
||||
.route("/runs/{id}/graph", get(get_graph))
|
||||
.route("/runs/{id}/retro", get(get_retro))
|
||||
.route("/runs/{id}/stages", get(not_implemented))
|
||||
.route("/runs/{id}/stages/{stageId}/turns", get(not_implemented))
|
||||
.route("/runs/{id}/files", get(not_implemented))
|
||||
.route("/runs/{id}/usage", get(not_implemented))
|
||||
.route("/runs/{id}/verifications", get(not_implemented))
|
||||
.route("/runs/{id}/configuration", get(not_implemented))
|
||||
.route("/runs/{id}/steer", post(not_implemented))
|
||||
.route("/workflows", get(not_implemented))
|
||||
.route("/workflows/{name}", get(not_implemented))
|
||||
.route("/workflows/{name}/runs", get(not_implemented).post(not_implemented))
|
||||
.route("/verifications", get(not_implemented))
|
||||
.route("/verifications/{slug}", get(not_implemented))
|
||||
.route("/retros", get(not_implemented))
|
||||
.route("/sessions", get(not_implemented).post(not_implemented))
|
||||
.route("/sessions/{id}", get(not_implemented))
|
||||
.route("/sessions/{id}/messages", post(not_implemented))
|
||||
.route("/sessions/{id}/events", get(not_implemented))
|
||||
.route("/insights/queries", get(not_implemented).post(not_implemented))
|
||||
.route("/insights/queries/{id}", put(not_implemented).delete(not_implemented))
|
||||
.route("/insights/execute", post(not_implemented))
|
||||
.route("/insights/history", get(not_implemented))
|
||||
.route("/settings", get(not_implemented))
|
||||
.route("/projects", get(not_implemented))
|
||||
.route("/projects/{id}/branches", get(not_implemented));
|
||||
}
|
||||
|
||||
router
|
||||
.layer(axum::Extension(auth_mode))
|
||||
.with_state(state)
|
||||
}
|
||||
|
||||
async fn not_implemented() -> Response {
|
||||
StatusCode::NOT_IMPLEMENTED.into_response()
|
||||
}
|
||||
|
||||
/// Create an `AppState` with the given registry factory and database pool.
|
||||
///
|
||||
/// The factory receives the run's `WebInterviewer` so it can wire it
|
||||
|
|
@ -80,19 +151,21 @@ pub fn create_app_state(
|
|||
db: sqlx::SqlitePool,
|
||||
registry_factory: impl Fn(Arc<dyn Interviewer>) -> HandlerRegistry + Send + Sync + 'static,
|
||||
) -> Arc<AppState> {
|
||||
create_app_state_with_options(db, registry_factory, false)
|
||||
create_app_state_with_options(db, registry_factory, false, false)
|
||||
}
|
||||
|
||||
/// Create an `AppState` with the given database pool, registry factory, and dry-run flag.
|
||||
/// Create an `AppState` with the given database pool, registry factory, dry-run flag, and demo flag.
|
||||
pub fn create_app_state_with_options(
|
||||
db: sqlx::SqlitePool,
|
||||
registry_factory: impl Fn(Arc<dyn Interviewer>) -> HandlerRegistry + Send + Sync + 'static,
|
||||
dry_run: bool,
|
||||
is_demo: bool,
|
||||
) -> Arc<AppState> {
|
||||
Arc::new(AppState {
|
||||
runs: Mutex::new(HashMap::new()),
|
||||
registry_factory: Box::new(registry_factory),
|
||||
dry_run,
|
||||
is_demo,
|
||||
db,
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,6 +39,9 @@ fn load_spec() -> openapiv3::OpenAPI {
|
|||
fn resolve_path(path: &str) -> String {
|
||||
path.replace("{id}", "test-id")
|
||||
.replace("{qid}", "test-qid")
|
||||
.replace("{stageId}", "test-stage")
|
||||
.replace("{name}", "test-name")
|
||||
.replace("{slug}", "test-slug")
|
||||
}
|
||||
|
||||
fn methods_for_path_item(item: &openapiv3::PathItem) -> Vec<Method> {
|
||||
|
|
|
|||
1511
openapi/arc-api.yaml
1511
openapi/arc-api.yaml
File diff suppressed because it is too large
Load diff
|
|
@ -1,17 +1,79 @@
|
|||
api.ts
|
||||
api/insights-api.ts
|
||||
api/projects-api.ts
|
||||
api/retros-api.ts
|
||||
api/runs-api.ts
|
||||
api/sessions-api.ts
|
||||
api/settings-api.ts
|
||||
api/verifications-api.ts
|
||||
api/workflows-api.ts
|
||||
base.ts
|
||||
common.ts
|
||||
configuration.ts
|
||||
index.ts
|
||||
models/api-question-option.ts
|
||||
models/api-question.ts
|
||||
models/branch.ts
|
||||
models/cancel-run200-response.ts
|
||||
models/check-run-status.ts
|
||||
models/check-run.ts
|
||||
models/control-detail.ts
|
||||
models/control-info.ts
|
||||
models/control-performance.ts
|
||||
models/create-session-request.ts
|
||||
models/create-session-response.ts
|
||||
models/diff-file.ts
|
||||
models/diff-stats.ts
|
||||
models/error-response.ts
|
||||
models/evaluation-result.ts
|
||||
models/execute-query-request.ts
|
||||
models/execute-query-response.ts
|
||||
models/file-checkpoint.ts
|
||||
models/file-diff.ts
|
||||
models/history-entry.ts
|
||||
models/index.ts
|
||||
models/project.ts
|
||||
models/recent-control-result.ts
|
||||
models/retro-list-item.ts
|
||||
models/retro-stats.ts
|
||||
models/run-files.ts
|
||||
models/run-list-item-status.ts
|
||||
models/run-list-item.ts
|
||||
models/run-stage.ts
|
||||
models/run-status-response.ts
|
||||
models/run-status.ts
|
||||
models/run-usage.ts
|
||||
models/run-verification-control.ts
|
||||
models/run-verification.ts
|
||||
models/save-query-request.ts
|
||||
models/saved-query.ts
|
||||
models/send-message-request.ts
|
||||
models/session-detail.ts
|
||||
models/session-group.ts
|
||||
models/session-list-item.ts
|
||||
models/session-turn.ts
|
||||
models/setting-field-type.ts
|
||||
models/setting-field.ts
|
||||
models/setting-group.ts
|
||||
models/sibling-control.ts
|
||||
models/smoothness-rating.ts
|
||||
models/stage-status.ts
|
||||
models/stage-turn.ts
|
||||
models/start-run-request.ts
|
||||
models/start-run-response.ts
|
||||
models/steer-request.ts
|
||||
models/steer-run200-response.ts
|
||||
models/submit-answer-request.ts
|
||||
models/submit-answer-response.ts
|
||||
models/tool-use.ts
|
||||
models/usage-by-model.ts
|
||||
models/usage-stage.ts
|
||||
models/usage-totals.ts
|
||||
models/verification-category.ts
|
||||
models/verification-control.ts
|
||||
models/verification-detail-response.ts
|
||||
models/verification-mode.ts
|
||||
models/verification-status.ts
|
||||
models/verification-type.ts
|
||||
models/workflow-detail.ts
|
||||
models/workflow-list-item.ts
|
||||
|
|
|
|||
|
|
@ -14,5 +14,12 @@
|
|||
|
||||
|
||||
|
||||
export * from './api/insights-api';
|
||||
export * from './api/projects-api';
|
||||
export * from './api/retros-api';
|
||||
export * from './api/runs-api';
|
||||
export * from './api/sessions-api';
|
||||
export * from './api/settings-api';
|
||||
export * from './api/verifications-api';
|
||||
export * from './api/workflows-api';
|
||||
|
||||
|
|
|
|||
467
packages/arc-api-client/src/api/insights-api.ts
Normal file
467
packages/arc-api-client/src/api/insights-api.ts
Normal file
|
|
@ -0,0 +1,467 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Arc Run API
|
||||
* HTTP API for managing Arc workflow run executions.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
import type { Configuration } from '../configuration';
|
||||
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
|
||||
import globalAxios from 'axios';
|
||||
// Some imports not used depending on template conditions
|
||||
// @ts-ignore
|
||||
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction, replaceWithSerializableTypeIfNeeded } from '../common';
|
||||
// @ts-ignore
|
||||
import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base';
|
||||
// @ts-ignore
|
||||
import type { ExecuteQueryRequest } from '../models';
|
||||
// @ts-ignore
|
||||
import type { ExecuteQueryResponse } from '../models';
|
||||
// @ts-ignore
|
||||
import type { HistoryEntry } from '../models';
|
||||
// @ts-ignore
|
||||
import type { SaveQueryRequest } from '../models';
|
||||
// @ts-ignore
|
||||
import type { SavedQuery } from '../models';
|
||||
/**
|
||||
* InsightsApi - axios parameter creator
|
||||
*/
|
||||
export const InsightsApiAxiosParamCreator = function (configuration?: Configuration) {
|
||||
return {
|
||||
/**
|
||||
*
|
||||
* @summary Delete a saved query
|
||||
* @param {string} id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deleteSavedQuery: async (id: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'id' is not null or undefined
|
||||
assertParamExists('deleteSavedQuery', 'id', id)
|
||||
const localVarPath = `/insights/queries/{id}`
|
||||
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||||
let baseOptions;
|
||||
if (configuration) {
|
||||
baseOptions = configuration.baseOptions;
|
||||
}
|
||||
|
||||
const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
|
||||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary Execute a SQL query
|
||||
* @param {ExecuteQueryRequest} executeQueryRequest
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
executeQuery: async (executeQueryRequest: ExecuteQueryRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'executeQueryRequest' is not null or undefined
|
||||
assertParamExists('executeQuery', 'executeQueryRequest', executeQueryRequest)
|
||||
const localVarPath = `/insights/execute`;
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||||
let baseOptions;
|
||||
if (configuration) {
|
||||
baseOptions = configuration.baseOptions;
|
||||
}
|
||||
|
||||
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
localVarHeaderParameter['Content-Type'] = 'application/json';
|
||||
localVarHeaderParameter['Accept'] = 'application/json';
|
||||
|
||||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
localVarRequestOptions.data = serializeDataIfNeeded(executeQueryRequest, localVarRequestOptions, configuration)
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary Query execution history
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
listQueryHistory: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
const localVarPath = `/insights/history`;
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||||
let baseOptions;
|
||||
if (configuration) {
|
||||
baseOptions = configuration.baseOptions;
|
||||
}
|
||||
|
||||
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
localVarHeaderParameter['Accept'] = 'application/json';
|
||||
|
||||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary List saved queries
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
listSavedQueries: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
const localVarPath = `/insights/queries`;
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||||
let baseOptions;
|
||||
if (configuration) {
|
||||
baseOptions = configuration.baseOptions;
|
||||
}
|
||||
|
||||
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
localVarHeaderParameter['Accept'] = 'application/json';
|
||||
|
||||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary Save a query
|
||||
* @param {SaveQueryRequest} saveQueryRequest
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
saveQuery: async (saveQueryRequest: SaveQueryRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'saveQueryRequest' is not null or undefined
|
||||
assertParamExists('saveQuery', 'saveQueryRequest', saveQueryRequest)
|
||||
const localVarPath = `/insights/queries`;
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||||
let baseOptions;
|
||||
if (configuration) {
|
||||
baseOptions = configuration.baseOptions;
|
||||
}
|
||||
|
||||
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
localVarHeaderParameter['Content-Type'] = 'application/json';
|
||||
localVarHeaderParameter['Accept'] = 'application/json';
|
||||
|
||||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
localVarRequestOptions.data = serializeDataIfNeeded(saveQueryRequest, localVarRequestOptions, configuration)
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary Update a saved query
|
||||
* @param {string} id
|
||||
* @param {SaveQueryRequest} saveQueryRequest
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updateSavedQuery: async (id: string, saveQueryRequest: SaveQueryRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'id' is not null or undefined
|
||||
assertParamExists('updateSavedQuery', 'id', id)
|
||||
// verify required parameter 'saveQueryRequest' is not null or undefined
|
||||
assertParamExists('updateSavedQuery', 'saveQueryRequest', saveQueryRequest)
|
||||
const localVarPath = `/insights/queries/{id}`
|
||||
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||||
let baseOptions;
|
||||
if (configuration) {
|
||||
baseOptions = configuration.baseOptions;
|
||||
}
|
||||
|
||||
const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
localVarHeaderParameter['Content-Type'] = 'application/json';
|
||||
localVarHeaderParameter['Accept'] = 'application/json';
|
||||
|
||||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
localVarRequestOptions.data = serializeDataIfNeeded(saveQueryRequest, localVarRequestOptions, configuration)
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* InsightsApi - functional programming interface
|
||||
*/
|
||||
export const InsightsApiFp = function(configuration?: Configuration) {
|
||||
const localVarAxiosParamCreator = InsightsApiAxiosParamCreator(configuration)
|
||||
return {
|
||||
/**
|
||||
*
|
||||
* @summary Delete a saved query
|
||||
* @param {string} id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async deleteSavedQuery(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteSavedQuery(id, options);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath = operationServerMap['InsightsApi.deleteSavedQuery']?.[localVarOperationServerIndex]?.url;
|
||||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary Execute a SQL query
|
||||
* @param {ExecuteQueryRequest} executeQueryRequest
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async executeQuery(executeQueryRequest: ExecuteQueryRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ExecuteQueryResponse>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.executeQuery(executeQueryRequest, options);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath = operationServerMap['InsightsApi.executeQuery']?.[localVarOperationServerIndex]?.url;
|
||||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary Query execution history
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async listQueryHistory(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<HistoryEntry>>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.listQueryHistory(options);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath = operationServerMap['InsightsApi.listQueryHistory']?.[localVarOperationServerIndex]?.url;
|
||||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary List saved queries
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async listSavedQueries(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<SavedQuery>>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.listSavedQueries(options);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath = operationServerMap['InsightsApi.listSavedQueries']?.[localVarOperationServerIndex]?.url;
|
||||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary Save a query
|
||||
* @param {SaveQueryRequest} saveQueryRequest
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async saveQuery(saveQueryRequest: SaveQueryRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SavedQuery>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.saveQuery(saveQueryRequest, options);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath = operationServerMap['InsightsApi.saveQuery']?.[localVarOperationServerIndex]?.url;
|
||||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary Update a saved query
|
||||
* @param {string} id
|
||||
* @param {SaveQueryRequest} saveQueryRequest
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async updateSavedQuery(id: string, saveQueryRequest: SaveQueryRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SavedQuery>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.updateSavedQuery(id, saveQueryRequest, options);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath = operationServerMap['InsightsApi.updateSavedQuery']?.[localVarOperationServerIndex]?.url;
|
||||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* InsightsApi - factory interface
|
||||
*/
|
||||
export const InsightsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
||||
const localVarFp = InsightsApiFp(configuration)
|
||||
return {
|
||||
/**
|
||||
*
|
||||
* @summary Delete a saved query
|
||||
* @param {string} id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
deleteSavedQuery(id: string, options?: RawAxiosRequestConfig): AxiosPromise<void> {
|
||||
return localVarFp.deleteSavedQuery(id, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary Execute a SQL query
|
||||
* @param {ExecuteQueryRequest} executeQueryRequest
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
executeQuery(executeQueryRequest: ExecuteQueryRequest, options?: RawAxiosRequestConfig): AxiosPromise<ExecuteQueryResponse> {
|
||||
return localVarFp.executeQuery(executeQueryRequest, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary Query execution history
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
listQueryHistory(options?: RawAxiosRequestConfig): AxiosPromise<Array<HistoryEntry>> {
|
||||
return localVarFp.listQueryHistory(options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary List saved queries
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
listSavedQueries(options?: RawAxiosRequestConfig): AxiosPromise<Array<SavedQuery>> {
|
||||
return localVarFp.listSavedQueries(options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary Save a query
|
||||
* @param {SaveQueryRequest} saveQueryRequest
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
saveQuery(saveQueryRequest: SaveQueryRequest, options?: RawAxiosRequestConfig): AxiosPromise<SavedQuery> {
|
||||
return localVarFp.saveQuery(saveQueryRequest, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary Update a saved query
|
||||
* @param {string} id
|
||||
* @param {SaveQueryRequest} saveQueryRequest
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
updateSavedQuery(id: string, saveQueryRequest: SaveQueryRequest, options?: RawAxiosRequestConfig): AxiosPromise<SavedQuery> {
|
||||
return localVarFp.updateSavedQuery(id, saveQueryRequest, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* InsightsApi - object-oriented interface
|
||||
*/
|
||||
export class InsightsApi extends BaseAPI {
|
||||
/**
|
||||
*
|
||||
* @summary Delete a saved query
|
||||
* @param {string} id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
public deleteSavedQuery(id: string, options?: RawAxiosRequestConfig) {
|
||||
return InsightsApiFp(this.configuration).deleteSavedQuery(id, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Execute a SQL query
|
||||
* @param {ExecuteQueryRequest} executeQueryRequest
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
public executeQuery(executeQueryRequest: ExecuteQueryRequest, options?: RawAxiosRequestConfig) {
|
||||
return InsightsApiFp(this.configuration).executeQuery(executeQueryRequest, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Query execution history
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
public listQueryHistory(options?: RawAxiosRequestConfig) {
|
||||
return InsightsApiFp(this.configuration).listQueryHistory(options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary List saved queries
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
public listSavedQueries(options?: RawAxiosRequestConfig) {
|
||||
return InsightsApiFp(this.configuration).listSavedQueries(options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Save a query
|
||||
* @param {SaveQueryRequest} saveQueryRequest
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
public saveQuery(saveQueryRequest: SaveQueryRequest, options?: RawAxiosRequestConfig) {
|
||||
return InsightsApiFp(this.configuration).saveQuery(saveQueryRequest, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Update a saved query
|
||||
* @param {string} id
|
||||
* @param {SaveQueryRequest} saveQueryRequest
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
public updateSavedQuery(id: string, saveQueryRequest: SaveQueryRequest, options?: RawAxiosRequestConfig) {
|
||||
return InsightsApiFp(this.configuration).updateSavedQuery(id, saveQueryRequest, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
}
|
||||
|
||||
187
packages/arc-api-client/src/api/projects-api.ts
Normal file
187
packages/arc-api-client/src/api/projects-api.ts
Normal file
|
|
@ -0,0 +1,187 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Arc Run API
|
||||
* HTTP API for managing Arc workflow run executions.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
import type { Configuration } from '../configuration';
|
||||
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
|
||||
import globalAxios from 'axios';
|
||||
// Some imports not used depending on template conditions
|
||||
// @ts-ignore
|
||||
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction, replaceWithSerializableTypeIfNeeded } from '../common';
|
||||
// @ts-ignore
|
||||
import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base';
|
||||
// @ts-ignore
|
||||
import type { Branch } from '../models';
|
||||
// @ts-ignore
|
||||
import type { Project } from '../models';
|
||||
/**
|
||||
* ProjectsApi - axios parameter creator
|
||||
*/
|
||||
export const ProjectsApiAxiosParamCreator = function (configuration?: Configuration) {
|
||||
return {
|
||||
/**
|
||||
*
|
||||
* @summary List branches for a project
|
||||
* @param {string} id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
listBranches: async (id: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'id' is not null or undefined
|
||||
assertParamExists('listBranches', 'id', id)
|
||||
const localVarPath = `/projects/{id}/branches`
|
||||
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||||
let baseOptions;
|
||||
if (configuration) {
|
||||
baseOptions = configuration.baseOptions;
|
||||
}
|
||||
|
||||
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
localVarHeaderParameter['Accept'] = 'application/json';
|
||||
|
||||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary List available projects
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
listProjects: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
const localVarPath = `/projects`;
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||||
let baseOptions;
|
||||
if (configuration) {
|
||||
baseOptions = configuration.baseOptions;
|
||||
}
|
||||
|
||||
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
localVarHeaderParameter['Accept'] = 'application/json';
|
||||
|
||||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* ProjectsApi - functional programming interface
|
||||
*/
|
||||
export const ProjectsApiFp = function(configuration?: Configuration) {
|
||||
const localVarAxiosParamCreator = ProjectsApiAxiosParamCreator(configuration)
|
||||
return {
|
||||
/**
|
||||
*
|
||||
* @summary List branches for a project
|
||||
* @param {string} id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async listBranches(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Branch>>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.listBranches(id, options);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath = operationServerMap['ProjectsApi.listBranches']?.[localVarOperationServerIndex]?.url;
|
||||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary List available projects
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async listProjects(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Project>>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.listProjects(options);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath = operationServerMap['ProjectsApi.listProjects']?.[localVarOperationServerIndex]?.url;
|
||||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* ProjectsApi - factory interface
|
||||
*/
|
||||
export const ProjectsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
||||
const localVarFp = ProjectsApiFp(configuration)
|
||||
return {
|
||||
/**
|
||||
*
|
||||
* @summary List branches for a project
|
||||
* @param {string} id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
listBranches(id: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<Branch>> {
|
||||
return localVarFp.listBranches(id, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary List available projects
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
listProjects(options?: RawAxiosRequestConfig): AxiosPromise<Array<Project>> {
|
||||
return localVarFp.listProjects(options).then((request) => request(axios, basePath));
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* ProjectsApi - object-oriented interface
|
||||
*/
|
||||
export class ProjectsApi extends BaseAPI {
|
||||
/**
|
||||
*
|
||||
* @summary List branches for a project
|
||||
* @param {string} id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
public listBranches(id: string, options?: RawAxiosRequestConfig) {
|
||||
return ProjectsApiFp(this.configuration).listBranches(id, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary List available projects
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
public listProjects(options?: RawAxiosRequestConfig) {
|
||||
return ProjectsApiFp(this.configuration).listProjects(options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
}
|
||||
|
||||
117
packages/arc-api-client/src/api/retros-api.ts
Normal file
117
packages/arc-api-client/src/api/retros-api.ts
Normal file
|
|
@ -0,0 +1,117 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Arc Run API
|
||||
* HTTP API for managing Arc workflow run executions.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
import type { Configuration } from '../configuration';
|
||||
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
|
||||
import globalAxios from 'axios';
|
||||
// Some imports not used depending on template conditions
|
||||
// @ts-ignore
|
||||
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction, replaceWithSerializableTypeIfNeeded } from '../common';
|
||||
// @ts-ignore
|
||||
import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base';
|
||||
// @ts-ignore
|
||||
import type { RetroListItem } from '../models';
|
||||
/**
|
||||
* RetrosApi - axios parameter creator
|
||||
*/
|
||||
export const RetrosApiAxiosParamCreator = function (configuration?: Configuration) {
|
||||
return {
|
||||
/**
|
||||
*
|
||||
* @summary List all retros across runs
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
listRetros: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
const localVarPath = `/retros`;
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||||
let baseOptions;
|
||||
if (configuration) {
|
||||
baseOptions = configuration.baseOptions;
|
||||
}
|
||||
|
||||
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
localVarHeaderParameter['Accept'] = 'application/json';
|
||||
|
||||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* RetrosApi - functional programming interface
|
||||
*/
|
||||
export const RetrosApiFp = function(configuration?: Configuration) {
|
||||
const localVarAxiosParamCreator = RetrosApiAxiosParamCreator(configuration)
|
||||
return {
|
||||
/**
|
||||
*
|
||||
* @summary List all retros across runs
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async listRetros(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<RetroListItem>>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.listRetros(options);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath = operationServerMap['RetrosApi.listRetros']?.[localVarOperationServerIndex]?.url;
|
||||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* RetrosApi - factory interface
|
||||
*/
|
||||
export const RetrosApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
||||
const localVarFp = RetrosApiFp(configuration)
|
||||
return {
|
||||
/**
|
||||
*
|
||||
* @summary List all retros across runs
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
listRetros(options?: RawAxiosRequestConfig): AxiosPromise<Array<RetroListItem>> {
|
||||
return localVarFp.listRetros(options).then((request) => request(axios, basePath));
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* RetrosApi - object-oriented interface
|
||||
*/
|
||||
export class RetrosApi extends BaseAPI {
|
||||
/**
|
||||
*
|
||||
* @summary List all retros across runs
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
public listRetros(options?: RawAxiosRequestConfig) {
|
||||
return RetrosApiFp(this.configuration).listRetros(options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -28,12 +28,28 @@ import type { CancelRun200Response } from '../models';
|
|||
// @ts-ignore
|
||||
import type { ErrorResponse } from '../models';
|
||||
// @ts-ignore
|
||||
import type { RunFiles } from '../models';
|
||||
// @ts-ignore
|
||||
import type { RunListItem } from '../models';
|
||||
// @ts-ignore
|
||||
import type { RunStage } from '../models';
|
||||
// @ts-ignore
|
||||
import type { RunStatusResponse } from '../models';
|
||||
// @ts-ignore
|
||||
import type { RunUsage } from '../models';
|
||||
// @ts-ignore
|
||||
import type { RunVerification } from '../models';
|
||||
// @ts-ignore
|
||||
import type { StageTurn } from '../models';
|
||||
// @ts-ignore
|
||||
import type { StartRunRequest } from '../models';
|
||||
// @ts-ignore
|
||||
import type { StartRunResponse } from '../models';
|
||||
// @ts-ignore
|
||||
import type { SteerRequest } from '../models';
|
||||
// @ts-ignore
|
||||
import type { SteerRun200Response } from '../models';
|
||||
// @ts-ignore
|
||||
import type { SubmitAnswerRequest } from '../models';
|
||||
// @ts-ignore
|
||||
import type { SubmitAnswerResponse } from '../models';
|
||||
|
|
@ -280,6 +296,113 @@ export const RunsApiAxiosParamCreator = function (configuration?: Configuration)
|
|||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary Run configuration (TOML)
|
||||
* @param {string} id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getRunConfiguration: async (id: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'id' is not null or undefined
|
||||
assertParamExists('getRunConfiguration', 'id', id)
|
||||
const localVarPath = `/runs/{id}/configuration`
|
||||
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||||
let baseOptions;
|
||||
if (configuration) {
|
||||
baseOptions = configuration.baseOptions;
|
||||
}
|
||||
|
||||
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
localVarHeaderParameter['Accept'] = 'text/plain';
|
||||
|
||||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary File diffs grouped by checkpoint
|
||||
* @param {string} id
|
||||
* @param {string} [checkpoint]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getRunFiles: async (id: string, checkpoint?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'id' is not null or undefined
|
||||
assertParamExists('getRunFiles', 'id', id)
|
||||
const localVarPath = `/runs/{id}/files`
|
||||
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||||
let baseOptions;
|
||||
if (configuration) {
|
||||
baseOptions = configuration.baseOptions;
|
||||
}
|
||||
|
||||
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
if (checkpoint !== undefined) {
|
||||
localVarQueryParameter['checkpoint'] = checkpoint;
|
||||
}
|
||||
|
||||
localVarHeaderParameter['Accept'] = 'application/json';
|
||||
|
||||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary List stages with status and duration
|
||||
* @param {string} id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getRunStages: async (id: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'id' is not null or undefined
|
||||
assertParamExists('getRunStages', 'id', id)
|
||||
const localVarPath = `/runs/{id}/stages`
|
||||
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||||
let baseOptions;
|
||||
if (configuration) {
|
||||
baseOptions = configuration.baseOptions;
|
||||
}
|
||||
|
||||
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
localVarHeaderParameter['Accept'] = 'application/json';
|
||||
|
||||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary Get run status
|
||||
|
|
@ -316,7 +439,113 @@ export const RunsApiAxiosParamCreator = function (configuration?: Configuration)
|
|||
},
|
||||
/**
|
||||
*
|
||||
* @summary List all runs
|
||||
* @summary Token and cost breakdown by stage and model
|
||||
* @param {string} id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getRunUsage: async (id: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'id' is not null or undefined
|
||||
assertParamExists('getRunUsage', 'id', id)
|
||||
const localVarPath = `/runs/{id}/usage`
|
||||
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||||
let baseOptions;
|
||||
if (configuration) {
|
||||
baseOptions = configuration.baseOptions;
|
||||
}
|
||||
|
||||
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
localVarHeaderParameter['Accept'] = 'application/json';
|
||||
|
||||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary Verification results for this run
|
||||
* @param {string} id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getRunVerifications: async (id: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'id' is not null or undefined
|
||||
assertParamExists('getRunVerifications', 'id', id)
|
||||
const localVarPath = `/runs/{id}/verifications`
|
||||
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||||
let baseOptions;
|
||||
if (configuration) {
|
||||
baseOptions = configuration.baseOptions;
|
||||
}
|
||||
|
||||
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
localVarHeaderParameter['Accept'] = 'application/json';
|
||||
|
||||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary Conversation transcript for a stage
|
||||
* @param {string} id
|
||||
* @param {string} stageId
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getStageTurns: async (id: string, stageId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'id' is not null or undefined
|
||||
assertParamExists('getStageTurns', 'id', id)
|
||||
// verify required parameter 'stageId' is not null or undefined
|
||||
assertParamExists('getStageTurns', 'stageId', stageId)
|
||||
const localVarPath = `/runs/{id}/stages/{stageId}/turns`
|
||||
.replace(`{${"id"}}`, encodeURIComponent(String(id)))
|
||||
.replace(`{${"stageId"}}`, encodeURIComponent(String(stageId)));
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||||
let baseOptions;
|
||||
if (configuration) {
|
||||
baseOptions = configuration.baseOptions;
|
||||
}
|
||||
|
||||
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
localVarHeaderParameter['Accept'] = 'application/json';
|
||||
|
||||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary List all runs (board view)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
|
|
@ -379,6 +608,45 @@ export const RunsApiAxiosParamCreator = function (configuration?: Configuration)
|
|||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary Submit steering guidance on a file line
|
||||
* @param {string} id
|
||||
* @param {SteerRequest} steerRequest
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
steerRun: async (id: string, steerRequest: SteerRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'id' is not null or undefined
|
||||
assertParamExists('steerRun', 'id', id)
|
||||
// verify required parameter 'steerRequest' is not null or undefined
|
||||
assertParamExists('steerRun', 'steerRequest', steerRequest)
|
||||
const localVarPath = `/runs/{id}/steer`
|
||||
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||||
let baseOptions;
|
||||
if (configuration) {
|
||||
baseOptions = configuration.baseOptions;
|
||||
}
|
||||
|
||||
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
localVarHeaderParameter['Content-Type'] = 'application/json';
|
||||
localVarHeaderParameter['Accept'] = 'application/json';
|
||||
|
||||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
localVarRequestOptions.data = serializeDataIfNeeded(steerRequest, localVarRequestOptions, configuration)
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary Submit an answer to a question
|
||||
|
|
@ -522,6 +790,46 @@ export const RunsApiFp = function(configuration?: Configuration) {
|
|||
const localVarOperationServerBasePath = operationServerMap['RunsApi.getRetro']?.[localVarOperationServerIndex]?.url;
|
||||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary Run configuration (TOML)
|
||||
* @param {string} id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async getRunConfiguration(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<string>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.getRunConfiguration(id, options);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath = operationServerMap['RunsApi.getRunConfiguration']?.[localVarOperationServerIndex]?.url;
|
||||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary File diffs grouped by checkpoint
|
||||
* @param {string} id
|
||||
* @param {string} [checkpoint]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async getRunFiles(id: string, checkpoint?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RunFiles>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.getRunFiles(id, checkpoint, options);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath = operationServerMap['RunsApi.getRunFiles']?.[localVarOperationServerIndex]?.url;
|
||||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary List stages with status and duration
|
||||
* @param {string} id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async getRunStages(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<RunStage>>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.getRunStages(id, options);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath = operationServerMap['RunsApi.getRunStages']?.[localVarOperationServerIndex]?.url;
|
||||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary Get run status
|
||||
|
|
@ -537,11 +845,51 @@ export const RunsApiFp = function(configuration?: Configuration) {
|
|||
},
|
||||
/**
|
||||
*
|
||||
* @summary List all runs
|
||||
* @summary Token and cost breakdown by stage and model
|
||||
* @param {string} id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async listRuns(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<RunStatusResponse>>> {
|
||||
async getRunUsage(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RunUsage>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.getRunUsage(id, options);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath = operationServerMap['RunsApi.getRunUsage']?.[localVarOperationServerIndex]?.url;
|
||||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary Verification results for this run
|
||||
* @param {string} id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async getRunVerifications(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<RunVerification>>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.getRunVerifications(id, options);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath = operationServerMap['RunsApi.getRunVerifications']?.[localVarOperationServerIndex]?.url;
|
||||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary Conversation transcript for a stage
|
||||
* @param {string} id
|
||||
* @param {string} stageId
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async getStageTurns(id: string, stageId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<StageTurn>>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.getStageTurns(id, stageId, options);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath = operationServerMap['RunsApi.getStageTurns']?.[localVarOperationServerIndex]?.url;
|
||||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary List all runs (board view)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async listRuns(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<RunListItem>>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.listRuns(options);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath = operationServerMap['RunsApi.listRuns']?.[localVarOperationServerIndex]?.url;
|
||||
|
|
@ -560,6 +908,20 @@ export const RunsApiFp = function(configuration?: Configuration) {
|
|||
const localVarOperationServerBasePath = operationServerMap['RunsApi.startRun']?.[localVarOperationServerIndex]?.url;
|
||||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary Submit steering guidance on a file line
|
||||
* @param {string} id
|
||||
* @param {SteerRequest} steerRequest
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async steerRun(id: string, steerRequest: SteerRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SteerRun200Response>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.steerRun(id, steerRequest, options);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath = operationServerMap['RunsApi.steerRun']?.[localVarOperationServerIndex]?.url;
|
||||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary Submit an answer to a question
|
||||
|
|
@ -654,6 +1016,37 @@ export const RunsApiFactory = function (configuration?: Configuration, basePath?
|
|||
getRetro(id: string, options?: RawAxiosRequestConfig): AxiosPromise<any> {
|
||||
return localVarFp.getRetro(id, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary Run configuration (TOML)
|
||||
* @param {string} id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getRunConfiguration(id: string, options?: RawAxiosRequestConfig): AxiosPromise<string> {
|
||||
return localVarFp.getRunConfiguration(id, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary File diffs grouped by checkpoint
|
||||
* @param {string} id
|
||||
* @param {string} [checkpoint]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getRunFiles(id: string, checkpoint?: string, options?: RawAxiosRequestConfig): AxiosPromise<RunFiles> {
|
||||
return localVarFp.getRunFiles(id, checkpoint, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary List stages with status and duration
|
||||
* @param {string} id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getRunStages(id: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<RunStage>> {
|
||||
return localVarFp.getRunStages(id, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary Get run status
|
||||
|
|
@ -666,11 +1059,42 @@ export const RunsApiFactory = function (configuration?: Configuration, basePath?
|
|||
},
|
||||
/**
|
||||
*
|
||||
* @summary List all runs
|
||||
* @summary Token and cost breakdown by stage and model
|
||||
* @param {string} id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
listRuns(options?: RawAxiosRequestConfig): AxiosPromise<Array<RunStatusResponse>> {
|
||||
getRunUsage(id: string, options?: RawAxiosRequestConfig): AxiosPromise<RunUsage> {
|
||||
return localVarFp.getRunUsage(id, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary Verification results for this run
|
||||
* @param {string} id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getRunVerifications(id: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<RunVerification>> {
|
||||
return localVarFp.getRunVerifications(id, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary Conversation transcript for a stage
|
||||
* @param {string} id
|
||||
* @param {string} stageId
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getStageTurns(id: string, stageId: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<StageTurn>> {
|
||||
return localVarFp.getStageTurns(id, stageId, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary List all runs (board view)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
listRuns(options?: RawAxiosRequestConfig): AxiosPromise<Array<RunListItem>> {
|
||||
return localVarFp.listRuns(options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
|
|
@ -683,6 +1107,17 @@ export const RunsApiFactory = function (configuration?: Configuration, basePath?
|
|||
startRun(startRunRequest: StartRunRequest, options?: RawAxiosRequestConfig): AxiosPromise<StartRunResponse> {
|
||||
return localVarFp.startRun(startRunRequest, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary Submit steering guidance on a file line
|
||||
* @param {string} id
|
||||
* @param {SteerRequest} steerRequest
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
steerRun(id: string, steerRequest: SteerRequest, options?: RawAxiosRequestConfig): AxiosPromise<SteerRun200Response> {
|
||||
return localVarFp.steerRun(id, steerRequest, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary Submit an answer to a question
|
||||
|
|
@ -779,6 +1214,40 @@ export class RunsApi extends BaseAPI {
|
|||
return RunsApiFp(this.configuration).getRetro(id, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Run configuration (TOML)
|
||||
* @param {string} id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
public getRunConfiguration(id: string, options?: RawAxiosRequestConfig) {
|
||||
return RunsApiFp(this.configuration).getRunConfiguration(id, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary File diffs grouped by checkpoint
|
||||
* @param {string} id
|
||||
* @param {string} [checkpoint]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
public getRunFiles(id: string, checkpoint?: string, options?: RawAxiosRequestConfig) {
|
||||
return RunsApiFp(this.configuration).getRunFiles(id, checkpoint, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary List stages with status and duration
|
||||
* @param {string} id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
public getRunStages(id: string, options?: RawAxiosRequestConfig) {
|
||||
return RunsApiFp(this.configuration).getRunStages(id, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Get run status
|
||||
|
|
@ -792,7 +1261,41 @@ export class RunsApi extends BaseAPI {
|
|||
|
||||
/**
|
||||
*
|
||||
* @summary List all runs
|
||||
* @summary Token and cost breakdown by stage and model
|
||||
* @param {string} id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
public getRunUsage(id: string, options?: RawAxiosRequestConfig) {
|
||||
return RunsApiFp(this.configuration).getRunUsage(id, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Verification results for this run
|
||||
* @param {string} id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
public getRunVerifications(id: string, options?: RawAxiosRequestConfig) {
|
||||
return RunsApiFp(this.configuration).getRunVerifications(id, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Conversation transcript for a stage
|
||||
* @param {string} id
|
||||
* @param {string} stageId
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
public getStageTurns(id: string, stageId: string, options?: RawAxiosRequestConfig) {
|
||||
return RunsApiFp(this.configuration).getStageTurns(id, stageId, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary List all runs (board view)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
|
|
@ -811,6 +1314,18 @@ export class RunsApi extends BaseAPI {
|
|||
return RunsApiFp(this.configuration).startRun(startRunRequest, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Submit steering guidance on a file line
|
||||
* @param {string} id
|
||||
* @param {SteerRequest} steerRequest
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
public steerRun(id: string, steerRequest: SteerRequest, options?: RawAxiosRequestConfig) {
|
||||
return RunsApiFp(this.configuration).steerRun(id, steerRequest, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Submit an answer to a question
|
||||
|
|
|
|||
408
packages/arc-api-client/src/api/sessions-api.ts
Normal file
408
packages/arc-api-client/src/api/sessions-api.ts
Normal file
|
|
@ -0,0 +1,408 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Arc Run API
|
||||
* HTTP API for managing Arc workflow run executions.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
import type { Configuration } from '../configuration';
|
||||
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
|
||||
import globalAxios from 'axios';
|
||||
// Some imports not used depending on template conditions
|
||||
// @ts-ignore
|
||||
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction, replaceWithSerializableTypeIfNeeded } from '../common';
|
||||
// @ts-ignore
|
||||
import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base';
|
||||
// @ts-ignore
|
||||
import type { CreateSessionRequest } from '../models';
|
||||
// @ts-ignore
|
||||
import type { CreateSessionResponse } from '../models';
|
||||
// @ts-ignore
|
||||
import type { SendMessageRequest } from '../models';
|
||||
// @ts-ignore
|
||||
import type { SessionDetail } from '../models';
|
||||
// @ts-ignore
|
||||
import type { SessionGroup } from '../models';
|
||||
// @ts-ignore
|
||||
import type { SteerRun200Response } from '../models';
|
||||
/**
|
||||
* SessionsApi - axios parameter creator
|
||||
*/
|
||||
export const SessionsApiAxiosParamCreator = function (configuration?: Configuration) {
|
||||
return {
|
||||
/**
|
||||
*
|
||||
* @summary Create a new session
|
||||
* @param {CreateSessionRequest} createSessionRequest
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createSession: async (createSessionRequest: CreateSessionRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'createSessionRequest' is not null or undefined
|
||||
assertParamExists('createSession', 'createSessionRequest', createSessionRequest)
|
||||
const localVarPath = `/sessions`;
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||||
let baseOptions;
|
||||
if (configuration) {
|
||||
baseOptions = configuration.baseOptions;
|
||||
}
|
||||
|
||||
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
localVarHeaderParameter['Content-Type'] = 'application/json';
|
||||
localVarHeaderParameter['Accept'] = 'application/json';
|
||||
|
||||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
localVarRequestOptions.data = serializeDataIfNeeded(createSessionRequest, localVarRequestOptions, configuration)
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary Session detail with full turn history
|
||||
* @param {string} id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getSession: async (id: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'id' is not null or undefined
|
||||
assertParamExists('getSession', 'id', id)
|
||||
const localVarPath = `/sessions/{id}`
|
||||
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||||
let baseOptions;
|
||||
if (configuration) {
|
||||
baseOptions = configuration.baseOptions;
|
||||
}
|
||||
|
||||
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
localVarHeaderParameter['Accept'] = 'application/json';
|
||||
|
||||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary SSE stream for live assistant responses
|
||||
* @param {string} id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getSessionEvents: async (id: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'id' is not null or undefined
|
||||
assertParamExists('getSessionEvents', 'id', id)
|
||||
const localVarPath = `/sessions/{id}/events`
|
||||
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||||
let baseOptions;
|
||||
if (configuration) {
|
||||
baseOptions = configuration.baseOptions;
|
||||
}
|
||||
|
||||
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
localVarHeaderParameter['Accept'] = 'text/event-stream';
|
||||
|
||||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary List sessions grouped by recency
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
listSessions: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
const localVarPath = `/sessions`;
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||||
let baseOptions;
|
||||
if (configuration) {
|
||||
baseOptions = configuration.baseOptions;
|
||||
}
|
||||
|
||||
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
localVarHeaderParameter['Accept'] = 'application/json';
|
||||
|
||||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary Send a user message
|
||||
* @param {string} id
|
||||
* @param {SendMessageRequest} sendMessageRequest
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
sendMessage: async (id: string, sendMessageRequest: SendMessageRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'id' is not null or undefined
|
||||
assertParamExists('sendMessage', 'id', id)
|
||||
// verify required parameter 'sendMessageRequest' is not null or undefined
|
||||
assertParamExists('sendMessage', 'sendMessageRequest', sendMessageRequest)
|
||||
const localVarPath = `/sessions/{id}/messages`
|
||||
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||||
let baseOptions;
|
||||
if (configuration) {
|
||||
baseOptions = configuration.baseOptions;
|
||||
}
|
||||
|
||||
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
localVarHeaderParameter['Content-Type'] = 'application/json';
|
||||
localVarHeaderParameter['Accept'] = 'application/json';
|
||||
|
||||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
localVarRequestOptions.data = serializeDataIfNeeded(sendMessageRequest, localVarRequestOptions, configuration)
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* SessionsApi - functional programming interface
|
||||
*/
|
||||
export const SessionsApiFp = function(configuration?: Configuration) {
|
||||
const localVarAxiosParamCreator = SessionsApiAxiosParamCreator(configuration)
|
||||
return {
|
||||
/**
|
||||
*
|
||||
* @summary Create a new session
|
||||
* @param {CreateSessionRequest} createSessionRequest
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async createSession(createSessionRequest: CreateSessionRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateSessionResponse>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.createSession(createSessionRequest, options);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath = operationServerMap['SessionsApi.createSession']?.[localVarOperationServerIndex]?.url;
|
||||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary Session detail with full turn history
|
||||
* @param {string} id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async getSession(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SessionDetail>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.getSession(id, options);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath = operationServerMap['SessionsApi.getSession']?.[localVarOperationServerIndex]?.url;
|
||||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary SSE stream for live assistant responses
|
||||
* @param {string} id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async getSessionEvents(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<string>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.getSessionEvents(id, options);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath = operationServerMap['SessionsApi.getSessionEvents']?.[localVarOperationServerIndex]?.url;
|
||||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary List sessions grouped by recency
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async listSessions(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<SessionGroup>>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.listSessions(options);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath = operationServerMap['SessionsApi.listSessions']?.[localVarOperationServerIndex]?.url;
|
||||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary Send a user message
|
||||
* @param {string} id
|
||||
* @param {SendMessageRequest} sendMessageRequest
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async sendMessage(id: string, sendMessageRequest: SendMessageRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SteerRun200Response>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.sendMessage(id, sendMessageRequest, options);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath = operationServerMap['SessionsApi.sendMessage']?.[localVarOperationServerIndex]?.url;
|
||||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* SessionsApi - factory interface
|
||||
*/
|
||||
export const SessionsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
||||
const localVarFp = SessionsApiFp(configuration)
|
||||
return {
|
||||
/**
|
||||
*
|
||||
* @summary Create a new session
|
||||
* @param {CreateSessionRequest} createSessionRequest
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
createSession(createSessionRequest: CreateSessionRequest, options?: RawAxiosRequestConfig): AxiosPromise<CreateSessionResponse> {
|
||||
return localVarFp.createSession(createSessionRequest, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary Session detail with full turn history
|
||||
* @param {string} id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getSession(id: string, options?: RawAxiosRequestConfig): AxiosPromise<SessionDetail> {
|
||||
return localVarFp.getSession(id, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary SSE stream for live assistant responses
|
||||
* @param {string} id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getSessionEvents(id: string, options?: RawAxiosRequestConfig): AxiosPromise<string> {
|
||||
return localVarFp.getSessionEvents(id, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary List sessions grouped by recency
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
listSessions(options?: RawAxiosRequestConfig): AxiosPromise<Array<SessionGroup>> {
|
||||
return localVarFp.listSessions(options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary Send a user message
|
||||
* @param {string} id
|
||||
* @param {SendMessageRequest} sendMessageRequest
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
sendMessage(id: string, sendMessageRequest: SendMessageRequest, options?: RawAxiosRequestConfig): AxiosPromise<SteerRun200Response> {
|
||||
return localVarFp.sendMessage(id, sendMessageRequest, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* SessionsApi - object-oriented interface
|
||||
*/
|
||||
export class SessionsApi extends BaseAPI {
|
||||
/**
|
||||
*
|
||||
* @summary Create a new session
|
||||
* @param {CreateSessionRequest} createSessionRequest
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
public createSession(createSessionRequest: CreateSessionRequest, options?: RawAxiosRequestConfig) {
|
||||
return SessionsApiFp(this.configuration).createSession(createSessionRequest, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Session detail with full turn history
|
||||
* @param {string} id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
public getSession(id: string, options?: RawAxiosRequestConfig) {
|
||||
return SessionsApiFp(this.configuration).getSession(id, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary SSE stream for live assistant responses
|
||||
* @param {string} id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
public getSessionEvents(id: string, options?: RawAxiosRequestConfig) {
|
||||
return SessionsApiFp(this.configuration).getSessionEvents(id, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary List sessions grouped by recency
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
public listSessions(options?: RawAxiosRequestConfig) {
|
||||
return SessionsApiFp(this.configuration).listSessions(options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Send a user message
|
||||
* @param {string} id
|
||||
* @param {SendMessageRequest} sendMessageRequest
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
public sendMessage(id: string, sendMessageRequest: SendMessageRequest, options?: RawAxiosRequestConfig) {
|
||||
return SessionsApiFp(this.configuration).sendMessage(id, sendMessageRequest, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
}
|
||||
|
||||
117
packages/arc-api-client/src/api/settings-api.ts
Normal file
117
packages/arc-api-client/src/api/settings-api.ts
Normal file
|
|
@ -0,0 +1,117 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Arc Run API
|
||||
* HTTP API for managing Arc workflow run executions.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
import type { Configuration } from '../configuration';
|
||||
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
|
||||
import globalAxios from 'axios';
|
||||
// Some imports not used depending on template conditions
|
||||
// @ts-ignore
|
||||
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction, replaceWithSerializableTypeIfNeeded } from '../common';
|
||||
// @ts-ignore
|
||||
import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base';
|
||||
// @ts-ignore
|
||||
import type { SettingGroup } from '../models';
|
||||
/**
|
||||
* SettingsApi - axios parameter creator
|
||||
*/
|
||||
export const SettingsApiAxiosParamCreator = function (configuration?: Configuration) {
|
||||
return {
|
||||
/**
|
||||
*
|
||||
* @summary Get all setting groups with current values
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getSettings: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
const localVarPath = `/settings`;
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||||
let baseOptions;
|
||||
if (configuration) {
|
||||
baseOptions = configuration.baseOptions;
|
||||
}
|
||||
|
||||
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
localVarHeaderParameter['Accept'] = 'application/json';
|
||||
|
||||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* SettingsApi - functional programming interface
|
||||
*/
|
||||
export const SettingsApiFp = function(configuration?: Configuration) {
|
||||
const localVarAxiosParamCreator = SettingsApiAxiosParamCreator(configuration)
|
||||
return {
|
||||
/**
|
||||
*
|
||||
* @summary Get all setting groups with current values
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async getSettings(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<SettingGroup>>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.getSettings(options);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath = operationServerMap['SettingsApi.getSettings']?.[localVarOperationServerIndex]?.url;
|
||||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* SettingsApi - factory interface
|
||||
*/
|
||||
export const SettingsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
||||
const localVarFp = SettingsApiFp(configuration)
|
||||
return {
|
||||
/**
|
||||
*
|
||||
* @summary Get all setting groups with current values
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getSettings(options?: RawAxiosRequestConfig): AxiosPromise<Array<SettingGroup>> {
|
||||
return localVarFp.getSettings(options).then((request) => request(axios, basePath));
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* SettingsApi - object-oriented interface
|
||||
*/
|
||||
export class SettingsApi extends BaseAPI {
|
||||
/**
|
||||
*
|
||||
* @summary Get all setting groups with current values
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
public getSettings(options?: RawAxiosRequestConfig) {
|
||||
return SettingsApiFp(this.configuration).getSettings(options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
}
|
||||
|
||||
187
packages/arc-api-client/src/api/verifications-api.ts
Normal file
187
packages/arc-api-client/src/api/verifications-api.ts
Normal file
|
|
@ -0,0 +1,187 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Arc Run API
|
||||
* HTTP API for managing Arc workflow run executions.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
import type { Configuration } from '../configuration';
|
||||
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
|
||||
import globalAxios from 'axios';
|
||||
// Some imports not used depending on template conditions
|
||||
// @ts-ignore
|
||||
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction, replaceWithSerializableTypeIfNeeded } from '../common';
|
||||
// @ts-ignore
|
||||
import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base';
|
||||
// @ts-ignore
|
||||
import type { VerificationCategory } from '../models';
|
||||
// @ts-ignore
|
||||
import type { VerificationDetailResponse } from '../models';
|
||||
/**
|
||||
* VerificationsApi - axios parameter creator
|
||||
*/
|
||||
export const VerificationsApiAxiosParamCreator = function (configuration?: Configuration) {
|
||||
return {
|
||||
/**
|
||||
*
|
||||
* @summary Control detail with performance and recent results
|
||||
* @param {string} slug
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getVerificationDetail: async (slug: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'slug' is not null or undefined
|
||||
assertParamExists('getVerificationDetail', 'slug', slug)
|
||||
const localVarPath = `/verifications/{slug}`
|
||||
.replace(`{${"slug"}}`, encodeURIComponent(String(slug)));
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||||
let baseOptions;
|
||||
if (configuration) {
|
||||
baseOptions = configuration.baseOptions;
|
||||
}
|
||||
|
||||
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
localVarHeaderParameter['Accept'] = 'application/json';
|
||||
|
||||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary List all verification categories with controls
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
listVerifications: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
const localVarPath = `/verifications`;
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||||
let baseOptions;
|
||||
if (configuration) {
|
||||
baseOptions = configuration.baseOptions;
|
||||
}
|
||||
|
||||
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
localVarHeaderParameter['Accept'] = 'application/json';
|
||||
|
||||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* VerificationsApi - functional programming interface
|
||||
*/
|
||||
export const VerificationsApiFp = function(configuration?: Configuration) {
|
||||
const localVarAxiosParamCreator = VerificationsApiAxiosParamCreator(configuration)
|
||||
return {
|
||||
/**
|
||||
*
|
||||
* @summary Control detail with performance and recent results
|
||||
* @param {string} slug
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async getVerificationDetail(slug: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<VerificationDetailResponse>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.getVerificationDetail(slug, options);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath = operationServerMap['VerificationsApi.getVerificationDetail']?.[localVarOperationServerIndex]?.url;
|
||||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary List all verification categories with controls
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async listVerifications(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<VerificationCategory>>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.listVerifications(options);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath = operationServerMap['VerificationsApi.listVerifications']?.[localVarOperationServerIndex]?.url;
|
||||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* VerificationsApi - factory interface
|
||||
*/
|
||||
export const VerificationsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
||||
const localVarFp = VerificationsApiFp(configuration)
|
||||
return {
|
||||
/**
|
||||
*
|
||||
* @summary Control detail with performance and recent results
|
||||
* @param {string} slug
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getVerificationDetail(slug: string, options?: RawAxiosRequestConfig): AxiosPromise<VerificationDetailResponse> {
|
||||
return localVarFp.getVerificationDetail(slug, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary List all verification categories with controls
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
listVerifications(options?: RawAxiosRequestConfig): AxiosPromise<Array<VerificationCategory>> {
|
||||
return localVarFp.listVerifications(options).then((request) => request(axios, basePath));
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* VerificationsApi - object-oriented interface
|
||||
*/
|
||||
export class VerificationsApi extends BaseAPI {
|
||||
/**
|
||||
*
|
||||
* @summary Control detail with performance and recent results
|
||||
* @param {string} slug
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
public getVerificationDetail(slug: string, options?: RawAxiosRequestConfig) {
|
||||
return VerificationsApiFp(this.configuration).getVerificationDetail(slug, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary List all verification categories with controls
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
public listVerifications(options?: RawAxiosRequestConfig) {
|
||||
return VerificationsApiFp(this.configuration).listVerifications(options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
}
|
||||
|
||||
327
packages/arc-api-client/src/api/workflows-api.ts
Normal file
327
packages/arc-api-client/src/api/workflows-api.ts
Normal file
|
|
@ -0,0 +1,327 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Arc Run API
|
||||
* HTTP API for managing Arc workflow run executions.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
import type { Configuration } from '../configuration';
|
||||
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
|
||||
import globalAxios from 'axios';
|
||||
// Some imports not used depending on template conditions
|
||||
// @ts-ignore
|
||||
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction, replaceWithSerializableTypeIfNeeded } from '../common';
|
||||
// @ts-ignore
|
||||
import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base';
|
||||
// @ts-ignore
|
||||
import type { RunListItem } from '../models';
|
||||
// @ts-ignore
|
||||
import type { StartRunResponse } from '../models';
|
||||
// @ts-ignore
|
||||
import type { WorkflowDetail } from '../models';
|
||||
// @ts-ignore
|
||||
import type { WorkflowListItem } from '../models';
|
||||
/**
|
||||
* WorkflowsApi - axios parameter creator
|
||||
*/
|
||||
export const WorkflowsApiAxiosParamCreator = function (configuration?: Configuration) {
|
||||
return {
|
||||
/**
|
||||
*
|
||||
* @summary Get workflow detail with config and graph
|
||||
* @param {string} name
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getWorkflow: async (name: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'name' is not null or undefined
|
||||
assertParamExists('getWorkflow', 'name', name)
|
||||
const localVarPath = `/workflows/{name}`
|
||||
.replace(`{${"name"}}`, encodeURIComponent(String(name)));
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||||
let baseOptions;
|
||||
if (configuration) {
|
||||
baseOptions = configuration.baseOptions;
|
||||
}
|
||||
|
||||
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
localVarHeaderParameter['Accept'] = 'application/json';
|
||||
|
||||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary List runs for this workflow
|
||||
* @param {string} name
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
listWorkflowRuns: async (name: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'name' is not null or undefined
|
||||
assertParamExists('listWorkflowRuns', 'name', name)
|
||||
const localVarPath = `/workflows/{name}/runs`
|
||||
.replace(`{${"name"}}`, encodeURIComponent(String(name)));
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||||
let baseOptions;
|
||||
if (configuration) {
|
||||
baseOptions = configuration.baseOptions;
|
||||
}
|
||||
|
||||
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
localVarHeaderParameter['Accept'] = 'application/json';
|
||||
|
||||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary List all workflows
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
listWorkflows: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
const localVarPath = `/workflows`;
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||||
let baseOptions;
|
||||
if (configuration) {
|
||||
baseOptions = configuration.baseOptions;
|
||||
}
|
||||
|
||||
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
localVarHeaderParameter['Accept'] = 'application/json';
|
||||
|
||||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary Trigger a run for this workflow
|
||||
* @param {string} name
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
triggerWorkflowRun: async (name: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'name' is not null or undefined
|
||||
assertParamExists('triggerWorkflowRun', 'name', name)
|
||||
const localVarPath = `/workflows/{name}/runs`
|
||||
.replace(`{${"name"}}`, encodeURIComponent(String(name)));
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||||
let baseOptions;
|
||||
if (configuration) {
|
||||
baseOptions = configuration.baseOptions;
|
||||
}
|
||||
|
||||
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
localVarHeaderParameter['Accept'] = 'application/json';
|
||||
|
||||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* WorkflowsApi - functional programming interface
|
||||
*/
|
||||
export const WorkflowsApiFp = function(configuration?: Configuration) {
|
||||
const localVarAxiosParamCreator = WorkflowsApiAxiosParamCreator(configuration)
|
||||
return {
|
||||
/**
|
||||
*
|
||||
* @summary Get workflow detail with config and graph
|
||||
* @param {string} name
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async getWorkflow(name: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<WorkflowDetail>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.getWorkflow(name, options);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath = operationServerMap['WorkflowsApi.getWorkflow']?.[localVarOperationServerIndex]?.url;
|
||||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary List runs for this workflow
|
||||
* @param {string} name
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async listWorkflowRuns(name: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<RunListItem>>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.listWorkflowRuns(name, options);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath = operationServerMap['WorkflowsApi.listWorkflowRuns']?.[localVarOperationServerIndex]?.url;
|
||||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary List all workflows
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async listWorkflows(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<WorkflowListItem>>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.listWorkflows(options);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath = operationServerMap['WorkflowsApi.listWorkflows']?.[localVarOperationServerIndex]?.url;
|
||||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary Trigger a run for this workflow
|
||||
* @param {string} name
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async triggerWorkflowRun(name: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<StartRunResponse>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.triggerWorkflowRun(name, options);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath = operationServerMap['WorkflowsApi.triggerWorkflowRun']?.[localVarOperationServerIndex]?.url;
|
||||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* WorkflowsApi - factory interface
|
||||
*/
|
||||
export const WorkflowsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
||||
const localVarFp = WorkflowsApiFp(configuration)
|
||||
return {
|
||||
/**
|
||||
*
|
||||
* @summary Get workflow detail with config and graph
|
||||
* @param {string} name
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getWorkflow(name: string, options?: RawAxiosRequestConfig): AxiosPromise<WorkflowDetail> {
|
||||
return localVarFp.getWorkflow(name, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary List runs for this workflow
|
||||
* @param {string} name
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
listWorkflowRuns(name: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<RunListItem>> {
|
||||
return localVarFp.listWorkflowRuns(name, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary List all workflows
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
listWorkflows(options?: RawAxiosRequestConfig): AxiosPromise<Array<WorkflowListItem>> {
|
||||
return localVarFp.listWorkflows(options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary Trigger a run for this workflow
|
||||
* @param {string} name
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
triggerWorkflowRun(name: string, options?: RawAxiosRequestConfig): AxiosPromise<StartRunResponse> {
|
||||
return localVarFp.triggerWorkflowRun(name, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* WorkflowsApi - object-oriented interface
|
||||
*/
|
||||
export class WorkflowsApi extends BaseAPI {
|
||||
/**
|
||||
*
|
||||
* @summary Get workflow detail with config and graph
|
||||
* @param {string} name
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
public getWorkflow(name: string, options?: RawAxiosRequestConfig) {
|
||||
return WorkflowsApiFp(this.configuration).getWorkflow(name, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary List runs for this workflow
|
||||
* @param {string} name
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
public listWorkflowRuns(name: string, options?: RawAxiosRequestConfig) {
|
||||
return WorkflowsApiFp(this.configuration).listWorkflowRuns(name, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary List all workflows
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
public listWorkflows(options?: RawAxiosRequestConfig) {
|
||||
return WorkflowsApiFp(this.configuration).listWorkflows(options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @summary Trigger a run for this workflow
|
||||
* @param {string} name
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
public triggerWorkflowRun(name: string, options?: RawAxiosRequestConfig) {
|
||||
return WorkflowsApiFp(this.configuration).triggerWorkflowRun(name, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
}
|
||||
|
||||
21
packages/arc-api-client/src/models/branch.ts
Normal file
21
packages/arc-api-client/src/models/branch.ts
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Arc Run API
|
||||
* HTTP API for managing Arc workflow run executions.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
export interface Branch {
|
||||
'id': string;
|
||||
'name': string;
|
||||
}
|
||||
|
||||
29
packages/arc-api-client/src/models/check-run-status.ts
Normal file
29
packages/arc-api-client/src/models/check-run-status.ts
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Arc Run API
|
||||
* HTTP API for managing Arc workflow run executions.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
export const CheckRunStatus = {
|
||||
SUCCESS: 'success',
|
||||
FAILURE: 'failure',
|
||||
SKIPPED: 'skipped',
|
||||
PENDING: 'pending',
|
||||
QUEUED: 'queued'
|
||||
} as const;
|
||||
|
||||
export type CheckRunStatus = typeof CheckRunStatus[keyof typeof CheckRunStatus];
|
||||
|
||||
|
||||
|
||||
27
packages/arc-api-client/src/models/check-run.ts
Normal file
27
packages/arc-api-client/src/models/check-run.ts
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Arc Run API
|
||||
* HTTP API for managing Arc workflow run executions.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
// May contain unused imports in some cases
|
||||
// @ts-ignore
|
||||
import type { CheckRunStatus } from './check-run-status';
|
||||
|
||||
export interface CheckRun {
|
||||
'name': string;
|
||||
'status': CheckRunStatus;
|
||||
'duration_secs'?: number;
|
||||
}
|
||||
|
||||
|
||||
|
||||
23
packages/arc-api-client/src/models/control-detail.ts
Normal file
23
packages/arc-api-client/src/models/control-detail.ts
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Arc Run API
|
||||
* HTTP API for managing Arc workflow run executions.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
export interface ControlDetail {
|
||||
'description': string;
|
||||
'checks': Array<string>;
|
||||
'pass_example': string;
|
||||
'fail_example': string;
|
||||
}
|
||||
|
||||
29
packages/arc-api-client/src/models/control-info.ts
Normal file
29
packages/arc-api-client/src/models/control-info.ts
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Arc Run API
|
||||
* HTTP API for managing Arc workflow run executions.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
// May contain unused imports in some cases
|
||||
// @ts-ignore
|
||||
import type { VerificationType } from './verification-type';
|
||||
|
||||
export interface ControlInfo {
|
||||
'name': string;
|
||||
'slug': string;
|
||||
'description': string;
|
||||
'type'?: VerificationType;
|
||||
'category': string;
|
||||
}
|
||||
|
||||
|
||||
|
||||
31
packages/arc-api-client/src/models/control-performance.ts
Normal file
31
packages/arc-api-client/src/models/control-performance.ts
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Arc Run API
|
||||
* HTTP API for managing Arc workflow run executions.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
// May contain unused imports in some cases
|
||||
// @ts-ignore
|
||||
import type { EvaluationResult } from './evaluation-result';
|
||||
// May contain unused imports in some cases
|
||||
// @ts-ignore
|
||||
import type { VerificationMode } from './verification-mode';
|
||||
|
||||
export interface ControlPerformance {
|
||||
'mode': VerificationMode;
|
||||
'f1'?: number;
|
||||
'pass_at_1'?: number;
|
||||
'evaluations': Array<EvaluationResult>;
|
||||
}
|
||||
|
||||
|
||||
|
||||
22
packages/arc-api-client/src/models/create-session-request.ts
Normal file
22
packages/arc-api-client/src/models/create-session-request.ts
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Arc Run API
|
||||
* HTTP API for managing Arc workflow run executions.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
export interface CreateSessionRequest {
|
||||
'project': string;
|
||||
'branch': string;
|
||||
'prompt': string;
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Arc Run API
|
||||
* HTTP API for managing Arc workflow run executions.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
export interface CreateSessionResponse {
|
||||
'id': string;
|
||||
}
|
||||
|
||||
21
packages/arc-api-client/src/models/diff-file.ts
Normal file
21
packages/arc-api-client/src/models/diff-file.ts
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Arc Run API
|
||||
* HTTP API for managing Arc workflow run executions.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
export interface DiffFile {
|
||||
'name': string;
|
||||
'contents': string;
|
||||
}
|
||||
|
||||
21
packages/arc-api-client/src/models/diff-stats.ts
Normal file
21
packages/arc-api-client/src/models/diff-stats.ts
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Arc Run API
|
||||
* HTTP API for managing Arc workflow run executions.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
export interface DiffStats {
|
||||
'additions': number;
|
||||
'deletions': number;
|
||||
}
|
||||
|
||||
27
packages/arc-api-client/src/models/evaluation-result.ts
Normal file
27
packages/arc-api-client/src/models/evaluation-result.ts
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Arc Run API
|
||||
* HTTP API for managing Arc workflow run executions.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
export const EvaluationResult = {
|
||||
PASS: 'pass',
|
||||
FAIL: 'fail',
|
||||
SKIP: 'skip'
|
||||
} as const;
|
||||
|
||||
export type EvaluationResult = typeof EvaluationResult[keyof typeof EvaluationResult];
|
||||
|
||||
|
||||
|
||||
20
packages/arc-api-client/src/models/execute-query-request.ts
Normal file
20
packages/arc-api-client/src/models/execute-query-request.ts
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Arc Run API
|
||||
* HTTP API for managing Arc workflow run executions.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
export interface ExecuteQueryRequest {
|
||||
'sql': string;
|
||||
}
|
||||
|
||||
23
packages/arc-api-client/src/models/execute-query-response.ts
Normal file
23
packages/arc-api-client/src/models/execute-query-response.ts
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Arc Run API
|
||||
* HTTP API for managing Arc workflow run executions.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
export interface ExecuteQueryResponse {
|
||||
'columns': Array<string>;
|
||||
'rows': Array<Array<any>>;
|
||||
'elapsed': number;
|
||||
'row_count': number;
|
||||
}
|
||||
|
||||
21
packages/arc-api-client/src/models/file-checkpoint.ts
Normal file
21
packages/arc-api-client/src/models/file-checkpoint.ts
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Arc Run API
|
||||
* HTTP API for managing Arc workflow run executions.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
export interface FileCheckpoint {
|
||||
'id': string;
|
||||
'label': string;
|
||||
}
|
||||
|
||||
24
packages/arc-api-client/src/models/file-diff.ts
Normal file
24
packages/arc-api-client/src/models/file-diff.ts
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Arc Run API
|
||||
* HTTP API for managing Arc workflow run executions.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
// May contain unused imports in some cases
|
||||
// @ts-ignore
|
||||
import type { DiffFile } from './diff-file';
|
||||
|
||||
export interface FileDiff {
|
||||
'old_file': DiffFile;
|
||||
'new_file': DiffFile;
|
||||
}
|
||||
|
||||
24
packages/arc-api-client/src/models/history-entry.ts
Normal file
24
packages/arc-api-client/src/models/history-entry.ts
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Arc Run API
|
||||
* HTTP API for managing Arc workflow run executions.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
export interface HistoryEntry {
|
||||
'id': string;
|
||||
'sql': string;
|
||||
'timestamp': string;
|
||||
'elapsed': number;
|
||||
'row_count': number;
|
||||
}
|
||||
|
||||
|
|
@ -1,10 +1,65 @@
|
|||
export * from './api-question';
|
||||
export * from './api-question-option';
|
||||
export * from './branch';
|
||||
export * from './cancel-run200-response';
|
||||
export * from './check-run';
|
||||
export * from './check-run-status';
|
||||
export * from './control-detail';
|
||||
export * from './control-info';
|
||||
export * from './control-performance';
|
||||
export * from './create-session-request';
|
||||
export * from './create-session-response';
|
||||
export * from './diff-file';
|
||||
export * from './diff-stats';
|
||||
export * from './error-response';
|
||||
export * from './evaluation-result';
|
||||
export * from './execute-query-request';
|
||||
export * from './execute-query-response';
|
||||
export * from './file-checkpoint';
|
||||
export * from './file-diff';
|
||||
export * from './history-entry';
|
||||
export * from './project';
|
||||
export * from './recent-control-result';
|
||||
export * from './retro-list-item';
|
||||
export * from './retro-stats';
|
||||
export * from './run-files';
|
||||
export * from './run-list-item';
|
||||
export * from './run-list-item-status';
|
||||
export * from './run-stage';
|
||||
export * from './run-status';
|
||||
export * from './run-status-response';
|
||||
export * from './run-usage';
|
||||
export * from './run-verification';
|
||||
export * from './run-verification-control';
|
||||
export * from './save-query-request';
|
||||
export * from './saved-query';
|
||||
export * from './send-message-request';
|
||||
export * from './session-detail';
|
||||
export * from './session-group';
|
||||
export * from './session-list-item';
|
||||
export * from './session-turn';
|
||||
export * from './setting-field';
|
||||
export * from './setting-field-type';
|
||||
export * from './setting-group';
|
||||
export * from './sibling-control';
|
||||
export * from './smoothness-rating';
|
||||
export * from './stage-status';
|
||||
export * from './stage-turn';
|
||||
export * from './start-run-request';
|
||||
export * from './start-run-response';
|
||||
export * from './steer-request';
|
||||
export * from './steer-run200-response';
|
||||
export * from './submit-answer-request';
|
||||
export * from './submit-answer-response';
|
||||
export * from './tool-use';
|
||||
export * from './usage-by-model';
|
||||
export * from './usage-stage';
|
||||
export * from './usage-totals';
|
||||
export * from './verification-category';
|
||||
export * from './verification-control';
|
||||
export * from './verification-detail-response';
|
||||
export * from './verification-mode';
|
||||
export * from './verification-status';
|
||||
export * from './verification-type';
|
||||
export * from './workflow-detail';
|
||||
export * from './workflow-list-item';
|
||||
|
|
|
|||
21
packages/arc-api-client/src/models/project.ts
Normal file
21
packages/arc-api-client/src/models/project.ts
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Arc Run API
|
||||
* HTTP API for managing Arc workflow run executions.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
export interface Project {
|
||||
'id': string;
|
||||
'name': string;
|
||||
}
|
||||
|
||||
29
packages/arc-api-client/src/models/recent-control-result.ts
Normal file
29
packages/arc-api-client/src/models/recent-control-result.ts
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Arc Run API
|
||||
* HTTP API for managing Arc workflow run executions.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
// May contain unused imports in some cases
|
||||
// @ts-ignore
|
||||
import type { VerificationStatus } from './verification-status';
|
||||
|
||||
export interface RecentControlResult {
|
||||
'run_id': string;
|
||||
'run_title': string;
|
||||
'workflow': string;
|
||||
'result': VerificationStatus;
|
||||
'timestamp': string;
|
||||
}
|
||||
|
||||
|
||||
|
||||
34
packages/arc-api-client/src/models/retro-list-item.ts
Normal file
34
packages/arc-api-client/src/models/retro-list-item.ts
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Arc Run API
|
||||
* HTTP API for managing Arc workflow run executions.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
// May contain unused imports in some cases
|
||||
// @ts-ignore
|
||||
import type { RetroStats } from './retro-stats';
|
||||
// May contain unused imports in some cases
|
||||
// @ts-ignore
|
||||
import type { SmoothnessRating } from './smoothness-rating';
|
||||
|
||||
export interface RetroListItem {
|
||||
'run_id': string;
|
||||
'workflow_name': string;
|
||||
'goal': string;
|
||||
'timestamp': string;
|
||||
'smoothness'?: SmoothnessRating;
|
||||
'stats': RetroStats;
|
||||
'friction_point_count': number;
|
||||
}
|
||||
|
||||
|
||||
|
||||
25
packages/arc-api-client/src/models/retro-stats.ts
Normal file
25
packages/arc-api-client/src/models/retro-stats.ts
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Arc Run API
|
||||
* HTTP API for managing Arc workflow run executions.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
export interface RetroStats {
|
||||
'total_duration_ms': number;
|
||||
'total_cost'?: number;
|
||||
'total_retries': number;
|
||||
'files_touched': Array<string>;
|
||||
'stages_completed': number;
|
||||
'stages_failed': number;
|
||||
}
|
||||
|
||||
31
packages/arc-api-client/src/models/run-files.ts
Normal file
31
packages/arc-api-client/src/models/run-files.ts
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Arc Run API
|
||||
* HTTP API for managing Arc workflow run executions.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
// May contain unused imports in some cases
|
||||
// @ts-ignore
|
||||
import type { DiffStats } from './diff-stats';
|
||||
// May contain unused imports in some cases
|
||||
// @ts-ignore
|
||||
import type { FileCheckpoint } from './file-checkpoint';
|
||||
// May contain unused imports in some cases
|
||||
// @ts-ignore
|
||||
import type { FileDiff } from './file-diff';
|
||||
|
||||
export interface RunFiles {
|
||||
'checkpoints': Array<FileCheckpoint>;
|
||||
'files': Array<FileDiff>;
|
||||
'stats': DiffStats;
|
||||
}
|
||||
|
||||
28
packages/arc-api-client/src/models/run-list-item-status.ts
Normal file
28
packages/arc-api-client/src/models/run-list-item-status.ts
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Arc Run API
|
||||
* HTTP API for managing Arc workflow run executions.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
export const RunListItemStatus = {
|
||||
WORKING: 'working',
|
||||
PENDING: 'pending',
|
||||
REVIEW: 'review',
|
||||
MERGE: 'merge'
|
||||
} as const;
|
||||
|
||||
export type RunListItemStatus = typeof RunListItemStatus[keyof typeof RunListItemStatus];
|
||||
|
||||
|
||||
|
||||
42
packages/arc-api-client/src/models/run-list-item.ts
Normal file
42
packages/arc-api-client/src/models/run-list-item.ts
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Arc Run API
|
||||
* HTTP API for managing Arc workflow run executions.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
// May contain unused imports in some cases
|
||||
// @ts-ignore
|
||||
import type { CheckRun } from './check-run';
|
||||
// May contain unused imports in some cases
|
||||
// @ts-ignore
|
||||
import type { RunListItemStatus } from './run-list-item-status';
|
||||
|
||||
export interface RunListItem {
|
||||
'id': string;
|
||||
'repo': string;
|
||||
'title': string;
|
||||
'workflow': string;
|
||||
'status': RunListItemStatus;
|
||||
'number'?: number;
|
||||
'additions'?: number;
|
||||
'deletions'?: number;
|
||||
'checks'?: Array<CheckRun>;
|
||||
'elapsed_secs'?: number;
|
||||
'elapsed_warning'?: boolean;
|
||||
'resources'?: string;
|
||||
'comments'?: number;
|
||||
'question'?: string;
|
||||
'sandbox_id'?: string;
|
||||
}
|
||||
|
||||
|
||||
|
||||
29
packages/arc-api-client/src/models/run-stage.ts
Normal file
29
packages/arc-api-client/src/models/run-stage.ts
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Arc Run API
|
||||
* HTTP API for managing Arc workflow run executions.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
// May contain unused imports in some cases
|
||||
// @ts-ignore
|
||||
import type { StageStatus } from './stage-status';
|
||||
|
||||
export interface RunStage {
|
||||
'id': string;
|
||||
'name': string;
|
||||
'status': StageStatus;
|
||||
'duration_secs'?: number;
|
||||
'dot_id'?: string;
|
||||
}
|
||||
|
||||
|
||||
|
||||
31
packages/arc-api-client/src/models/run-usage.ts
Normal file
31
packages/arc-api-client/src/models/run-usage.ts
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Arc Run API
|
||||
* HTTP API for managing Arc workflow run executions.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
// May contain unused imports in some cases
|
||||
// @ts-ignore
|
||||
import type { UsageByModel } from './usage-by-model';
|
||||
// May contain unused imports in some cases
|
||||
// @ts-ignore
|
||||
import type { UsageStage } from './usage-stage';
|
||||
// May contain unused imports in some cases
|
||||
// @ts-ignore
|
||||
import type { UsageTotals } from './usage-totals';
|
||||
|
||||
export interface RunUsage {
|
||||
'stages': Array<UsageStage>;
|
||||
'totals': UsageTotals;
|
||||
'by_model': Array<UsageByModel>;
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Arc Run API
|
||||
* HTTP API for managing Arc workflow run executions.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
// May contain unused imports in some cases
|
||||
// @ts-ignore
|
||||
import type { VerificationStatus } from './verification-status';
|
||||
// May contain unused imports in some cases
|
||||
// @ts-ignore
|
||||
import type { VerificationType } from './verification-type';
|
||||
|
||||
export interface RunVerificationControl {
|
||||
'name': string;
|
||||
'description': string;
|
||||
'type'?: VerificationType;
|
||||
'status': VerificationStatus;
|
||||
}
|
||||
|
||||
|
||||
|
||||
31
packages/arc-api-client/src/models/run-verification.ts
Normal file
31
packages/arc-api-client/src/models/run-verification.ts
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Arc Run API
|
||||
* HTTP API for managing Arc workflow run executions.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
// May contain unused imports in some cases
|
||||
// @ts-ignore
|
||||
import type { RunVerificationControl } from './run-verification-control';
|
||||
// May contain unused imports in some cases
|
||||
// @ts-ignore
|
||||
import type { VerificationStatus } from './verification-status';
|
||||
|
||||
export interface RunVerification {
|
||||
'name': string;
|
||||
'question': string;
|
||||
'status': VerificationStatus;
|
||||
'controls': Array<RunVerificationControl>;
|
||||
}
|
||||
|
||||
|
||||
|
||||
21
packages/arc-api-client/src/models/save-query-request.ts
Normal file
21
packages/arc-api-client/src/models/save-query-request.ts
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Arc Run API
|
||||
* HTTP API for managing Arc workflow run executions.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
export interface SaveQueryRequest {
|
||||
'name': string;
|
||||
'sql': string;
|
||||
}
|
||||
|
||||
22
packages/arc-api-client/src/models/saved-query.ts
Normal file
22
packages/arc-api-client/src/models/saved-query.ts
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Arc Run API
|
||||
* HTTP API for managing Arc workflow run executions.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
export interface SavedQuery {
|
||||
'id': string;
|
||||
'name': string;
|
||||
'sql': string;
|
||||
}
|
||||
|
||||
20
packages/arc-api-client/src/models/send-message-request.ts
Normal file
20
packages/arc-api-client/src/models/send-message-request.ts
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Arc Run API
|
||||
* HTTP API for managing Arc workflow run executions.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
export interface SendMessageRequest {
|
||||
'content': string;
|
||||
}
|
||||
|
||||
27
packages/arc-api-client/src/models/session-detail.ts
Normal file
27
packages/arc-api-client/src/models/session-detail.ts
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Arc Run API
|
||||
* HTTP API for managing Arc workflow run executions.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
// May contain unused imports in some cases
|
||||
// @ts-ignore
|
||||
import type { SessionTurn } from './session-turn';
|
||||
|
||||
export interface SessionDetail {
|
||||
'id': string;
|
||||
'title': string;
|
||||
'repo': string;
|
||||
'model': string;
|
||||
'turns': Array<SessionTurn>;
|
||||
}
|
||||
|
||||
24
packages/arc-api-client/src/models/session-group.ts
Normal file
24
packages/arc-api-client/src/models/session-group.ts
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Arc Run API
|
||||
* HTTP API for managing Arc workflow run executions.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
// May contain unused imports in some cases
|
||||
// @ts-ignore
|
||||
import type { SessionListItem } from './session-list-item';
|
||||
|
||||
export interface SessionGroup {
|
||||
'label': string;
|
||||
'sessions': Array<SessionListItem>;
|
||||
}
|
||||
|
||||
23
packages/arc-api-client/src/models/session-list-item.ts
Normal file
23
packages/arc-api-client/src/models/session-list-item.ts
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Arc Run API
|
||||
* HTTP API for managing Arc workflow run executions.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
export interface SessionListItem {
|
||||
'id': string;
|
||||
'title': string;
|
||||
'repo': string;
|
||||
'time': string;
|
||||
}
|
||||
|
||||
35
packages/arc-api-client/src/models/session-turn.ts
Normal file
35
packages/arc-api-client/src/models/session-turn.ts
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Arc Run API
|
||||
* HTTP API for managing Arc workflow run executions.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
// May contain unused imports in some cases
|
||||
// @ts-ignore
|
||||
import type { ToolUse } from './tool-use';
|
||||
|
||||
export interface SessionTurn {
|
||||
'kind': SessionTurnKindEnum;
|
||||
'content'?: string;
|
||||
'date'?: string;
|
||||
'tools'?: Array<ToolUse>;
|
||||
}
|
||||
|
||||
export const SessionTurnKindEnum = {
|
||||
USER: 'user',
|
||||
ASSISTANT: 'assistant',
|
||||
TOOL: 'tool'
|
||||
} as const;
|
||||
|
||||
export type SessionTurnKindEnum = typeof SessionTurnKindEnum[keyof typeof SessionTurnKindEnum];
|
||||
|
||||
|
||||
27
packages/arc-api-client/src/models/setting-field-type.ts
Normal file
27
packages/arc-api-client/src/models/setting-field-type.ts
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Arc Run API
|
||||
* HTTP API for managing Arc workflow run executions.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
export const SettingFieldType = {
|
||||
TEXT: 'text',
|
||||
SELECT: 'select',
|
||||
TOGGLE: 'toggle'
|
||||
} as const;
|
||||
|
||||
export type SettingFieldType = typeof SettingFieldType[keyof typeof SettingFieldType];
|
||||
|
||||
|
||||
|
||||
30
packages/arc-api-client/src/models/setting-field.ts
Normal file
30
packages/arc-api-client/src/models/setting-field.ts
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Arc Run API
|
||||
* HTTP API for managing Arc workflow run executions.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
// May contain unused imports in some cases
|
||||
// @ts-ignore
|
||||
import type { SettingFieldType } from './setting-field-type';
|
||||
|
||||
export interface SettingField {
|
||||
'key': string;
|
||||
'label': string;
|
||||
'value': string;
|
||||
'type': SettingFieldType;
|
||||
'options'?: Array<string>;
|
||||
'description'?: string;
|
||||
}
|
||||
|
||||
|
||||
|
||||
26
packages/arc-api-client/src/models/setting-group.ts
Normal file
26
packages/arc-api-client/src/models/setting-group.ts
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Arc Run API
|
||||
* HTTP API for managing Arc workflow run executions.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
// May contain unused imports in some cases
|
||||
// @ts-ignore
|
||||
import type { SettingField } from './setting-field';
|
||||
|
||||
export interface SettingGroup {
|
||||
'id': string;
|
||||
'name': string;
|
||||
'description': string;
|
||||
'fields': Array<SettingField>;
|
||||
}
|
||||
|
||||
31
packages/arc-api-client/src/models/sibling-control.ts
Normal file
31
packages/arc-api-client/src/models/sibling-control.ts
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Arc Run API
|
||||
* HTTP API for managing Arc workflow run executions.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
// May contain unused imports in some cases
|
||||
// @ts-ignore
|
||||
import type { VerificationMode } from './verification-mode';
|
||||
// May contain unused imports in some cases
|
||||
// @ts-ignore
|
||||
import type { VerificationType } from './verification-type';
|
||||
|
||||
export interface SiblingControl {
|
||||
'name': string;
|
||||
'slug': string;
|
||||
'type'?: VerificationType;
|
||||
'mode'?: VerificationMode;
|
||||
}
|
||||
|
||||
|
||||
|
||||
29
packages/arc-api-client/src/models/smoothness-rating.ts
Normal file
29
packages/arc-api-client/src/models/smoothness-rating.ts
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Arc Run API
|
||||
* HTTP API for managing Arc workflow run executions.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
export const SmoothnessRating = {
|
||||
EFFORTLESS: 'effortless',
|
||||
SMOOTH: 'smooth',
|
||||
BUMPY: 'bumpy',
|
||||
STRUGGLED: 'struggled',
|
||||
FAILED: 'failed'
|
||||
} as const;
|
||||
|
||||
export type SmoothnessRating = typeof SmoothnessRating[keyof typeof SmoothnessRating];
|
||||
|
||||
|
||||
|
||||
28
packages/arc-api-client/src/models/stage-status.ts
Normal file
28
packages/arc-api-client/src/models/stage-status.ts
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Arc Run API
|
||||
* HTTP API for managing Arc workflow run executions.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
export const StageStatus = {
|
||||
COMPLETED: 'completed',
|
||||
RUNNING: 'running',
|
||||
PENDING: 'pending',
|
||||
FAILED: 'failed'
|
||||
} as const;
|
||||
|
||||
export type StageStatus = typeof StageStatus[keyof typeof StageStatus];
|
||||
|
||||
|
||||
|
||||
34
packages/arc-api-client/src/models/stage-turn.ts
Normal file
34
packages/arc-api-client/src/models/stage-turn.ts
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Arc Run API
|
||||
* HTTP API for managing Arc workflow run executions.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
// May contain unused imports in some cases
|
||||
// @ts-ignore
|
||||
import type { ToolUse } from './tool-use';
|
||||
|
||||
export interface StageTurn {
|
||||
'kind': StageTurnKindEnum;
|
||||
'content'?: string;
|
||||
'tools'?: Array<ToolUse>;
|
||||
}
|
||||
|
||||
export const StageTurnKindEnum = {
|
||||
SYSTEM: 'system',
|
||||
ASSISTANT: 'assistant',
|
||||
TOOL: 'tool'
|
||||
} as const;
|
||||
|
||||
export type StageTurnKindEnum = typeof StageTurnKindEnum[keyof typeof StageTurnKindEnum];
|
||||
|
||||
|
||||
22
packages/arc-api-client/src/models/steer-request.ts
Normal file
22
packages/arc-api-client/src/models/steer-request.ts
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Arc Run API
|
||||
* HTTP API for managing Arc workflow run executions.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
export interface SteerRequest {
|
||||
'file': string;
|
||||
'line': number;
|
||||
'guidance': string;
|
||||
}
|
||||
|
||||
20
packages/arc-api-client/src/models/steer-run200-response.ts
Normal file
20
packages/arc-api-client/src/models/steer-run200-response.ts
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Arc Run API
|
||||
* HTTP API for managing Arc workflow run executions.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
export interface SteerRun200Response {
|
||||
'accepted': boolean;
|
||||
}
|
||||
|
||||
22
packages/arc-api-client/src/models/tool-use.ts
Normal file
22
packages/arc-api-client/src/models/tool-use.ts
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Arc Run API
|
||||
* HTTP API for managing Arc workflow run executions.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
export interface ToolUse {
|
||||
'tool_name': string;
|
||||
'args': string;
|
||||
'result': string;
|
||||
}
|
||||
|
||||
24
packages/arc-api-client/src/models/usage-by-model.ts
Normal file
24
packages/arc-api-client/src/models/usage-by-model.ts
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Arc Run API
|
||||
* HTTP API for managing Arc workflow run executions.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
export interface UsageByModel {
|
||||
'model': string;
|
||||
'stages': number;
|
||||
'input_tokens': number;
|
||||
'output_tokens': number;
|
||||
'cost': number;
|
||||
}
|
||||
|
||||
25
packages/arc-api-client/src/models/usage-stage.ts
Normal file
25
packages/arc-api-client/src/models/usage-stage.ts
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Arc Run API
|
||||
* HTTP API for managing Arc workflow run executions.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
export interface UsageStage {
|
||||
'stage': string;
|
||||
'model': string;
|
||||
'input_tokens': number;
|
||||
'output_tokens': number;
|
||||
'runtime_secs': number;
|
||||
'cost': number;
|
||||
}
|
||||
|
||||
23
packages/arc-api-client/src/models/usage-totals.ts
Normal file
23
packages/arc-api-client/src/models/usage-totals.ts
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Arc Run API
|
||||
* HTTP API for managing Arc workflow run executions.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
export interface UsageTotals {
|
||||
'runtime_secs': number;
|
||||
'input_tokens': number;
|
||||
'output_tokens': number;
|
||||
'cost': number;
|
||||
}
|
||||
|
||||
25
packages/arc-api-client/src/models/verification-category.ts
Normal file
25
packages/arc-api-client/src/models/verification-category.ts
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Arc Run API
|
||||
* HTTP API for managing Arc workflow run executions.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
// May contain unused imports in some cases
|
||||
// @ts-ignore
|
||||
import type { VerificationControl } from './verification-control';
|
||||
|
||||
export interface VerificationCategory {
|
||||
'name': string;
|
||||
'question': string;
|
||||
'controls': Array<VerificationControl>;
|
||||
}
|
||||
|
||||
38
packages/arc-api-client/src/models/verification-control.ts
Normal file
38
packages/arc-api-client/src/models/verification-control.ts
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Arc Run API
|
||||
* HTTP API for managing Arc workflow run executions.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
// May contain unused imports in some cases
|
||||
// @ts-ignore
|
||||
import type { EvaluationResult } from './evaluation-result';
|
||||
// May contain unused imports in some cases
|
||||
// @ts-ignore
|
||||
import type { VerificationMode } from './verification-mode';
|
||||
// May contain unused imports in some cases
|
||||
// @ts-ignore
|
||||
import type { VerificationType } from './verification-type';
|
||||
|
||||
export interface VerificationControl {
|
||||
'name': string;
|
||||
'slug': string;
|
||||
'description': string;
|
||||
'type'?: VerificationType;
|
||||
'mode'?: VerificationMode;
|
||||
'f1'?: number;
|
||||
'pass_at_1'?: number;
|
||||
'evaluations'?: Array<EvaluationResult>;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Arc Run API
|
||||
* HTTP API for managing Arc workflow run executions.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
// May contain unused imports in some cases
|
||||
// @ts-ignore
|
||||
import type { ControlDetail } from './control-detail';
|
||||
// May contain unused imports in some cases
|
||||
// @ts-ignore
|
||||
import type { ControlInfo } from './control-info';
|
||||
// May contain unused imports in some cases
|
||||
// @ts-ignore
|
||||
import type { ControlPerformance } from './control-performance';
|
||||
// May contain unused imports in some cases
|
||||
// @ts-ignore
|
||||
import type { RecentControlResult } from './recent-control-result';
|
||||
// May contain unused imports in some cases
|
||||
// @ts-ignore
|
||||
import type { SiblingControl } from './sibling-control';
|
||||
|
||||
export interface VerificationDetailResponse {
|
||||
'control': ControlInfo;
|
||||
'performance': ControlPerformance;
|
||||
'control_detail': ControlDetail;
|
||||
'recent_results': Array<RecentControlResult>;
|
||||
'siblings': Array<SiblingControl>;
|
||||
}
|
||||
|
||||
27
packages/arc-api-client/src/models/verification-mode.ts
Normal file
27
packages/arc-api-client/src/models/verification-mode.ts
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Arc Run API
|
||||
* HTTP API for managing Arc workflow run executions.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
export const VerificationMode = {
|
||||
ACTIVE: 'active',
|
||||
EVALUATE: 'evaluate',
|
||||
DISABLED: 'disabled'
|
||||
} as const;
|
||||
|
||||
export type VerificationMode = typeof VerificationMode[keyof typeof VerificationMode];
|
||||
|
||||
|
||||
|
||||
27
packages/arc-api-client/src/models/verification-status.ts
Normal file
27
packages/arc-api-client/src/models/verification-status.ts
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Arc Run API
|
||||
* HTTP API for managing Arc workflow run executions.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
export const VerificationStatus = {
|
||||
PASS: 'pass',
|
||||
FAIL: 'fail',
|
||||
NA: 'na'
|
||||
} as const;
|
||||
|
||||
export type VerificationStatus = typeof VerificationStatus[keyof typeof VerificationStatus];
|
||||
|
||||
|
||||
|
||||
28
packages/arc-api-client/src/models/verification-type.ts
Normal file
28
packages/arc-api-client/src/models/verification-type.ts
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Arc Run API
|
||||
* HTTP API for managing Arc workflow run executions.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
export const VerificationType = {
|
||||
AI: 'ai',
|
||||
AUTOMATED: 'automated',
|
||||
ANALYSIS: 'analysis',
|
||||
AI_ANALYSIS: 'ai-analysis'
|
||||
} as const;
|
||||
|
||||
export type VerificationType = typeof VerificationType[keyof typeof VerificationType];
|
||||
|
||||
|
||||
|
||||
25
packages/arc-api-client/src/models/workflow-detail.ts
Normal file
25
packages/arc-api-client/src/models/workflow-detail.ts
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Arc Run API
|
||||
* HTTP API for managing Arc workflow run executions.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
export interface WorkflowDetail {
|
||||
'title': string;
|
||||
'slug': string;
|
||||
'filename': string;
|
||||
'description': string;
|
||||
'config': string;
|
||||
'graph': string;
|
||||
}
|
||||
|
||||
25
packages/arc-api-client/src/models/workflow-list-item.ts
Normal file
25
packages/arc-api-client/src/models/workflow-list-item.ts
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Arc Run API
|
||||
* HTTP API for managing Arc workflow run executions.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
export interface WorkflowListItem {
|
||||
'name': string;
|
||||
'slug': string;
|
||||
'filename': string;
|
||||
'last_run'?: string;
|
||||
'schedule'?: string;
|
||||
'next_run'?: string;
|
||||
}
|
||||
|
||||
Loading…
Add table
Reference in a new issue