@yadsh/dsh-qa-surface 0.2.0 → 0.4.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/README.md +236 -20
- package/compatibility.json +11 -3
- package/lib/account-remotes.js +100 -0
- package/lib/account-remotes.js.map +1 -0
- package/lib/accounts/credentials.js +27 -0
- package/lib/accounts/credentials.js.map +1 -0
- package/lib/accounts/errors.js +9 -0
- package/lib/accounts/errors.js.map +1 -0
- package/lib/accounts/file.js +101 -0
- package/lib/accounts/file.js.map +1 -0
- package/lib/accounts/index.js +2 -0
- package/lib/accounts/index.js.map +1 -0
- package/lib/accounts/store.js +461 -0
- package/lib/accounts/store.js.map +1 -0
- package/lib/accounts/token.js +61 -0
- package/lib/accounts/token.js.map +1 -0
- package/lib/attachment-rules.js +111 -0
- package/lib/attachment-rules.js.map +1 -0
- package/lib/attestation.js.map +1 -1
- package/lib/cli.js +256 -0
- package/lib/cli.js.map +1 -0
- package/lib/client/QaAccountsController.js +359 -0
- package/lib/client/QaAccountsController.js.map +1 -0
- package/lib/client/QaSessionController.js +238 -180
- package/lib/client/QaSessionController.js.map +1 -1
- package/lib/client/QaSurface.js +281 -105
- package/lib/client/QaSurface.js.map +1 -1
- package/lib/client/QaTranscriptAdapter.js +95 -244
- package/lib/client/QaTranscriptAdapter.js.map +1 -1
- package/lib/client/attachments.js +150 -0
- package/lib/client/attachments.js.map +1 -0
- package/lib/client/attestation.js +7 -1
- package/lib/client/attestation.js.map +1 -1
- package/lib/client/base64.js +16 -0
- package/lib/client/base64.js.map +1 -0
- package/lib/client/chat-files.js +48 -0
- package/lib/client/chat-files.js.map +1 -0
- package/lib/client/components/Markdown.js +54 -13
- package/lib/client/components/Markdown.js.map +1 -1
- package/lib/client/components/QaAuthGate.js +40 -0
- package/lib/client/components/QaAuthGate.js.map +1 -0
- package/lib/client/components/QaChangelog.js +131 -0
- package/lib/client/components/QaChangelog.js.map +1 -0
- package/lib/client/components/QaComposer.js +56 -74
- package/lib/client/components/QaComposer.js.map +1 -1
- package/lib/client/components/QaFileAttachment.js +19 -0
- package/lib/client/components/QaFileAttachment.js.map +1 -0
- package/lib/client/components/QaFilesPanel.js +45 -0
- package/lib/client/components/QaFilesPanel.js.map +1 -0
- package/lib/client/components/QaHeader.js +34 -0
- package/lib/client/components/QaHeader.js.map +1 -0
- package/lib/client/components/QaMessage.js +61 -18
- package/lib/client/components/QaMessage.js.map +1 -1
- package/lib/client/components/QaModal.js +31 -0
- package/lib/client/components/QaModal.js.map +1 -0
- package/lib/client/components/QaProfile.js +64 -0
- package/lib/client/components/QaProfile.js.map +1 -0
- package/lib/client/components/QaRightRail.js +15 -0
- package/lib/client/components/QaRightRail.js.map +1 -0
- package/lib/client/components/QaSidebar.js +68 -20
- package/lib/client/components/QaSidebar.js.map +1 -1
- package/lib/client/components/QaSourcesPanel.js +127 -0
- package/lib/client/components/QaSourcesPanel.js.map +1 -0
- package/lib/client/components/QaTurnRail.js +296 -0
- package/lib/client/components/QaTurnRail.js.map +1 -0
- package/lib/client/components/QaWelcomeNotice.js +125 -0
- package/lib/client/components/QaWelcomeNotice.js.map +1 -0
- package/lib/client/components/QaWidthHandle.js +147 -0
- package/lib/client/components/QaWidthHandle.js.map +1 -0
- package/lib/client/components/QaWorkGroup.js +19 -20
- package/lib/client/components/QaWorkGroup.js.map +1 -1
- package/lib/client/components/source-refs.js +78 -0
- package/lib/client/components/source-refs.js.map +1 -0
- package/lib/client/components/surface-utils.js +28 -0
- package/lib/client/components/surface-utils.js.map +1 -0
- package/lib/client/components/thinking-phrases.js +24 -0
- package/lib/client/components/thinking-phrases.js.map +1 -0
- package/lib/client/create-session.js +26 -0
- package/lib/client/create-session.js.map +1 -0
- package/lib/client/failure-copy.js +63 -0
- package/lib/client/failure-copy.js.map +1 -0
- package/lib/client/index.js +135 -16
- package/lib/client/index.js.map +1 -1
- package/lib/client/project-session-state.js +78 -0
- package/lib/client/project-session-state.js.map +1 -0
- package/lib/client/prompt-content.js +54 -0
- package/lib/client/prompt-content.js.map +1 -0
- package/lib/client/session-admission.js +38 -0
- package/lib/client/session-admission.js.map +1 -0
- package/lib/client/session-assets.js +52 -0
- package/lib/client/session-assets.js.map +1 -0
- package/lib/client/session-sources.js +61 -0
- package/lib/client/session-sources.js.map +1 -0
- package/lib/client/settings/card.js +143 -0
- package/lib/client/settings/card.js.map +1 -0
- package/lib/client/settings/fields.js +145 -0
- package/lib/client/settings/fields.js.map +1 -0
- package/lib/client/settings/format.js +255 -0
- package/lib/client/settings/format.js.map +1 -0
- package/lib/client/settings/sections/access.js +25 -0
- package/lib/client/settings/sections/access.js.map +1 -0
- package/lib/client/settings/sections/accounts.js +47 -0
- package/lib/client/settings/sections/accounts.js.map +1 -0
- package/lib/client/settings/sections/attachments.js +46 -0
- package/lib/client/settings/sections/attachments.js.map +1 -0
- package/lib/client/settings/sections/branding.js +28 -0
- package/lib/client/settings/sections/branding.js.map +1 -0
- package/lib/client/settings/sections/common.js +20 -0
- package/lib/client/settings/sections/common.js.map +1 -0
- package/lib/client/settings/sections/embedding.js +19 -0
- package/lib/client/settings/sections/embedding.js.map +1 -0
- package/lib/client/settings/sections/interface.js +60 -0
- package/lib/client/settings/sections/interface.js.map +1 -0
- package/lib/client/settings/sections/lockdown.js +82 -0
- package/lib/client/settings/sections/lockdown.js.map +1 -0
- package/lib/client/settings/sections/session.js +53 -0
- package/lib/client/settings/sections/session.js.map +1 -0
- package/lib/client/settings/sections/sources.js +72 -0
- package/lib/client/settings/sections/sources.js.map +1 -0
- package/lib/client/settings/sections/status.js +37 -0
- package/lib/client/settings/sections/status.js.map +1 -0
- package/lib/client/settings/sections.js +23 -0
- package/lib/client/settings/sections.js.map +1 -0
- package/lib/client/settings/styles.js +57 -0
- package/lib/client/settings/styles.js.map +1 -0
- package/lib/client/settlement.js +24 -0
- package/lib/client/settlement.js.map +1 -0
- package/lib/client/stream-publisher.js +47 -0
- package/lib/client/stream-publisher.js.map +1 -0
- package/lib/client/styles.js +225 -17
- package/lib/client/styles.js.map +1 -1
- package/lib/client/tool-presentation.js +102 -0
- package/lib/client/tool-presentation.js.map +1 -0
- package/lib/client/turn-sources.js +98 -0
- package/lib/client/turn-sources.js.map +1 -0
- package/lib/client/types.js +2 -0
- package/lib/client/types.js.map +1 -1
- package/lib/client/use-right-rail.js +96 -0
- package/lib/client/use-right-rail.js.map +1 -0
- package/lib/client/use-session-ui-state.js +75 -0
- package/lib/client/use-session-ui-state.js.map +1 -0
- package/lib/client/use-transcript-view.js +44 -0
- package/lib/client/use-transcript-view.js.map +1 -0
- package/lib/client.js +9052 -1345
- package/lib/client.js.map +1 -1
- package/lib/config-resolvers/accounts.js +60 -0
- package/lib/config-resolvers/accounts.js.map +1 -0
- package/lib/config-resolvers/attachments.js +28 -0
- package/lib/config-resolvers/attachments.js.map +1 -0
- package/lib/config-resolvers/basics.js +59 -0
- package/lib/config-resolvers/basics.js.map +1 -0
- package/lib/config-resolvers/defaults.js +132 -0
- package/lib/config-resolvers/defaults.js.map +1 -0
- package/lib/config-resolvers/lockdown.js +79 -0
- package/lib/config-resolvers/lockdown.js.map +1 -0
- package/lib/config-resolvers/session.js +42 -0
- package/lib/config-resolvers/session.js.map +1 -0
- package/lib/config-resolvers/shared.js +42 -0
- package/lib/config-resolvers/shared.js.map +1 -0
- package/lib/config-resolvers/sources.js +81 -0
- package/lib/config-resolvers/sources.js.map +1 -0
- package/lib/config-resolvers/ui.js +20 -0
- package/lib/config-resolvers/ui.js.map +1 -0
- package/lib/config.js +279 -102
- package/lib/config.js.map +1 -1
- package/lib/entry-redirect.js +45 -0
- package/lib/entry-redirect.js.map +1 -0
- package/lib/host-route.js +25 -1
- package/lib/host-route.js.map +1 -1
- package/lib/index.js +258 -23
- package/lib/index.js.map +1 -1
- package/lib/launch-token.js +42 -0
- package/lib/launch-token.js.map +1 -0
- package/lib/profile.js +214 -0
- package/lib/profile.js.map +1 -0
- package/lib/prompt-notes.js +231 -0
- package/lib/prompt-notes.js.map +1 -0
- package/lib/provenance/collector.js +40 -0
- package/lib/provenance/collector.js.map +1 -0
- package/lib/provenance/connectors.js +147 -0
- package/lib/provenance/connectors.js.map +1 -0
- package/lib/provenance/dedupe.js +89 -0
- package/lib/provenance/dedupe.js.map +1 -0
- package/lib/provenance/extractors.js +340 -0
- package/lib/provenance/extractors.js.map +1 -0
- package/lib/provenance/file-preview.js +39 -0
- package/lib/provenance/file-preview.js.map +1 -0
- package/lib/provenance/host-store.js +387 -0
- package/lib/provenance/host-store.js.map +1 -0
- package/lib/provenance/index.js +9 -0
- package/lib/provenance/index.js.map +1 -0
- package/lib/provenance/normalize.js +128 -0
- package/lib/provenance/normalize.js.map +1 -0
- package/lib/provenance/reported.js +53 -0
- package/lib/provenance/reported.js.map +1 -0
- package/lib/provenance/types.js +2 -0
- package/lib/provenance/types.js.map +1 -0
- package/lib/resolve-config.js +35 -249
- package/lib/resolve-config.js.map +1 -1
- package/lib/secure-session.js +122 -14
- package/lib/secure-session.js.map +1 -1
- package/lib/shared/session-key.js +18 -0
- package/lib/shared/session-key.js.map +1 -0
- package/lib/shared/settings.js +10 -0
- package/lib/shared/settings.js.map +1 -0
- package/lib/thinking-phrases.js +68 -0
- package/lib/thinking-phrases.js.map +1 -0
- package/lib/typert.host.js +749 -11
- package/lib/typert.remote-client.d.ts +23 -3
- package/lib/typert.remote-client.js +593 -6
- package/lib/types/account-remotes.d.ts +42 -0
- package/lib/types/accounts/credentials.d.ts +14 -0
- package/lib/types/accounts/errors.d.ts +11 -0
- package/lib/types/accounts/file.d.ts +82 -0
- package/lib/types/accounts/index.d.ts +2 -0
- package/lib/types/accounts/store.d.ts +144 -0
- package/lib/types/accounts/token.d.ts +31 -0
- package/lib/types/attachment-rules.d.ts +44 -0
- package/lib/types/attestation.d.ts +1 -1
- package/lib/types/cli.d.ts +9 -0
- package/lib/types/client/QaAccountsController.d.ts +102 -0
- package/lib/types/client/QaConfigController.d.ts +1 -1
- package/lib/types/client/QaSessionController.d.ts +61 -22
- package/lib/types/client/QaSurface.d.ts +14 -3
- package/lib/types/client/QaTranscriptAdapter.d.ts +5 -10
- package/lib/types/client/attachments.d.ts +54 -0
- package/lib/types/client/base64.d.ts +10 -0
- package/lib/types/client/chat-files.d.ts +30 -0
- package/lib/types/client/components/Markdown.d.ts +11 -1
- package/lib/types/client/components/QaAgentsDrawer.d.ts +1 -1
- package/lib/types/client/components/QaAuthGate.d.ts +15 -0
- package/lib/types/client/components/QaChangelog.d.ts +21 -0
- package/lib/types/client/components/QaComposer.d.ts +8 -4
- package/lib/types/client/components/QaFileAttachment.d.ts +14 -0
- package/lib/types/client/components/QaFilesPanel.d.ts +15 -0
- package/lib/types/client/components/QaHeader.d.ts +41 -0
- package/lib/types/client/components/QaMessage.d.ts +12 -3
- package/lib/types/client/components/QaModal.d.ts +26 -0
- package/lib/types/client/components/QaProfile.d.ts +25 -0
- package/lib/types/client/components/QaRightRail.d.ts +23 -0
- package/lib/types/client/components/QaSidebar.d.ts +44 -2
- package/lib/types/client/components/QaSourcesPanel.d.ts +23 -0
- package/lib/types/client/components/QaTurnRail.d.ts +65 -0
- package/lib/types/client/components/QaWelcomeNotice.d.ts +27 -0
- package/lib/types/client/components/QaWidthHandle.d.ts +43 -0
- package/lib/types/client/components/QaWorkGroup.d.ts +5 -3
- package/lib/types/client/components/source-refs.d.ts +16 -0
- package/lib/types/client/components/surface-utils.d.ts +11 -0
- package/lib/types/client/components/thinking-phrases.d.ts +9 -0
- package/lib/types/client/create-session.d.ts +13 -0
- package/lib/types/client/failure-copy.d.ts +19 -0
- package/lib/types/client/index.d.ts +1 -0
- package/lib/types/client/project-session-state.d.ts +30 -0
- package/lib/types/client/prompt-content.d.ts +30 -0
- package/lib/types/client/session-admission.d.ts +23 -0
- package/lib/types/client/session-assets.d.ts +20 -0
- package/lib/types/client/session-sources.d.ts +28 -0
- package/lib/types/client/settings/card.d.ts +23 -0
- package/lib/types/client/settings/fields.d.ts +139 -0
- package/lib/types/client/settings/format.d.ts +108 -0
- package/lib/types/client/settings/sections/access.d.ts +9 -0
- package/lib/types/client/settings/sections/accounts.d.ts +9 -0
- package/lib/types/client/settings/sections/attachments.d.ts +15 -0
- package/lib/types/client/settings/sections/branding.d.ts +8 -0
- package/lib/types/client/settings/sections/common.d.ts +28 -0
- package/lib/types/client/settings/sections/embedding.d.ts +8 -0
- package/lib/types/client/settings/sections/interface.d.ts +9 -0
- package/lib/types/client/settings/sections/lockdown.d.ts +9 -0
- package/lib/types/client/settings/sections/session.d.ts +9 -0
- package/lib/types/client/settings/sections/sources.d.ts +9 -0
- package/lib/types/client/settings/sections/status.d.ts +22 -0
- package/lib/types/client/settings/sections.d.ts +25 -0
- package/lib/types/client/settings/styles.d.ts +8 -0
- package/lib/types/client/settlement.d.ts +6 -0
- package/lib/types/client/stream-publisher.d.ts +28 -0
- package/lib/types/client/tool-presentation.d.ts +6 -0
- package/lib/types/client/turn-sources.d.ts +14 -0
- package/lib/types/client/types.d.ts +101 -9
- package/lib/types/client/use-right-rail.d.ts +56 -0
- package/lib/types/client/use-session-ui-state.d.ts +41 -0
- package/lib/types/client/use-transcript-view.d.ts +20 -0
- package/lib/types/config-resolvers/accounts.d.ts +15 -0
- package/lib/types/config-resolvers/attachments.d.ts +6 -0
- package/lib/types/config-resolvers/basics.d.ts +8 -0
- package/lib/types/config-resolvers/defaults.d.ts +4 -0
- package/lib/types/config-resolvers/lockdown.d.ts +10 -0
- package/lib/types/config-resolvers/session.d.ts +6 -0
- package/lib/types/config-resolvers/shared.d.ts +16 -0
- package/lib/types/config-resolvers/sources.d.ts +6 -0
- package/lib/types/config-resolvers/ui.d.ts +6 -0
- package/lib/types/entry-redirect.d.ts +20 -0
- package/lib/types/host-route.d.ts +14 -1
- package/lib/types/index.d.ts +54 -3
- package/lib/types/launch-token.d.ts +21 -0
- package/lib/types/profile.d.ts +76 -0
- package/lib/types/prompt-notes.d.ts +110 -0
- package/lib/types/provenance/collector.d.ts +26 -0
- package/lib/types/provenance/connectors.d.ts +11 -0
- package/lib/types/provenance/dedupe.d.ts +6 -0
- package/lib/types/provenance/extractors.d.ts +14 -0
- package/lib/types/provenance/file-preview.d.ts +10 -0
- package/lib/types/provenance/host-store.d.ts +54 -0
- package/lib/types/provenance/index.d.ts +10 -0
- package/lib/types/provenance/normalize.d.ts +13 -0
- package/lib/types/provenance/reported.d.ts +5 -0
- package/lib/types/provenance/types.d.ts +78 -0
- package/lib/types/resolve-config.d.ts +8 -3
- package/lib/types/secure-session.d.ts +36 -2
- package/lib/types/shared/session-key.d.ts +23 -0
- package/lib/types/shared/settings.d.ts +10 -0
- package/lib/types/thinking-phrases.d.ts +17 -0
- package/lib/types/types.d.ts +290 -16
- package/lib/types/user-workspace.d.ts +38 -0
- package/lib/user-workspace.js +231 -0
- package/lib/user-workspace.js.map +1 -0
- package/package.json +71 -47
- package/CHANGELOG.md +0 -93
- package/SPEC-dsh-qa-surface.md +0 -2425
- package/docs/ARCHITECTURE.md +0 -66
- package/docs/COMPATIBILITY.md +0 -14
- package/docs/CONFIGURATION.md +0 -112
- package/docs/EMBEDDING.md +0 -13
- package/lib/client/components/QaSourcesDrawer.js +0 -46
- package/lib/client/components/QaSourcesDrawer.js.map +0 -1
- package/lib/types/client/components/QaSourcesDrawer.d.ts +0 -8
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { type RefObject } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Space kept outside the content: 88px per side leaves room for the handle,
|
|
4
|
+
* its inset, and a safe zone that remains draggable in both directions. It is
|
|
5
|
+
* the whole ceiling too: like DSH, the page bounds the width, so a wide column
|
|
6
|
+
* lets the transcript fill it.
|
|
7
|
+
*/
|
|
8
|
+
export declare const QA_CONTENT_EDGE_BUDGET = 176;
|
|
9
|
+
export declare function readQaContentWidth(storage: Pick<Storage, "getItem">, key: string): number | null;
|
|
10
|
+
export declare function writeQaContentWidth(storage: Pick<Storage, "setItem">, key: string, width: number): void;
|
|
11
|
+
/**
|
|
12
|
+
* Resolve the centered content width for the currently available column. The
|
|
13
|
+
* operator sets only the floor; the column is the ceiling, so the content may
|
|
14
|
+
* grow until its handles reach the edge budget and a wider window keeps
|
|
15
|
+
* widening it. A column too narrow even for the floor wins over the floor —
|
|
16
|
+
* there is nothing else to give up.
|
|
17
|
+
*/
|
|
18
|
+
export declare function resolveQaContentWidth(columnWidth: number, preference: number | null, minContentWidth: number): number;
|
|
19
|
+
interface QaWidthHandleProps {
|
|
20
|
+
readonly side: "left" | "right";
|
|
21
|
+
readonly onStart: () => number;
|
|
22
|
+
readonly onDrag: (width: number) => void;
|
|
23
|
+
readonly onCommit: (width: number) => void;
|
|
24
|
+
readonly onEnd: () => void;
|
|
25
|
+
}
|
|
26
|
+
/** Pointer-captured, rAF-throttled symmetric content-width handle. */
|
|
27
|
+
export declare function QaWidthHandle(props: QaWidthHandleProps): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
interface UseQaContentWidthOptions {
|
|
29
|
+
readonly active: boolean;
|
|
30
|
+
readonly root: RefObject<HTMLDivElement | null>;
|
|
31
|
+
readonly storage: Pick<Storage, "getItem" | "setItem">;
|
|
32
|
+
readonly storageKey: string;
|
|
33
|
+
readonly minContentWidth: number;
|
|
34
|
+
}
|
|
35
|
+
export declare function useQaContentWidth({ active, root, storage, storageKey, minContentWidth, }: UseQaContentWidthOptions): {
|
|
36
|
+
readonly onStart: () => number;
|
|
37
|
+
readonly onDrag: (requestedWidth: number) => void;
|
|
38
|
+
readonly onCommit: (requestedWidth: number) => void;
|
|
39
|
+
readonly onEnd: () => void;
|
|
40
|
+
};
|
|
41
|
+
export type UseQaContentWidthResult = ReturnType<typeof useQaContentWidth>;
|
|
42
|
+
export {};
|
|
43
|
+
//# sourceMappingURL=QaWidthHandle.d.ts.map
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import type { QaWorkItem } from "../../types.js";
|
|
2
2
|
export interface QaWorkGroupProps {
|
|
3
|
-
|
|
3
|
+
/** "error" marks a turn the host ended with a provider failure. */
|
|
4
|
+
readonly status: "running" | "complete" | "error";
|
|
4
5
|
readonly startedAt?: number;
|
|
5
6
|
readonly endedAt?: number;
|
|
6
7
|
readonly items: readonly QaWorkItem[];
|
|
7
8
|
readonly renderMarkdown: boolean;
|
|
9
|
+
/** Operator-configured running phrases; omitted reads the built-in list. */
|
|
10
|
+
readonly thinkingPhrases?: readonly string[];
|
|
8
11
|
}
|
|
9
|
-
export declare const THINKING_PHRASES: readonly string[];
|
|
10
12
|
/**
|
|
11
13
|
* Whether two work items render identically. The transcript projection
|
|
12
14
|
* rebuilds every item object on each published frame, so memoized work rows
|
|
@@ -15,5 +17,5 @@ export declare const THINKING_PHRASES: readonly string[];
|
|
|
15
17
|
export declare function sameWorkItem(a: QaWorkItem, b: QaWorkItem): boolean;
|
|
16
18
|
/** Whether two work item lists render identically, item for item. */
|
|
17
19
|
export declare function sameWorkItems(a: readonly QaWorkItem[], b: readonly QaWorkItem[]): boolean;
|
|
18
|
-
export declare const QaWorkGroup: import("react").MemoExoticComponent<({ status, startedAt, endedAt, items, renderMarkdown, }: QaWorkGroupProps) => import("react/jsx-runtime").JSX.Element>;
|
|
20
|
+
export declare const QaWorkGroup: import("react").MemoExoticComponent<({ status, startedAt, endedAt, items, renderMarkdown, thinkingPhrases, }: QaWorkGroupProps) => import("react/jsx-runtime").JSX.Element>;
|
|
19
21
|
//# sourceMappingURL=QaWorkGroup.d.ts.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { QaSource } from "../../types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Match layer between assistant text and the canonical turn sources: markdown
|
|
4
|
+
* links resolve by normalized URL, inline-code tokens by file path. A token
|
|
5
|
+
* that matches nothing keeps its plain rendering — the surface never guesses.
|
|
6
|
+
*/
|
|
7
|
+
export interface QaSourceRefs {
|
|
8
|
+
/** Identity of the source set; memo comparators compare this. */
|
|
9
|
+
readonly signature: string;
|
|
10
|
+
resolveUrl(url: string): QaSource | undefined;
|
|
11
|
+
resolvePath(token: string): QaSource | undefined;
|
|
12
|
+
}
|
|
13
|
+
/** Display name for a file-backed source: the file name alone, case kept. */
|
|
14
|
+
export declare function sourceFileName(source: QaSource): string;
|
|
15
|
+
export declare function buildSourceRefs(sources: readonly QaSource[]): QaSourceRefs;
|
|
16
|
+
//# sourceMappingURL=source-refs.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { QaSessionState } from "../../types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Small pure projections of the session state shared by surface regions: the
|
|
4
|
+
* composer's status line and the conversation title. Keeping them out of
|
|
5
|
+
* QaSurface leaves that file pure composition.
|
|
6
|
+
*/
|
|
7
|
+
/** The composer's status line, or null when nothing is due. */
|
|
8
|
+
export declare function statusText(state: QaSessionState, runningPhrase: string | null): string | null;
|
|
9
|
+
/** The conversation title derived from the first user prompt, clipped. */
|
|
10
|
+
export declare function titleFromMessages(state: QaSessionState): string | null;
|
|
11
|
+
//# sourceMappingURL=surface-utils.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DEFAULT_THINKING_PHRASES, thinkingPhrase } from "../../thinking-phrases.js";
|
|
2
|
+
export { DEFAULT_THINKING_PHRASES, thinkingPhrase };
|
|
3
|
+
/**
|
|
4
|
+
* Phrase for a turn that started at `startedAt`. Every reader that passes the
|
|
5
|
+
* same start time and phrase list lands on the same phrase, so the composer
|
|
6
|
+
* hint and the work list never disagree.
|
|
7
|
+
*/
|
|
8
|
+
export declare function useThinkingPhrase(running: boolean, startedAt: number | undefined, phrases?: readonly string[]): string | null;
|
|
9
|
+
//# sourceMappingURL=thinking-phrases.d.ts.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { QaCreateSession } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Ask the QA Host boundary to create a fully composed session. The browser
|
|
4
|
+
* supplies only its account token and cannot select cwd, workspace, owner,
|
|
5
|
+
* preset, model, or permission policy. The resulting session
|
|
6
|
+
* is addressed only here — no prompt can run before the caller attests the
|
|
7
|
+
* composed preset.
|
|
8
|
+
*/
|
|
9
|
+
export declare function createQaSession(args: {
|
|
10
|
+
readonly createSession: QaCreateSession;
|
|
11
|
+
readonly token: string;
|
|
12
|
+
}): Promise<string>;
|
|
13
|
+
//# sourceMappingURL=create-session.d.ts.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* QA-facing copy for provider failures, keyed by the stable failure code the
|
|
3
|
+
* host records on retry and turn-end events. Raw provider messages never
|
|
4
|
+
* reach these rows — they can carry stack traces and local paths — so every
|
|
5
|
+
* text here derives from the code alone.
|
|
6
|
+
*/
|
|
7
|
+
/** Terminal turn-failure row shown after the work group. */
|
|
8
|
+
export declare function turnErrorCopy(code: string | undefined): string;
|
|
9
|
+
export interface RetryCopySource {
|
|
10
|
+
readonly mode: "normal" | "always";
|
|
11
|
+
readonly retry: number;
|
|
12
|
+
readonly maxRetries?: number;
|
|
13
|
+
readonly delayMs: number;
|
|
14
|
+
readonly retryState: "scheduled" | "started" | "cancelled";
|
|
15
|
+
readonly failureCode?: string;
|
|
16
|
+
}
|
|
17
|
+
/** Work-group row for one host-scheduled model-request retry. */
|
|
18
|
+
export declare function retryWorkCopy(node: RetryCopySource): string;
|
|
19
|
+
//# sourceMappingURL=failure-copy.d.ts.map
|
|
@@ -9,6 +9,7 @@ export declare const inject: string[];
|
|
|
9
9
|
/** Register the route-aware, full-frame QA entry in the additive overlay slot. */
|
|
10
10
|
export declare function apply(ctx: Context): Promise<() => Promise<void>>;
|
|
11
11
|
export { QaConfigController } from "./QaConfigController.js";
|
|
12
|
+
export { QaAccountsController } from "./QaAccountsController.js";
|
|
12
13
|
export { QaRouteController, matchesQaRoute } from "./QaRouteController.js";
|
|
13
14
|
export { QaSessionController } from "./QaSessionController.js";
|
|
14
15
|
export { projectTranscript } from "./QaTranscriptAdapter.js";
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { SessionFace } from "@deepseek-ai/dsh-api-session-controller/client";
|
|
2
|
+
import type { ConversationSnapshot } from "@deepseek-ai/dsh-client-ui-conversation/client";
|
|
3
|
+
import type { QaSessionState, QaSubagentView, QaTurnSources, ResolvedQaSurfaceConfig } from "../types.js";
|
|
4
|
+
/** Everything the bound-chat projection reads; the computation is pure. */
|
|
5
|
+
export interface QaBoundProjectionInput {
|
|
6
|
+
readonly connected: boolean;
|
|
7
|
+
readonly sessionId: string;
|
|
8
|
+
readonly sessionSnapshot: ReturnType<SessionFace["getSnapshot"]>;
|
|
9
|
+
readonly conversationSnapshot: ConversationSnapshot | undefined;
|
|
10
|
+
/** Turn bundles with the Host provenance already merged in (Host wins). */
|
|
11
|
+
readonly sourceBundles: readonly QaTurnSources[];
|
|
12
|
+
readonly operationError: string | null;
|
|
13
|
+
readonly policyReady: boolean;
|
|
14
|
+
readonly admissionPending: boolean;
|
|
15
|
+
readonly chatsRevision: number;
|
|
16
|
+
readonly viewingSubagent: QaSubagentView | null;
|
|
17
|
+
readonly config: ResolvedQaSurfaceConfig;
|
|
18
|
+
/**
|
|
19
|
+
* The chat owner's display name for author labels; present only when an
|
|
20
|
+
* admin reads a foreign chat (chat-level, not per-message).
|
|
21
|
+
*/
|
|
22
|
+
readonly author?: string;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Project one bound chat into the observable surface state: phase, transcript
|
|
26
|
+
* with per-turn sources, footer sources, and the composer's capabilities.
|
|
27
|
+
* Side effects (host-bundle refresh, notifications) live in the controller.
|
|
28
|
+
*/
|
|
29
|
+
export declare function projectBoundSessionState(input: QaBoundProjectionInput): QaSessionState;
|
|
30
|
+
//# sourceMappingURL=project-session-state.d.ts.map
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { SessionFace } from "@deepseek-ai/dsh-api-session-controller/client";
|
|
2
|
+
import type { QaAttachmentDraft, QaFileDraft } from "../types.js";
|
|
3
|
+
import type { QaFileUpload, QaPromptContent } from "./types.js";
|
|
4
|
+
/**
|
|
5
|
+
* Stage every pending file on the Host and collect the receipts the prompt
|
|
6
|
+
* cites. Sequential on purpose: a partial batch must be attributable to the
|
|
7
|
+
* exact file that failed, and the visitor's file counts are small.
|
|
8
|
+
* `service` is undefined on a page the deployment serves without the upload
|
|
9
|
+
* plugin, which leaves attachments unavailable rather than broken. The
|
|
10
|
+
* receipt is opaque and host-minted — the upload service answers with a
|
|
11
|
+
* plain string, and only the session wire brand knows it as an id.
|
|
12
|
+
*/
|
|
13
|
+
export declare function stageQaFiles(service: QaFileUpload | undefined, session: SessionFace, files: readonly QaFileDraft[]): Promise<{
|
|
14
|
+
readonly kind: "ok";
|
|
15
|
+
readonly receipts: Map<string, string>;
|
|
16
|
+
} | {
|
|
17
|
+
readonly kind: "unavailable";
|
|
18
|
+
} | {
|
|
19
|
+
readonly kind: "failed";
|
|
20
|
+
}>;
|
|
21
|
+
/**
|
|
22
|
+
* Assemble the wire content of one prompt: the text part, images riding the
|
|
23
|
+
* prompt inline, and files cited by their staged receipts. The visitor's own
|
|
24
|
+
* order decides the prompt order, so images and files are assembled from one
|
|
25
|
+
* walk over the drafts; an unpaired file receipt (a draft kept while its
|
|
26
|
+
* staging failed elsewhere) degrades to an empty receipt rather than
|
|
27
|
+
* dropping the attachment.
|
|
28
|
+
*/
|
|
29
|
+
export declare function buildQaPromptContent(prompt: string, attachments: readonly QaAttachmentDraft[], receipts: ReadonlyMap<string, string>): QaPromptContent;
|
|
30
|
+
//# sourceMappingURL=prompt-content.d.ts.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { QaSecureSession } from "./types.js";
|
|
2
|
+
import type { ResolvedQaSurfaceConfig } from "../types.js";
|
|
3
|
+
export type QaAttestationOutcome = {
|
|
4
|
+
readonly ok: true;
|
|
5
|
+
} | {
|
|
6
|
+
readonly ok: false;
|
|
7
|
+
/** The identity is absent or expired; the caller returns to the gate. */
|
|
8
|
+
readonly authRequired: boolean;
|
|
9
|
+
readonly reason: string | null;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* One send-time policy attestation against the Host admission gate. The
|
|
13
|
+
* QA-facing message stays generic by design; the coarse reason plus an
|
|
14
|
+
* operator hint go to the console once per refusal.
|
|
15
|
+
*/
|
|
16
|
+
export declare function attestQaPolicy(args: {
|
|
17
|
+
readonly secureSession: QaSecureSession;
|
|
18
|
+
readonly token: string;
|
|
19
|
+
readonly sessionId: string;
|
|
20
|
+
readonly lockdown: ResolvedQaSurfaceConfig["lockdown"];
|
|
21
|
+
readonly report: boolean;
|
|
22
|
+
}): Promise<QaAttestationOutcome>;
|
|
23
|
+
//# sourceMappingURL=session-admission.d.ts.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Per-chat cache of resolved attachment URLs. Attachment reads are
|
|
3
|
+
* session-scoped (the loader reads the bound session's durable store), and
|
|
4
|
+
* attachment ids are only unique within a chat, so both the cache and the
|
|
5
|
+
* blob lifetime are keyed by chat, not by the page.
|
|
6
|
+
*/
|
|
7
|
+
export declare class SessionAssetRepository {
|
|
8
|
+
private readonly bySession;
|
|
9
|
+
/** Resolve one attachment of one chat, deduplicating concurrent reads. */
|
|
10
|
+
resolve(sessionId: string, attachmentId: string, load: (attachmentId: string) => Promise<string>): Promise<string>;
|
|
11
|
+
/**
|
|
12
|
+
* Revoke the chat's blob URLs and drop its cache. Data URLs need no
|
|
13
|
+
* revocation; a failed resolution never produced a URL at all.
|
|
14
|
+
*/
|
|
15
|
+
release(sessionId: string): void;
|
|
16
|
+
dispose(): void;
|
|
17
|
+
}
|
|
18
|
+
/** Revoke one blob URL; data URLs (and other runtimes) need nothing. */
|
|
19
|
+
export declare function revokeObjectUrlIfBlob(url: string): void;
|
|
20
|
+
//# sourceMappingURL=session-assets.d.ts.map
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { QaTurnSources } from "../types.js";
|
|
2
|
+
import type { QaSourceApi } from "./types.js";
|
|
3
|
+
/**
|
|
4
|
+
* Host-side provenance of the bound chat. The client projects turn sources
|
|
5
|
+
* from durable conversation events; the Host bundle (which also carries
|
|
6
|
+
* subagent-inherited evidence) is fetched on the side and merged by turn,
|
|
7
|
+
* Host data winning over the projection.
|
|
8
|
+
*/
|
|
9
|
+
export declare class QaHostSourceBridge {
|
|
10
|
+
private readonly sourceApi;
|
|
11
|
+
private readonly token;
|
|
12
|
+
private bundles;
|
|
13
|
+
private signature;
|
|
14
|
+
private refreshing;
|
|
15
|
+
/** Bumped on reset so a stale in-flight fetch never lands. */
|
|
16
|
+
private generation;
|
|
17
|
+
constructor(sourceApi: QaSourceApi, token: () => string);
|
|
18
|
+
/** Leave the chat: drop its bundles; merging degrades to the projection. */
|
|
19
|
+
reset(): void;
|
|
20
|
+
merge(projected: readonly QaTurnSources[]): readonly QaTurnSources[];
|
|
21
|
+
/**
|
|
22
|
+
* Fetch the Host bundles of one chat; a changed payload republishes through
|
|
23
|
+
* the callback. Repeated calls coalesce while one is in flight, and a
|
|
24
|
+
* response that outlives the chat is dropped.
|
|
25
|
+
*/
|
|
26
|
+
refresh(sessionId: string, onChanged: () => void): Promise<void>;
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=session-sources.d.ts.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The QA Surface settings card.
|
|
3
|
+
*
|
|
4
|
+
* Two sources meet here: the `qa-surface` settings namespace, which is the
|
|
5
|
+
* page's configuration source on the Host, and the `qaSurface/describe`
|
|
6
|
+
* Remote, which reports the configuration the running Host actually resolved.
|
|
7
|
+
* Everything the user changes is written immediately as a path-addressed
|
|
8
|
+
* mutation; the status view re-reads the Remote while the card is visible, so
|
|
9
|
+
* a saved change is confirmed against the Host rather than against the form.
|
|
10
|
+
*/
|
|
11
|
+
import type { SettingsScope } from "@deepseek-ai/dsh-client-ui-settings/client";
|
|
12
|
+
import type { InjectFace, PropsRuntime } from "@deepseek-ai/dsh-client-ui-slots";
|
|
13
|
+
import type { RemoteResult } from "@deepseek-ai/dsh-typert-protocol";
|
|
14
|
+
import type { QaSurfaceConfig, ResolvedQaSurfaceConfig } from "../../types.js";
|
|
15
|
+
/** The face the slot entry injects into this card. */
|
|
16
|
+
export interface QaSettingsCardFace {
|
|
17
|
+
readonly scope: SettingsScope<QaSurfaceConfig>;
|
|
18
|
+
describe(): Promise<RemoteResult<ResolvedQaSurfaceConfig>>;
|
|
19
|
+
}
|
|
20
|
+
type CardProps = PropsRuntime<"settings.plugin.item"> & InjectFace<QaSettingsCardFace>;
|
|
21
|
+
export declare function QaSettingsCard({ scope, describe }: CardProps): import("react/jsx-runtime").JSX.Element | null;
|
|
22
|
+
export {};
|
|
23
|
+
//# sourceMappingURL=card.d.ts.map
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared controls of the QA Surface card body.
|
|
3
|
+
*
|
|
4
|
+
* Every control edits the settings namespace through the same path-addressed
|
|
5
|
+
* write, and text and number drafts commit on blur or Enter rather than per
|
|
6
|
+
* keystroke: a half-typed path or an emptied number is a value the Host
|
|
7
|
+
* refuses, and a refusal mid-typing would clear the field the user is still
|
|
8
|
+
* editing. Controls that must land together (a provider with its model, the
|
|
9
|
+
* per-user sandbox with its flag) write every path in one mutation, because
|
|
10
|
+
* the Host validates the section as a whole.
|
|
11
|
+
*/
|
|
12
|
+
import { type ReactNode } from "react";
|
|
13
|
+
import { type IdentityFieldDraft } from "./format.js";
|
|
14
|
+
/** One field write inside the plugin's settings namespace. */
|
|
15
|
+
export interface ConfigEntry {
|
|
16
|
+
readonly path: readonly string[];
|
|
17
|
+
readonly value: unknown;
|
|
18
|
+
}
|
|
19
|
+
/** Path-addressed write into the plugin's settings namespace. */
|
|
20
|
+
export type ConfigWrite = (path: readonly string[], value: unknown) => void;
|
|
21
|
+
/** Several path-addressed writes applied as one mutation. */
|
|
22
|
+
export type ConfigWriteMany = (entries: readonly ConfigEntry[]) => void;
|
|
23
|
+
/** Path-addressed clear, so the field re-inherits the composition layer. */
|
|
24
|
+
export type ConfigUnset = (path: readonly string[]) => void;
|
|
25
|
+
/** Whether the raw user layer carries a path. */
|
|
26
|
+
export type OverrideCheck = (path: readonly string[]) => boolean;
|
|
27
|
+
export interface SectionProps {
|
|
28
|
+
readonly writable: boolean;
|
|
29
|
+
readonly write: ConfigWrite;
|
|
30
|
+
readonly writeMany: ConfigWriteMany;
|
|
31
|
+
readonly unset: ConfigUnset;
|
|
32
|
+
readonly overridden: OverrideCheck;
|
|
33
|
+
}
|
|
34
|
+
/** Section frame: title, optional modified marker, optional trailing control. */
|
|
35
|
+
export declare function Section(props: {
|
|
36
|
+
title: string;
|
|
37
|
+
modified: boolean;
|
|
38
|
+
hint?: ReactNode;
|
|
39
|
+
aside?: ReactNode;
|
|
40
|
+
children: ReactNode;
|
|
41
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
42
|
+
/** Small clearing control shown beside a section the user layer overrides. */
|
|
43
|
+
export declare function ResetButton(props: {
|
|
44
|
+
disabled: boolean;
|
|
45
|
+
label: string;
|
|
46
|
+
onClick: () => void;
|
|
47
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
48
|
+
/** Two-state control with a label and an explanatory hint. */
|
|
49
|
+
export declare function Toggle(props: {
|
|
50
|
+
checked: boolean;
|
|
51
|
+
disabled: boolean;
|
|
52
|
+
label: string;
|
|
53
|
+
hint: string;
|
|
54
|
+
onChange: (checked: boolean) => void;
|
|
55
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
56
|
+
/** Fixed-option control for the schema's string unions. */
|
|
57
|
+
export declare function SelectField(props: {
|
|
58
|
+
label: string;
|
|
59
|
+
value: string;
|
|
60
|
+
disabled: boolean;
|
|
61
|
+
options: ReadonlyArray<{
|
|
62
|
+
value: string;
|
|
63
|
+
label: string;
|
|
64
|
+
}>;
|
|
65
|
+
hint?: string;
|
|
66
|
+
onChange: (value: string) => void;
|
|
67
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
68
|
+
/** Text control; the draft commits on blur and on Enter. */
|
|
69
|
+
export declare function TextField(props: {
|
|
70
|
+
label: string;
|
|
71
|
+
value: string;
|
|
72
|
+
disabled: boolean;
|
|
73
|
+
placeholder?: string;
|
|
74
|
+
hint?: string;
|
|
75
|
+
multiline?: boolean;
|
|
76
|
+
rows?: number;
|
|
77
|
+
onChange: (value: string) => void;
|
|
78
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
79
|
+
/**
|
|
80
|
+
* Whole-number control; the draft commits on blur and on Enter. A value
|
|
81
|
+
* outside the range snaps into it on commit, so the field never holds a
|
|
82
|
+
* number the Host would refuse outright.
|
|
83
|
+
*/
|
|
84
|
+
export declare function NumberField(props: {
|
|
85
|
+
label: string;
|
|
86
|
+
value: number;
|
|
87
|
+
min: number;
|
|
88
|
+
max: number;
|
|
89
|
+
disabled: boolean;
|
|
90
|
+
hint?: string;
|
|
91
|
+
onChange: (value: number) => void;
|
|
92
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
93
|
+
/**
|
|
94
|
+
* List control for string arrays. The draft parses on commit so a separator
|
|
95
|
+
* the user is still typing never becomes a stored entry.
|
|
96
|
+
*/
|
|
97
|
+
export declare function ListField(props: {
|
|
98
|
+
label: string;
|
|
99
|
+
hint?: string;
|
|
100
|
+
value: readonly string[];
|
|
101
|
+
disabled: boolean;
|
|
102
|
+
placeholder?: string;
|
|
103
|
+
rows?: number;
|
|
104
|
+
parse: (text: string) => string[];
|
|
105
|
+
onCommit: (values: string[]) => void;
|
|
106
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
107
|
+
/**
|
|
108
|
+
* The deployment's declared profile fields, one `key = подпись` per line. The
|
|
109
|
+
* control keeps its own draft so a line still being typed is not parsed into
|
|
110
|
+
* the stored array.
|
|
111
|
+
*/
|
|
112
|
+
export declare function IdentitiesField(props: {
|
|
113
|
+
value: ReadonlyArray<{
|
|
114
|
+
readonly key?: string | undefined;
|
|
115
|
+
readonly label?: string | undefined;
|
|
116
|
+
}>;
|
|
117
|
+
disabled: boolean;
|
|
118
|
+
onCommit: (fields: IdentityFieldDraft[]) => void;
|
|
119
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
120
|
+
/** Status chip pair: label and value with the mode's tone. */
|
|
121
|
+
export declare function Chip(props: {
|
|
122
|
+
label: string;
|
|
123
|
+
value: string;
|
|
124
|
+
tone?: string;
|
|
125
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
126
|
+
/** Prose notice: informational or warning, never a control. */
|
|
127
|
+
export declare function Notice(props: {
|
|
128
|
+
tone: "info" | "warn";
|
|
129
|
+
children: ReactNode;
|
|
130
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
131
|
+
/** Fixed facts of the composed policy, shown as label/value rows. */
|
|
132
|
+
export declare function Facts(props: {
|
|
133
|
+
items: ReadonlyArray<{
|
|
134
|
+
label: string;
|
|
135
|
+
value: string;
|
|
136
|
+
note?: string;
|
|
137
|
+
}>;
|
|
138
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
139
|
+
//# sourceMappingURL=fields.d.ts.map
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure presentation helpers of the QA Surface settings card.
|
|
3
|
+
*
|
|
4
|
+
* Kept out of the components so the wording and the draft parsing are
|
|
5
|
+
* unit-testable without a DOM, and so every place that renders the same value
|
|
6
|
+
* renders it identically. Nothing here may reach the Host config surface: the
|
|
7
|
+
* card bundle must not pull schemastery into the page.
|
|
8
|
+
*/
|
|
9
|
+
import type { QaSurfaceConfig } from "../../types.js";
|
|
10
|
+
/** A control's label with the sentence explaining what it does. */
|
|
11
|
+
export interface DescribedOption {
|
|
12
|
+
readonly label: string;
|
|
13
|
+
readonly hint: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Header badge: the route the page answers on, or that the surface is off.
|
|
17
|
+
* The route is the one fact an operator scanning the plugin list looks for.
|
|
18
|
+
*/
|
|
19
|
+
export declare function badgeText(enabled: boolean | undefined, routePath: string | undefined): string;
|
|
20
|
+
/** Wording of the session-policy control. */
|
|
21
|
+
export declare function describeSessionPolicy(policy: string | undefined): DescribedOption;
|
|
22
|
+
/** Wording of the sandbox-mode control. */
|
|
23
|
+
export declare function describeSandbox(mode: string | undefined): DescribedOption;
|
|
24
|
+
/**
|
|
25
|
+
* Parse a numeric control's draft text.
|
|
26
|
+
* @param text - raw input value.
|
|
27
|
+
* @param min - lowest accepted value, clamped into range on commit.
|
|
28
|
+
* @param max - highest accepted value, clamped into range on commit.
|
|
29
|
+
* @returns the integer, or null when the field is empty or not numeric (the
|
|
30
|
+
* caller leaves the stored value alone rather than writing a NaN).
|
|
31
|
+
*/
|
|
32
|
+
export declare function parseNumberDraft(text: string, min: number, max: number): number | null;
|
|
33
|
+
/**
|
|
34
|
+
* Parse a one-entry-per-line list control's draft text. Questions and phrases
|
|
35
|
+
* are free copy, so a comma inside an entry must stay part of that entry.
|
|
36
|
+
*/
|
|
37
|
+
export declare function parseLineList(text: string): string[];
|
|
38
|
+
/** Parse a list control whose entries may also be comma-separated. */
|
|
39
|
+
export declare function parseCommaList(text: string): string[];
|
|
40
|
+
/** One declared identity field as the operator writes it. */
|
|
41
|
+
export interface IdentityFieldDraft {
|
|
42
|
+
readonly key: string;
|
|
43
|
+
readonly label: string;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Parse the identity-field control: one `key = подпись` entry per line. A
|
|
47
|
+
* missing label falls back to the key, and an entry whose key cannot exist on
|
|
48
|
+
* the Host is dropped here rather than refused as a whole write.
|
|
49
|
+
*/
|
|
50
|
+
export declare function parseIdentityFields(text: string): IdentityFieldDraft[];
|
|
51
|
+
/** Render declared identity fields back into the control's draft text. */
|
|
52
|
+
export declare function formatIdentityFields(fields: readonly IdentityFieldDraft[] | undefined): string;
|
|
53
|
+
/**
|
|
54
|
+
* Prerequisites `accounts.perUserWorkspace` cannot run without. The Host
|
|
55
|
+
* refuses the configuration while any of them is unmet, and the sandbox mode
|
|
56
|
+
* is the one entry the card must write together with the flag: both
|
|
57
|
+
* `workspace-write` alone and per-user workspaces alone are refused.
|
|
58
|
+
*/
|
|
59
|
+
export declare function perUserWorkspaceGaps(config: QaSurfaceConfig): string[];
|
|
60
|
+
/**
|
|
61
|
+
* Whether the raw user layer carries this path, which is what marks a field
|
|
62
|
+
* overridden — a value equal to the composition default is still an override.
|
|
63
|
+
* @param user - raw user section from the settings snapshot.
|
|
64
|
+
* @param path - path from the section root.
|
|
65
|
+
* @returns true when every segment exists in the user layer.
|
|
66
|
+
*/
|
|
67
|
+
export declare function isOverridden(user: unknown, path: readonly string[]): boolean;
|
|
68
|
+
/** Top-level keys the user layer carries; the reset-all action clears exactly these. */
|
|
69
|
+
export declare function overriddenKeys(user: unknown): string[];
|
|
70
|
+
/**
|
|
71
|
+
* Read a path out of a settings section.
|
|
72
|
+
* @param value - section root (the snapshot's effective value or user layer).
|
|
73
|
+
* @param path - path from the section root.
|
|
74
|
+
* @returns the value found, or undefined when any segment is absent.
|
|
75
|
+
*/
|
|
76
|
+
export declare function readPath(value: unknown, path: readonly string[]): unknown;
|
|
77
|
+
/**
|
|
78
|
+
* Whether a settled mutation left the section holding what it asked for.
|
|
79
|
+
*
|
|
80
|
+
* The scope resolves a Host-rejected write instead of rejecting it — it
|
|
81
|
+
* reloads Host state and returns — so acceptance is confirmed here. The
|
|
82
|
+
* namespace revision advances on every committed change, and a write that
|
|
83
|
+
* changed nothing is indistinguishable from a refusal; in that one case the
|
|
84
|
+
* section itself answers whether the value already stood.
|
|
85
|
+
* @param entries - writes the mutation asked for.
|
|
86
|
+
* @param cleared - paths the mutation asked to clear.
|
|
87
|
+
* @param snapshot - the scope snapshot as it stands after the settlement.
|
|
88
|
+
* @returns true when the mutation's intent is visible in the section.
|
|
89
|
+
*/
|
|
90
|
+
export declare function mutationLanded(entries: readonly {
|
|
91
|
+
readonly path: readonly string[];
|
|
92
|
+
readonly value: unknown;
|
|
93
|
+
}[], cleared: readonly (readonly string[])[], snapshot: {
|
|
94
|
+
readonly value: unknown;
|
|
95
|
+
readonly user: unknown;
|
|
96
|
+
}): boolean;
|
|
97
|
+
/** Wall-clock stamp of the last Host answer, for the status line. */
|
|
98
|
+
export declare function formatClock(timestamp: number | undefined): string;
|
|
99
|
+
/**
|
|
100
|
+
* Count with the Russian form of its noun: 1 ключ, 2 ключа, 5 ключей.
|
|
101
|
+
* @param count - counted value.
|
|
102
|
+
* @param forms - singular, few, and many forms of the noun.
|
|
103
|
+
* @returns the counted noun as the copy renders it.
|
|
104
|
+
*/
|
|
105
|
+
export declare function pluralRu(count: number, forms: readonly [string, string, string]): string;
|
|
106
|
+
/** Thousands separator so long byte budgets stay readable. */
|
|
107
|
+
export declare function formatCount(value: number | undefined): string;
|
|
108
|
+
//# sourceMappingURL=format.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Access and route: the only section whose consequences reach beyond this
|
|
3
|
+
* plugin's namespace — the path it claims on the Host and where external
|
|
4
|
+
* visitors of the harness root land.
|
|
5
|
+
*/
|
|
6
|
+
import { type ConfigProps } from "./common.js";
|
|
7
|
+
/** Where the page lives and who may reach it. */
|
|
8
|
+
export declare function AccessSection(props: ConfigProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
//# sourceMappingURL=access.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Accounts: the account gate, the self-declared profile, and per-user
|
|
3
|
+
* workspaces. The per-user toggle lands together with the sandbox mode —
|
|
4
|
+
* the Host accepts that pairing or nothing.
|
|
5
|
+
*/
|
|
6
|
+
import { type ConfigProps } from "./common.js";
|
|
7
|
+
/** The account gate, the self-declared profile, and per-user workspaces. */
|
|
8
|
+
export declare function AccountsSection(props: ConfigProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
//# sourceMappingURL=accounts.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Attachments: what a visitor may attach to one message. Like the interface
|
|
3
|
+
* section, the list fields show the value in effect — a stored list, else the
|
|
4
|
+
* Host's resolved one — so an untouched deployment never sees an empty box
|
|
5
|
+
* for a setting that is active.
|
|
6
|
+
*/
|
|
7
|
+
import { type ConfigProps } from "./common.js";
|
|
8
|
+
/**
|
|
9
|
+
* What a visitor may attach to one message. Files never ride the prompt
|
|
10
|
+
* inline: the browser stages them on the Host and the prompt cites the
|
|
11
|
+
* receipt, so the model resolves the stored copy through its file tools — the
|
|
12
|
+
* deployment's tool allow-list has to keep `read` for that to be useful.
|
|
13
|
+
*/
|
|
14
|
+
export declare function AttachmentsSection(props: ConfigProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
//# sourceMappingURL=attachments.d.ts.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Branding: pure copy the visitor reads, so nothing here constrains what the
|
|
3
|
+
* Host accepts — every field is free-form and safe to leave empty.
|
|
4
|
+
*/
|
|
5
|
+
import { type ConfigProps } from "./common.js";
|
|
6
|
+
/** Titles, welcome copy, and the notice under the composer. */
|
|
7
|
+
export declare function BrandingSection(props: ConfigProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
//# sourceMappingURL=branding.d.ts.map
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What the config sections share: the props every section receives, the
|
|
3
|
+
* override check behind the modified marker, and the reset control that
|
|
4
|
+
* clears a whole section with one click.
|
|
5
|
+
*/
|
|
6
|
+
import type { ReactNode } from "react";
|
|
7
|
+
import type { QaSurfaceConfig, ResolvedQaSurfaceConfig } from "../../../types.js";
|
|
8
|
+
import { type SectionProps } from "../fields.js";
|
|
9
|
+
export interface ConfigProps extends SectionProps {
|
|
10
|
+
readonly config: QaSurfaceConfig | undefined;
|
|
11
|
+
/**
|
|
12
|
+
* What the running Host resolved, when it answered. A control whose default
|
|
13
|
+
* is not a literal — the running phrases — reads the effective list from
|
|
14
|
+
* here instead of showing an empty field for a setting that is in effect.
|
|
15
|
+
*/
|
|
16
|
+
readonly effective: ResolvedQaSurfaceConfig | null;
|
|
17
|
+
}
|
|
18
|
+
/** The setting paths one section owns; its reset clears them in order. */
|
|
19
|
+
export type SectionPaths = ReadonlyArray<readonly string[]>;
|
|
20
|
+
/** Whether the user layer overrides any of the paths the section owns. */
|
|
21
|
+
export declare function overriddenAny(props: ConfigProps, paths: SectionPaths): boolean;
|
|
22
|
+
/**
|
|
23
|
+
* The reset control beside a section whose paths the user layer overrides:
|
|
24
|
+
* one button clearing every path of the section, disabled while the settings
|
|
25
|
+
* namespace itself is read-only.
|
|
26
|
+
*/
|
|
27
|
+
export declare function resetAside(props: ConfigProps, paths: SectionPaths): ReactNode;
|
|
28
|
+
//# sourceMappingURL=common.d.ts.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Embedding: one CSP field with a wide blast radius — an overly generous
|
|
3
|
+
* frame-ancestors list lets any listed site run this page as its own UI.
|
|
4
|
+
*/
|
|
5
|
+
import { type ConfigProps } from "./common.js";
|
|
6
|
+
/** Embedding the page into another site's frame. */
|
|
7
|
+
export declare function EmbeddingSection(props: ConfigProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
//# sourceMappingURL=embedding.d.ts.map
|