@tangle-network/agent-app 0.45.21 → 0.45.22
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/DesignCanvas-ZG7DJS7C.js +10 -0
- package/dist/DesignCanvasEditor-SLFMHOII.js +13 -0
- package/dist/app-auth/index.js +2 -2
- package/dist/assistant/index.d.ts +1 -1
- package/dist/assistant/index.js +5 -5
- package/dist/{attachment-validation-CsmUzuI3.d.ts → attachment-validation-BfJDBU1g.d.ts} +41 -5
- package/dist/{auth-DJjJBtYw.d.ts → auth-BYtiazA4.d.ts} +1 -1
- package/dist/chat-react/index.js +2 -2
- package/dist/chat-routes/index.d.ts +8 -4
- package/dist/chat-routes/index.js +21 -4
- package/dist/chat-routes/index.js.map +1 -1
- package/dist/{chunk-KPRBFNGT.js → chunk-3IHYJIDJ.js} +3 -3
- package/dist/{chunk-MYS7DHMM.js → chunk-4QVG4WJQ.js} +2 -2
- package/dist/{chunk-RMHZKMQ4.js → chunk-73CQJOIU.js} +5 -5
- package/dist/chunk-CCVG2TL6.js +327 -0
- package/dist/chunk-CCVG2TL6.js.map +1 -0
- package/dist/{chunk-U4BXAZCN.js → chunk-DRB77FYL.js} +2 -2
- package/dist/{chunk-6MUJROBT.js → chunk-E4DHYENH.js} +2 -2
- package/dist/chunk-F7VH4G5C.js +283 -0
- package/dist/chunk-F7VH4G5C.js.map +1 -0
- package/dist/chunk-I24YIKHO.js +183 -0
- package/dist/chunk-I24YIKHO.js.map +1 -0
- package/dist/{chunk-AH3IOSWF.js → chunk-NZVBJM73.js} +1432 -187
- package/dist/chunk-NZVBJM73.js.map +1 -0
- package/dist/{chunk-OO4DROKM.js → chunk-OASVAPRL.js} +3 -3
- package/dist/{chunk-ZSGTG6PK.js → chunk-P5PIAQVS.js} +2 -2
- package/dist/chunk-PC2WYTK7.js +405 -0
- package/dist/chunk-PC2WYTK7.js.map +1 -0
- package/dist/{chunk-YEFFHORB.js → chunk-TX6S7XXU.js} +8 -2
- package/dist/chunk-TX6S7XXU.js.map +1 -0
- package/dist/chunk-UGWQLQDS.js +35 -0
- package/dist/chunk-UGWQLQDS.js.map +1 -0
- package/dist/{chunk-O22STZ3P.js → chunk-X5DQ5QOP.js} +2 -2
- package/dist/{chunk-PCJHEZA7.js → chunk-YABHE2QY.js} +2 -2
- package/dist/design-canvas/index.d.ts +3 -3
- package/dist/design-canvas/index.js +2 -2
- package/dist/design-canvas-react/engine.js +4 -4
- package/dist/design-canvas-react/index.js +7 -7
- package/dist/design-canvas-react/lazy.js +1 -1
- package/dist/documents/index.d.ts +233 -0
- package/dist/documents/index.js +495 -0
- package/dist/documents/index.js.map +1 -0
- package/dist/documents/pdf-inspector.d.ts +60 -0
- package/dist/documents/pdf-inspector.js +100 -0
- package/dist/documents/pdf-inspector.js.map +1 -0
- package/dist/eval/index.d.ts +1 -1
- package/dist/fold-DACU7gtf.d.ts +320 -0
- package/dist/{mcp-BiKqnsJV.d.ts → mcp-xxoZZfor.d.ts} +2 -2
- package/dist/openui/index.d.ts +208 -0
- package/dist/openui/index.js +350 -0
- package/dist/openui/index.js.map +1 -0
- package/dist/openui-react/index.d.ts +119 -0
- package/dist/openui-react/index.js +149 -0
- package/dist/openui-react/index.js.map +1 -0
- package/dist/platform/index.js +2 -2
- package/dist/preset-cloudflare/index.d.ts +2 -2
- package/dist/rate-limit-BOVmJRXZ.d.ts +35 -0
- package/dist/record/drizzle.d.ts +682 -0
- package/dist/record/drizzle.js +579 -0
- package/dist/record/drizzle.js.map +1 -0
- package/dist/record/index.d.ts +16 -0
- package/dist/record/index.js +35 -0
- package/dist/record/index.js.map +1 -0
- package/dist/runtime/index.d.ts +3 -3
- package/dist/sandbox/index.d.ts +2 -2
- package/dist/sandbox/index.js +3 -2
- package/dist/sequences/index.d.ts +3 -3
- package/dist/sequences/index.js +1 -1
- package/dist/session-shell/index.d.ts +173 -1
- package/dist/session-shell/index.js +13 -1
- package/dist/teams/index.js +9 -9
- package/dist/teams/invitations-api.js +3 -3
- package/dist/tools/index.d.ts +5 -5
- package/dist/tools/index.js +3 -2
- package/dist/{types-DbU-oO5h.d.ts → types-B25Mib1r.d.ts} +11 -0
- package/dist/types-DrBidf3O.d.ts +123 -0
- package/dist/values-C7RidJuI.d.ts +156 -0
- package/dist/web/index.d.ts +197 -31
- package/dist/web/index.js +15 -3
- package/dist/web-react/async/index.d.ts +309 -0
- package/dist/web-react/async/index.js +327 -0
- package/dist/web-react/async/index.js.map +1 -0
- package/dist/web-react/index.d.ts +338 -2
- package/dist/web-react/index.js +52 -6
- package/dist/work-product/index.d.ts +1 -1
- package/dist/work-product/index.js +2 -1
- package/dist/work-product/index.js.map +1 -1
- package/dist/workspace-react/index.js +1 -1
- package/package.json +43 -3
- package/dist/DesignCanvas-NEIW3AER.js +0 -10
- package/dist/DesignCanvasEditor-QD33OI2W.js +0 -13
- package/dist/chunk-AH3IOSWF.js.map +0 -1
- package/dist/chunk-GINKOZFD.js +0 -214
- package/dist/chunk-GINKOZFD.js.map +0 -1
- package/dist/chunk-J25RST7G.js +0 -126
- package/dist/chunk-J25RST7G.js.map +0 -1
- package/dist/chunk-WBHPN5DY.js +0 -158
- package/dist/chunk-WBHPN5DY.js.map +0 -1
- package/dist/chunk-YEFFHORB.js.map +0 -1
- /package/dist/{DesignCanvas-NEIW3AER.js.map → DesignCanvas-ZG7DJS7C.js.map} +0 -0
- /package/dist/{DesignCanvasEditor-QD33OI2W.js.map → DesignCanvasEditor-SLFMHOII.js.map} +0 -0
- /package/dist/{chunk-KPRBFNGT.js.map → chunk-3IHYJIDJ.js.map} +0 -0
- /package/dist/{chunk-MYS7DHMM.js.map → chunk-4QVG4WJQ.js.map} +0 -0
- /package/dist/{chunk-RMHZKMQ4.js.map → chunk-73CQJOIU.js.map} +0 -0
- /package/dist/{chunk-U4BXAZCN.js.map → chunk-DRB77FYL.js.map} +0 -0
- /package/dist/{chunk-6MUJROBT.js.map → chunk-E4DHYENH.js.map} +0 -0
- /package/dist/{chunk-OO4DROKM.js.map → chunk-OASVAPRL.js.map} +0 -0
- /package/dist/{chunk-ZSGTG6PK.js.map → chunk-P5PIAQVS.js.map} +0 -0
- /package/dist/{chunk-O22STZ3P.js.map → chunk-X5DQ5QOP.js.map} +0 -0
- /package/dist/{chunk-PCJHEZA7.js.map → chunk-YABHE2QY.js.map} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/web-react/async/state.ts","../../../src/web-react/async/use-async-resource.ts","../../../src/web-react/async/use-confirmed-mutation.ts","../../../src/web-react/async/async-view.tsx"],"sourcesContent":["/**\n * The fetch-state contract: a failed load cannot render as empty data.\n *\n * Three shapes produce that defect, and two audited verticals shipped dozens of\n * each: a `catch` handler that only clears a loading flag, an early return on a\n * non-ok response, and a bare `null` returned while loading. All three end with\n * the same pixels a successful-but-empty load produces — \"No templates\n * available\", an empty member list, a blank conversation — so the reader cannot\n * tell \"we asked and there is nothing\" from \"we could not ask\", and the retry\n * that would fix it is never offered.\n *\n * `AsyncResourceState` makes the two outcomes separate variants: `error` is the\n * only one carrying a message and it is never reachable with a value, `empty` is\n * the only one carrying a resolved-but-empty value and it never carries a\n * message. A component rendering one is structurally not rendering the other.\n *\n * This file is React-free so the state model, the emptiness rule and the\n * Response readers can be unit-tested and reused outside a component.\n */\n\n/**\n * - `idle` — no load has been attempted (the hook is disabled, or its inputs\n * are not resolved yet). Distinct from `loading`: nothing is in flight.\n * - `loading` — a load is in flight and no value is held.\n * - `error` — the load failed. Carries the message and never a value.\n * - `empty` — the load succeeded and the value is empty. Never carries a message.\n * - `ready` — the load succeeded and the value is non-empty.\n */\nexport type AsyncResourceStatus = 'idle' | 'loading' | 'error' | 'empty' | 'ready'\n\n/** Re-runs the load. Present on every variant so the error branch can never be\n * rendered without the action that recovers from it. */\nexport interface AsyncRetryable {\n readonly retry: () => void\n}\n\nexport type AsyncResourceState<T> =\n | ({ readonly status: 'idle' } & AsyncRetryable)\n | ({ readonly status: 'loading' } & AsyncRetryable)\n | ({ readonly status: 'error'; readonly message: string; readonly error: unknown } & AsyncRetryable)\n | ({ readonly status: 'empty'; readonly value: T } & AsyncRetryable)\n | ({ readonly status: 'ready'; readonly value: T } & AsyncRetryable)\n\n/** The state model without the retry action — what a reducer produces. */\nexport type AsyncResolution<T> =\n | { readonly status: 'idle' }\n | { readonly status: 'loading' }\n | { readonly status: 'error'; readonly message: string; readonly error: unknown }\n | { readonly status: 'empty'; readonly value: T }\n | { readonly status: 'ready'; readonly value: T }\n\nexport const DEFAULT_ASYNC_ERROR_MESSAGE = 'Something went wrong. Please try again.'\n\n/**\n * Default emptiness rule: `null`/`undefined`, an empty array, an empty `Map` or\n * `Set`. A string, a number and a plain object are `ready` — `''` and `{}` are\n * legitimate values for the resources that produce them, and guessing otherwise\n * would route a real answer into the empty branch. Pass `isEmpty` for a shape\n * this cannot see into (`{ items: [] }`, a paged envelope, a count).\n */\nexport function defaultIsEmpty(value: unknown): boolean {\n if (value === null || value === undefined) return true\n if (Array.isArray(value)) return value.length === 0\n if (value instanceof Map || value instanceof Set) return value.size === 0\n return false\n}\n\nfunction hasMessage(value: object): value is { message: unknown } {\n return 'message' in value\n}\n\n/** Best available human-readable message for a thrown value. Never returns an\n * empty string — a blank error block reads as a rendering bug. */\nexport function asyncErrorMessage(error: unknown, fallback: string = DEFAULT_ASYNC_ERROR_MESSAGE): string {\n if (typeof error === 'string' && error.trim() !== '') return error\n if (typeof error === 'object' && error !== null && hasMessage(error)) {\n const message = error.message\n if (typeof message === 'string' && message.trim() !== '') return message\n }\n return fallback\n}\n\n/** Classifies a successfully loaded value into `ready` or `empty`. */\nexport function resolveAsyncValue<T>(value: T, isEmpty: (value: T) => boolean = defaultIsEmpty): AsyncResolution<T> {\n return isEmpty(value) ? { status: 'empty', value } : { status: 'ready', value }\n}\n\n/**\n * A non-ok HTTP response, as a throwable. `requireOk`/`readOkJson` raise this so\n * a non-ok response reaches the `error` branch instead of an early `return` that\n * leaves the caller rendering the empty branch.\n */\nexport class AsyncRequestError extends Error {\n readonly status: number\n readonly statusText: string\n readonly url: string\n /** First 200 characters of the response body when it could be read, else `''`.\n * Kept off `message` so a server's HTML error page never becomes UI copy. */\n readonly body: string\n\n constructor(response: { status: number; statusText?: string; url?: string }, body = '') {\n const statusText = response.statusText ?? ''\n super(`Request failed (${response.status}${statusText ? ` ${statusText}` : ''})`)\n this.name = 'AsyncRequestError'\n this.status = response.status\n this.statusText = statusText\n this.url = response.url ?? ''\n this.body = body\n }\n}\n\nasync function readBodySnippet(response: Response): Promise<string> {\n try {\n return (await response.text()).slice(0, 200)\n } catch {\n // An already-consumed or unreadable body is a missing diagnostic, not a\n // second failure — the status is what the error reports.\n return ''\n }\n}\n\n/** Returns the response when ok; throws `AsyncRequestError` otherwise. Reads the\n * body only on the failure path, so the caller keeps an unconsumed stream. */\nexport async function requireOk(response: Response): Promise<Response> {\n if (response.ok) return response\n throw new AsyncRequestError(response, await readBodySnippet(response))\n}\n\n/**\n * `requireOk` + `response.json()`. Without `parse` the result is `unknown`, so a\n * caller narrows at the JSON boundary rather than inheriting an unchecked shape;\n * with `parse` the validator runs inside the load and a rejection lands in the\n * `error` branch.\n */\nexport async function readOkJson(response: Response): Promise<unknown>\nexport async function readOkJson<T>(response: Response, parse: (data: unknown) => T): Promise<T>\nexport async function readOkJson<T>(response: Response, parse?: (data: unknown) => T): Promise<T | unknown> {\n await requireOk(response)\n let data: unknown\n try {\n data = await response.json()\n } catch (error) {\n throw new Error('The response was not valid JSON.', { cause: error })\n }\n return parse ? parse(data) : data\n}\n","import { useCallback, useEffect, useMemo, useRef, useState } from 'react'\n\nimport {\n asyncErrorMessage,\n defaultIsEmpty,\n resolveAsyncValue,\n type AsyncResolution,\n type AsyncResourceState,\n} from './state'\n\nexport interface AsyncLoadContext {\n /** Aborted when the inputs change, a retry supersedes this load, or the\n * component unmounts. Forward it to `fetch` so a superseded request stops. */\n readonly signal: AbortSignal\n}\n\nexport interface UseAsyncResourceOptions<T> {\n /**\n * The one load. Reject (or throw) to reach the `error` branch — a non-ok\n * response must reject too, which is what `requireOk`/`readOkJson` are for.\n * Read from a ref internally, so an inline arrow does not re-trigger; `deps`\n * is what declares when the load must run again.\n */\n load: (context: AsyncLoadContext) => Promise<T>\n /** Re-runs the load when any entry changes by `Object.is`, like `useEffect`. */\n deps?: readonly unknown[]\n /** `false` holds the resource at `idle` and runs nothing — for inputs that are\n * not resolved yet. Flipping it to `true` starts the load. */\n enabled?: boolean\n /** First-render seed (an SSR/loader page). The hook starts resolved and skips\n * the first load. Read once — later identity changes are ignored, so a\n * revalidating loader belongs in `deps`, not here. */\n initialValue?: T\n /** Splits a successful load into `empty` vs `ready`. Default: `defaultIsEmpty`. */\n isEmpty?: (value: T) => boolean\n /** Maps a thrown value to the message the `error` branch renders. */\n errorMessage?: (error: unknown) => string\n}\n\n/** Bumps a token when any dependency changes identity, so the effect's own\n * dependency list stays a fixed length whatever the caller passes. */\nfunction useChangeToken(deps: readonly unknown[]): number {\n const ref = useRef<{ deps: readonly unknown[]; token: number }>({ deps, token: 0 })\n const changed =\n ref.current.deps.length !== deps.length || deps.some((dep, index) => !Object.is(dep, ref.current.deps[index]))\n if (changed) ref.current = { deps, token: ref.current.token + 1 }\n return ref.current.token\n}\n\nconst NO_DEPS: readonly unknown[] = []\n\n/**\n * The five-state fetch machine: `idle | loading | error | empty | ready`.\n *\n * What it guarantees, and what the hand-rolled versions it replaces did not:\n *\n * - a rejected load lands on `error` with a message and a `retry`, never on an\n * empty list;\n * - `empty` is only reachable from a load that actually succeeded;\n * - a superseded load (inputs changed, retry pressed, component unmounted) is\n * aborted and its late result is dropped by a monotonic sequence guard, so it\n * cannot repaint a newer view.\n */\nexport function useAsyncResource<T>({\n load,\n deps = NO_DEPS,\n enabled = true,\n initialValue,\n isEmpty,\n errorMessage,\n}: UseAsyncResourceOptions<T>): AsyncResourceState<T> {\n const loadRef = useRef(load)\n loadRef.current = load\n const isEmptyRef = useRef(isEmpty ?? defaultIsEmpty)\n isEmptyRef.current = isEmpty ?? defaultIsEmpty\n const errorMessageRef = useRef(errorMessage)\n errorMessageRef.current = errorMessage\n\n const [resolution, setResolution] = useState<AsyncResolution<T>>(() => {\n if (initialValue !== undefined) return resolveAsyncValue(initialValue, isEmpty ?? defaultIsEmpty)\n return enabled ? { status: 'loading' } : { status: 'idle' }\n })\n const [reloadKey, setReloadKey] = useState(0)\n\n const seqRef = useRef(0)\n // Consumed by the first load attempt: a seeded resource must not throw its\n // seed away to re-fetch what the server already sent.\n const seededRef = useRef(initialValue !== undefined)\n const token = useChangeToken(deps)\n\n useEffect(() => {\n if (!enabled) return\n if (seededRef.current) {\n seededRef.current = false\n return\n }\n\n const seq = ++seqRef.current\n const controller = new AbortController()\n setResolution({ status: 'loading' })\n\n void (async () => {\n try {\n const value = await loadRef.current({ signal: controller.signal })\n if (seq !== seqRef.current || controller.signal.aborted) return\n setResolution(resolveAsyncValue(value, isEmptyRef.current))\n } catch (error) {\n if (seq !== seqRef.current || controller.signal.aborted) return\n setResolution({\n status: 'error',\n message: errorMessageRef.current ? errorMessageRef.current(error) : asyncErrorMessage(error),\n error,\n })\n }\n })()\n\n return () => controller.abort()\n }, [token, enabled, reloadKey])\n\n const retry = useCallback(() => {\n setReloadKey((key) => key + 1)\n }, [])\n\n return useMemo<AsyncResourceState<T>>(() => {\n switch (resolution.status) {\n case 'ready':\n return { status: 'ready', value: resolution.value, retry }\n case 'empty':\n return { status: 'empty', value: resolution.value, retry }\n case 'error':\n return { status: 'error', message: resolution.message, error: resolution.error, retry }\n case 'loading':\n return { status: 'loading', retry }\n case 'idle':\n return { status: 'idle', retry }\n }\n }, [resolution, retry])\n}\n","import { useCallback, useMemo, useRef, useState } from 'react'\n\nimport { asyncErrorMessage, readOkJson, requireOk } from './state'\nimport type { AsyncLoadContext } from './use-async-resource'\n\n/**\n * The brand that makes \"Saved\" unreachable without a confirmed write.\n *\n * A resolved promise is not a success: `fetch` resolves on a 404, and the\n * shipped defect this closes is a save button that rendered \"Saved\" because the\n * only thing awaited was that the request came back at all. The success variant\n * therefore carries a symbol no object literal can spell, so the only way into\n * `succeeded` is `confirmWrite` / `confirmResponse` / `confirmJson` — each of\n * which has already checked that the write landed.\n */\nexport const CONFIRMED_WRITE: unique symbol = Symbol('agent-app.confirmed-write')\n\nexport interface MutationConfirmed<T> {\n readonly succeeded: true\n readonly value: T\n readonly [CONFIRMED_WRITE]: true\n}\n\nexport interface MutationRejected {\n readonly succeeded: false\n /** Safe to render: what the user is told the write did not do. */\n readonly message: string\n readonly error?: unknown\n}\n\nexport type MutationOutcome<T> = MutationConfirmed<T> | MutationRejected\n\n/** Confirms a write whose success is already established (an SDK call that\n * throws on failure, a store returning its own typed outcome). The deliberate\n * act is the point — this call is what an audit greps for. */\nexport function confirmWrite<T>(value: T): MutationConfirmed<T> {\n return { succeeded: true, value, [CONFIRMED_WRITE]: true }\n}\n\n/** A write that did not land. Constructible by hand: failing loud is never the\n * direction that needs guarding. */\nexport function rejectWrite(message: string, error?: unknown): MutationRejected {\n return error === undefined ? { succeeded: false, message } : { succeeded: false, message, error }\n}\n\n/** Confirms only a 2xx response. A 404/500 becomes a rejection carrying the\n * status — never a success, whatever the promise did. */\nexport async function confirmResponse(response: Response): Promise<MutationOutcome<Response>> {\n try {\n return confirmWrite(await requireOk(response))\n } catch (error) {\n return rejectWrite(asyncErrorMessage(error), error)\n }\n}\n\n/** `confirmResponse` + a JSON body. A non-ok status, an unreadable body and a\n * throwing `parse` are all rejections. */\nexport async function confirmJson<T>(response: Response, parse: (data: unknown) => T): Promise<MutationOutcome<T>> {\n try {\n return confirmWrite(await readOkJson(response, parse))\n } catch (error) {\n return rejectWrite(asyncErrorMessage(error), error)\n }\n}\n\n/** True only for a value built by one of the confirm helpers. Takes `unknown`\n * because an untyped consumer can return anything from `mutate`. */\nexport function isConfirmedWrite<T>(outcome: unknown): outcome is MutationConfirmed<T> {\n if (typeof outcome !== 'object' || outcome === null) return false\n return (outcome as { readonly [CONFIRMED_WRITE]?: unknown })[CONFIRMED_WRITE] === true\n}\n\nfunction asRejection(outcome: unknown): MutationRejected | null {\n if (typeof outcome !== 'object' || outcome === null) return null\n const candidate = outcome as { succeeded?: unknown; message?: unknown; error?: unknown }\n if (candidate.succeeded !== false) return null\n const message = typeof candidate.message === 'string' && candidate.message.trim() !== ''\n ? candidate.message\n : UNCONFIRMED_MESSAGE\n return rejectWrite(message, candidate.error)\n}\n\nexport type MutationState<T> =\n | { readonly status: 'idle' }\n | { readonly status: 'pending' }\n | { readonly status: 'succeeded'; readonly value: T }\n | { readonly status: 'failed'; readonly message: string; readonly error: unknown }\n\nexport interface UseConfirmedMutationOptions<TInput, TValue> {\n /**\n * Performs the write and returns a confirmation. Anything else — including a\n * hand-written `{ succeeded: true }` — is treated as a failed write, because\n * an unbranded object is exactly the shape produced by code that never\n * checked the response.\n *\n * The context signal aborts only when a later `run` supersedes this one. It is\n * NOT aborted on unmount: a write the user asked for must not be cancelled by\n * navigating away.\n */\n mutate: (input: TInput, context: AsyncLoadContext) => Promise<MutationOutcome<TValue>>\n /** Fires after the state reaches `succeeded` (latest run only). */\n onSucceeded?: (value: TValue) => void\n /** Fires after the state reaches `failed` (latest run only). */\n onFailed?: (message: string, error: unknown) => void\n /** Maps a thrown value to the message the `failed` state renders. */\n errorMessage?: (error: unknown) => string\n}\n\nexport interface ConfirmedMutation<TInput, TValue> {\n readonly state: MutationState<TValue>\n /** Runs the write. Never rejects — the outcome is returned and mirrored into\n * `state`. Concurrent runs are last-write-wins; disable the control while\n * `state.status === 'pending'`. */\n readonly run: (input: TInput) => Promise<MutationOutcome<TValue>>\n /** Back to `idle` (dismisses a \"Saved\" or error affordance). */\n readonly reset: () => void\n}\n\nconst UNCONFIRMED_MESSAGE = 'The write could not be confirmed.'\n\nconst UNCONFIRMED_CONTRACT =\n 'mutate() resolved without a confirmation. Return confirmWrite(value), confirmResponse(response) or confirmJson(response, parse) so the success state proves the write landed.'\n\n/**\n * `idle | pending | succeeded | failed` over a write that must confirm itself.\n *\n * `succeeded` is reachable only through a branded confirmation, so the audited\n * \"Saved on a 404\" bug cannot be written with this hook: the 404 path produces\n * `failed` carrying the status, and a `mutate` that forgot to check produces\n * `failed` carrying the contract violation rather than a success it never\n * earned.\n */\nexport function useConfirmedMutation<TInput, TValue>({\n mutate,\n onSucceeded,\n onFailed,\n errorMessage,\n}: UseConfirmedMutationOptions<TInput, TValue>): ConfirmedMutation<TInput, TValue> {\n const mutateRef = useRef(mutate)\n mutateRef.current = mutate\n const onSucceededRef = useRef(onSucceeded)\n onSucceededRef.current = onSucceeded\n const onFailedRef = useRef(onFailed)\n onFailedRef.current = onFailed\n const errorMessageRef = useRef(errorMessage)\n errorMessageRef.current = errorMessage\n\n const [state, setState] = useState<MutationState<TValue>>({ status: 'idle' })\n const seqRef = useRef(0)\n const inFlightRef = useRef<AbortController | null>(null)\n\n const run = useCallback(async (input: TInput): Promise<MutationOutcome<TValue>> => {\n inFlightRef.current?.abort()\n const controller = new AbortController()\n inFlightRef.current = controller\n const seq = ++seqRef.current\n\n setState({ status: 'pending' })\n\n let outcome: MutationOutcome<TValue>\n try {\n const returned: unknown = await mutateRef.current(input, { signal: controller.signal })\n outcome = isConfirmedWrite<TValue>(returned)\n ? returned\n : asRejection(returned) ?? rejectWrite(UNCONFIRMED_MESSAGE, new Error(UNCONFIRMED_CONTRACT))\n } catch (error) {\n outcome = rejectWrite(errorMessageRef.current ? errorMessageRef.current(error) : asyncErrorMessage(error), error)\n }\n\n // A superseded run reports its own outcome to its own caller and never\n // repaints the state a newer run owns.\n if (seq !== seqRef.current) return outcome\n\n if (outcome.succeeded) {\n setState({ status: 'succeeded', value: outcome.value })\n onSucceededRef.current?.(outcome.value)\n } else {\n setState({ status: 'failed', message: outcome.message, error: outcome.error })\n onFailedRef.current?.(outcome.message, outcome.error)\n }\n return outcome\n }, [])\n\n const reset = useCallback(() => {\n seqRef.current += 1\n inFlightRef.current?.abort()\n inFlightRef.current = null\n setState({ status: 'idle' })\n }, [])\n\n return useMemo(() => ({ state, run, reset }), [state, run, reset])\n}\n","import { isValidElement, type ReactElement, type ReactNode } from 'react'\n\nimport type { AsyncResourceState } from './state'\nimport type { MutationState } from './use-confirmed-mutation'\n\nexport interface AsyncEmptyAction {\n label: string\n onClick: () => void\n}\n\nexport interface AsyncEmptySpec {\n /** What is not there, in the reader's words (\"No templates yet\"). Required:\n * an empty state with nothing to say is the state this module exists to\n * stop being mistaken for a failure. */\n title: string\n description?: string\n /** The next action. An element is rendered as supplied (a link, a dialog\n * trigger); the object form renders the standard button. */\n action?: AsyncEmptyAction | ReactElement\n}\n\nexport interface AsyncErrorRenderProps {\n message: string\n retry: () => void\n}\n\nexport interface AsyncViewProps<T> {\n state: AsyncResourceState<T>\n /** Rendered only for `ready`, with the loaded value — the branch cannot be\n * entered without one. */\n children: (value: T) => ReactNode\n /** Required: `empty` must name what is missing and what to do about it. */\n empty: AsyncEmptySpec | ReactElement\n /** Must return an element. Returning nothing is what produced the blank\n * screens this component replaces, so a nullish return falls back to the\n * built-in block rather than rendering nothing. */\n renderLoading?: () => ReactElement\n renderError?: (props: AsyncErrorRenderProps) => ReactElement\n /** `idle` renders the loading block by default — from the reader's side,\n * \"not started\" and \"in flight\" are the same wait. */\n renderIdle?: () => ReactElement\n loadingLabel?: string\n retryLabel?: string\n /** Applied to the wrapper around the non-`ready` branches. `ready` renders the\n * children with no wrapper element, so grids and lists keep their layout. */\n className?: string\n}\n\nconst BLOCK_CLASS = 'flex flex-col items-center justify-center gap-2 px-4 py-10 text-center'\n\n/**\n * Renders the branch the state is actually in.\n *\n * The three anti-patterns this replaces (`catch` that only clears a loading\n * flag, early return on a non-ok response, bare `null` while loading) all end at\n * the same rendered output as a successful-but-empty load. Here every branch is\n * reached from a different variant and each renders visibly: `loading` and\n * `idle` render a labelled busy block, `error` renders the message plus the\n * retry, `empty` renders the caller's copy and next action, and `ready` is the\n * only branch with a value to hand to `children`.\n */\nexport function AsyncView<T>({\n state,\n children,\n empty,\n renderLoading,\n renderError,\n renderIdle,\n loadingLabel = 'Loading…',\n retryLabel = 'Retry',\n className,\n}: AsyncViewProps<T>): ReactElement {\n if (state.status === 'ready') return <>{children(state.value)}</>\n\n // Every `??` here is the guarantee: a custom renderer that returns nothing\n // leaves the reader with the built-in block, never a blank region.\n const branch = (): ReactNode => {\n switch (state.status) {\n case 'idle':\n return renderIdle?.() ?? <LoadingBlock label={loadingLabel} />\n case 'loading':\n return renderLoading?.() ?? <LoadingBlock label={loadingLabel} />\n case 'error':\n return (\n renderError?.({ message: state.message, retry: state.retry }) ?? (\n <ErrorBlock message={state.message} retry={state.retry} retryLabel={retryLabel} />\n )\n )\n case 'empty':\n if (isValidElement(empty)) return empty\n return typeof empty === 'object' && empty !== null && typeof empty.title === 'string' ? (\n <EmptyBlock spec={empty} />\n ) : (\n <EmptyBlock spec={{ title: 'Nothing here yet.' }} />\n )\n }\n }\n\n return (\n <div data-async-state={state.status} className={className}>\n {branch()}\n </div>\n )\n}\n\nfunction LoadingBlock({ label }: { label: string }): ReactElement {\n return (\n <div role=\"status\" aria-live=\"polite\" aria-busy=\"true\" className={BLOCK_CLASS}>\n <span\n className=\"h-4 w-4 animate-spin rounded-full border-2 border-border border-t-transparent\"\n aria-hidden=\"true\"\n />\n <span className=\"text-sm text-muted-foreground\">{label}</span>\n </div>\n )\n}\n\nfunction ErrorBlock({\n message,\n retry,\n retryLabel,\n}: {\n message: string\n retry: () => void\n retryLabel: string\n}): ReactElement {\n return (\n <div role=\"alert\" className={BLOCK_CLASS}>\n <p className=\"max-w-md text-sm text-muted-foreground\">{message}</p>\n <button\n type=\"button\"\n onClick={retry}\n className=\"h-8 rounded-md border border-border px-3 text-xs font-medium text-foreground transition hover:bg-accent/30\"\n >\n {retryLabel}\n </button>\n </div>\n )\n}\n\nfunction EmptyBlock({ spec }: { spec: AsyncEmptySpec }): ReactElement {\n return (\n <div className={BLOCK_CLASS}>\n <p className=\"text-sm font-medium text-foreground\">{spec.title}</p>\n {spec.description ? <p className=\"max-w-md text-sm text-muted-foreground\">{spec.description}</p> : null}\n {spec.action ? (\n isValidElement(spec.action) ? (\n spec.action\n ) : (\n <button\n type=\"button\"\n onClick={(spec.action as AsyncEmptyAction).onClick}\n className=\"h-8 rounded-md border border-border px-3 text-xs font-medium text-foreground transition hover:bg-accent/30\"\n >\n {(spec.action as AsyncEmptyAction).label}\n </button>\n )\n ) : null}\n </div>\n )\n}\n\nexport interface MutationStatusLabels {\n pending?: string\n succeeded?: string\n}\n\nexport interface MutationStatusProps<T> {\n state: MutationState<T>\n labels?: MutationStatusLabels\n className?: string\n}\n\n/**\n * The write's own status line. \"Saved\" renders only from `succeeded`, which\n * `useConfirmedMutation` can only reach through a confirmed write, so the label\n * cannot appear over a failed request.\n */\nexport function MutationStatus<T>({ state, labels, className }: MutationStatusProps<T>): ReactElement | null {\n if (state.status === 'idle') return null\n if (state.status === 'pending') {\n return (\n <span role=\"status\" aria-live=\"polite\" className={className ?? 'text-xs text-muted-foreground'}>\n {labels?.pending ?? 'Saving…'}\n </span>\n )\n }\n if (state.status === 'succeeded') {\n return (\n <span role=\"status\" aria-live=\"polite\" className={className ?? 'text-xs text-muted-foreground'}>\n {labels?.succeeded ?? 'Saved'}\n </span>\n )\n }\n return (\n <span role=\"alert\" className={className ?? 'text-xs text-destructive'}>\n {state.message}\n </span>\n )\n}\n"],"mappings":";AAmDO,IAAM,8BAA8B;AASpC,SAAS,eAAe,OAAyB;AACtD,MAAI,UAAU,QAAQ,UAAU,OAAW,QAAO;AAClD,MAAI,MAAM,QAAQ,KAAK,EAAG,QAAO,MAAM,WAAW;AAClD,MAAI,iBAAiB,OAAO,iBAAiB,IAAK,QAAO,MAAM,SAAS;AACxE,SAAO;AACT;AAEA,SAAS,WAAW,OAA8C;AAChE,SAAO,aAAa;AACtB;AAIO,SAAS,kBAAkB,OAAgB,WAAmB,6BAAqC;AACxG,MAAI,OAAO,UAAU,YAAY,MAAM,KAAK,MAAM,GAAI,QAAO;AAC7D,MAAI,O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AAU,0CAA0C,mBAAQ;AAAA,IAC/D;AAAA,MAAC;AAAA;AAAA,QACC,MAAK;AAAA,QACL,SAAS;AAAA,QACT,WAAU;AAAA,QAET;AAAA;AAAA,IACH;AAAA,KACF;AAEJ;AAEA,SAAS,WAAW,EAAE,KAAK,GAA2C;AACpE,SACE,qBAAC,SAAI,WAAW,aACd;AAAA,wBAAC,OAAE,WAAU,uCAAuC,eAAK,OAAM;AAAA,IAC9D,KAAK,cAAc,oBAAC,OAAE,WAAU,0CAA0C,eAAK,aAAY,IAAO;AAAA,IAClG,KAAK,SACJ,eAAe,KAAK,MAAM,IACxB,KAAK,SAEL;AAAA,MAAC;AAAA;AAAA,QACC,MAAK;AAAA,QACL,SAAU,KAAK,OAA4B;AAAA,QAC3C,WAAU;AAAA,QAER,eAAK,OAA4B;AAAA;AAAA,IACrC,IAEA;AAAA,KACN;AAEJ;AAkBO,SAAS,eAAkB,EAAE,OAAO,QAAQ,UAAU,GAAgD;AAC3G,MAAI,MAAM,WAAW,OAAQ,QAAO;AACpC,MAAI,MAAM,WAAW,WAAW;AAC9B,WACE,oBAAC,UAAK,MAAK,UAAS,aAAU,UAAS,WAAW,aAAa,iCAC5D,kBAAQ,WAAW,gBACtB;AAAA,EAEJ;AACA,MAAI,MAAM,WAAW,aAAa;AAChC,WACE,oBAAC,UAAK,MAAK,UAAS,aAAU,UAAS,WAAW,aAAa,iCAC5D,kBAAQ,aAAa,SACxB;AAAA,EAEJ;AACA,SACE,oBAAC,UAAK,MAAK,SAAQ,WAAW,aAAa,4BACxC,gBAAM,SACT;AAEJ;","names":["useCallback","useMemo","useRef","useState","useRef","useState","useCallback","useMemo"]}
|
|
@@ -20,7 +20,7 @@ import { i as ProductSeatOffer } from '../billing-BibxgALe.js';
|
|
|
20
20
|
import { SessionSort, SessionPage, SessionSummary, SessionRailAction } from '../session-shell/index.js';
|
|
21
21
|
import { CatalogModel } from '../catalog/index.js';
|
|
22
22
|
import { Harness } from '../harness/index.js';
|
|
23
|
-
export { a as ATTACHMENT_ACCEPT, e as FileIndexReadyResponse, f as FileIndexResponse, g as FileIndexWarmingResponse } from '../attachment-validation-
|
|
23
|
+
export { a as ATTACHMENT_ACCEPT, e as FileIndexReadyResponse, f as FileIndexResponse, g as FileIndexWarmingResponse } from '../attachment-validation-BfJDBU1g.js';
|
|
24
24
|
export { a as attachmentPartKey } from '../stream-normalizer-DKRxyVlZ.js';
|
|
25
25
|
import '../billing/index.js';
|
|
26
26
|
|
|
@@ -1277,6 +1277,342 @@ declare function formatSessionTimestamp(isoDate: string | null): string;
|
|
|
1277
1277
|
*/
|
|
1278
1278
|
declare function SessionHistoryPanel({ history, hasAnySessions, query, onQueryChange, sort, onSortChange, hrefForSession, linkComponent: Link, respondingSessionIds, onRename, onDelete, onBulkAction, renameLabel, deleteLabel, extraActions, newSessionHref, title, untitledLabel, emptyTitle, emptyDescription, formatTimestamp, contentWidth, className, }: SessionHistoryPanelProps): react.JSX.Element;
|
|
1279
1279
|
|
|
1280
|
+
/**
|
|
1281
|
+
* The pure half of the editable record grid: the typed column vocabulary, the
|
|
1282
|
+
* per-cell parse/validate rules, display + editor formatting, and the
|
|
1283
|
+
* optimistic overlay a caller's rows are projected through.
|
|
1284
|
+
*
|
|
1285
|
+
* Zero React, zero DOM — a product can validate a row on a worker before it
|
|
1286
|
+
* ever reaches storage, and the component in `./record-grid` renders exactly
|
|
1287
|
+
* what these functions decide.
|
|
1288
|
+
*
|
|
1289
|
+
* Every domain word is a caller parameter: the module knows no column names,
|
|
1290
|
+
* no currencies, no option sets. What it owns is the mechanism four verticals
|
|
1291
|
+
* each re-derived — typed cells, an error a person can act on, and an
|
|
1292
|
+
* optimistic edit that can be taken back.
|
|
1293
|
+
*/
|
|
1294
|
+
/** The value one cell can hold. `null` is "no value on file". */
|
|
1295
|
+
type RecordGridValue = string | number | boolean | null;
|
|
1296
|
+
/** Typed outcome for one cell. Callers MUST inspect `succeeded` before reading
|
|
1297
|
+
* `value`; nothing here throws. */
|
|
1298
|
+
type RecordGridCellOutcome = {
|
|
1299
|
+
succeeded: true;
|
|
1300
|
+
value: RecordGridValue;
|
|
1301
|
+
} | {
|
|
1302
|
+
succeeded: false;
|
|
1303
|
+
error: string;
|
|
1304
|
+
};
|
|
1305
|
+
/** Typed outcome for a whole row of inputs (the add form). `cellErrors` is
|
|
1306
|
+
* keyed by column id so each control can render its own message. */
|
|
1307
|
+
type RecordGridRowOutcome = {
|
|
1308
|
+
succeeded: true;
|
|
1309
|
+
value: Record<string, RecordGridValue>;
|
|
1310
|
+
} | {
|
|
1311
|
+
succeeded: false;
|
|
1312
|
+
error: string;
|
|
1313
|
+
cellErrors: Readonly<Record<string, string>>;
|
|
1314
|
+
};
|
|
1315
|
+
/** Build a cell success outcome. */
|
|
1316
|
+
declare function recordGridOk(value: RecordGridValue): RecordGridCellOutcome;
|
|
1317
|
+
/** Build a cell failure outcome carrying the message shown next to the cell. */
|
|
1318
|
+
declare function recordGridFail(error: string): RecordGridCellOutcome;
|
|
1319
|
+
/** How a value came to sit in a cell. Rendered as the provenance tone. */
|
|
1320
|
+
type RecordGridSourceBasis =
|
|
1321
|
+
/** Extracted from a document or message the product can link to. */
|
|
1322
|
+
'source'
|
|
1323
|
+
/** A person entered or confirmed it. */
|
|
1324
|
+
| 'confirmed'
|
|
1325
|
+
/** Computed from other cells; the quote (if any) is the input, not the value. */
|
|
1326
|
+
| 'derived';
|
|
1327
|
+
/**
|
|
1328
|
+
* Where one cell's value came from. Optional on every row — a grid over data
|
|
1329
|
+
* with no lineage renders identically without it.
|
|
1330
|
+
*/
|
|
1331
|
+
interface RecordGridCellSource {
|
|
1332
|
+
/** The text in the source that supports this value. */
|
|
1333
|
+
quote?: string;
|
|
1334
|
+
/** Human name of the source document, message, or system. */
|
|
1335
|
+
label?: string;
|
|
1336
|
+
/** Click-through to the source. */
|
|
1337
|
+
href?: string;
|
|
1338
|
+
/** Position inside the source: a page, a line, a span — the caller's words. */
|
|
1339
|
+
locator?: string;
|
|
1340
|
+
/** How the value got here. Absent renders as a neutral marker. */
|
|
1341
|
+
basis?: RecordGridSourceBasis;
|
|
1342
|
+
}
|
|
1343
|
+
/** One option of a `select` column. */
|
|
1344
|
+
interface RecordGridSelectOption {
|
|
1345
|
+
value: string;
|
|
1346
|
+
label: string;
|
|
1347
|
+
}
|
|
1348
|
+
/** A cell is only editable, rendered, and validated when the column it depends
|
|
1349
|
+
* on holds `equals`. This is how a nested sub-form (a vesting schedule behind
|
|
1350
|
+
* a "has vesting" toggle) stays a set of flat, individually-typed columns. */
|
|
1351
|
+
interface RecordGridDependency {
|
|
1352
|
+
column: string;
|
|
1353
|
+
equals: RecordGridValue;
|
|
1354
|
+
}
|
|
1355
|
+
/** Fields every column kind carries. */
|
|
1356
|
+
interface RecordGridColumnBase {
|
|
1357
|
+
/** Key into a row's `values` bag. */
|
|
1358
|
+
id: string;
|
|
1359
|
+
/** Column heading, and the accessible name of every control in the column. */
|
|
1360
|
+
header: string;
|
|
1361
|
+
/** Short hint rendered under the control in the add form. */
|
|
1362
|
+
hint?: string;
|
|
1363
|
+
/** An empty cell is rejected. */
|
|
1364
|
+
required?: boolean;
|
|
1365
|
+
/** Cells are editable unless this is `false`. */
|
|
1366
|
+
editable?: boolean;
|
|
1367
|
+
/** Cell alignment. Numeric kinds default to `right`. */
|
|
1368
|
+
align?: 'left' | 'right';
|
|
1369
|
+
/** Groups this column under a labelled sub-form in the add form. */
|
|
1370
|
+
group?: string;
|
|
1371
|
+
/** Only applicable when another column holds a given value. */
|
|
1372
|
+
dependsOn?: RecordGridDependency;
|
|
1373
|
+
/** Extra rule, run after the kind's own checks pass. Return the message to
|
|
1374
|
+
* reject with, or `null` to accept. */
|
|
1375
|
+
validate?: (value: RecordGridValue) => string | null;
|
|
1376
|
+
/** Column summary rendered in the footer row. */
|
|
1377
|
+
footerValue?: (rows: readonly RecordGridRow[]) => RecordGridValue;
|
|
1378
|
+
}
|
|
1379
|
+
/** Free text, optionally length- or pattern-constrained. */
|
|
1380
|
+
interface RecordGridTextColumn extends RecordGridColumnBase {
|
|
1381
|
+
kind: 'text';
|
|
1382
|
+
minLength?: number;
|
|
1383
|
+
maxLength?: number;
|
|
1384
|
+
pattern?: RegExp;
|
|
1385
|
+
/** Message when `pattern` rejects. Without it the pattern source is shown. */
|
|
1386
|
+
patternMessage?: string;
|
|
1387
|
+
/** Render a textarea instead of a single-line input. */
|
|
1388
|
+
multiline?: boolean;
|
|
1389
|
+
}
|
|
1390
|
+
/** A plain number. */
|
|
1391
|
+
interface RecordGridNumberColumn extends RecordGridColumnBase {
|
|
1392
|
+
kind: 'number';
|
|
1393
|
+
min?: number;
|
|
1394
|
+
max?: number;
|
|
1395
|
+
integer?: boolean;
|
|
1396
|
+
/** Passed through to the editor's `step`. */
|
|
1397
|
+
step?: number;
|
|
1398
|
+
}
|
|
1399
|
+
/** A money amount. The currency is a caller parameter — this module bakes no
|
|
1400
|
+
* domain value, so a product with two currencies declares two columns. */
|
|
1401
|
+
interface RecordGridCurrencyColumn extends RecordGridColumnBase {
|
|
1402
|
+
kind: 'currency';
|
|
1403
|
+
/** ISO 4217 code, e.g. `USD`. */
|
|
1404
|
+
currency: string;
|
|
1405
|
+
min?: number;
|
|
1406
|
+
max?: number;
|
|
1407
|
+
/** Fraction digits for display. Defaults to the currency's own. */
|
|
1408
|
+
fractionDigits?: number;
|
|
1409
|
+
}
|
|
1410
|
+
/** A calendar date held as `YYYY-MM-DD`; no time, no zone. */
|
|
1411
|
+
interface RecordGridDateColumn extends RecordGridColumnBase {
|
|
1412
|
+
kind: 'date';
|
|
1413
|
+
/** Earliest accepted date, `YYYY-MM-DD`. */
|
|
1414
|
+
min?: string;
|
|
1415
|
+
/** Latest accepted date, `YYYY-MM-DD`. */
|
|
1416
|
+
max?: string;
|
|
1417
|
+
}
|
|
1418
|
+
/** One of a closed set of values. */
|
|
1419
|
+
interface RecordGridSelectColumn extends RecordGridColumnBase {
|
|
1420
|
+
kind: 'select';
|
|
1421
|
+
options: readonly RecordGridSelectOption[];
|
|
1422
|
+
}
|
|
1423
|
+
/** A checkbox. */
|
|
1424
|
+
interface RecordGridBooleanColumn extends RecordGridColumnBase {
|
|
1425
|
+
kind: 'boolean';
|
|
1426
|
+
/** Label for `true`. Defaults to `Yes`. */
|
|
1427
|
+
trueLabel?: string;
|
|
1428
|
+
/** Label for `false`. Defaults to `No`. */
|
|
1429
|
+
falseLabel?: string;
|
|
1430
|
+
}
|
|
1431
|
+
/** Every column shape the grid renders. */
|
|
1432
|
+
type RecordGridColumn = RecordGridTextColumn | RecordGridNumberColumn | RecordGridCurrencyColumn | RecordGridDateColumn | RecordGridSelectColumn | RecordGridBooleanColumn;
|
|
1433
|
+
/** One row: an id, a flat value bag keyed by column id, and optional per-cell
|
|
1434
|
+
* provenance. A record-backed product maps its fold output straight onto
|
|
1435
|
+
* this — one entry per cell, its quote and link in `sources`. */
|
|
1436
|
+
interface RecordGridRow {
|
|
1437
|
+
id: string;
|
|
1438
|
+
values: Readonly<Record<string, RecordGridValue>>;
|
|
1439
|
+
/** Per-cell provenance, keyed by column id. */
|
|
1440
|
+
sources?: Readonly<Record<string, RecordGridCellSource>>;
|
|
1441
|
+
/** No cell in this row may be edited or deleted. */
|
|
1442
|
+
readOnly?: boolean;
|
|
1443
|
+
/** Accessible name for the row's own controls. Falls back to the first text
|
|
1444
|
+
* or select column's value, then the row id. */
|
|
1445
|
+
label?: string;
|
|
1446
|
+
}
|
|
1447
|
+
/** True when the column's dependency (if any) is satisfied by the row's other
|
|
1448
|
+
* values. An inapplicable cell is never required, never validated, and never
|
|
1449
|
+
* editable. */
|
|
1450
|
+
declare function isRecordGridCellApplicable(column: RecordGridColumn, values: Readonly<Record<string, RecordGridValue>>): boolean;
|
|
1451
|
+
/** Value equality across the grid's value union, treating `undefined` as
|
|
1452
|
+
* `null` so an absent key and an explicit null never read as a change. */
|
|
1453
|
+
declare function sameRecordGridValue(a: RecordGridValue | undefined, b: RecordGridValue | undefined): boolean;
|
|
1454
|
+
/**
|
|
1455
|
+
* Turn what an editor control produced into a typed value. Syntax only —
|
|
1456
|
+
* range, length, and membership are {@link validateRecordGridCell}'s job.
|
|
1457
|
+
*/
|
|
1458
|
+
declare function parseRecordGridInput(column: RecordGridColumn, raw: string): RecordGridCellOutcome;
|
|
1459
|
+
/**
|
|
1460
|
+
* Check one already-typed value against its column. Returns the value the grid
|
|
1461
|
+
* should store (empty text normalizes to `null`) or the message a person can
|
|
1462
|
+
* act on.
|
|
1463
|
+
*/
|
|
1464
|
+
declare function validateRecordGridCell(column: RecordGridColumn, value: RecordGridValue): RecordGridCellOutcome;
|
|
1465
|
+
/** Parse editor text and validate it in one step — what a committing cell
|
|
1466
|
+
* editor calls. */
|
|
1467
|
+
declare function readRecordGridCell(column: RecordGridColumn, raw: string): RecordGridCellOutcome;
|
|
1468
|
+
/**
|
|
1469
|
+
* Validate a whole value bag against the columns. Inapplicable cells (an
|
|
1470
|
+
* unsatisfied `dependsOn`) are forced to `null` rather than carried, so a
|
|
1471
|
+
* sub-form the user turned off cannot smuggle stale values into a write.
|
|
1472
|
+
*/
|
|
1473
|
+
declare function validateRecordGridRow(columns: readonly RecordGridColumn[], values: Readonly<Record<string, RecordGridValue>>): RecordGridRowOutcome;
|
|
1474
|
+
/** Display text for a cell. `null` renders as the empty string; the component
|
|
1475
|
+
* decides what a missing value looks like. */
|
|
1476
|
+
declare function formatRecordGridValue(column: RecordGridColumn, value: RecordGridValue, locale?: string): string;
|
|
1477
|
+
/** The text an editor control starts with — the raw value, never the formatted
|
|
1478
|
+
* one, so committing an untouched cell is a no-op. */
|
|
1479
|
+
declare function recordGridEditorText(column: RecordGridColumn, value: RecordGridValue): string;
|
|
1480
|
+
/** Accessible name for a row's own controls. */
|
|
1481
|
+
declare function recordGridRowLabel(columns: readonly RecordGridColumn[], row: RecordGridRow): string;
|
|
1482
|
+
/** Sum a numeric column over the rows that hold a number. Rows with no value
|
|
1483
|
+
* are absent from the sum, not zero — a total over three of five filled cells
|
|
1484
|
+
* is the total of what is on file. */
|
|
1485
|
+
declare function sumRecordGridColumn(rows: readonly RecordGridRow[], columnId: string): number;
|
|
1486
|
+
/**
|
|
1487
|
+
* Edits the grid has applied locally but the caller's `rows` prop has not yet
|
|
1488
|
+
* caught up with. Every field is what rollback removes: drop the entry and the
|
|
1489
|
+
* caller's own data shows through again.
|
|
1490
|
+
*/
|
|
1491
|
+
interface RecordGridOverlay {
|
|
1492
|
+
/** rowId → columnId → optimistic value. */
|
|
1493
|
+
updates: Readonly<Record<string, Readonly<Record<string, RecordGridValue>>>>;
|
|
1494
|
+
/** Rows created locally, in insertion order. */
|
|
1495
|
+
created: readonly RecordGridRow[];
|
|
1496
|
+
/** Row ids removed locally. */
|
|
1497
|
+
removed: readonly string[];
|
|
1498
|
+
}
|
|
1499
|
+
/** An overlay holding nothing. */
|
|
1500
|
+
declare const EMPTY_RECORD_GRID_OVERLAY: RecordGridOverlay;
|
|
1501
|
+
/** The rows to render: caller rows minus local deletes, with local cell edits
|
|
1502
|
+
* applied, then locally-created rows. */
|
|
1503
|
+
declare function projectRecordGridRows(rows: readonly RecordGridRow[], overlay: RecordGridOverlay): RecordGridRow[];
|
|
1504
|
+
/** Record one optimistic cell edit. */
|
|
1505
|
+
declare function withRecordGridUpdate(overlay: RecordGridOverlay, rowId: string, columnId: string, value: RecordGridValue): RecordGridOverlay;
|
|
1506
|
+
/** Take back one optimistic cell edit — the rollback path. */
|
|
1507
|
+
declare function withoutRecordGridUpdate(overlay: RecordGridOverlay, rowId: string, columnId: string): RecordGridOverlay;
|
|
1508
|
+
/** Adopt a row the writer returned as canonical: for a locally-created row it
|
|
1509
|
+
* replaces the draft; for an existing row it replaces the optimistic cells.
|
|
1510
|
+
* Either way the draft's pending cell edits go with it — the canonical row IS
|
|
1511
|
+
* the answer, and leaving an edit layered over it is how a grid keeps showing
|
|
1512
|
+
* a value the server normalized away. */
|
|
1513
|
+
declare function withRecordGridServerRow(overlay: RecordGridOverlay, draftId: string, row: RecordGridRow): RecordGridOverlay;
|
|
1514
|
+
/** Record an optimistic create. */
|
|
1515
|
+
declare function withRecordGridCreated(overlay: RecordGridOverlay, row: RecordGridRow): RecordGridOverlay;
|
|
1516
|
+
/** Take back an optimistic create — the rollback path. Cell edits made against
|
|
1517
|
+
* the draft go with it; the row they applied to no longer exists anywhere. */
|
|
1518
|
+
declare function withoutRecordGridCreated(overlay: RecordGridOverlay, rowId: string): RecordGridOverlay;
|
|
1519
|
+
/** Record an optimistic delete. */
|
|
1520
|
+
declare function withRecordGridRemoved(overlay: RecordGridOverlay, rowId: string): RecordGridOverlay;
|
|
1521
|
+
/** Take back an optimistic delete — the rollback path. */
|
|
1522
|
+
declare function withoutRecordGridRemoved(overlay: RecordGridOverlay, rowId: string): RecordGridOverlay;
|
|
1523
|
+
/**
|
|
1524
|
+
* Drop the overlay entries the caller's own rows have caught up with: a cell
|
|
1525
|
+
* whose value now matches, a created row now present, a removed row now gone.
|
|
1526
|
+
* Without this an overlay would mask every later refresh of the same cell.
|
|
1527
|
+
*
|
|
1528
|
+
* Returns the SAME overlay object when nothing settled, so a caller can prune
|
|
1529
|
+
* on every render without looping.
|
|
1530
|
+
*/
|
|
1531
|
+
declare function pruneRecordGridOverlay(rows: readonly RecordGridRow[], overlay: RecordGridOverlay): RecordGridOverlay;
|
|
1532
|
+
|
|
1533
|
+
/** Which of the three data states the caller is in. Distinct renders: an
|
|
1534
|
+
* errored fetch must never be indistinguishable from an empty result. */
|
|
1535
|
+
type RecordGridState = 'loading' | 'error' | 'ready';
|
|
1536
|
+
/** The empty state's content. `action` is the caller's next step — a link into
|
|
1537
|
+
* chat, an import button — because only the product knows what unblocks the
|
|
1538
|
+
* reader. */
|
|
1539
|
+
interface RecordGridEmptyState {
|
|
1540
|
+
title: string;
|
|
1541
|
+
description?: string;
|
|
1542
|
+
action?: ReactNode;
|
|
1543
|
+
}
|
|
1544
|
+
/** One committed cell edit, handed to `onUpdate`. */
|
|
1545
|
+
interface RecordGridCellChange {
|
|
1546
|
+
/** The row as it was BEFORE the edit — what rollback restores. */
|
|
1547
|
+
row: RecordGridRow;
|
|
1548
|
+
columnId: string;
|
|
1549
|
+
value: RecordGridValue;
|
|
1550
|
+
/** The full value bag after the edit: what a whole-row write would send. */
|
|
1551
|
+
values: Readonly<Record<string, RecordGridValue>>;
|
|
1552
|
+
}
|
|
1553
|
+
/** Outcome of an update or a delete. `value` optionally carries the server's
|
|
1554
|
+
* canonical row, which replaces the optimistic one. */
|
|
1555
|
+
type RecordGridWriteOutcome = {
|
|
1556
|
+
succeeded: true;
|
|
1557
|
+
value?: RecordGridRow;
|
|
1558
|
+
} | {
|
|
1559
|
+
succeeded: false;
|
|
1560
|
+
error: string;
|
|
1561
|
+
};
|
|
1562
|
+
/** Outcome of a create. The row is REQUIRED on success: a create that does not
|
|
1563
|
+
* name the row it wrote leaves the grid unable to address it. */
|
|
1564
|
+
type RecordGridCreateOutcome = {
|
|
1565
|
+
succeeded: true;
|
|
1566
|
+
value: RecordGridRow;
|
|
1567
|
+
} | {
|
|
1568
|
+
succeeded: false;
|
|
1569
|
+
error: string;
|
|
1570
|
+
};
|
|
1571
|
+
/** Properties for the editable, provenance-aware record grid. */
|
|
1572
|
+
interface RecordGridProps {
|
|
1573
|
+
/** Column definitions, in render order. */
|
|
1574
|
+
columns: readonly RecordGridColumn[];
|
|
1575
|
+
/** The caller's rows. Optimistic edits are layered over these and dropped as
|
|
1576
|
+
* this prop catches up. */
|
|
1577
|
+
rows: readonly RecordGridRow[];
|
|
1578
|
+
/** Accessible name for the grid. Required — an unnamed grid is unusable with
|
|
1579
|
+
* a screen reader. */
|
|
1580
|
+
caption: string;
|
|
1581
|
+
/** Data state. Defaults to `ready`. A non-empty `error` forces the error
|
|
1582
|
+
* state whatever this says, so a caller cannot render a failed fetch as an
|
|
1583
|
+
* empty list by forgetting one prop. */
|
|
1584
|
+
state?: RecordGridState;
|
|
1585
|
+
/** The failure message the error state renders. */
|
|
1586
|
+
error?: string | null;
|
|
1587
|
+
/** Re-run the caller's fetch. Absent → the error state offers no retry. */
|
|
1588
|
+
onRetry?: () => void;
|
|
1589
|
+
/** What the empty state says, and what it offers next. */
|
|
1590
|
+
empty: RecordGridEmptyState;
|
|
1591
|
+
/** Persist one created row. Absent → no add affordance. */
|
|
1592
|
+
onCreate?: (values: Readonly<Record<string, RecordGridValue>>) => Promise<RecordGridCreateOutcome>;
|
|
1593
|
+
/** Persist one cell edit. Absent → every cell renders read-only. */
|
|
1594
|
+
onUpdate?: (change: RecordGridCellChange) => Promise<RecordGridWriteOutcome>;
|
|
1595
|
+
/** Delete one row. Absent → no delete affordance. */
|
|
1596
|
+
onDelete?: (row: RecordGridRow) => Promise<RecordGridWriteOutcome>;
|
|
1597
|
+
/** Starting values for the add form. */
|
|
1598
|
+
newRowDefaults?: Readonly<Record<string, RecordGridValue>>;
|
|
1599
|
+
/** Label of the add control and of the add form. Defaults to `Add row`. */
|
|
1600
|
+
addLabel?: string;
|
|
1601
|
+
/** BCP-47 locale for number, currency, and date display. */
|
|
1602
|
+
locale?: string;
|
|
1603
|
+
/** Rendered above the grid — filters, counts, a product action row. */
|
|
1604
|
+
toolbar?: ReactNode;
|
|
1605
|
+
/** Skeleton rows in the loading state. Defaults to 3. */
|
|
1606
|
+
loadingRowCount?: number;
|
|
1607
|
+
className?: string;
|
|
1608
|
+
}
|
|
1609
|
+
/**
|
|
1610
|
+
* The shared editable record table. A row is a flat value bag keyed by column
|
|
1611
|
+
* id, so a record store's fold output maps straight on: one cell per entry,
|
|
1612
|
+
* its quote and link in `sources`.
|
|
1613
|
+
*/
|
|
1614
|
+
declare function RecordGrid({ columns, rows, caption, state, error, onRetry, empty, onCreate, onUpdate, onDelete, newRowDefaults, addLabel, locale, toolbar, loadingRowCount, className, }: RecordGridProps): react.JSX.Element;
|
|
1615
|
+
|
|
1280
1616
|
/**
|
|
1281
1617
|
* Keyboard + pointer model for a trigger-and-popover pair, dependency-free.
|
|
1282
1618
|
* Outside-mousedown and Escape both close; Escape also returns focus to the
|
|
@@ -1572,4 +1908,4 @@ declare function useThinkingSeconds(active: boolean): number;
|
|
|
1572
1908
|
*/
|
|
1573
1909
|
declare function ChatMessages({ messages, messageSize, models, renderMarkdown, renderExtras, durableCards, userLabel, agentLabel, loading, approval, onToolCallClick, toolRenderers, error, onRetry, renderEmpty, emptyState, header, resolveAttachmentUrl, workProductCards, }: ChatMessagesProps): react.JSX.Element;
|
|
1574
1910
|
|
|
1575
|
-
export { type ActivityTone, type AgentActivityPage, AgentActivityPanel, type AgentActivityPanelProps, type AgentActivityRecord, AgentSessionControls, type AgentSessionControlsProps, type AttachmentFileResult, CatalogModel, ChatAttachmentInput, ChatAttachmentKind, ChatAttachmentPart, ChatComposer, type ChatComposerProps, type ChatEmptyDoor, ChatEmptyState, type ChatEmptyStateProps, ChatInteraction, ChatInteractionField, type ChatInteractionRestoreMode, ChatInteractionStatus, ChatMentionPart, type ChatMessageMetrics, type ChatMessageSegment, ChatMessages, type ChatMessagesProps, ChatSelectField, type ChatStreamCallbacks, type ChatStreamToolCall, type ChatStreamToolResult, type ChatToolCallInfo, type ChatUiMessage, type ComposerFile, type ComposerFilePart, type ConsumeChatStreamResult, DEFAULT_EFFORT_LEVELS, type DurableChatCard, DurableChatCards, type DurableChatCardsProps, type DurableInteractionAnswerSubmitterOptions, DurablePlanCard, type DurablePlanCardProps, DurablePlanClientError, type DurablePlanCurrentInput, type DurablePlanDecision, type DurablePlanDecisionClient, type DurablePlanDecisionClientOptions, type DurablePlanDecisionInput, type DurablePlanDecisionResult, type DurablePlanFollowUpReceipt, type EffortLevel, EffortPicker, type EffortPickerProps, EvidenceLineageTable, type EvidenceLineageTableProps, ExceptionList, type ExceptionListProps, type FetchSessionPage, type FieldValues, FlowWaterfall, type FlowWaterfallProps, INTERACTION_SUBMIT_TIMEOUT_MESSAGE, INTERACTION_SUBMIT_TIMEOUT_MS, InteractionActionButton, type InteractionAnswerSubmission, type InteractionAnswerSubmitterOptions, InteractionAnswers, type InteractionAttemptStore, InteractionBadge, type InteractionBadgeVariant, InteractionCancelData, InteractionPlanCard, type InteractionPlanCardProps, InteractionQuestionCard, type InteractionQuestionCardProps, InteractionRequestWire, type InteractionSubmitResult, type LinkLikeComponent, type LinkLikeProps, type MentionTextSegment, MessageAttachments, type MessageAttachmentsProps, MissionActivityLane, type MissionActivityLaneProps, ModelPicker, type ModelPickerProps, type ProposalApprovalHandlers, ProvenanceStamp, type ProvenanceStampProps, ProviderLogo, type ProviderLogoProps, QualityCheckList, type QualityCheckListProps, QuestionOptionList, type QuestionOptionListProps, type RestoreChatInteractionsOptions, ReviewQueueItem, type ReviewQueuePage, ReviewQueuePanel, type ReviewQueuePanelProps, ReviewQueueState, RunDrillIn, type RunDrillInProps, SeatPaywall, type SeatPaywallProps, type SessionActionLabels, type SessionActions, type SessionActionsOptions, type SessionBulkAction, SessionHistoryPanel, type SessionHistoryPanelProps, type SessionHistoryState, type SessionPageQuery, type SmoothRevealOptions, type StreamChatOptions, type SubmitInteractionAnswer, type ToolDetailRenderers, type ToolRunRecord, type ToolRunStep, type UseChatInteractionsOptions, type UseChatInteractionsResult, type UseComposerAttachmentsOptions, type UseComposerAttachmentsResult, type UseDurablePlanFlowOptions, type UseDurablePlanFlowResult, type UseInfiniteScrollOptions, type UseSessionHistoryOptions, type WaterfallRow, WorkProductCard, type WorkProductCardProps, __resetAttachmentFileCacheForTests, activityTone, buildAnswerData, cancelChatInteraction, consumeChatStream, createDurableInteractionAnswerSubmitter, createDurablePlanDecisionClient, createInteractionAnswerSubmitter, createMemoryInteractionAttemptStore, createSessionInteractionAttemptStore, dispatchChatStreamLine, durableChatCardsFromParts, fieldAnswer, fieldValuesFromAnswers, formatActivityCost, formatActivityDuration, formatModelCost, formatSessionTimestamp, formatTokensPerSecond, hasSecretField, hydrateChatInteractions, interactionStatusLabels, interactionSubmissionSignature, interactionTerminalNotes, isLateAnswerableStatus, lateAnswerMessage, loadAttachmentFile, mergeActivityPages, mergeReviewQueuePages, nextRevealCount, pendingApprovalOf, resolveChatInteraction, responseErrorMessage, restoreChatInteractions, reviewQueueStateLabel, segmentMentionContent, settleInteractionSubmit, streamChatTurn, terminalizePendingChatInteractions, triggerAttachmentDownload, upsertChatInteraction, useChatInteractions, useComposerAttachments, useDurablePlanFlow, useInfiniteScroll, usePending, usePopover, useSessionActions, useSessionHistory, useSmoothText, useThinkingSeconds, waterfallLayout, workProductPartsFromMessageParts, workProductStatusLabel };
|
|
1911
|
+
export { type ActivityTone, type AgentActivityPage, AgentActivityPanel, type AgentActivityPanelProps, type AgentActivityRecord, AgentSessionControls, type AgentSessionControlsProps, type AttachmentFileResult, CatalogModel, ChatAttachmentInput, ChatAttachmentKind, ChatAttachmentPart, ChatComposer, type ChatComposerProps, type ChatEmptyDoor, ChatEmptyState, type ChatEmptyStateProps, ChatInteraction, ChatInteractionField, type ChatInteractionRestoreMode, ChatInteractionStatus, ChatMentionPart, type ChatMessageMetrics, type ChatMessageSegment, ChatMessages, type ChatMessagesProps, ChatSelectField, type ChatStreamCallbacks, type ChatStreamToolCall, type ChatStreamToolResult, type ChatToolCallInfo, type ChatUiMessage, type ComposerFile, type ComposerFilePart, type ConsumeChatStreamResult, DEFAULT_EFFORT_LEVELS, type DurableChatCard, DurableChatCards, type DurableChatCardsProps, type DurableInteractionAnswerSubmitterOptions, DurablePlanCard, type DurablePlanCardProps, DurablePlanClientError, type DurablePlanCurrentInput, type DurablePlanDecision, type DurablePlanDecisionClient, type DurablePlanDecisionClientOptions, type DurablePlanDecisionInput, type DurablePlanDecisionResult, type DurablePlanFollowUpReceipt, EMPTY_RECORD_GRID_OVERLAY, type EffortLevel, EffortPicker, type EffortPickerProps, EvidenceLineageTable, type EvidenceLineageTableProps, ExceptionList, type ExceptionListProps, type FetchSessionPage, type FieldValues, FlowWaterfall, type FlowWaterfallProps, INTERACTION_SUBMIT_TIMEOUT_MESSAGE, INTERACTION_SUBMIT_TIMEOUT_MS, InteractionActionButton, type InteractionAnswerSubmission, type InteractionAnswerSubmitterOptions, InteractionAnswers, type InteractionAttemptStore, InteractionBadge, type InteractionBadgeVariant, InteractionCancelData, InteractionPlanCard, type InteractionPlanCardProps, InteractionQuestionCard, type InteractionQuestionCardProps, InteractionRequestWire, type InteractionSubmitResult, type LinkLikeComponent, type LinkLikeProps, type MentionTextSegment, MessageAttachments, type MessageAttachmentsProps, MissionActivityLane, type MissionActivityLaneProps, ModelPicker, type ModelPickerProps, type ProposalApprovalHandlers, ProvenanceStamp, type ProvenanceStampProps, ProviderLogo, type ProviderLogoProps, QualityCheckList, type QualityCheckListProps, QuestionOptionList, type QuestionOptionListProps, RecordGrid, type RecordGridBooleanColumn, type RecordGridCellChange, type RecordGridCellOutcome, type RecordGridCellSource, type RecordGridColumn, type RecordGridColumnBase, type RecordGridCreateOutcome, type RecordGridCurrencyColumn, type RecordGridDateColumn, type RecordGridDependency, type RecordGridEmptyState, type RecordGridNumberColumn, type RecordGridOverlay, type RecordGridProps, type RecordGridRow, type RecordGridRowOutcome, type RecordGridSelectColumn, type RecordGridSelectOption, type RecordGridSourceBasis, type RecordGridState, type RecordGridTextColumn, type RecordGridValue, type RecordGridWriteOutcome, type RestoreChatInteractionsOptions, ReviewQueueItem, type ReviewQueuePage, ReviewQueuePanel, type ReviewQueuePanelProps, ReviewQueueState, RunDrillIn, type RunDrillInProps, SeatPaywall, type SeatPaywallProps, type SessionActionLabels, type SessionActions, type SessionActionsOptions, type SessionBulkAction, SessionHistoryPanel, type SessionHistoryPanelProps, type SessionHistoryState, type SessionPageQuery, type SmoothRevealOptions, type StreamChatOptions, type SubmitInteractionAnswer, type ToolDetailRenderers, type ToolRunRecord, type ToolRunStep, type UseChatInteractionsOptions, type UseChatInteractionsResult, type UseComposerAttachmentsOptions, type UseComposerAttachmentsResult, type UseDurablePlanFlowOptions, type UseDurablePlanFlowResult, type UseInfiniteScrollOptions, type UseSessionHistoryOptions, type WaterfallRow, WorkProductCard, type WorkProductCardProps, __resetAttachmentFileCacheForTests, activityTone, buildAnswerData, cancelChatInteraction, consumeChatStream, createDurableInteractionAnswerSubmitter, createDurablePlanDecisionClient, createInteractionAnswerSubmitter, createMemoryInteractionAttemptStore, createSessionInteractionAttemptStore, dispatchChatStreamLine, durableChatCardsFromParts, fieldAnswer, fieldValuesFromAnswers, formatActivityCost, formatActivityDuration, formatModelCost, formatRecordGridValue, formatSessionTimestamp, formatTokensPerSecond, hasSecretField, hydrateChatInteractions, interactionStatusLabels, interactionSubmissionSignature, interactionTerminalNotes, isLateAnswerableStatus, isRecordGridCellApplicable, lateAnswerMessage, loadAttachmentFile, mergeActivityPages, mergeReviewQueuePages, nextRevealCount, parseRecordGridInput, pendingApprovalOf, projectRecordGridRows, pruneRecordGridOverlay, readRecordGridCell, recordGridEditorText, recordGridFail, recordGridOk, recordGridRowLabel, resolveChatInteraction, responseErrorMessage, restoreChatInteractions, reviewQueueStateLabel, sameRecordGridValue, segmentMentionContent, settleInteractionSubmit, streamChatTurn, sumRecordGridColumn, terminalizePendingChatInteractions, triggerAttachmentDownload, upsertChatInteraction, useChatInteractions, useComposerAttachments, useDurablePlanFlow, useInfiniteScroll, usePending, usePopover, useSessionActions, useSessionHistory, useSmoothText, useThinkingSeconds, validateRecordGridCell, validateRecordGridRow, waterfallLayout, withRecordGridCreated, withRecordGridRemoved, withRecordGridServerRow, withRecordGridUpdate, withoutRecordGridCreated, withoutRecordGridRemoved, withoutRecordGridUpdate, workProductPartsFromMessageParts, workProductStatusLabel };
|
package/dist/web-react/index.js
CHANGED
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
DurableChatCards,
|
|
11
11
|
DurablePlanCard,
|
|
12
12
|
DurablePlanClientError,
|
|
13
|
+
EMPTY_RECORD_GRID_OVERLAY,
|
|
13
14
|
EffortPicker,
|
|
14
15
|
FlowWaterfall,
|
|
15
16
|
INDEX_REFRESH_AFTER_MS,
|
|
@@ -24,6 +25,7 @@ import {
|
|
|
24
25
|
ModelPicker,
|
|
25
26
|
ProviderLogo,
|
|
26
27
|
QuestionOptionList,
|
|
28
|
+
RecordGrid,
|
|
27
29
|
RunDrillIn,
|
|
28
30
|
SeatPaywall,
|
|
29
31
|
SessionHistoryPanel,
|
|
@@ -44,6 +46,7 @@ import {
|
|
|
44
46
|
formatActivityCost,
|
|
45
47
|
formatActivityDuration,
|
|
46
48
|
formatModelCost,
|
|
49
|
+
formatRecordGridValue,
|
|
47
50
|
formatSessionTimestamp,
|
|
48
51
|
formatTokensPerSecond,
|
|
49
52
|
hasSecretField,
|
|
@@ -52,18 +55,29 @@ import {
|
|
|
52
55
|
interactionSubmissionSignature,
|
|
53
56
|
interactionTerminalNotes,
|
|
54
57
|
isLateAnswerableStatus,
|
|
58
|
+
isRecordGridCellApplicable,
|
|
55
59
|
lateAnswerMessage,
|
|
56
60
|
loadAttachmentFile,
|
|
57
61
|
mergeActivityPages,
|
|
58
62
|
nextRevealCount,
|
|
63
|
+
parseRecordGridInput,
|
|
59
64
|
pendingApprovalOf,
|
|
65
|
+
projectRecordGridRows,
|
|
66
|
+
pruneRecordGridOverlay,
|
|
60
67
|
rankFileMentions,
|
|
68
|
+
readRecordGridCell,
|
|
69
|
+
recordGridEditorText,
|
|
70
|
+
recordGridFail,
|
|
71
|
+
recordGridOk,
|
|
72
|
+
recordGridRowLabel,
|
|
61
73
|
resolveChatInteraction,
|
|
62
74
|
responseErrorMessage,
|
|
63
75
|
restoreChatInteractions,
|
|
76
|
+
sameRecordGridValue,
|
|
64
77
|
segmentMentionContent,
|
|
65
78
|
settleInteractionSubmit,
|
|
66
79
|
streamChatTurn,
|
|
80
|
+
sumRecordGridColumn,
|
|
67
81
|
terminalizePendingChatInteractions,
|
|
68
82
|
triggerAttachmentDownload,
|
|
69
83
|
upsertChatInteraction,
|
|
@@ -77,17 +91,26 @@ import {
|
|
|
77
91
|
useSessionHistory,
|
|
78
92
|
useSmoothText,
|
|
79
93
|
useThinkingSeconds,
|
|
80
|
-
|
|
81
|
-
|
|
94
|
+
validateRecordGridCell,
|
|
95
|
+
validateRecordGridRow,
|
|
96
|
+
waterfallLayout,
|
|
97
|
+
withRecordGridCreated,
|
|
98
|
+
withRecordGridRemoved,
|
|
99
|
+
withRecordGridServerRow,
|
|
100
|
+
withRecordGridUpdate,
|
|
101
|
+
withoutRecordGridCreated,
|
|
102
|
+
withoutRecordGridRemoved,
|
|
103
|
+
withoutRecordGridUpdate
|
|
104
|
+
} from "../chunk-NZVBJM73.js";
|
|
105
|
+
import "../chunk-FBVLEGEG.js";
|
|
82
106
|
import {
|
|
83
107
|
useComposerAttachments
|
|
84
|
-
} from "../chunk-
|
|
108
|
+
} from "../chunk-E4DHYENH.js";
|
|
85
109
|
import {
|
|
86
110
|
tabTerminalConnectionId,
|
|
87
111
|
useSandboxTerminalConnection
|
|
88
112
|
} from "../chunk-BATKJP3P.js";
|
|
89
|
-
import "../chunk-
|
|
90
|
-
import "../chunk-GINKOZFD.js";
|
|
113
|
+
import "../chunk-PC2WYTK7.js";
|
|
91
114
|
import {
|
|
92
115
|
EvidenceLineageTable,
|
|
93
116
|
ExceptionList,
|
|
@@ -106,7 +129,7 @@ import {
|
|
|
106
129
|
import "../chunk-QY4BRKRJ.js";
|
|
107
130
|
import {
|
|
108
131
|
ATTACHMENT_ACCEPT
|
|
109
|
-
} from "../chunk-
|
|
132
|
+
} from "../chunk-CCVG2TL6.js";
|
|
110
133
|
import {
|
|
111
134
|
attachmentInputToPart,
|
|
112
135
|
attachmentKindForMime,
|
|
@@ -175,6 +198,7 @@ export {
|
|
|
175
198
|
DurableChatCards,
|
|
176
199
|
DurablePlanCard,
|
|
177
200
|
DurablePlanClientError,
|
|
201
|
+
EMPTY_RECORD_GRID_OVERLAY,
|
|
178
202
|
EffortPicker,
|
|
179
203
|
EvidenceLineageTable,
|
|
180
204
|
ExceptionList,
|
|
@@ -196,6 +220,7 @@ export {
|
|
|
196
220
|
ProviderLogo,
|
|
197
221
|
QualityCheckList,
|
|
198
222
|
QuestionOptionList,
|
|
223
|
+
RecordGrid,
|
|
199
224
|
ReviewQueuePanel,
|
|
200
225
|
RunDrillIn,
|
|
201
226
|
SeatPaywall,
|
|
@@ -232,6 +257,7 @@ export {
|
|
|
232
257
|
formatActivityCost,
|
|
233
258
|
formatActivityDuration,
|
|
234
259
|
formatModelCost,
|
|
260
|
+
formatRecordGridValue,
|
|
235
261
|
formatSessionTimestamp,
|
|
236
262
|
formatTokensPerSecond,
|
|
237
263
|
hasSecretField,
|
|
@@ -244,6 +270,7 @@ export {
|
|
|
244
270
|
interactionToPersistedPart,
|
|
245
271
|
isChatAttachmentPart,
|
|
246
272
|
isLateAnswerableStatus,
|
|
273
|
+
isRecordGridCellApplicable,
|
|
247
274
|
isRenderableInteractionKind,
|
|
248
275
|
isSafeInteractionFieldKey,
|
|
249
276
|
isTerminalInteractionStatus,
|
|
@@ -261,19 +288,29 @@ export {
|
|
|
261
288
|
parseInteractionAnswers,
|
|
262
289
|
parseInteractionCancel,
|
|
263
290
|
parseInteractionRequest,
|
|
291
|
+
parseRecordGridInput,
|
|
264
292
|
parseReviewQueueItem,
|
|
265
293
|
pendingApprovalOf,
|
|
266
294
|
persistedPartToInteraction,
|
|
295
|
+
projectRecordGridRows,
|
|
296
|
+
pruneRecordGridOverlay,
|
|
267
297
|
questionInteractionContentSignature,
|
|
268
298
|
rankFileMentions,
|
|
299
|
+
readRecordGridCell,
|
|
300
|
+
recordGridEditorText,
|
|
301
|
+
recordGridFail,
|
|
302
|
+
recordGridOk,
|
|
303
|
+
recordGridRowLabel,
|
|
269
304
|
resolveChatInteraction,
|
|
270
305
|
responseErrorMessage,
|
|
271
306
|
restoreChatInteractions,
|
|
272
307
|
reviewQueueStateLabel,
|
|
308
|
+
sameRecordGridValue,
|
|
273
309
|
segmentMentionContent,
|
|
274
310
|
settleInteractionSubmit,
|
|
275
311
|
stampInteractionAnswers,
|
|
276
312
|
streamChatTurn,
|
|
313
|
+
sumRecordGridColumn,
|
|
277
314
|
tabTerminalConnectionId,
|
|
278
315
|
terminalizePendingChatInteractions,
|
|
279
316
|
triggerAttachmentDownload,
|
|
@@ -290,7 +327,16 @@ export {
|
|
|
290
327
|
useSessionHistory,
|
|
291
328
|
useSmoothText,
|
|
292
329
|
useThinkingSeconds,
|
|
330
|
+
validateRecordGridCell,
|
|
331
|
+
validateRecordGridRow,
|
|
293
332
|
waterfallLayout,
|
|
333
|
+
withRecordGridCreated,
|
|
334
|
+
withRecordGridRemoved,
|
|
335
|
+
withRecordGridServerRow,
|
|
336
|
+
withRecordGridUpdate,
|
|
337
|
+
withoutRecordGridCreated,
|
|
338
|
+
withoutRecordGridRemoved,
|
|
339
|
+
withoutRecordGridUpdate,
|
|
294
340
|
workProductPartsFromMessageParts,
|
|
295
341
|
workProductStatusLabel
|
|
296
342
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { b as WorkProductProvenance, d as WorkProductStorePort, e as WorkProductAuditEvent, c as WorkProductRecord, f as WorkProductArtifact, Q as QualityCheck, E as EvidenceEntry, g as ExceptionEntry, h as WorkProductStatus, W as WorkProductPersistedPart } from '../types-CCeYywdS.js';
|
|
2
2
|
export { A as AgentCheckInput, i as EvidenceLocator, j as EvidenceSpan, k as ExceptionSeverity, P as ProfileBacktestSummary, l as QuoteBasis, m as WorkProductParseResult, n as WorkProductPatch, a as WorkProductRef, o as WorkProductUpdateGuard, p as WorkProductVersionEntry, q as isWorkProductStatus, r as parseAgentCheckInput, s as parseArtifactInput, t as parseEvidenceInput, u as parseExceptionInput, v as persistedPartToWorkProduct, w as unresolvedBlockingExceptions, x as workProductToPersistedPart } from '../types-CCeYywdS.js';
|
|
3
|
-
import { A as AppToolContext, b as AppToolDefinition } from '../types-
|
|
3
|
+
import { A as AppToolContext, b as AppToolDefinition } from '../types-B25Mib1r.js';
|
|
4
4
|
import { JudgeVerdict } from '@tangle-network/agent-eval';
|
|
5
5
|
import { T as TrustItem } from '../trust-gate-Dcm5xSva.js';
|
|
6
6
|
export { R as ReviewQueueInputs, a as ReviewQueueItem, b as ReviewQueuePendingAsk, c as ReviewQueueState, d as ReviewQueueThread, p as parseReviewQueueItem, e as projectReviewQueue } from '../queue-VTBA5ONX.js';
|