feat(web): W4-A wire console to real endpoints
- Agent page uses contracts (AgentRun/AgentRunDetail/AgentGoalReport) instead of a local mirror; ?mock=1 stays as an explicit demo switch; run snapshot refreshes on agent.run_status; stream auto-follow only while the user stays near the bottom (abort stays reachable) - settings: Pi provider select incl. fake, new Agent runtime card (budgets, fakeScript) - download trace uses /tasks?subjectId= and /organization-records?downloadTaskId= instead of time-window engine run matching and path matching; new business-task tab with cancel/retry - workbench download dialog posts /acquisition-plans and shows per-slot rejection reasons - preference tag revision history; subscription search by title/kind; identity/alias/subscription lists show entity titles; slot cards show current asset summary; policy preview sample titles - DecisionSummary / IdentityRevisionList / ReleaseIdentityResult / TaskAccepted / PolicyPreviewSummary / OrganizePlanArtifactContent taken from contracts - docs: SSE for console (cookie) vs GET /events?after=&limit= JSON replay for API keys Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
34e8751b45
commit
1023642ef9
30 files changed
+703
-271
No files matched your search
@@ -1,6 +1,12 @@
|
||||
import { keepPreviousData, useInfiniteQuery, useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
||||
import { cursorPage, Decision, DecisionKind, type DecisionResolveInput, type DecisionStatus, Id } from "@umt/contracts";
|
||||
import { z } from "zod";
|
||||
import {
|
||||
cursorPage,
|
||||
Decision,
|
||||
type DecisionKind,
|
||||
type DecisionResolveInput,
|
||||
type DecisionStatus,
|
||||
DecisionSummary,
|
||||
} from "@umt/contracts";
|
||||
import { api } from "~/lib/api.ts";
|
||||
import { getParsed, parseOrThrow } from "./library.ts";
|
||||
|
||||
@@ -14,21 +20,8 @@ export const decisionKeys = {
|
||||
|
||||
export type DecisionFilters = { status?: DecisionStatus; kind?: DecisionKind };
|
||||
|
||||
/** 服务端 /decisions/summary 的形状(路由内定义,未进 contracts) */
|
||||
export const DecisionSummary = z.object({
|
||||
total: z.number().int(),
|
||||
groups: z.array(
|
||||
z.object({
|
||||
kind: DecisionKind,
|
||||
mediaEntityId: Id.nullable(),
|
||||
mediaEntityTitle: z.string().nullable(),
|
||||
count: z.number().int(),
|
||||
maxSeverity: z.enum(["info", "warning", "critical"]),
|
||||
latestAt: z.string(),
|
||||
}),
|
||||
),
|
||||
});
|
||||
export type DecisionSummary = z.infer<typeof DecisionSummary>;
|
||||
/** /decisions/summary(合同 DecisionSummary) */
|
||||
export { DecisionSummary };
|
||||
|
||||
const Page = cursorPage(Decision);
|
||||
|
||||
|
||||
Reference in new issue
Block a user