@cellarnode/ui 0.195.2 → 0.197.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent/activity-ledger.d.ts +28 -0
- package/dist/agent/activity-ledger.d.ts.map +1 -0
- package/dist/agent/activity-ledger.js +50 -0
- package/dist/agent/activity-ledger.js.map +1 -0
- package/dist/agent/approval-ledger.d.ts +27 -0
- package/dist/agent/approval-ledger.d.ts.map +1 -0
- package/dist/agent/approval-ledger.js +39 -0
- package/dist/agent/approval-ledger.js.map +1 -0
- package/dist/agent/composer.d.ts +27 -0
- package/dist/agent/composer.d.ts.map +1 -0
- package/dist/agent/composer.js +50 -0
- package/dist/agent/composer.js.map +1 -0
- package/dist/agent/confirm-card.d.ts +58 -0
- package/dist/agent/confirm-card.d.ts.map +1 -0
- package/dist/agent/confirm-card.js +127 -0
- package/dist/agent/confirm-card.js.map +1 -0
- package/dist/agent/confirm-guards.d.ts +36 -0
- package/dist/agent/confirm-guards.d.ts.map +1 -0
- package/dist/agent/confirm-guards.js +44 -0
- package/dist/agent/confirm-guards.js.map +1 -0
- package/dist/agent/conversation.d.ts +41 -0
- package/dist/agent/conversation.d.ts.map +1 -0
- package/dist/agent/conversation.js +77 -0
- package/dist/agent/conversation.js.map +1 -0
- package/dist/agent/copy.d.ts +5 -0
- package/dist/agent/copy.d.ts.map +1 -0
- package/dist/agent/copy.js +10 -0
- package/dist/agent/copy.js.map +1 -0
- package/dist/agent/fixtures.d.ts +20 -0
- package/dist/agent/fixtures.d.ts.map +1 -0
- package/dist/agent/fixtures.js +197 -0
- package/dist/agent/fixtures.js.map +1 -0
- package/dist/agent/index.d.ts +24 -0
- package/dist/agent/index.d.ts.map +1 -0
- package/dist/agent/index.js +24 -0
- package/dist/agent/index.js.map +1 -0
- package/dist/agent/masked-value.d.ts +20 -0
- package/dist/agent/masked-value.d.ts.map +1 -0
- package/dist/agent/masked-value.js +19 -0
- package/dist/agent/masked-value.js.map +1 -0
- package/dist/agent/message.d.ts +32 -0
- package/dist/agent/message.d.ts.map +1 -0
- package/dist/agent/message.js +47 -0
- package/dist/agent/message.js.map +1 -0
- package/dist/agent/panel-frame.d.ts +23 -0
- package/dist/agent/panel-frame.d.ts.map +1 -0
- package/dist/agent/panel-frame.js +17 -0
- package/dist/agent/panel-frame.js.map +1 -0
- package/dist/agent/readiness-checklist.d.ts +49 -0
- package/dist/agent/readiness-checklist.d.ts.map +1 -0
- package/dist/agent/readiness-checklist.js +104 -0
- package/dist/agent/readiness-checklist.js.map +1 -0
- package/dist/agent/schema.d.ts +418 -0
- package/dist/agent/schema.d.ts.map +1 -0
- package/dist/agent/schema.js +137 -0
- package/dist/agent/schema.js.map +1 -0
- package/dist/agent/states.d.ts +44 -0
- package/dist/agent/states.d.ts.map +1 -0
- package/dist/agent/states.js +70 -0
- package/dist/agent/states.js.map +1 -0
- package/dist/agent/thinking.d.ts +14 -0
- package/dist/agent/thinking.d.ts.map +1 -0
- package/dist/agent/thinking.js +12 -0
- package/dist/agent/thinking.js.map +1 -0
- package/dist/agent/thread-list.d.ts +25 -0
- package/dist/agent/thread-list.d.ts.map +1 -0
- package/dist/agent/thread-list.js +39 -0
- package/dist/agent/thread-list.js.map +1 -0
- package/dist/agent/tool-call-card.d.ts +24 -0
- package/dist/agent/tool-call-card.d.ts.map +1 -0
- package/dist/agent/tool-call-card.js +36 -0
- package/dist/agent/tool-call-card.js.map +1 -0
- package/dist/agent/ui.d.ts +13 -0
- package/dist/agent/ui.d.ts.map +1 -0
- package/dist/agent/ui.js +22 -0
- package/dist/agent/ui.js.map +1 -0
- package/dist/brand/brand-generation-context-form.js +1 -1
- package/dist/brand/brand-generation-context-form.js.map +1 -1
- package/dist/brand/brand-profile-form-lists.js +1 -1
- package/dist/brand/brand-profile-form-lists.js.map +1 -1
- package/dist/brand/brand-profile-form-people.js +1 -1
- package/dist/brand/brand-profile-form-people.js.map +1 -1
- package/dist/brand/brand-profile-form.js +1 -1
- package/dist/brand/brand-profile-form.js.map +1 -1
- package/dist/components/animated-combobox.js +5 -5
- package/dist/components/animated-combobox.js.map +1 -1
- package/dist/components/animated-select.js +1 -1
- package/dist/components/animated-shadcn-select.js +1 -1
- package/dist/components/animated-shadcn-select.js.map +1 -1
- package/dist/components/checkbox.js +2 -2
- package/dist/components/checkbox.js.map +1 -1
- package/dist/components/colour-picker-field.js +1 -1
- package/dist/components/colour-picker-field.js.map +1 -1
- package/dist/components/combobox.js +6 -6
- package/dist/components/combobox.js.map +1 -1
- package/dist/components/composition-editor.js +1 -1
- package/dist/components/composition-editor.js.map +1 -1
- package/dist/components/contact-person-select.js +1 -1
- package/dist/components/contact-person-select.js.map +1 -1
- package/dist/components/flagged-field-editor.js +1 -1
- package/dist/components/flagged-field-editor.js.map +1 -1
- package/dist/components/importer-picker-modal.js +1 -1
- package/dist/components/importer-picker-modal.js.map +1 -1
- package/dist/components/input.js +6 -6
- package/dist/components/input.js.map +1 -1
- package/dist/components/listbox.d.ts.map +1 -1
- package/dist/components/listbox.js +6 -6
- package/dist/components/listbox.js.map +1 -1
- package/dist/components/radio.js +2 -2
- package/dist/components/radio.js.map +1 -1
- package/dist/components/select.js +5 -5
- package/dist/components/select.js.map +1 -1
- package/dist/components/shadcn-button.d.ts.map +1 -1
- package/dist/components/shadcn-button.js +4 -1
- package/dist/components/shadcn-button.js.map +1 -1
- package/dist/components/shadcn-input.js +1 -1
- package/dist/components/shadcn-input.js.map +1 -1
- package/dist/components/shadcn-select.js +1 -1
- package/dist/components/shadcn-select.js.map +1 -1
- package/dist/components/shadcn-textarea.js +1 -1
- package/dist/components/shadcn-textarea.js.map +1 -1
- package/dist/components/textarea.js +6 -6
- package/dist/components/textarea.js.map +1 -1
- package/dist/components/variant-picker-dialog.js +2 -2
- package/dist/components/variant-picker-dialog.js.map +1 -1
- package/dist/components/year-picker.js +1 -1
- package/dist/components/year-picker.js.map +1 -1
- package/dist/fic-label/ingredient-input.js +1 -1
- package/dist/fic-label/ingredient-input.js.map +1 -1
- package/dist/markets/market-opportunities-table.js +1 -1
- package/dist/markets/market-opportunities-table.js.map +1 -1
- package/dist/mcp-connect/brand-marks.d.ts +18 -0
- package/dist/mcp-connect/brand-marks.d.ts.map +1 -0
- package/dist/mcp-connect/brand-marks.js +15 -0
- package/dist/mcp-connect/brand-marks.js.map +1 -0
- package/dist/mcp-connect/clients.d.ts +18 -0
- package/dist/mcp-connect/clients.d.ts.map +1 -0
- package/dist/mcp-connect/clients.js +15 -0
- package/dist/mcp-connect/clients.js.map +1 -0
- package/dist/mcp-connect/index.d.ts +7 -0
- package/dist/mcp-connect/index.d.ts.map +1 -0
- package/dist/mcp-connect/index.js +4 -0
- package/dist/mcp-connect/index.js.map +1 -0
- package/dist/mcp-connect/mcp-connect-panel.d.ts +87 -0
- package/dist/mcp-connect/mcp-connect-panel.d.ts.map +1 -0
- package/dist/mcp-connect/mcp-connect-panel.js +145 -0
- package/dist/mcp-connect/mcp-connect-panel.js.map +1 -0
- package/dist/offer/offer-branch-switcher.js +1 -1
- package/dist/offer/offer-branch-switcher.js.map +1 -1
- package/dist/opportunities/opportunity-filter-bar-drawer.js +2 -2
- package/dist/opportunities/opportunity-filter-bar-drawer.js.map +1 -1
- package/dist/opportunities/opportunity-filter-bar.js +2 -2
- package/dist/opportunities/opportunity-filter-bar.js.map +1 -1
- package/dist/opportunities/wizard/step-opportunities.js +4 -4
- package/dist/opportunities/wizard/step-opportunities.js.map +1 -1
- package/dist/opportunities/wizard/step-pricing-timeline.js +2 -2
- package/dist/opportunities/wizard/step-pricing-timeline.js.map +1 -1
- package/dist/opportunities/wizard/step-tender-basics.js +2 -2
- package/dist/opportunities/wizard/step-tender-basics.js.map +1 -1
- package/dist/opportunities/wizard/use-wizard-draft.d.ts +36 -0
- package/dist/opportunities/wizard/use-wizard-draft.d.ts.map +1 -1
- package/dist/opportunities/wizard/use-wizard-draft.js +220 -12
- package/dist/opportunities/wizard/use-wizard-draft.js.map +1 -1
- package/dist/org/postal-address-fields.js +1 -1
- package/dist/org/postal-address-fields.js.map +1 -1
- package/dist/portfolio-import/session/import-job.d.ts.map +1 -1
- package/dist/portfolio-import/session/import-job.js +2 -1
- package/dist/portfolio-import/session/import-job.js.map +1 -1
- package/dist/portfolio-import/session/list-all-confirmations.d.ts +8 -0
- package/dist/portfolio-import/session/list-all-confirmations.d.ts.map +1 -0
- package/dist/portfolio-import/session/list-all-confirmations.js +30 -0
- package/dist/portfolio-import/session/list-all-confirmations.js.map +1 -0
- package/dist/product-editor/tabs/resources/certifications-panel.js +1 -1
- package/dist/product-editor/tabs/resources/certifications-panel.js.map +1 -1
- package/dist/realtime/job-status/schemas.d.ts +2 -2
- package/package.json +9 -1
- package/src/theme/tokens.css +21 -2
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
export interface AgentPanelFrameCopy {
|
|
3
|
+
title: string;
|
|
4
|
+
close: string;
|
|
5
|
+
pageContext: string;
|
|
6
|
+
}
|
|
7
|
+
export interface AgentPanelFrameProps {
|
|
8
|
+
/** `docked` is a 440 px side drawer; `workbench` fills the `/agent` page. */
|
|
9
|
+
mode?: "docked" | "workbench";
|
|
10
|
+
/** The page the agent was opened from, shown as a chip. */
|
|
11
|
+
pageContextChip?: string;
|
|
12
|
+
/** Upstream health says the agent is down. */
|
|
13
|
+
unavailable?: boolean;
|
|
14
|
+
onClose?: () => void;
|
|
15
|
+
/** Slot in the header, e.g. a thread switcher. */
|
|
16
|
+
headerActions?: ReactNode;
|
|
17
|
+
children: ReactNode;
|
|
18
|
+
copy?: Partial<AgentPanelFrameCopy>;
|
|
19
|
+
className?: string;
|
|
20
|
+
}
|
|
21
|
+
/** @internal Panel frame. Sizes with container queries, so it behaves the same at 440 px in a drawer and full width on a page. */
|
|
22
|
+
export declare function AgentPanelFrame({ mode, pageContextChip, unavailable, onClose, headerActions, children, copy, className, }: AgentPanelFrameProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
//# sourceMappingURL=panel-frame.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"panel-frame.d.ts","sourceRoot":"","sources":["../../src/agent/panel-frame.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAOvC,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;CACrB;AAOD,MAAM,WAAW,oBAAoB;IACnC,6EAA6E;IAC7E,IAAI,CAAC,EAAE,QAAQ,GAAG,WAAW,CAAC;IAC9B,2DAA2D;IAC3D,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,8CAA8C;IAC9C,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,kDAAkD;IAClD,aAAa,CAAC,EAAE,SAAS,CAAC;IAC1B,QAAQ,EAAE,SAAS,CAAC;IACpB,IAAI,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,CAAC;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,kIAAkI;AAClI,wBAAgB,eAAe,CAAC,EAC9B,IAAe,EACf,eAAe,EACf,WAAW,EACX,OAAO,EACP,aAAa,EACb,QAAQ,EACR,IAAI,EACJ,SAAS,GACV,EAAE,oBAAoB,2CA2CtB"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { PanelRightClose } from "lucide-react";
|
|
3
|
+
import { cn } from "../lib/utils.js";
|
|
4
|
+
import { useCopy } from "./copy.js";
|
|
5
|
+
import { AgentError } from "./states.js";
|
|
6
|
+
import { focusRing } from "./ui.js";
|
|
7
|
+
const DEFAULT_COPY = {
|
|
8
|
+
title: "Agent",
|
|
9
|
+
close: "Close agent panel",
|
|
10
|
+
pageContext: "Page context",
|
|
11
|
+
};
|
|
12
|
+
/** @internal Panel frame. Sizes with container queries, so it behaves the same at 440 px in a drawer and full width on a page. */
|
|
13
|
+
export function AgentPanelFrame({ mode = "docked", pageContextChip, unavailable, onClose, headerActions, children, copy, className, }) {
|
|
14
|
+
const c = useCopy(DEFAULT_COPY, copy);
|
|
15
|
+
return (_jsxs("section", { "aria-label": c.title, "data-mode": mode, className: cn("@container flex h-full min-h-0 flex-col bg-background", mode === "docked" ? "w-full max-w-110 border-l border-border/60" : "w-full", className), children: [_jsxs("header", { className: "flex items-center gap-2 border-b border-border/60 px-4 py-2.5", children: [_jsx("h2", { className: "text-sm/5 font-semibold text-foreground", children: c.title }), pageContextChip && (_jsxs("span", { className: "min-w-0 truncate rounded-full bg-muted px-2 py-0.5 text-xs/4 text-muted-foreground", title: pageContextChip, children: [_jsxs("span", { className: "sr-only", children: [c.pageContext, ": "] }), pageContextChip] })), _jsxs("div", { className: "ml-auto flex items-center gap-1", children: [headerActions, onClose && (_jsx("button", { type: "button", "aria-label": c.close, onClick: onClose, className: cn("inline-flex size-8 items-center justify-center rounded-lg text-muted-foreground hover:bg-muted hover:text-foreground", focusRing), children: _jsx(PanelRightClose, { "aria-hidden": true, className: "size-4" }) }))] })] }), unavailable ? _jsx(AgentError, { kind: "unavailable", className: "m-4" }) : children] }));
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=panel-frame.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"panel-frame.js","sourceRoot":"","sources":["../../src/agent/panel-frame.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AAOjC,MAAM,YA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schema.js";
|
|
2
|
+
export type ReadinessPhase = "editing" | "proposing" | "awaitingConfirm" | "rechecking" | "ready";
|
|
3
|
+
export interface AgentReadinessCopy {
|
|
4
|
+
progress: string;
|
|
5
|
+
blockers: string;
|
|
6
|
+
acknowledgements: string;
|
|
7
|
+
recommendations: string;
|
|
8
|
+
suggested: string;
|
|
9
|
+
accept: string;
|
|
10
|
+
edit: string;
|
|
11
|
+
acknowledge: string;
|
|
12
|
+
submit: string;
|
|
13
|
+
proposing: string;
|
|
14
|
+
awaitingConfirm: string;
|
|
15
|
+
rechecking: string;
|
|
16
|
+
recheckFailed: string;
|
|
17
|
+
readyTitle: string;
|
|
18
|
+
readyBody: string;
|
|
19
|
+
approve: string;
|
|
20
|
+
noGaps: string;
|
|
21
|
+
required: string;
|
|
22
|
+
invalidNumber: string;
|
|
23
|
+
invalidYear: string;
|
|
24
|
+
select: string;
|
|
25
|
+
source: string;
|
|
26
|
+
}
|
|
27
|
+
export interface ReadinessChange {
|
|
28
|
+
path: string;
|
|
29
|
+
value: string;
|
|
30
|
+
}
|
|
31
|
+
export interface AgentReadinessChecklistProps {
|
|
32
|
+
readiness: AgentReadiness;
|
|
33
|
+
phase?: ReadinessPhase;
|
|
34
|
+
/** The last re-check failed; shown inline. */
|
|
35
|
+
recheckFailed?: boolean;
|
|
36
|
+
/** Emits ONE proposal. The host turns it into an AgentConfirmCard; this component never writes. */
|
|
37
|
+
onPropose: (changes: ReadinessChange[], acknowledged: string[]) => void;
|
|
38
|
+
onApprove?: () => void;
|
|
39
|
+
copy?: Partial<AgentReadinessCopy>;
|
|
40
|
+
className?: string;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* @internal Readiness checklist for one product version: blockers grouped by
|
|
44
|
+
* section, inline inputs, extraction-suggested values to accept, acknowledgements
|
|
45
|
+
* for low-confidence values, then ONE confirm-first proposal. Channel-neutral
|
|
46
|
+
* data (`AgentReadiness`), so Slack/WhatsApp can render a text version of it.
|
|
47
|
+
*/
|
|
48
|
+
export declare function AgentReadinessChecklist({ readiness, phase, recheckFailed, onPropose, onApprove, copy, className, }: AgentReadinessChecklistProps): import("react/jsx-runtime").JSX.Element;
|
|
49
|
+
//# sourceMappingURL=readiness-checklist.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readiness-checklist.d.ts","sourceRoot":"","sources":["../../src/agent/readiness-checklist.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,cAAc,EAAqB,MAAM,UAAU,CAAC;AAGlE,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,WAAW,GAAG,iBAAiB,GAAG,YAAY,GAAG,OAAO,CAAC;AAElG,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,EAAE,MAAM,CAAC;IACzB,eAAe,EAAE,MAAM,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB;AA0BD,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,4BAA4B;IAC3C,SAAS,EAAE,cAAc,CAAC;IAC1B,KAAK,CAAC,EAAE,cAAc,CAAC;IACvB,8CAA8C;IAC9C,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,mGAAmG;IACnG,SAAS,EAAE,CAAC,OAAO,EAAE,eAAe,EAAE,EAAE,YAAY,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACxE,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,IAAI,CAAC,EAAE,OAAO,CAAC,kBAAkB,CAAC,CAAC;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAuFD;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,EACtC,SAAS,EACT,KAAiB,EACjB,aAAa,EACb,SAAS,EACT,SAAS,EACT,IAAI,EACJ,SAAS,GACV,EAAE,4BAA4B,2CA4L9B"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useId, useMemo, useState } from "react";
|
|
3
|
+
import { CheckCircle2, Sparkles } from "lucide-react";
|
|
4
|
+
import { cn } from "../lib/utils.js";
|
|
5
|
+
import { fmt, useCopy } from "./copy.js";
|
|
6
|
+
import { MaskedValue } from "./masked-value.js";
|
|
7
|
+
import { agentButton, focusRing, toneChip } from "./ui.js";
|
|
8
|
+
const DEFAULT_COPY = {
|
|
9
|
+
progress: "{percent}% complete",
|
|
10
|
+
blockers: "Required before approval",
|
|
11
|
+
acknowledgements: "Please confirm",
|
|
12
|
+
recommendations: "Recommended",
|
|
13
|
+
suggested: "Suggested: {value}",
|
|
14
|
+
accept: "Use this",
|
|
15
|
+
edit: "Edit",
|
|
16
|
+
acknowledge: "I have checked this value",
|
|
17
|
+
submit: "Propose these changes",
|
|
18
|
+
proposing: "Preparing the change for your confirmation",
|
|
19
|
+
awaitingConfirm: "Waiting for your confirmation above",
|
|
20
|
+
rechecking: "Checking readiness again",
|
|
21
|
+
recheckFailed: "Could not re-check readiness. Try again.",
|
|
22
|
+
readyTitle: "Ready to approve",
|
|
23
|
+
readyBody: "{name} has everything needed to start matching.",
|
|
24
|
+
approve: "Propose approval",
|
|
25
|
+
noGaps: "No detail is available for what is missing. Ask the agent to list it.",
|
|
26
|
+
required: "Required",
|
|
27
|
+
invalidNumber: "Enter a number.",
|
|
28
|
+
invalidYear: "Enter a four digit year.",
|
|
29
|
+
select: "Choose",
|
|
30
|
+
source: "from {source}",
|
|
31
|
+
};
|
|
32
|
+
function validate(gap, value, c) {
|
|
33
|
+
if (value.trim() === "")
|
|
34
|
+
return c.required;
|
|
35
|
+
const t = gap.expected?.type;
|
|
36
|
+
if (t === "number" && Number.isNaN(Number(value)))
|
|
37
|
+
return c.invalidNumber;
|
|
38
|
+
if (t === "year" && !/^\d{4}$/.test(value.trim()))
|
|
39
|
+
return c.invalidYear;
|
|
40
|
+
return null;
|
|
41
|
+
}
|
|
42
|
+
function GapField({ gap, value, error, touched, onChange, c, }) {
|
|
43
|
+
const id = useId();
|
|
44
|
+
const errId = `${id}-err`;
|
|
45
|
+
const hintId = `${id}-hint`;
|
|
46
|
+
const showErr = touched && error;
|
|
47
|
+
const common = {
|
|
48
|
+
id,
|
|
49
|
+
value,
|
|
50
|
+
"aria-invalid": showErr ? true : undefined,
|
|
51
|
+
"aria-describedby": [showErr ? errId : null, gap.hint || gap.reason ? hintId : null].filter(Boolean).join(" ") ||
|
|
52
|
+
undefined,
|
|
53
|
+
className: cn("w-full rounded-lg border bg-background px-3 py-1.5 text-sm/5", showErr ? "border-destructive" : "border-input hover:border-input-hover", focusRing),
|
|
54
|
+
};
|
|
55
|
+
return (_jsxs("div", { className: "flex flex-col gap-1", children: [_jsxs("label", { htmlFor: id, className: "text-sm/5 font-medium text-foreground", children: [gap.label, gap.expected?.unit ? (_jsxs("span", { className: "ml-1 font-normal text-muted-foreground", children: ["(", gap.expected.unit, ")"] })) : null] }), gap.allowedValues ? (_jsxs("select", { ...common, onChange: (e) => onChange(e.target.value), children: [_jsx("option", { value: "", children: c.select }), gap.allowedValues.map((o) => (_jsx("option", { value: o.value, children: o.label }, o.value)))] })) : (_jsx("input", { ...common, type: "text", inputMode: gap.expected?.type === "number" || gap.expected?.type === "year" ? "decimal" : undefined, onChange: (e) => onChange(e.target.value) })), _jsxs("p", { id: hintId, className: "text-xs/4 text-muted-foreground", children: [gap.hint ?? gap.reason, gap.currentValue !== undefined && gap.currentValue !== null ? (_jsxs(_Fragment, { children: [" ", _jsx(MaskedValue, { value: gap.currentValue })] })) : null] }), showErr && (_jsx("p", { id: errId, className: "text-xs/4 text-[var(--tone-danger-fg)]", children: error }))] }));
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* @internal Readiness checklist for one product version: blockers grouped by
|
|
59
|
+
* section, inline inputs, extraction-suggested values to accept, acknowledgements
|
|
60
|
+
* for low-confidence values, then ONE confirm-first proposal. Channel-neutral
|
|
61
|
+
* data (`AgentReadiness`), so Slack/WhatsApp can render a text version of it.
|
|
62
|
+
*/
|
|
63
|
+
export function AgentReadinessChecklist({ readiness, phase = "editing", recheckFailed, onPropose, onApprove, copy, className, }) {
|
|
64
|
+
const c = useCopy(DEFAULT_COPY, copy);
|
|
65
|
+
const [values, setValues] = useState({});
|
|
66
|
+
const [touched, setTouched] = useState({});
|
|
67
|
+
const [acked, setAcked] = useState({});
|
|
68
|
+
const allGaps = useMemo(() => readiness.sections.flatMap((s) => s.gaps), [readiness]);
|
|
69
|
+
const blockers = allGaps.filter((g) => g.severity === "blocker");
|
|
70
|
+
const needAck = allGaps.filter((g) => g.severity === "acknowledgement");
|
|
71
|
+
const errors = Object.fromEntries(blockers.map((g) => [g.path, validate(g, values[g.path] ?? "", c)]));
|
|
72
|
+
const busy = phase !== "editing";
|
|
73
|
+
const ackedAll = needAck.every((g) => acked[g.path]);
|
|
74
|
+
const dirty = Object.values(values).some((v) => v.trim() !== "");
|
|
75
|
+
const canSubmit = !busy && blockers.every((g) => !errors[g.path]) && ackedAll && (dirty || needAck.length > 0);
|
|
76
|
+
if (readiness.ready || phase === "ready") {
|
|
77
|
+
return (_jsx("div", { className: cn("rounded-2xl bg-card p-4 ring-1 ring-border/60", className), children: _jsxs("div", { className: "flex items-start gap-3", children: [_jsx("span", { className: cn("inline-flex size-8 items-center justify-center rounded-full", toneChip.success), children: _jsx(CheckCircle2, { "aria-hidden": true, className: "size-4" }) }), _jsxs("div", { children: [_jsx("h3", { className: "text-base/6 font-medium text-foreground", children: c.readyTitle }), _jsx("p", { className: "text-sm/5 text-muted-foreground", children: fmt(c.readyBody, { name: readiness.productName }) }), onApprove && (_jsx("button", { type: "button", className: cn(agentButton.primary, "mt-3"), onClick: onApprove, children: c.approve }))] })] }) }));
|
|
78
|
+
}
|
|
79
|
+
const groups = [
|
|
80
|
+
[c.blockers, "blocker"],
|
|
81
|
+
[c.acknowledgements, "acknowledgement"],
|
|
82
|
+
[c.recommendations, "recommendation"],
|
|
83
|
+
];
|
|
84
|
+
return (_jsxs("form", { "aria-label": readiness.productName, className: cn("flex flex-col gap-4 rounded-2xl bg-card p-4 ring-1 ring-border/60", className), onSubmit: (e) => {
|
|
85
|
+
e.preventDefault();
|
|
86
|
+
setTouched(Object.fromEntries(blockers.map((g) => [g.path, true])));
|
|
87
|
+
if (!canSubmit)
|
|
88
|
+
return;
|
|
89
|
+
onPropose(Object.entries(values)
|
|
90
|
+
.filter(([, v]) => v.trim() !== "")
|
|
91
|
+
.map(([path, value]) => ({ path, value: value.trim() })), needAck.filter((g) => acked[g.path]).map((g) => g.path));
|
|
92
|
+
}, children: [_jsxs("div", { children: [_jsx("h3", { className: "text-base/6 font-medium text-foreground", children: readiness.productName }), _jsx("div", { role: "progressbar", "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": readiness.completionPercent, "aria-label": fmt(c.progress, { percent: readiness.completionPercent }), className: "mt-2 h-1.5 overflow-hidden rounded-full bg-muted", children: _jsx("div", { className: "h-full rounded-full bg-primary", style: { width: `${readiness.completionPercent}%` } }) }), _jsx("p", { className: "mt-1 text-xs/4 tabular-nums text-muted-foreground", children: fmt(c.progress, { percent: readiness.completionPercent }) })] }), allGaps.length === 0 && _jsx("p", { className: "text-sm/5 text-muted-foreground", children: c.noGaps }), groups.map(([title, sev]) => {
|
|
93
|
+
const gaps = readiness.sections
|
|
94
|
+
.map((s) => ({ ...s, gaps: s.gaps.filter((g) => g.severity === sev) }))
|
|
95
|
+
.filter((s) => s.gaps.length > 0);
|
|
96
|
+
if (gaps.length === 0)
|
|
97
|
+
return null;
|
|
98
|
+
return (_jsxs("fieldset", { className: "flex flex-col gap-3", disabled: busy, children: [_jsx("legend", { className: "text-xs/4 font-medium uppercase tracking-wider text-muted-foreground", children: title }), gaps.map((s) => (_jsxs("div", { className: "flex flex-col gap-3", children: [_jsx("p", { className: "text-sm/5 font-medium text-foreground", children: s.label }), s.gaps.map((g) => sev === "blocker" ? (_jsxs("div", { className: "flex flex-col gap-1.5", children: [_jsx(GapField, { gap: g, value: values[g.path] ?? "", error: errors[g.path] ?? null, touched: touched[g.path] ?? false, onChange: (v) => {
|
|
99
|
+
setValues((p) => ({ ...p, [g.path]: v }));
|
|
100
|
+
setTouched((p) => ({ ...p, [g.path]: true }));
|
|
101
|
+
}, c: c }), g.suggestedValue && (values[g.path] ?? "") !== g.suggestedValue.value && (_jsxs("div", { className: "flex flex-wrap items-center gap-2 text-xs/5 text-muted-foreground", children: [_jsx(Sparkles, { "aria-hidden": true, className: "size-3.5" }), _jsxs("span", { children: [fmt(c.suggested, { value: g.suggestedValue.value }), " (", fmt(c.source, { source: g.suggestedValue.source }), ",", " ", g.suggestedValue.confidence, ")"] }), _jsx("button", { type: "button", className: agentButton.quiet, onClick: () => setValues((p) => ({ ...p, [g.path]: g.suggestedValue.value })), children: c.accept })] }))] }, g.path)) : sev === "acknowledgement" ? (_jsxs("label", { className: "flex items-start gap-2 text-sm/5", children: [_jsx("input", { type: "checkbox", checked: acked[g.path] ?? false, onChange: (e) => setAcked((p) => ({ ...p, [g.path]: e.target.checked })), className: cn("mt-0.5 size-4", focusRing) }), _jsxs("span", { children: [_jsx("span", { className: "font-medium text-foreground", children: g.label }), _jsxs("span", { className: "block text-muted-foreground", children: [g.reason, g.currentValue !== undefined && g.currentValue !== null ? (_jsxs(_Fragment, { children: [": ", _jsx(MaskedValue, { value: g.currentValue })] })) : null] }), _jsx("span", { className: "sr-only", children: c.acknowledge })] })] }, g.path)) : (_jsxs("p", { className: "text-sm/5 text-muted-foreground", children: [_jsx("span", { className: "font-medium text-foreground", children: g.label }), ": ", g.reason] }, g.path)))] }, s.id)))] }, sev));
|
|
102
|
+
}), _jsxs("div", { className: "flex flex-wrap items-center justify-between gap-2", "aria-live": "polite", children: [_jsxs("p", { className: cn("text-sm/5", recheckFailed ? "text-[var(--tone-danger-fg)]" : "text-muted-foreground"), children: [recheckFailed && phase === "editing" && c.recheckFailed, phase === "proposing" && c.proposing, phase === "awaitingConfirm" && c.awaitingConfirm, phase === "rechecking" && c.rechecking] }), _jsx("button", { type: "submit", className: agentButton.primary, disabled: busy, children: c.submit })] })] }));
|
|
103
|
+
}
|
|
104
|
+
//# sourceMappingURL=readiness-checklist.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readiness-checklist.js","sourceRoot":"","sources":["../../src/agent/readiness-checklist.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAClC,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AA4BxD,MAAM,Y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E,CACX,WAAW,EACX,aAAa,CAAC,CAAC,CAAC,8BAA8B,CAAC,CAAC,CAAC,uBAAuB,CACzE,aAEA,aAAa,IAAI,KAAK,KAAK,SAAS,IAAI,CAAC,CAAC,aAAa,EACvD,KAAK,KAAK,WAAW,IAAI,CAAC,CAAC,SAAS,EACpC,KAAK,KAAK,iBAAiB,IAAI,CAAC,CAAC,eAAe,EAChD,KAAK,KAAK,YAAY,IAAI,CAAC,CAAC,UAAU,IACrC,EACJ,iBAAQ,IAAI,EAAC,QAAQ,EAAC,SAAS,EAAE,WAAW,CAAC,OAAO,EAAE,QAAQ,EAAE,IAAI,YACjE,CAAC,CAAC,MAAM,GACF,IACL,IACD,CACR,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,418 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/**
|
|
3
|
+
* @internal Experimental. Colocated Zod schemas for the `@cellarnode/ui/agent`
|
|
4
|
+
* primitives. Components take already-reduced state (from AG-UI events), so the
|
|
5
|
+
* same shapes feed the stories, the host's reducer and, later, non-web channels.
|
|
6
|
+
*/
|
|
7
|
+
/** A value the BFF has masked. `display` is what a human may see; the raw value never reaches the UI. */
|
|
8
|
+
export declare const MaskedSchema: z.ZodObject<{
|
|
9
|
+
masked: z.ZodLiteral<true>;
|
|
10
|
+
display: z.ZodString;
|
|
11
|
+
}, z.core.$strip>;
|
|
12
|
+
export type Masked = z.infer<typeof MaskedSchema>;
|
|
13
|
+
export declare const CellValueSchema: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodObject<{
|
|
14
|
+
masked: z.ZodLiteral<true>;
|
|
15
|
+
display: z.ZodString;
|
|
16
|
+
}, z.core.$strip>]>;
|
|
17
|
+
export type CellValue = z.infer<typeof CellValueSchema>;
|
|
18
|
+
export declare const isMasked: (v: unknown) => v is Masked;
|
|
19
|
+
export declare const RiskSchema: z.ZodEnum<{
|
|
20
|
+
destructive: "destructive";
|
|
21
|
+
read: "read";
|
|
22
|
+
reversible: "reversible";
|
|
23
|
+
costly: "costly";
|
|
24
|
+
}>;
|
|
25
|
+
export type AgentRisk = z.infer<typeof RiskSchema>;
|
|
26
|
+
export declare const ChangeRowSchema: z.ZodObject<{
|
|
27
|
+
label: z.ZodString;
|
|
28
|
+
before: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodObject<{
|
|
29
|
+
masked: z.ZodLiteral<true>;
|
|
30
|
+
display: z.ZodString;
|
|
31
|
+
}, z.core.$strip>]>>;
|
|
32
|
+
after: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodObject<{
|
|
33
|
+
masked: z.ZodLiteral<true>;
|
|
34
|
+
display: z.ZodString;
|
|
35
|
+
}, z.core.$strip>]>>;
|
|
36
|
+
}, z.core.$strip>;
|
|
37
|
+
export type AgentChangeRow = z.infer<typeof ChangeRowSchema>;
|
|
38
|
+
export declare const ApprovalStatusSchema: z.ZodEnum<{
|
|
39
|
+
pending: "pending";
|
|
40
|
+
rejected: "rejected";
|
|
41
|
+
expired: "expired";
|
|
42
|
+
failed: "failed";
|
|
43
|
+
confirming: "confirming";
|
|
44
|
+
approved_running: "approved_running";
|
|
45
|
+
succeeded: "succeeded";
|
|
46
|
+
superseded: "superseded";
|
|
47
|
+
cap_reached: "cap_reached";
|
|
48
|
+
}>;
|
|
49
|
+
export type AgentApprovalStatus = z.infer<typeof ApprovalStatusSchema>;
|
|
50
|
+
export declare const ApprovalSchema: z.ZodObject<{
|
|
51
|
+
approvalId: z.ZodString;
|
|
52
|
+
tool: z.ZodString;
|
|
53
|
+
method: z.ZodString;
|
|
54
|
+
routeTemplate: z.ZodString;
|
|
55
|
+
intent: z.ZodString;
|
|
56
|
+
changes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
57
|
+
label: z.ZodString;
|
|
58
|
+
before: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodObject<{
|
|
59
|
+
masked: z.ZodLiteral<true>;
|
|
60
|
+
display: z.ZodString;
|
|
61
|
+
}, z.core.$strip>]>>;
|
|
62
|
+
after: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodObject<{
|
|
63
|
+
masked: z.ZodLiteral<true>;
|
|
64
|
+
display: z.ZodString;
|
|
65
|
+
}, z.core.$strip>]>>;
|
|
66
|
+
}, z.core.$strip>>>;
|
|
67
|
+
body: z.ZodOptional<z.ZodUnknown>;
|
|
68
|
+
risk: z.ZodEnum<{
|
|
69
|
+
destructive: "destructive";
|
|
70
|
+
read: "read";
|
|
71
|
+
reversible: "reversible";
|
|
72
|
+
costly: "costly";
|
|
73
|
+
}>;
|
|
74
|
+
taint: z.ZodOptional<z.ZodObject<{
|
|
75
|
+
sources: z.ZodArray<z.ZodString>;
|
|
76
|
+
}, z.core.$strip>>;
|
|
77
|
+
cost: z.ZodOptional<z.ZodObject<{
|
|
78
|
+
label: z.ZodString;
|
|
79
|
+
capRemaining: z.ZodOptional<z.ZodString>;
|
|
80
|
+
}, z.core.$strip>>;
|
|
81
|
+
expiresAt: z.ZodISODateTime;
|
|
82
|
+
createdAt: z.ZodISODateTime;
|
|
83
|
+
confirmPhrase: z.ZodOptional<z.ZodString>;
|
|
84
|
+
status: z.ZodEnum<{
|
|
85
|
+
pending: "pending";
|
|
86
|
+
rejected: "rejected";
|
|
87
|
+
expired: "expired";
|
|
88
|
+
failed: "failed";
|
|
89
|
+
confirming: "confirming";
|
|
90
|
+
approved_running: "approved_running";
|
|
91
|
+
succeeded: "succeeded";
|
|
92
|
+
superseded: "superseded";
|
|
93
|
+
cap_reached: "cap_reached";
|
|
94
|
+
}>;
|
|
95
|
+
resultSummary: z.ZodOptional<z.ZodString>;
|
|
96
|
+
error: z.ZodOptional<z.ZodString>;
|
|
97
|
+
decidedAt: z.ZodOptional<z.ZodString>;
|
|
98
|
+
}, z.core.$strip>;
|
|
99
|
+
export type AgentApproval = z.infer<typeof ApprovalSchema>;
|
|
100
|
+
export declare const StepSchema: z.ZodObject<{
|
|
101
|
+
id: z.ZodString;
|
|
102
|
+
kind: z.ZodEnum<{
|
|
103
|
+
note: "note";
|
|
104
|
+
candidates: "candidates";
|
|
105
|
+
decision: "decision";
|
|
106
|
+
toolCall: "toolCall";
|
|
107
|
+
}>;
|
|
108
|
+
status: z.ZodEnum<{
|
|
109
|
+
done: "done";
|
|
110
|
+
running: "running";
|
|
111
|
+
failed: "failed";
|
|
112
|
+
}>;
|
|
113
|
+
title: z.ZodString;
|
|
114
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
115
|
+
}, z.core.$strip>;
|
|
116
|
+
export type AgentStep = z.infer<typeof StepSchema>;
|
|
117
|
+
export declare const ToolCallSchema: z.ZodObject<{
|
|
118
|
+
id: z.ZodString;
|
|
119
|
+
name: z.ZodString;
|
|
120
|
+
status: z.ZodEnum<{
|
|
121
|
+
pending: "pending";
|
|
122
|
+
running: "running";
|
|
123
|
+
failed: "failed";
|
|
124
|
+
succeeded: "succeeded";
|
|
125
|
+
retrying: "retrying";
|
|
126
|
+
}>;
|
|
127
|
+
args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodObject<{
|
|
128
|
+
masked: z.ZodLiteral<true>;
|
|
129
|
+
display: z.ZodString;
|
|
130
|
+
}, z.core.$strip>]>>>;
|
|
131
|
+
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
132
|
+
resultSummary: z.ZodOptional<z.ZodString>;
|
|
133
|
+
error: z.ZodOptional<z.ZodString>;
|
|
134
|
+
}, z.core.$strip>;
|
|
135
|
+
export type AgentToolCall = z.infer<typeof ToolCallSchema>;
|
|
136
|
+
export declare const MessagePartSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
137
|
+
type: z.ZodLiteral<"text">;
|
|
138
|
+
text: z.ZodString;
|
|
139
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
140
|
+
type: z.ZodLiteral<"thinking">;
|
|
141
|
+
summary: z.ZodString;
|
|
142
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
143
|
+
type: z.ZodLiteral<"toolCall">;
|
|
144
|
+
call: z.ZodObject<{
|
|
145
|
+
id: z.ZodString;
|
|
146
|
+
name: z.ZodString;
|
|
147
|
+
status: z.ZodEnum<{
|
|
148
|
+
pending: "pending";
|
|
149
|
+
running: "running";
|
|
150
|
+
failed: "failed";
|
|
151
|
+
succeeded: "succeeded";
|
|
152
|
+
retrying: "retrying";
|
|
153
|
+
}>;
|
|
154
|
+
args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodObject<{
|
|
155
|
+
masked: z.ZodLiteral<true>;
|
|
156
|
+
display: z.ZodString;
|
|
157
|
+
}, z.core.$strip>]>>>;
|
|
158
|
+
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
159
|
+
resultSummary: z.ZodOptional<z.ZodString>;
|
|
160
|
+
error: z.ZodOptional<z.ZodString>;
|
|
161
|
+
}, z.core.$strip>;
|
|
162
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
163
|
+
type: z.ZodLiteral<"approval">;
|
|
164
|
+
approval: z.ZodObject<{
|
|
165
|
+
approvalId: z.ZodString;
|
|
166
|
+
tool: z.ZodString;
|
|
167
|
+
method: z.ZodString;
|
|
168
|
+
routeTemplate: z.ZodString;
|
|
169
|
+
intent: z.ZodString;
|
|
170
|
+
changes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
171
|
+
label: z.ZodString;
|
|
172
|
+
before: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodObject<{
|
|
173
|
+
masked: z.ZodLiteral<true>;
|
|
174
|
+
display: z.ZodString;
|
|
175
|
+
}, z.core.$strip>]>>;
|
|
176
|
+
after: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodObject<{
|
|
177
|
+
masked: z.ZodLiteral<true>;
|
|
178
|
+
display: z.ZodString;
|
|
179
|
+
}, z.core.$strip>]>>;
|
|
180
|
+
}, z.core.$strip>>>;
|
|
181
|
+
body: z.ZodOptional<z.ZodUnknown>;
|
|
182
|
+
risk: z.ZodEnum<{
|
|
183
|
+
destructive: "destructive";
|
|
184
|
+
read: "read";
|
|
185
|
+
reversible: "reversible";
|
|
186
|
+
costly: "costly";
|
|
187
|
+
}>;
|
|
188
|
+
taint: z.ZodOptional<z.ZodObject<{
|
|
189
|
+
sources: z.ZodArray<z.ZodString>;
|
|
190
|
+
}, z.core.$strip>>;
|
|
191
|
+
cost: z.ZodOptional<z.ZodObject<{
|
|
192
|
+
label: z.ZodString;
|
|
193
|
+
capRemaining: z.ZodOptional<z.ZodString>;
|
|
194
|
+
}, z.core.$strip>>;
|
|
195
|
+
expiresAt: z.ZodISODateTime;
|
|
196
|
+
createdAt: z.ZodISODateTime;
|
|
197
|
+
confirmPhrase: z.ZodOptional<z.ZodString>;
|
|
198
|
+
status: z.ZodEnum<{
|
|
199
|
+
pending: "pending";
|
|
200
|
+
rejected: "rejected";
|
|
201
|
+
expired: "expired";
|
|
202
|
+
failed: "failed";
|
|
203
|
+
confirming: "confirming";
|
|
204
|
+
approved_running: "approved_running";
|
|
205
|
+
succeeded: "succeeded";
|
|
206
|
+
superseded: "superseded";
|
|
207
|
+
cap_reached: "cap_reached";
|
|
208
|
+
}>;
|
|
209
|
+
resultSummary: z.ZodOptional<z.ZodString>;
|
|
210
|
+
error: z.ZodOptional<z.ZodString>;
|
|
211
|
+
decidedAt: z.ZodOptional<z.ZodString>;
|
|
212
|
+
}, z.core.$strip>;
|
|
213
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
214
|
+
type: z.ZodLiteral<"card">;
|
|
215
|
+
cardType: z.ZodString;
|
|
216
|
+
data: z.ZodUnknown;
|
|
217
|
+
}, z.core.$strip>], "type">;
|
|
218
|
+
export type AgentMessagePart = z.infer<typeof MessagePartSchema>;
|
|
219
|
+
export declare const MessageSchema: z.ZodObject<{
|
|
220
|
+
id: z.ZodString;
|
|
221
|
+
role: z.ZodEnum<{
|
|
222
|
+
user: "user";
|
|
223
|
+
assistant: "assistant";
|
|
224
|
+
}>;
|
|
225
|
+
parts: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
226
|
+
type: z.ZodLiteral<"text">;
|
|
227
|
+
text: z.ZodString;
|
|
228
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
229
|
+
type: z.ZodLiteral<"thinking">;
|
|
230
|
+
summary: z.ZodString;
|
|
231
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
232
|
+
type: z.ZodLiteral<"toolCall">;
|
|
233
|
+
call: z.ZodObject<{
|
|
234
|
+
id: z.ZodString;
|
|
235
|
+
name: z.ZodString;
|
|
236
|
+
status: z.ZodEnum<{
|
|
237
|
+
pending: "pending";
|
|
238
|
+
running: "running";
|
|
239
|
+
failed: "failed";
|
|
240
|
+
succeeded: "succeeded";
|
|
241
|
+
retrying: "retrying";
|
|
242
|
+
}>;
|
|
243
|
+
args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodObject<{
|
|
244
|
+
masked: z.ZodLiteral<true>;
|
|
245
|
+
display: z.ZodString;
|
|
246
|
+
}, z.core.$strip>]>>>;
|
|
247
|
+
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
248
|
+
resultSummary: z.ZodOptional<z.ZodString>;
|
|
249
|
+
error: z.ZodOptional<z.ZodString>;
|
|
250
|
+
}, z.core.$strip>;
|
|
251
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
252
|
+
type: z.ZodLiteral<"approval">;
|
|
253
|
+
approval: z.ZodObject<{
|
|
254
|
+
approvalId: z.ZodString;
|
|
255
|
+
tool: z.ZodString;
|
|
256
|
+
method: z.ZodString;
|
|
257
|
+
routeTemplate: z.ZodString;
|
|
258
|
+
intent: z.ZodString;
|
|
259
|
+
changes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
260
|
+
label: z.ZodString;
|
|
261
|
+
before: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodObject<{
|
|
262
|
+
masked: z.ZodLiteral<true>;
|
|
263
|
+
display: z.ZodString;
|
|
264
|
+
}, z.core.$strip>]>>;
|
|
265
|
+
after: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodObject<{
|
|
266
|
+
masked: z.ZodLiteral<true>;
|
|
267
|
+
display: z.ZodString;
|
|
268
|
+
}, z.core.$strip>]>>;
|
|
269
|
+
}, z.core.$strip>>>;
|
|
270
|
+
body: z.ZodOptional<z.ZodUnknown>;
|
|
271
|
+
risk: z.ZodEnum<{
|
|
272
|
+
destructive: "destructive";
|
|
273
|
+
read: "read";
|
|
274
|
+
reversible: "reversible";
|
|
275
|
+
costly: "costly";
|
|
276
|
+
}>;
|
|
277
|
+
taint: z.ZodOptional<z.ZodObject<{
|
|
278
|
+
sources: z.ZodArray<z.ZodString>;
|
|
279
|
+
}, z.core.$strip>>;
|
|
280
|
+
cost: z.ZodOptional<z.ZodObject<{
|
|
281
|
+
label: z.ZodString;
|
|
282
|
+
capRemaining: z.ZodOptional<z.ZodString>;
|
|
283
|
+
}, z.core.$strip>>;
|
|
284
|
+
expiresAt: z.ZodISODateTime;
|
|
285
|
+
createdAt: z.ZodISODateTime;
|
|
286
|
+
confirmPhrase: z.ZodOptional<z.ZodString>;
|
|
287
|
+
status: z.ZodEnum<{
|
|
288
|
+
pending: "pending";
|
|
289
|
+
rejected: "rejected";
|
|
290
|
+
expired: "expired";
|
|
291
|
+
failed: "failed";
|
|
292
|
+
confirming: "confirming";
|
|
293
|
+
approved_running: "approved_running";
|
|
294
|
+
succeeded: "succeeded";
|
|
295
|
+
superseded: "superseded";
|
|
296
|
+
cap_reached: "cap_reached";
|
|
297
|
+
}>;
|
|
298
|
+
resultSummary: z.ZodOptional<z.ZodString>;
|
|
299
|
+
error: z.ZodOptional<z.ZodString>;
|
|
300
|
+
decidedAt: z.ZodOptional<z.ZodString>;
|
|
301
|
+
}, z.core.$strip>;
|
|
302
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
303
|
+
type: z.ZodLiteral<"card">;
|
|
304
|
+
cardType: z.ZodString;
|
|
305
|
+
data: z.ZodUnknown;
|
|
306
|
+
}, z.core.$strip>], "type">>;
|
|
307
|
+
streaming: z.ZodOptional<z.ZodBoolean>;
|
|
308
|
+
stopped: z.ZodOptional<z.ZodBoolean>;
|
|
309
|
+
failed: z.ZodOptional<z.ZodBoolean>;
|
|
310
|
+
}, z.core.$strip>;
|
|
311
|
+
export type AgentMessageData = z.infer<typeof MessageSchema>;
|
|
312
|
+
export declare const ConversationStatusSchema: z.ZodEnum<{
|
|
313
|
+
error: "error";
|
|
314
|
+
idle: "idle";
|
|
315
|
+
unavailable: "unavailable";
|
|
316
|
+
streaming: "streaming";
|
|
317
|
+
awaitingApproval: "awaitingApproval";
|
|
318
|
+
interrupted: "interrupted";
|
|
319
|
+
authExpired: "authExpired";
|
|
320
|
+
capReached: "capReached";
|
|
321
|
+
}>;
|
|
322
|
+
export type AgentConversationStatus = z.infer<typeof ConversationStatusSchema>;
|
|
323
|
+
export declare const ThreadSchema: z.ZodObject<{
|
|
324
|
+
id: z.ZodString;
|
|
325
|
+
title: z.ZodString;
|
|
326
|
+
updatedAt: z.ZodString;
|
|
327
|
+
preview: z.ZodOptional<z.ZodString>;
|
|
328
|
+
}, z.core.$strip>;
|
|
329
|
+
export type AgentThread = z.infer<typeof ThreadSchema>;
|
|
330
|
+
export declare const ReadinessGapSchema: z.ZodObject<{
|
|
331
|
+
path: z.ZodString;
|
|
332
|
+
label: z.ZodString;
|
|
333
|
+
reason: z.ZodString;
|
|
334
|
+
severity: z.ZodEnum<{
|
|
335
|
+
blocker: "blocker";
|
|
336
|
+
acknowledgement: "acknowledgement";
|
|
337
|
+
recommendation: "recommendation";
|
|
338
|
+
}>;
|
|
339
|
+
currentValue: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodObject<{
|
|
340
|
+
masked: z.ZodLiteral<true>;
|
|
341
|
+
display: z.ZodString;
|
|
342
|
+
}, z.core.$strip>]>>;
|
|
343
|
+
expected: z.ZodOptional<z.ZodObject<{
|
|
344
|
+
type: z.ZodEnum<{
|
|
345
|
+
number: "number";
|
|
346
|
+
select: "select";
|
|
347
|
+
text: "text";
|
|
348
|
+
year: "year";
|
|
349
|
+
}>;
|
|
350
|
+
unit: z.ZodOptional<z.ZodString>;
|
|
351
|
+
format: z.ZodOptional<z.ZodString>;
|
|
352
|
+
}, z.core.$strip>>;
|
|
353
|
+
allowedValues: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
354
|
+
value: z.ZodString;
|
|
355
|
+
label: z.ZodString;
|
|
356
|
+
}, z.core.$strip>>>;
|
|
357
|
+
hint: z.ZodOptional<z.ZodString>;
|
|
358
|
+
suggestedValue: z.ZodOptional<z.ZodObject<{
|
|
359
|
+
value: z.ZodString;
|
|
360
|
+
source: z.ZodString;
|
|
361
|
+
confidence: z.ZodEnum<{
|
|
362
|
+
high: "high";
|
|
363
|
+
low: "low";
|
|
364
|
+
medium: "medium";
|
|
365
|
+
}>;
|
|
366
|
+
}, z.core.$strip>>;
|
|
367
|
+
}, z.core.$strip>;
|
|
368
|
+
export type AgentReadinessGap = z.infer<typeof ReadinessGapSchema>;
|
|
369
|
+
export declare const ReadinessSchema: z.ZodObject<{
|
|
370
|
+
variantId: z.ZodString;
|
|
371
|
+
productName: z.ZodString;
|
|
372
|
+
ready: z.ZodBoolean;
|
|
373
|
+
completionPercent: z.ZodNumber;
|
|
374
|
+
sections: z.ZodArray<z.ZodObject<{
|
|
375
|
+
id: z.ZodString;
|
|
376
|
+
label: z.ZodString;
|
|
377
|
+
gaps: z.ZodArray<z.ZodObject<{
|
|
378
|
+
path: z.ZodString;
|
|
379
|
+
label: z.ZodString;
|
|
380
|
+
reason: z.ZodString;
|
|
381
|
+
severity: z.ZodEnum<{
|
|
382
|
+
blocker: "blocker";
|
|
383
|
+
acknowledgement: "acknowledgement";
|
|
384
|
+
recommendation: "recommendation";
|
|
385
|
+
}>;
|
|
386
|
+
currentValue: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodObject<{
|
|
387
|
+
masked: z.ZodLiteral<true>;
|
|
388
|
+
display: z.ZodString;
|
|
389
|
+
}, z.core.$strip>]>>;
|
|
390
|
+
expected: z.ZodOptional<z.ZodObject<{
|
|
391
|
+
type: z.ZodEnum<{
|
|
392
|
+
number: "number";
|
|
393
|
+
select: "select";
|
|
394
|
+
text: "text";
|
|
395
|
+
year: "year";
|
|
396
|
+
}>;
|
|
397
|
+
unit: z.ZodOptional<z.ZodString>;
|
|
398
|
+
format: z.ZodOptional<z.ZodString>;
|
|
399
|
+
}, z.core.$strip>>;
|
|
400
|
+
allowedValues: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
401
|
+
value: z.ZodString;
|
|
402
|
+
label: z.ZodString;
|
|
403
|
+
}, z.core.$strip>>>;
|
|
404
|
+
hint: z.ZodOptional<z.ZodString>;
|
|
405
|
+
suggestedValue: z.ZodOptional<z.ZodObject<{
|
|
406
|
+
value: z.ZodString;
|
|
407
|
+
source: z.ZodString;
|
|
408
|
+
confidence: z.ZodEnum<{
|
|
409
|
+
high: "high";
|
|
410
|
+
low: "low";
|
|
411
|
+
medium: "medium";
|
|
412
|
+
}>;
|
|
413
|
+
}, z.core.$strip>>;
|
|
414
|
+
}, z.core.$strip>>;
|
|
415
|
+
}, z.core.$strip>>;
|
|
416
|
+
}, z.core.$strip>;
|
|
417
|
+
export type AgentReadiness = z.infer<typeof ReadinessSchema>;
|
|
418
|
+
//# sourceMappingURL=schema.d.ts.map
|