@yadsh/dsh-qa-surface 0.16.0 → 0.17.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 +19 -2
- package/lib/account-remotes.js +9 -0
- package/lib/account-remotes.js.map +1 -1
- package/lib/accounts/database.js +34 -3
- package/lib/accounts/database.js.map +1 -1
- package/lib/accounts/store.js +20 -0
- package/lib/accounts/store.js.map +1 -1
- package/lib/chat-sharing/native-fence.js +11 -2
- package/lib/chat-sharing/native-fence.js.map +1 -1
- package/lib/chat-sharing/store.js +9 -3
- package/lib/chat-sharing/store.js.map +1 -1
- package/lib/chat-sharing/transport.js +66 -11
- package/lib/chat-sharing/transport.js.map +1 -1
- package/lib/client/QaAccountsController.js +18 -0
- package/lib/client/QaAccountsController.js.map +1 -1
- package/lib/client/QaSessionController.js +12 -3
- package/lib/client/QaSessionController.js.map +1 -1
- package/lib/client/QaSurface.js +49 -8
- package/lib/client/QaSurface.js.map +1 -1
- package/lib/client/QaTranscriptAdapter.js +15 -2
- package/lib/client/QaTranscriptAdapter.js.map +1 -1
- package/lib/client/answer-review.js +89 -0
- package/lib/client/answer-review.js.map +1 -0
- package/lib/client/chat-artifacts.js +1 -0
- package/lib/client/chat-artifacts.js.map +1 -1
- package/lib/client/components/QaAnswerReviewStatus.js +45 -0
- package/lib/client/components/QaAnswerReviewStatus.js.map +1 -0
- package/lib/client/components/QaChangelog.js +35 -0
- package/lib/client/components/QaChangelog.js.map +1 -1
- package/lib/client/components/QaChatActions.js +52 -0
- package/lib/client/components/QaChatActions.js.map +1 -0
- package/lib/client/components/QaChatSharing.js +22 -19
- package/lib/client/components/QaChatSharing.js.map +1 -1
- package/lib/client/components/QaMarkdownPreview.js +86 -0
- package/lib/client/components/QaMarkdownPreview.js.map +1 -0
- package/lib/client/components/QaMessage.js +8 -2
- package/lib/client/components/QaMessage.js.map +1 -1
- package/lib/client/components/QaModal.js +17 -0
- package/lib/client/components/QaModal.js.map +1 -1
- package/lib/client/components/QaRightRail.js +6 -4
- package/lib/client/components/QaRightRail.js.map +1 -1
- package/lib/client/components/QaRightRailResize.js +129 -0
- package/lib/client/components/QaRightRailResize.js.map +1 -0
- package/lib/client/components/QaSidebar.js +10 -1
- package/lib/client/components/QaSidebar.js.map +1 -1
- package/lib/client/components/QaSourceFilters.js +22 -0
- package/lib/client/components/QaSourceFilters.js.map +1 -0
- package/lib/client/components/QaSourcesPanel.js +57 -13
- package/lib/client/components/QaSourcesPanel.js.map +1 -1
- package/lib/client/components/QaSpreadsheetPreview.js +56 -0
- package/lib/client/components/QaSpreadsheetPreview.js.map +1 -0
- package/lib/client/components/QaWelcomeNotice.js +2 -2
- package/lib/client/components/QaWelcomeNotice.js.map +1 -1
- package/lib/client/components/QaWorkspaceBrowser.js +22 -9
- package/lib/client/components/QaWorkspaceBrowser.js.map +1 -1
- package/lib/client/components/QaZoomImage.js +56 -0
- package/lib/client/components/QaZoomImage.js.map +1 -0
- package/lib/client/components/source-refs.js +18 -4
- package/lib/client/components/source-refs.js.map +1 -1
- package/lib/client/index.js +16 -2
- package/lib/client/index.js.map +1 -1
- package/lib/client/markdown/SourceImage.js +52 -0
- package/lib/client/markdown/SourceImage.js.map +1 -0
- package/lib/client/markdown/blocks.js +150 -115
- package/lib/client/markdown/blocks.js.map +1 -1
- package/lib/client/markdown/render.js +23 -5
- package/lib/client/markdown/render.js.map +1 -1
- package/lib/client/markdown/source-chip.js +2 -1
- package/lib/client/markdown/source-chip.js.map +1 -1
- package/lib/client/settings/sections/sources.js +1 -1
- package/lib/client/settings/sections/sources.js.map +1 -1
- package/lib/client/settings/styles.js +18 -28
- package/lib/client/settings/styles.js.map +1 -1
- package/lib/client/source-filters-styles.js +11 -0
- package/lib/client/source-filters-styles.js.map +1 -0
- package/lib/client/styles.js +53 -2
- package/lib/client/styles.js.map +1 -1
- package/lib/client/types.js.map +1 -1
- package/lib/client/use-right-rail.js +1 -1
- package/lib/client/use-right-rail.js.map +1 -1
- package/lib/client/user-settings/IntegrationTokensPage.js +30 -6
- package/lib/client/user-settings/IntegrationTokensPage.js.map +1 -1
- package/lib/client.js +2820 -955
- package/lib/client.js.map +1 -1
- package/lib/config-resolvers/defaults.js +4 -3
- package/lib/config-resolvers/defaults.js.map +1 -1
- package/lib/config-resolvers/sources.js +2 -0
- package/lib/config-resolvers/sources.js.map +1 -1
- package/lib/config.js +3 -0
- package/lib/config.js.map +1 -1
- package/lib/index.js +50 -3
- package/lib/index.js.map +1 -1
- package/lib/integration/host-runner.js +1 -0
- package/lib/integration/host-runner.js.map +1 -1
- package/lib/integration/question-policy.js +126 -0
- package/lib/integration/question-policy.js.map +1 -0
- package/lib/integration/service.js +2 -0
- package/lib/integration/service.js.map +1 -1
- package/lib/llm-identity.js +27 -0
- package/lib/llm-identity.js.map +1 -0
- package/lib/markdown-frontmatter.js +47 -0
- package/lib/markdown-frontmatter.js.map +1 -0
- package/lib/markdown-images.js +33 -0
- package/lib/markdown-images.js.map +1 -0
- package/lib/prompt-notes.js +1 -1
- package/lib/prompt-notes.js.map +1 -1
- package/lib/provenance/collector.js +2 -0
- package/lib/provenance/collector.js.map +1 -1
- package/lib/provenance/connectors.js +25 -19
- package/lib/provenance/connectors.js.map +1 -1
- package/lib/provenance/dedupe.js +17 -0
- package/lib/provenance/dedupe.js.map +1 -1
- package/lib/provenance/document-preview.js +12 -2
- package/lib/provenance/document-preview.js.map +1 -1
- package/lib/provenance/extractors.js +23 -5
- package/lib/provenance/extractors.js.map +1 -1
- package/lib/provenance/file-preview.js +9 -2
- package/lib/provenance/file-preview.js.map +1 -1
- package/lib/provenance/integration-extractor.js +5 -6
- package/lib/provenance/integration-extractor.js.map +1 -1
- package/lib/provenance/snapshot-store.js +2 -0
- package/lib/provenance/snapshot-store.js.map +1 -1
- package/lib/provenance/source-content.js +103 -0
- package/lib/provenance/source-content.js.map +1 -0
- package/lib/provenance/source-image.js +57 -0
- package/lib/provenance/source-image.js.map +1 -0
- package/lib/provenance/spreadsheet-preview.js +52 -0
- package/lib/provenance/spreadsheet-preview.js.map +1 -0
- package/lib/questions.js +6 -1
- package/lib/questions.js.map +1 -1
- package/lib/shared/documents.js +12 -0
- package/lib/shared/documents.js.map +1 -1
- package/lib/typert.host.js +419 -110
- package/lib/typert.remote-client.d.ts +9 -5
- package/lib/typert.remote-client.js +383 -102
- package/lib/types/account-remotes.d.ts +3 -0
- package/lib/types/accounts/database.d.ts +5 -0
- package/lib/types/accounts/store.d.ts +6 -1
- package/lib/types/answer-review.js +2 -0
- package/lib/types/answer-review.js.map +1 -0
- package/lib/types/chat-sharing/store.d.ts +1 -0
- package/lib/types/chat-sharing/transport.d.ts +1 -0
- package/lib/types/client/QaAccountsController.d.ts +1 -0
- package/lib/types/client/answer-review.d.ts +16 -0
- package/lib/types/client/components/QaAnswerReviewStatus.d.ts +8 -0
- package/lib/types/client/components/QaChatActions.d.ts +7 -0
- package/lib/types/client/components/QaChatSharing.d.ts +4 -2
- package/lib/types/client/components/QaMarkdownPreview.d.ts +13 -0
- package/lib/types/client/components/QaModal.d.ts +9 -0
- package/lib/types/client/components/QaRightRail.d.ts +3 -2
- package/lib/types/client/components/QaRightRailResize.d.ts +9 -0
- package/lib/types/client/components/QaSidebar.d.ts +2 -0
- package/lib/types/client/components/QaSourceFilters.d.ts +12 -0
- package/lib/types/client/components/QaSpreadsheetPreview.d.ts +8 -0
- package/lib/types/client/components/QaWelcomeNotice.d.ts +1 -1
- package/lib/types/client/components/QaZoomImage.d.ts +38 -0
- package/lib/types/client/markdown/SourceImage.d.ts +7 -0
- package/lib/types/client/markdown/blocks.d.ts +8 -1
- package/lib/types/client/markdown/render.d.ts +5 -1
- package/lib/types/client/markdown/source-chip.d.ts +1 -0
- package/lib/types/client/settings/styles.d.ts +2 -5
- package/lib/types/client/source-filters-styles.d.ts +2 -0
- package/lib/types/client/types.d.ts +11 -5
- package/lib/types/index.d.ts +8 -3
- package/lib/types/integration/contract.d.ts +1 -0
- package/lib/types/integration/question-policy.d.ts +20 -0
- package/lib/types/integration/service.d.ts +1 -0
- package/lib/types/llm-identity.d.ts +20 -0
- package/lib/types/markdown-frontmatter.d.ts +10 -0
- package/lib/types/markdown-images.d.ts +3 -0
- package/lib/types/prompt-notes.d.ts +1 -1
- package/lib/types/provenance/document-preview.d.ts +3 -2
- package/lib/types/provenance/file-preview.d.ts +2 -1
- package/lib/types/provenance/source-content.d.ts +19 -0
- package/lib/types/provenance/source-image.d.ts +4 -0
- package/lib/types/provenance/spreadsheet-preview.d.ts +5 -0
- package/lib/types/provenance/types.d.ts +3 -0
- package/lib/types/questions.d.ts +2 -1
- package/lib/types/shared/documents.d.ts +2 -0
- package/lib/types/types/accounts.d.ts +5 -1
- package/lib/types/types/answer-review.d.ts +11 -0
- package/lib/types/types/config.d.ts +3 -0
- package/lib/types/types/session.d.ts +18 -3
- package/lib/types/types.d.ts +1 -0
- package/package.json +3 -3
|
@@ -81,6 +81,9 @@ export interface QaAccountRemotes {
|
|
|
81
81
|
revokeServiceToken(token: string, tokenId: string): {
|
|
82
82
|
readonly revoked: boolean;
|
|
83
83
|
};
|
|
84
|
+
setServiceTokenClarifications(token: string, tokenId: string, allowed: boolean): {
|
|
85
|
+
readonly updated: boolean;
|
|
86
|
+
};
|
|
84
87
|
}
|
|
85
88
|
/** Build the account-remotes context for one `QaSurface` service instance. */
|
|
86
89
|
export declare function createQaAccountRemotes(options: {
|
|
@@ -13,6 +13,7 @@ interface PasswordResetRow {
|
|
|
13
13
|
* nowhere else.
|
|
14
14
|
*/
|
|
15
15
|
export interface StoredServiceToken {
|
|
16
|
+
readonly allowClarifications: boolean;
|
|
16
17
|
readonly id: string;
|
|
17
18
|
readonly userId: string;
|
|
18
19
|
readonly label: string;
|
|
@@ -95,6 +96,10 @@ export declare class QaAccountsDatabase {
|
|
|
95
96
|
deleteOwnership(sessionIds: readonly string[]): void;
|
|
96
97
|
/** Record one freshly minted integration token (digest only, never a secret). */
|
|
97
98
|
insertServiceToken(token: StoredServiceToken): void;
|
|
99
|
+
/** Store the authenticated token policy before admitting its request to the inbox. */
|
|
100
|
+
recordIntegrationRequestPolicy(sessionId: string, requestId: string, allowed: boolean): void;
|
|
101
|
+
integrationClarificationsAllowed(sessionId: string, requestId: string): boolean;
|
|
102
|
+
setServiceTokenClarifications(userId: string, tokenId: string, allowed: boolean): boolean;
|
|
98
103
|
/**
|
|
99
104
|
* One integration token by id, revoked and expired ones included.
|
|
100
105
|
*
|
|
@@ -41,8 +41,9 @@ export interface QaSessionFacts {
|
|
|
41
41
|
export interface QaServiceTokenIssueInput {
|
|
42
42
|
/** A note for the operator's token list; empty becomes a generic label. */
|
|
43
43
|
readonly label?: string;
|
|
44
|
-
/** Requested scopes; unknown ones are dropped, empty
|
|
44
|
+
/** Requested scopes; unknown ones are dropped, explicit empty grants none. */
|
|
45
45
|
readonly scopes?: readonly string[];
|
|
46
|
+
readonly allowClarifications?: boolean;
|
|
46
47
|
/** How long the token lives; bounded, and the session TTL when omitted. */
|
|
47
48
|
readonly ttlDays?: number;
|
|
48
49
|
/**
|
|
@@ -54,6 +55,7 @@ export interface QaServiceTokenIssueInput {
|
|
|
54
55
|
}
|
|
55
56
|
/** What a presented integration token resolved to. */
|
|
56
57
|
export interface QaVerifiedServiceToken {
|
|
58
|
+
readonly allowClarifications: boolean;
|
|
57
59
|
readonly tokenId: string;
|
|
58
60
|
readonly userId: string;
|
|
59
61
|
readonly scopes: readonly QaServiceTokenScope[];
|
|
@@ -421,6 +423,9 @@ export declare class QaAccounts {
|
|
|
421
423
|
* @returns true when a live token was revoked.
|
|
422
424
|
*/
|
|
423
425
|
revokeServiceToken(token: string, tokenId: string): boolean;
|
|
426
|
+
recordIntegrationRequestPolicy(sessionId: string, requestId: string, allowed: boolean): void;
|
|
427
|
+
setServiceTokenClarifications(token: string, tokenId: string, allowed: boolean): boolean;
|
|
428
|
+
integrationClarificationsAllowed(sessionId: string, requestId: string): boolean;
|
|
424
429
|
/** Revoke one integration token of an account the caller has established. */
|
|
425
430
|
revokeServiceTokenFor(user: QaAccountUserPublic, tokenId: string): boolean;
|
|
426
431
|
/** The caller if it administers the deployment, or a refusal. */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"answer-review.js","sourceRoot":"","sources":["../../src/types/answer-review.ts"],"names":[],"mappings":""}
|
|
@@ -7,6 +7,7 @@ export declare class QaChatSharingStore {
|
|
|
7
7
|
readonly storage: SqliteDatabase;
|
|
8
8
|
constructor(filePath: string, accounts: () => QaAccounts);
|
|
9
9
|
access(token: string, sessionId: string): QaChatAccess;
|
|
10
|
+
private accessForActor;
|
|
10
11
|
owner(token: string, sessionId: string): QaChatAccess;
|
|
11
12
|
write(token: string, sessionId: string): QaChatAccess;
|
|
12
13
|
/** Exact address lookup after ownership, never an account directory. */
|
|
@@ -10,6 +10,7 @@ export declare class QaChatTransport {
|
|
|
10
10
|
private readonly locks;
|
|
11
11
|
constructor(ctx: Context, store: () => QaChatSharingStore, admit: (token: string, id: string) => Promise<unknown>, participantPolicy?: ((userId: string, id: string) => Promise<unknown>) | undefined);
|
|
12
12
|
list(token: string, signal: AbortSignal): Promise<SessionListValue>;
|
|
13
|
+
private filterListing;
|
|
13
14
|
page(token: string, request: SessionPageRequest, signal: AbortSignal): Promise<SessionPage>;
|
|
14
15
|
search(token: string, request: SessionSearchRequest, signal: AbortSignal): Promise<SessionSearchValue>;
|
|
15
16
|
projections(token: string, id: string, signal: AbortSignal): Promise<SessionProjectionsValue>;
|
|
@@ -181,6 +181,7 @@ export declare class QaAccountsController {
|
|
|
181
181
|
* authority on whose token it is; a refusal is shown as it arrives.
|
|
182
182
|
*/
|
|
183
183
|
revokeServiceToken(tokenId: string): Promise<QaIntegrationTokenResult<null>>;
|
|
184
|
+
setServiceTokenClarifications(tokenId: string, allowed: boolean): Promise<QaIntegrationTokenResult<null>>;
|
|
184
185
|
private authenticate;
|
|
185
186
|
/** Own the account, migrate the legacy index, replay held ratings, then auth. */
|
|
186
187
|
private enterSession;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { SessionEventLike } from "@deepseek-ai/dsh-api-session-controller/client";
|
|
2
|
+
import type { ConversationNodeDefinition, ConversationSnapshot } from "@deepseek-ai/dsh-client-ui-conversation/client";
|
|
3
|
+
import type { QaAnswerReview } from "../types/answer-review.js";
|
|
4
|
+
export declare const QA_REVIEW_NODE = "qa-answer-review";
|
|
5
|
+
declare module "@deepseek-ai/dsh-client-ui-chat/client" {
|
|
6
|
+
interface ChatNodeDataMap {
|
|
7
|
+
"qa-answer-review": QaAnswerReview;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
/** Read only the gate's producer metadata; answer prose never supplies a verdict. */
|
|
11
|
+
export declare function readAnswerReview(event: SessionEventLike): QaAnswerReview | null;
|
|
12
|
+
export declare function parseAnswerReview(receipt: unknown): QaAnswerReview | null;
|
|
13
|
+
/** One current result per human request, with the latest answer's anchor. */
|
|
14
|
+
export declare const answerReviewConversationDefinition: ConversationNodeDefinition<QaAnswerReview>;
|
|
15
|
+
export declare function answerReviewsOf(snapshot: ConversationSnapshot | undefined): ReadonlyMap<number, QaAnswerReview>;
|
|
16
|
+
//# sourceMappingURL=answer-review.d.ts.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { PropsRuntime } from "@deepseek-ai/dsh-client-ui-slots";
|
|
2
|
+
import type { QaAnswerReview } from "../../types/answer-review.js";
|
|
3
|
+
export declare function QaAnswerReviewStatus({ review, }: {
|
|
4
|
+
readonly review: QaAnswerReview;
|
|
5
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare function QaNativeAnswerReviewStatus({ node, }: PropsRuntime<"conversation.chat.node", "qa-answer-review">): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare const QA_REVIEW_STYLES = "\n.dsh-qa-review-row{padding:4px 0 12px}\n.dsh-qa-review{display:inline-flex;align-items:center;gap:6px;max-width:100%;margin:8px 0 0;padding:4px 9px;border:1px solid var(--dsw-alias-border-l2);border-radius:999px;color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-layer-2);font-size:12px;line-height:18px}\n.dsh-qa-review svg{width:14px;height:14px;flex:none;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}\n.dsh-qa-review[data-status=pass]{color:var(--dsw-alias-state-success-primary,var(--dsw-alias-label-primary))}\n";
|
|
8
|
+
//# sourceMappingURL=QaAnswerReviewStatus.d.ts.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** Quiet actions attached to one owned chat, outside the conversation header. */
|
|
2
|
+
export declare function QaChatActions(props: {
|
|
3
|
+
name: string;
|
|
4
|
+
onShare: () => void;
|
|
5
|
+
onDelete?: (trigger: HTMLButtonElement) => void;
|
|
6
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
//# sourceMappingURL=QaChatActions.d.ts.map
|
|
@@ -5,6 +5,8 @@ export declare function QaChatSharing(props: {
|
|
|
5
5
|
access: QaChatAccess;
|
|
6
6
|
token: string;
|
|
7
7
|
api: QaSharingApi;
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
open: boolean;
|
|
9
|
+
onClose: () => void;
|
|
10
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
11
|
+
export declare const QA_SHARING_STYLES = "\n.dsh-qa-sharing__body{font-size:13px;color:var(--dsw-alias-label-secondary)}\n.dsh-qa-sharing__intro{margin:0 0 8px;line-height:1.5}\n.dsh-qa-sharing__details{color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:1.5}\n.dsh-qa-sharing__details summary{cursor:pointer}\n.dsh-qa-sharing__body .dsh-qa-btn{appearance:none;cursor:pointer;min-height:36px;font:inherit;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l2);border-radius:8px;padding:7px 12px}\n.dsh-qa-sharing__body .dsh-qa-btn:hover{background:var(--dsw-alias-bg-layer-3)}\n.dsh-qa-sharing__body .dsh-qa-btn:disabled{cursor:default;opacity:.55}\n.dsh-qa-sharing__body .dsh-qa-btn:focus-visible{outline:var(--dsw-focus-ring-width,2px) solid var(--dsw-focus-ring-color,var(--dsw-alias-brand-primary));outline-offset:2px}\n.dsh-qa-sharing__form{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,160px);gap:12px;margin:20px 0}\n.dsh-qa-sharing__form>.dsh-qa-btn{grid-column:1/-1;justify-self:start}\n.dsh-qa-sharing__body label{display:flex;flex-direction:column;gap:6px}\n.dsh-qa-sharing__body input,.dsh-qa-sharing__body select{font:inherit;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l2);border-radius:8px;padding:8px;min-width:0;max-width:100%}\n.dsh-qa-sharing__people{list-style:none;padding:0;margin:16px 0}\n.dsh-qa-sharing__people li{display:flex;gap:10px;align-items:center;flex-wrap:wrap;padding:12px 0;border-top:1px solid var(--dsw-alias-border-l2)}\n.dsh-qa-sharing__people span{flex:1;min-width:140px;overflow-wrap:anywhere}\n.dsh-qa-sharing__people small{display:block;color:var(--dsw-alias-label-tertiary)}\n@media(max-width:480px){.dsh-qa-sharing__form{grid-template-columns:minmax(0,1fr)}}\n";
|
|
10
12
|
//# sourceMappingURL=QaChatSharing.d.ts.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { MarkdownFrontmatter } from "../../markdown-frontmatter.js";
|
|
3
|
+
/** Source-only rendering: original file line numbers survive frontmatter removal. */
|
|
4
|
+
export declare function QaMarkdownPreview({ text, renderFrontmatter, frontmatter, lineStart, lineEnd, renderImage, requestKey, }: {
|
|
5
|
+
readonly text: string;
|
|
6
|
+
readonly renderFrontmatter: boolean;
|
|
7
|
+
readonly frontmatter?: MarkdownFrontmatter;
|
|
8
|
+
readonly lineStart?: number;
|
|
9
|
+
readonly lineEnd?: number;
|
|
10
|
+
readonly renderImage?: (src: string, alt: string) => ReactNode;
|
|
11
|
+
readonly requestKey?: unknown;
|
|
12
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
//# sourceMappingURL=QaMarkdownPreview.d.ts.map
|
|
@@ -6,6 +6,15 @@ import { type ReactNode } from "react";
|
|
|
6
6
|
* the dialog is turned back into a page under the scrim.
|
|
7
7
|
*/
|
|
8
8
|
export declare function isQaModalOpen(): boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Join the stack from a shell that draws its own chrome rather than this
|
|
11
|
+
* panel — the image lightbox is such a shell. One Escape press then closes the
|
|
12
|
+
* innermost layer instead of every dialog under it.
|
|
13
|
+
*/
|
|
14
|
+
export declare function joinQaDialogStack(): {
|
|
15
|
+
readonly innermost: () => boolean;
|
|
16
|
+
readonly leave: () => void;
|
|
17
|
+
};
|
|
9
18
|
export interface QaModalProps {
|
|
10
19
|
readonly open: boolean;
|
|
11
20
|
/** Dialog title; also the dialog's accessible name. */
|
|
@@ -13,9 +13,10 @@ export interface QaRightRailProps {
|
|
|
13
13
|
readonly activeTab: QaRailTab;
|
|
14
14
|
readonly onTabSelect: (tab: QaRailTab) => void;
|
|
15
15
|
readonly onClose: () => void;
|
|
16
|
+
readonly stateKey?: string;
|
|
16
17
|
}
|
|
17
18
|
/**
|
|
18
|
-
* The chat's right rail: a
|
|
19
|
+
* The chat's right rail: a resizable column whose top edge is the tab strip,
|
|
19
20
|
* mirroring the Harness right Sidebar's chrome. Tabs are plain chips with
|
|
20
21
|
* counts; the strip's last control collapses the whole column.
|
|
21
22
|
*
|
|
@@ -25,5 +26,5 @@ export interface QaRightRailProps {
|
|
|
25
26
|
* the rail keeps the key: the innermost thing on the page is what the reader
|
|
26
27
|
* means to dismiss.
|
|
27
28
|
*/
|
|
28
|
-
export declare function QaRightRail({ tabs, activeTab, onTabSelect, onClose, }: QaRightRailProps): import("react/jsx-runtime").JSX.Element | null;
|
|
29
|
+
export declare function QaRightRail({ tabs, activeTab, onTabSelect, onClose, stateKey, }: QaRightRailProps): import("react/jsx-runtime").JSX.Element | null;
|
|
29
30
|
//# sourceMappingURL=QaRightRail.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type RefObject } from "react";
|
|
2
|
+
export declare function resolveQaRightRailWidth(requested: number | null, available: number): number;
|
|
3
|
+
/** A one-sided border drag: moving left widens the panel on the right. */
|
|
4
|
+
export declare function QaRightRailResize(props: {
|
|
5
|
+
root: RefObject<HTMLElement | null>;
|
|
6
|
+
storage: Pick<Storage, "getItem" | "setItem">;
|
|
7
|
+
storageKey: string;
|
|
8
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
//# sourceMappingURL=QaRightRailResize.d.ts.map
|
|
@@ -2,6 +2,7 @@ import type { SessionSummary } from "@deepseek-ai/dsh-api-session-controller/cli
|
|
|
2
2
|
import { type QaAuditSummary } from "../audit/types.js";
|
|
3
3
|
/** One renderable row of the chat-history sidebar. */
|
|
4
4
|
export interface QaChatRow {
|
|
5
|
+
readonly shareable?: boolean;
|
|
5
6
|
readonly id: string;
|
|
6
7
|
readonly title: string;
|
|
7
8
|
readonly running: boolean;
|
|
@@ -59,6 +60,7 @@ export interface QaSidebarProps {
|
|
|
59
60
|
readonly onNewChat: () => void;
|
|
60
61
|
/** Removes a chat from this browser's index; omit to hide the control. */
|
|
61
62
|
readonly onDelete?: (sessionId: string) => void;
|
|
63
|
+
readonly onShare?: (sessionId: string) => void;
|
|
62
64
|
/**
|
|
63
65
|
* Whether the phone layout shows this sidebar as a drawer over the
|
|
64
66
|
* conversation. The state is the surface's, not the sidebar's: the control
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { QaSource } from "../../types.js";
|
|
2
|
+
export declare function matchesSourceText(source: QaSource, query: string): boolean;
|
|
3
|
+
export declare function QaSourceFilters({ sources, query, kind, count, onQuery, onKind, onReset, }: {
|
|
4
|
+
readonly sources: readonly QaSource[];
|
|
5
|
+
readonly query: string;
|
|
6
|
+
readonly kind: QaSource["kind"] | "all";
|
|
7
|
+
readonly count: number;
|
|
8
|
+
readonly onQuery: (value: string) => void;
|
|
9
|
+
readonly onKind: (value: QaSource["kind"] | "all") => void;
|
|
10
|
+
readonly onReset: () => void;
|
|
11
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
//# sourceMappingURL=QaSourceFilters.d.ts.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { QaSpreadsheetPreview as Preview, QaSpreadsheetPreviewSelection as Selection } from "../../types.js";
|
|
2
|
+
export interface QaSpreadsheetPreviewProps {
|
|
3
|
+
readonly initial: Preview;
|
|
4
|
+
readonly load: (selection: Selection) => Promise<Preview>;
|
|
5
|
+
}
|
|
6
|
+
/** Read-only cells, with explicit paging on both axes and no formula execution. */
|
|
7
|
+
export declare function QaSpreadsheetPreview({ initial, load, }: QaSpreadsheetPreviewProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
//# sourceMappingURL=QaSpreadsheetPreview.d.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { SettingsOnboardingOwnerProps } from "@deepseek-ai/dsh-client-ui-settings/client";
|
|
2
2
|
import type { StorageLike } from "../types.js";
|
|
3
3
|
/** Bump when the notice changes materially and must be acknowledged again. */
|
|
4
|
-
export declare const QA_WELCOME_NOTICE_VERSION = "2026-
|
|
4
|
+
export declare const QA_WELCOME_NOTICE_VERSION = "2026-10-11.1";
|
|
5
5
|
export declare const QA_WELCOME_NOTICE_COPY: Readonly<{
|
|
6
6
|
title: "Перед началом тестирования";
|
|
7
7
|
paragraphs: readonly string[];
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { ImgHTMLAttributes } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* A surface image at its reading size, plus the overlay it opens into.
|
|
4
|
+
*
|
|
5
|
+
* A transcript thumbnail is 132 px wide: enough to recognise a figure, not
|
|
6
|
+
* enough to read one. The thumbnail used to be an anchor to its own `blob:`
|
|
7
|
+
* address, and a browser that refuses top-level navigation to a blob answers
|
|
8
|
+
* the click with nothing at all, so the reader had no way to see the image the
|
|
9
|
+
* question was about.
|
|
10
|
+
*/
|
|
11
|
+
export declare function QaZoomImage({ src, alt, className, testId, openLabel, zoomable, ...image }: {
|
|
12
|
+
readonly src: string;
|
|
13
|
+
readonly alt: string;
|
|
14
|
+
readonly className: string;
|
|
15
|
+
readonly testId: string;
|
|
16
|
+
readonly openLabel?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Whether the image answers a click. An image that sits inside a link does
|
|
19
|
+
* not: a control nested in an anchor is invalid, and the activation the
|
|
20
|
+
* reader meant for the link would reach the zoom as well.
|
|
21
|
+
*/
|
|
22
|
+
readonly zoomable?: boolean;
|
|
23
|
+
} & Omit<ImgHTMLAttributes<HTMLImageElement>, "src" | "alt" | "className">): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
/**
|
|
25
|
+
* The overlay itself: the image contained to the viewport over a mask. Escape,
|
|
26
|
+
* the mask and the close control end it, and the close control takes focus on
|
|
27
|
+
* open so a keyboard reader leaves the same way it entered.
|
|
28
|
+
*
|
|
29
|
+
* The root is a span because an answer's image sits inside its paragraph, and
|
|
30
|
+
* a block-level root there is invalid nesting the browser repairs by lifting it
|
|
31
|
+
* out of the text that owns it.
|
|
32
|
+
*/
|
|
33
|
+
export declare function QaImageLightbox({ src, alt, onClose, }: {
|
|
34
|
+
readonly src: string;
|
|
35
|
+
readonly alt: string;
|
|
36
|
+
readonly onClose: () => void;
|
|
37
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
38
|
+
//# sourceMappingURL=QaZoomImage.d.ts.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** Illustrations are fetched on approach to the viewport, never in a document-wide burst. */
|
|
2
|
+
export declare function SourceImage({ src, alt, load, }: {
|
|
3
|
+
readonly src: string;
|
|
4
|
+
readonly alt: string;
|
|
5
|
+
readonly load: (path: string) => Promise<string | undefined>;
|
|
6
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
//# sourceMappingURL=SourceImage.d.ts.map
|
|
@@ -74,6 +74,10 @@ export type MarkdownBlock = {
|
|
|
74
74
|
};
|
|
75
75
|
/** A parsed document: its blocks plus the reference targets they resolve. */
|
|
76
76
|
export interface ParsedMarkdown {
|
|
77
|
+
readonly ranges: readonly {
|
|
78
|
+
readonly start: number;
|
|
79
|
+
readonly end: number;
|
|
80
|
+
}[];
|
|
77
81
|
readonly blocks: readonly MarkdownBlock[];
|
|
78
82
|
/** Link/image definitions by upper-cased identifier. */
|
|
79
83
|
readonly definitions: ReadonlyMap<string, string>;
|
|
@@ -111,5 +115,8 @@ export declare function parseMarkdown(text: string, options?: MarkdownParseOptio
|
|
|
111
115
|
* line may still be typed.
|
|
112
116
|
* @returns The container's blocks.
|
|
113
117
|
*/
|
|
114
|
-
export declare function parseBlocks(lines: readonly string[], definitions: Map<string, string>, footnotes: Map<string, readonly MarkdownBlock[]>, depth: number, streaming?: boolean
|
|
118
|
+
export declare function parseBlocks(lines: readonly string[], definitions: Map<string, string>, footnotes: Map<string, readonly MarkdownBlock[]>, depth: number, streaming?: boolean, ranges?: {
|
|
119
|
+
start: number;
|
|
120
|
+
end: number;
|
|
121
|
+
}[]): MarkdownBlock[];
|
|
115
122
|
//# sourceMappingURL=blocks.d.ts.map
|
|
@@ -13,5 +13,9 @@ import { type MarkdownSourceContext } from "./source-chip.js";
|
|
|
13
13
|
* @returns The document's blocks, plus the footnote section when the document
|
|
14
14
|
* references a defined footnote.
|
|
15
15
|
*/
|
|
16
|
-
export declare function renderMarkdown(text: string, context: MarkdownSourceContext, options?: MarkdownParseOptions
|
|
16
|
+
export declare function renderMarkdown(text: string, context: MarkdownSourceContext, options?: MarkdownParseOptions, sourceLines?: {
|
|
17
|
+
readonly offset: number;
|
|
18
|
+
readonly start?: number;
|
|
19
|
+
readonly end?: number;
|
|
20
|
+
}): ReactNode[];
|
|
17
21
|
//# sourceMappingURL=render.d.ts.map
|
|
@@ -3,6 +3,7 @@ import type { QaSource } from "../../types.js";
|
|
|
3
3
|
import { type QaSourceRefs } from "../components/source-refs.js";
|
|
4
4
|
/** Inline source awareness handed down from the owning assistant message. */
|
|
5
5
|
export interface MarkdownSourceContext {
|
|
6
|
+
readonly renderImage?: (src: string, alt: string) => ReactNode;
|
|
6
7
|
readonly refs?: QaSourceRefs;
|
|
7
8
|
/** Open a path-backed source in the sources drawer's detail view. */
|
|
8
9
|
readonly onSourceOpen?: (source: QaSource) => void;
|
|
@@ -9,11 +9,8 @@
|
|
|
9
9
|
* outline under pointer modality at a specificity our rule cannot win, so a
|
|
10
10
|
* hard-coded ring is one that goes missing rather than one that degrades.
|
|
11
11
|
*
|
|
12
|
-
* The
|
|
13
|
-
*
|
|
14
|
-
* is 16px, a control's own label and an outcome line are 14px, and only chrome
|
|
15
|
-
* stays small on purpose: the «Изменено» badge (9px), the status chips (11px),
|
|
16
|
-
* the monospace data rows (11px) and the footer note (10px).
|
|
12
|
+
* The body controls use the plugin kit's shared type scale. Status chips,
|
|
13
|
+
* data rows and the footer retain their compact page-specific presentation.
|
|
17
14
|
*/
|
|
18
15
|
export declare const QA_SETTINGS_STYLES: string;
|
|
19
16
|
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const sourceFiltersStyles = "\n.dsh-qa-sourcefilters{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:2px 12px 10px;flex:none}\n.dsh-qa-sourcefilters input,.dsh-qa-sourcefilters select{min-width:0;padding:7px 9px;border:1px solid var(--dsw-alias-border-l2);border-radius:8px;background:var(--dsw-alias-bg-layer-2);color:var(--dsw-alias-label-primary);font:inherit;font-size:12px}\n.dsh-qa-sourcefilters input{flex:1 1 200px;width:100%}\n.dsh-qa-sourcefilters select{flex:1 1 150px;max-width:100%}\n.dsh-qa-sourcefilters__count{color:var(--dsw-alias-label-tertiary);font-size:11px}\n.dsh-qa-sourcefilters button{margin-left:auto;border:0;background:transparent;color:var(--dsh-qa-accent);font:inherit;font-size:12px;cursor:pointer}\n.dsh-qa-sourcefilters :is(input,select,button):focus-visible{outline:var(--dsw-focus-ring-width, 2px) solid var(--dsw-focus-ring-color, var(--dsh-qa-accent));outline-offset:2px}\n.dsh-qa-sourcedetail__content-label{margin:0 0 8px;font-size:12px;font-weight:600;color:var(--dsw-alias-label-primary)}\n";
|
|
2
|
+
//# sourceMappingURL=source-filters-styles.d.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ClientRemote } from "@deepseek-ai/dsh-api-gateway/client";
|
|
2
2
|
import type { ISessions, SessionFace } from "@deepseek-ai/dsh-api-session-controller/client";
|
|
3
3
|
import type { UiConversation } from "@deepseek-ai/dsh-client-ui-conversation/client";
|
|
4
|
-
import type { QaAccountNotificationsInput, QaAccountProfileInput, QaAccountSession, QaAccountStartersInput, QaAccountStarter, QaAccountUserPublic, QaAccessAdminSnapshot, QaApprovalDecision, QaClaimResult, QaLockdownProof, QaModelCatalogEntry, QaOwnershipEntry, QaPasswordResetRequest, QaPendingApproval, QaPendingQuestion, QaQuestionAnswerItem, QaQueueStatus, QaIssuedServiceToken, QaServiceTokenCreateInput, QaServiceTokenSummary, QaSessionState, QaSkillDocument, QaSkillDraftInput, QaSkillRemoval, QaSkillSummary, QaSkillToolDescriptor, QaSkillValidation, QaSourceFilePreview, QaTurnSources, QaWhoamiResult, QaDocumentPreview, QaWorkspaceFile, QaWorkspaceFileChunk, QaDocumentWorkflowStatus, QaWorkspaceListing, QaCapabilitySelection, QaCurrentAccess, QaSessionAccess, QaSkillActivationRecord, QaSkillAssignmentOverride, QaSubrole, QaUserAccess, QaAdminAuditEvent, QaAdminOverview, QaAdminPage, QaAdminSkillScope, QaAdminSkillsView, QaAdminUserDetail, QaAdminUserRow, QaAdminUserUpdate, QaAuditQuery, QaConversationDetail, QaConversationDeletion, QaConversationQuery, QaConversationReview, QaConversationReviewInput, QaConversationSummary, QaExpertMemoryDraft, QaExpertMemoryPage, QaExpertMemoryRecord, QaExpertMemoryScope, QaFeedbackQuery, QaFeedbackRow, QaMessageFeedback, QaMessageFeedbackInput, QaQualityMetrics, QaReviewQueueItem, QaReviewQueueRow, QaSlashCatalog, QaSlashExecution, QaSlashSubmitAttachment, QaUserQuery } from "../types.js";
|
|
4
|
+
import type { QaAccountNotificationsInput, QaAccountProfileInput, QaAccountSession, QaAccountStartersInput, QaAccountStarter, QaAccountUserPublic, QaAccessAdminSnapshot, QaApprovalDecision, QaClaimResult, QaLockdownProof, QaModelCatalogEntry, QaOwnershipEntry, QaPasswordResetRequest, QaPendingApproval, QaPendingQuestion, QaQuestionAnswerItem, QaQueueStatus, QaIssuedServiceToken, QaServiceTokenCreateInput, QaServiceTokenSummary, QaSessionState, QaSkillDocument, QaSkillDraftInput, QaSkillRemoval, QaSkillSummary, QaSkillToolDescriptor, QaSkillValidation, QaSourceFilePreview, QaTurnSources, QaWhoamiResult, QaDocumentPreview, QaSpreadsheetPreviewSelection, QaWorkspaceFile, QaWorkspaceFileChunk, QaDocumentWorkflowStatus, QaWorkspaceListing, QaCapabilitySelection, QaCurrentAccess, QaSessionAccess, QaSkillActivationRecord, QaSkillAssignmentOverride, QaSubrole, QaUserAccess, QaAdminAuditEvent, QaAdminOverview, QaAdminPage, QaAdminSkillScope, QaAdminSkillsView, QaAdminUserDetail, QaAdminUserRow, QaAdminUserUpdate, QaAuditQuery, QaConversationDetail, QaConversationDeletion, QaConversationQuery, QaConversationReview, QaConversationReviewInput, QaConversationSummary, QaExpertMemoryDraft, QaExpertMemoryPage, QaExpertMemoryRecord, QaExpertMemoryScope, QaFeedbackQuery, QaFeedbackRow, QaMessageFeedback, QaMessageFeedbackInput, QaQualityMetrics, QaReviewQueueItem, QaReviewQueueRow, QaSlashCatalog, QaSlashExecution, QaSlashSubmitAttachment, QaUserQuery } from "../types.js";
|
|
5
5
|
/** Wire content one prompt carries: text plus base64 image uploads. */
|
|
6
6
|
export type QaPromptContent = Parameters<SessionFace["prompt"]>[0];
|
|
7
7
|
/** DSH session runtime surface the QA controller is allowed to touch. */
|
|
@@ -158,13 +158,14 @@ export interface QaSourceApi {
|
|
|
158
158
|
readonly ok: false;
|
|
159
159
|
readonly error: unknown;
|
|
160
160
|
}>;
|
|
161
|
-
readSourceFile(token: string, sessionId: string, sourcePath: string): Promise<{
|
|
161
|
+
readSourceFile(token: string, sessionId: string, sourcePath: string, selection?: QaSpreadsheetPreviewSelection): Promise<{
|
|
162
162
|
readonly ok: true;
|
|
163
163
|
readonly value: QaSourceFilePreview;
|
|
164
164
|
} | {
|
|
165
165
|
readonly ok: false;
|
|
166
166
|
readonly error: unknown;
|
|
167
167
|
}>;
|
|
168
|
+
readSourceImage?(token: string, sessionId: string, sourcePath: string, imagePath: string): Promise<RemoteResult<string>>;
|
|
168
169
|
/** One directory of the chat's own workspace, for the files panel. */
|
|
169
170
|
listWorkspaceFiles(token: string, sessionId: string, path: string): Promise<{
|
|
170
171
|
readonly ok: true;
|
|
@@ -186,7 +187,7 @@ export interface QaSourceApi {
|
|
|
186
187
|
* document pipeline; the panel shows the PDF the browser already knows how
|
|
187
188
|
* to draw instead of uploading the bytes anywhere.
|
|
188
189
|
*/
|
|
189
|
-
previewWorkspaceDocument(token: string, sessionId: string, path: string): Promise<{
|
|
190
|
+
previewWorkspaceDocument(token: string, sessionId: string, path: string, selection?: QaSpreadsheetPreviewSelection): Promise<{
|
|
190
191
|
readonly ok: true;
|
|
191
192
|
readonly value: QaDocumentPreview;
|
|
192
193
|
} | {
|
|
@@ -214,13 +215,14 @@ export type QaBoundSourceApi = {
|
|
|
214
215
|
readonly ok: false;
|
|
215
216
|
readonly error: unknown;
|
|
216
217
|
}>;
|
|
217
|
-
readSourceFile(sessionId: string, sourcePath: string): Promise<{
|
|
218
|
+
readSourceFile(sessionId: string, sourcePath: string, selection?: QaSpreadsheetPreviewSelection): Promise<{
|
|
218
219
|
readonly ok: true;
|
|
219
220
|
readonly value: QaSourceFilePreview;
|
|
220
221
|
} | {
|
|
221
222
|
readonly ok: false;
|
|
222
223
|
readonly error: unknown;
|
|
223
224
|
}>;
|
|
225
|
+
readSourceImage?(sessionId: string, sourcePath: string, imagePath: string): Promise<RemoteResult<string>>;
|
|
224
226
|
listWorkspaceFiles(sessionId: string, path: string): Promise<{
|
|
225
227
|
readonly ok: true;
|
|
226
228
|
readonly value: QaWorkspaceListing;
|
|
@@ -235,7 +237,7 @@ export type QaBoundSourceApi = {
|
|
|
235
237
|
readonly ok: false;
|
|
236
238
|
readonly error: unknown;
|
|
237
239
|
}>;
|
|
238
|
-
previewWorkspaceDocument(sessionId: string, path: string): Promise<{
|
|
240
|
+
previewWorkspaceDocument(sessionId: string, path: string, selection?: QaSpreadsheetPreviewSelection): Promise<{
|
|
239
241
|
readonly ok: true;
|
|
240
242
|
readonly value: QaDocumentPreview;
|
|
241
243
|
} | {
|
|
@@ -342,9 +344,13 @@ export interface QaIntegrationTokenApi {
|
|
|
342
344
|
list(): Promise<QaIntegrationTokenResult<readonly QaServiceTokenSummary[]>>;
|
|
343
345
|
create(input: QaServiceTokenCreateInput): Promise<QaIntegrationTokenResult<QaIssuedServiceToken>>;
|
|
344
346
|
revoke(tokenId: string): Promise<QaIntegrationTokenResult<null>>;
|
|
347
|
+
setClarifications?(tokenId: string, allowed: boolean): Promise<QaIntegrationTokenResult<null>>;
|
|
345
348
|
}
|
|
346
349
|
/** Account remotes exposed by the plugin's own typert namespace. */
|
|
347
350
|
export interface QaAccountsApi {
|
|
351
|
+
accountsSetServiceTokenClarifications?(token: string, tokenId: string, allowed: boolean): Promise<RemoteResult<{
|
|
352
|
+
readonly updated: boolean;
|
|
353
|
+
}>>;
|
|
348
354
|
chatVisible?(token: string): Promise<RemoteResult<readonly import("../chat-sharing/types.js").QaChatAccess[]>>;
|
|
349
355
|
accountsWhoami(token: string): Promise<RemoteResult<QaWhoamiResult>>;
|
|
350
356
|
accountsLogin(email: string, password: string): Promise<RemoteResult<QaAccountSession>>;
|
package/lib/types/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import type { Context } from "@deepseek-ai/cordis";
|
|
|
5
5
|
import type { QaSurfaceConfigRefs } from "./config.js";
|
|
6
6
|
import type { QaAccountNotificationsInput } from "./types.js";
|
|
7
7
|
import type { QaTurnSources } from "./provenance/types.js";
|
|
8
|
-
import type { QaAccountProfileInput, QaAccountSession, QaAccountStartersInput, QaAccountUserPublic, QaApprovalDecision, QaClaimResult, QaDocumentPreview, QaDocumentWorkflowStatus, QaIssuedServiceToken, QaLockdownProof, QaOwnershipEntry, QaPasswordResetRequest, QaPendingApproval, QaPendingQuestion, QaQuestionAnswerItem, QaQueueStatus, QaServiceTokenCreateInput, QaServiceTokenSummary, ResolvedQaSurfaceConfig, QaAdminSkillScope, QaAdminSkillsView, QaExpertMemoryDraft, QaExpertMemoryPage, QaExpertMemoryRecord, QaExpertMemoryScope, QaSkillDocument, QaSkillDraftInput, QaSkillRemoval, QaSkillSummary, QaSkillToolDescriptor, QaSkillValidation, QaSourceFilePreview, QaWhoamiResult, QaWorkspaceFile, QaWorkspaceFileChunk, QaWorkspaceListing, QaPrincipal, QaAccessAdminSnapshot, QaAdminAuditEvent, QaAdminOverview, QaAdminPage, QaAdminUserDetail, QaAdminUserRow, QaAdminUserUpdate, QaAuditQuery, QaCapabilitySelection, QaConversationDetail, QaConversationDeletion, QaConversationQuery, QaConversationReview, QaConversationReviewInput, QaConversationSummary, QaCurrentAccess, QaFeedbackHarvestEntry, QaFeedbackHarvestResult, QaFeedbackQuery, QaFeedbackRow, QaMessageFeedback, QaMessageFeedbackInput, QaModelCatalogEntry, QaModelPair, QaQualityMetrics, QaReviewQueueItem, QaReviewQueueRow, QaSessionAccess, QaSlashCatalog, QaSlashExecution, QaSlashSubmitAttachment, QaSkillActivationRecord, QaSkillAssignmentOverride, QaSubrole, QaUserAccess, QaUserQuery } from "./types.js";
|
|
8
|
+
import type { QaAccountProfileInput, QaAccountSession, QaAccountStartersInput, QaAccountUserPublic, QaApprovalDecision, QaClaimResult, QaDocumentPreview, QaSpreadsheetPreviewSelection, QaDocumentWorkflowStatus, QaIssuedServiceToken, QaLockdownProof, QaOwnershipEntry, QaPasswordResetRequest, QaPendingApproval, QaPendingQuestion, QaQuestionAnswerItem, QaQueueStatus, QaServiceTokenCreateInput, QaServiceTokenSummary, ResolvedQaSurfaceConfig, QaAdminSkillScope, QaAdminSkillsView, QaExpertMemoryDraft, QaExpertMemoryPage, QaExpertMemoryRecord, QaExpertMemoryScope, QaSkillDocument, QaSkillDraftInput, QaSkillRemoval, QaSkillSummary, QaSkillToolDescriptor, QaSkillValidation, QaSourceFilePreview, QaWhoamiResult, QaWorkspaceFile, QaWorkspaceFileChunk, QaWorkspaceListing, QaPrincipal, QaAccessAdminSnapshot, QaAdminAuditEvent, QaAdminOverview, QaAdminPage, QaAdminUserDetail, QaAdminUserRow, QaAdminUserUpdate, QaAuditQuery, QaCapabilitySelection, QaConversationDetail, QaConversationDeletion, QaConversationQuery, QaConversationReview, QaConversationReviewInput, QaConversationSummary, QaCurrentAccess, QaFeedbackHarvestEntry, QaFeedbackHarvestResult, QaFeedbackQuery, QaFeedbackRow, QaMessageFeedback, QaMessageFeedbackInput, QaModelCatalogEntry, QaModelPair, QaQualityMetrics, QaReviewQueueItem, QaReviewQueueRow, QaSessionAccess, QaSlashCatalog, QaSlashExecution, QaSlashSubmitAttachment, QaSkillActivationRecord, QaSkillAssignmentOverride, QaSubrole, QaUserAccess, QaUserQuery } from "./types.js";
|
|
9
9
|
export declare const name = "qa-surface";
|
|
10
10
|
export declare const inject: string[];
|
|
11
11
|
import { QA_SURFACE_SETTINGS_NAMESPACE } from "./shared/settings.js";
|
|
@@ -214,6 +214,9 @@ export declare class QaSurface extends TypertRemoteService {
|
|
|
214
214
|
accountsRevokeServiceToken(token: string, tokenId: string): {
|
|
215
215
|
readonly revoked: boolean;
|
|
216
216
|
};
|
|
217
|
+
accountsSetServiceTokenClarifications(token: string, tokenId: string, allowed: boolean): {
|
|
218
|
+
readonly updated: boolean;
|
|
219
|
+
};
|
|
217
220
|
/**
|
|
218
221
|
* Serve the effective QA configuration to the browser. The DSH gateway pins
|
|
219
222
|
* settings RPCs to loopback, so a browser served over the LAN always sees
|
|
@@ -405,7 +408,9 @@ export declare class QaSurface extends TypertRemoteService {
|
|
|
405
408
|
* read — the normal case for a deployment whose docs and code live beside
|
|
406
409
|
* the per-account scratch directory — could never be opened in the panel.
|
|
407
410
|
*/
|
|
408
|
-
readSourceFile(token: string, sessionId: string, sourcePath: string): Promise<QaSourceFilePreview>;
|
|
411
|
+
readSourceFile(token: string, sessionId: string, sourcePath: string, selection?: QaSpreadsheetPreviewSelection): Promise<QaSourceFilePreview>;
|
|
412
|
+
/** Load one relative raster illustration of an attested Markdown source. */
|
|
413
|
+
readSourceImage(token: string, sessionId: string, sourcePath: string, imagePath: string): Promise<string>;
|
|
409
414
|
/**
|
|
410
415
|
* List one directory of the chat's own workspace for the files panel.
|
|
411
416
|
*
|
|
@@ -439,7 +444,7 @@ export declare class QaSurface extends TypertRemoteService {
|
|
|
439
444
|
* produced PDF is read back here and travels as base64, so the audience never
|
|
440
445
|
* reaches an unfenced byte route.
|
|
441
446
|
*/
|
|
442
|
-
previewWorkspaceDocument(token: string, sessionId: string, path: string): Promise<QaDocumentPreview>;
|
|
447
|
+
previewWorkspaceDocument(token: string, sessionId: string, path: string, selection?: QaSpreadsheetPreviewSelection): Promise<QaDocumentPreview>;
|
|
443
448
|
/**
|
|
444
449
|
* Shared admission facts of both browse methods: the preview switch is what
|
|
445
450
|
* opens the panel's file reading at all, and the chat's cwd is the tree that
|
|
@@ -166,6 +166,7 @@ export interface QaIntegrationRunner {
|
|
|
166
166
|
/** The chat to continue, or null for a new conversation. */
|
|
167
167
|
readonly chatId: string | null;
|
|
168
168
|
readonly message: string;
|
|
169
|
+
readonly allowClarifications?: boolean;
|
|
169
170
|
readonly attachments: readonly QaIntegrationAttachment[];
|
|
170
171
|
readonly ticketKey: string | null;
|
|
171
172
|
/** Ends the wait: the caller's own lifetime merged with the deployment's budget. */
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { Context } from "@deepseek-ai/cordis";
|
|
2
|
+
import type { Agent } from "@deepseek-ai/dsh-agent";
|
|
3
|
+
import type { QaAccounts } from "../accounts/store.js";
|
|
4
|
+
export declare const QA_INTEGRATION_NO_CLARIFICATIONS = "Clarifying questions are disabled for this integration turn. Do not call ask_user_question or ask follow-up questions in your answer. Answer from available evidence, label assumptions and missing facts, and state what cannot be determined when evidence is insufficient. Do not invent facts or bypass permission approvals.";
|
|
5
|
+
/** A queued request's durable policy follows its turn and its delegated agents. */
|
|
6
|
+
export declare class QaIntegrationQuestionPolicy {
|
|
7
|
+
private readonly ctx;
|
|
8
|
+
private readonly accounts;
|
|
9
|
+
private readonly qaRoot;
|
|
10
|
+
private readonly turns;
|
|
11
|
+
private readonly notes;
|
|
12
|
+
private readonly disposers;
|
|
13
|
+
constructor(ctx: Context, accounts: () => QaAccounts | undefined, qaRoot?: (id: string) => string | undefined);
|
|
14
|
+
allowed(agent: Agent): boolean;
|
|
15
|
+
private root;
|
|
16
|
+
/** Recover after a plugin reload from consumed messages, never queued future input. */
|
|
17
|
+
private recover;
|
|
18
|
+
dispose(): void;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=question-policy.d.ts.map
|
|
@@ -31,6 +31,7 @@ export declare const QA_INTEGRATION_MAX_CITATIONS = 5;
|
|
|
31
31
|
export declare function sourceCitations(sources: readonly QaSourceReference[]): readonly string[];
|
|
32
32
|
/** Who a presented credential turned out to be. */
|
|
33
33
|
export interface QaIntegrationIdentity {
|
|
34
|
+
readonly allowClarifications: boolean;
|
|
34
35
|
readonly tokenId: string;
|
|
35
36
|
readonly userId: string;
|
|
36
37
|
readonly scopes: readonly QaServiceTokenScope[];
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Service, type Context } from "@deepseek-ai/cordis";
|
|
2
|
+
import type { QaAccounts } from "./accounts/store.js";
|
|
3
|
+
interface IdentityAccounts {
|
|
4
|
+
ownerIdOf: QaAccounts["ownerIdOf"];
|
|
5
|
+
accountById: QaAccounts["accountById"];
|
|
6
|
+
}
|
|
7
|
+
export interface QaLlmIdentityOptions {
|
|
8
|
+
/** Resolves only roots attested by this QA deployment and their live children. */
|
|
9
|
+
rootOf(sessionId: string): string | undefined;
|
|
10
|
+
accounts(): IdentityAccounts | undefined;
|
|
11
|
+
}
|
|
12
|
+
/** Runtime-only identity seam; it grants no account or tool access. */
|
|
13
|
+
export declare class QaLlmIdentity extends Service {
|
|
14
|
+
private readonly options;
|
|
15
|
+
constructor(ctx: Context, options: QaLlmIdentityOptions);
|
|
16
|
+
/** Stable pseudonym of the chat's active owner, never the browser viewing it. */
|
|
17
|
+
forSession(sessionId: string): string | undefined;
|
|
18
|
+
}
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=llm-identity.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { QaSourceMetadata } from "./provenance/types.js";
|
|
2
|
+
export interface MarkdownFrontmatter {
|
|
3
|
+
readonly body: string;
|
|
4
|
+
/** Physical lines removed, including both fences. */
|
|
5
|
+
readonly offset: number;
|
|
6
|
+
readonly fields: QaSourceMetadata;
|
|
7
|
+
}
|
|
8
|
+
/** Only a complete, bounded YAML mapping at the start earns a metadata card. */
|
|
9
|
+
export declare function readFrontmatter(text: string): MarkdownFrontmatter | undefined;
|
|
10
|
+
//# sourceMappingURL=markdown-frontmatter.d.ts.map
|
|
@@ -41,7 +41,7 @@ export declare const QA_IDENTITY_NOTE_TEMPLATE = "{identity}\n\n{instructions}";
|
|
|
41
41
|
export declare const QA_SOURCES_NOTE_TEMPLATE = "Source provenance is collected automatically from your tool calls; the QA surface lists what it collected beside the answer. Do not append a manual Sources/\u0418\u0441\u0442\u043E\u0447\u043D\u0438\u043A\u0438 bibliography of your own.";
|
|
42
42
|
export declare const QA_SOURCES_FALLBACK_TEMPLATE = "A delegated run whose provider cannot expose tool events must call {reportTool} before finishing.";
|
|
43
43
|
export declare const QA_DELEGATION_NOTE_TEMPLATE = "When you start a background subagent, give the delegation a short vivid name in its description field: two or three words in the user's language that say what the run is for (\u00AB\u0421\u0432\u0435\u0440\u043A\u0430 \u043E\u0442\u0447\u0451\u0442\u043E\u0432\u00BB, \"Log triage\"). The QA surface shows that description as the subagent's display name in the operator's panel and completion notices.";
|
|
44
|
-
export declare const QA_DOCUMENTS_NOTE_TEMPLATE = "A document a chat user attached is a path on disk, not text: read it with the deployment's document pipeline \u2014 `document_inspect` says what a DOCX or PDF is, `document_to_markdown` extracts its text, `document_from_url` stores the text of an attachment that only exists behind a URL. The plain file reader refuses those formats as binary, so that refusal is expected and is not a hint to go looking for the file somewhere else. When the pipeline itself refuses a path, report the refusal and the path it named instead of trying another reader.";
|
|
44
|
+
export declare const QA_DOCUMENTS_NOTE_TEMPLATE = "A document a chat user attached is a path on disk, not text: read it with the deployment's document pipeline \u2014 `document_inspect` says what a DOCX or PDF is, `document_to_markdown` extracts its text, `document_from_url` stores the text of an attachment that only exists behind a URL. For XLSX, CSV, TSV, ODS or FODS, `spreadsheet_inspect` lists all sheets and detects text delimiter/encoding, `spreadsheet_read` reads pages, and `spreadsheet_create` creates a file in the selected format. CSV/TSV have one Data sheet with string fields; reuse detected delimiter and encoding when paging. XLSX/ODS/FODS support multiple sheets. Inspect all sheet names before selecting data; formula values are saved caches, not recalculated results. The plain file reader refuses those formats as binary, so that refusal is expected and is not a hint to go looking for the file somewhere else. When the pipeline itself refuses a path, report the refusal and the path it named instead of trying another reader.";
|
|
45
45
|
export declare const QA_SOURCE_PRIORITY_NOTE_TEMPLATE = "Answer from the source that owns the question: read what the conversation and its attachments already carry, then search the product documentation and ask the domain expert, and only then look in memory. Recalled memory is background from earlier sessions \u2014 a miss there is not evidence that no source exists, and it is not where a document, a page or a product fact should be looked up.";
|
|
46
46
|
export interface QaIdentityRenderInput {
|
|
47
47
|
/** The owner's account address; the one fact accounts always provide. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { DocumentsFace } from "@yadsh/dsh-documents";
|
|
2
|
-
import type { QaDocumentPreview } from "../types.js";
|
|
2
|
+
import type { QaDocumentPreview, QaSpreadsheetPreviewSelection } from "../types.js";
|
|
3
3
|
import { type QaAllowedFileRequest } from "./file-preview.js";
|
|
4
4
|
/** Look up the document subsystem a sibling Host plugin published. */
|
|
5
5
|
export type DocumentsLookup = () => DocumentsFace | undefined;
|
|
@@ -9,6 +9,7 @@ export interface QaDocumentPreviewRequest extends QaAllowedFileRequest {
|
|
|
9
9
|
readonly sessionId: string;
|
|
10
10
|
/** Bytes of the rendered PDF the panel accepts before it gives up. */
|
|
11
11
|
readonly maxBytes: number;
|
|
12
|
+
readonly selection?: QaSpreadsheetPreviewSelection;
|
|
12
13
|
}
|
|
13
14
|
/**
|
|
14
15
|
* Render one Word document as a PDF for the files panel.
|
|
@@ -24,7 +25,7 @@ export interface QaDocumentPreviewRequest extends QaAllowedFileRequest {
|
|
|
24
25
|
* an uploaded Word file lives in the attachment store, and a pipeline that is
|
|
25
26
|
* not told about that root refuses the file this check just accepted.
|
|
26
27
|
*/
|
|
27
|
-
export declare function previewConvertibleDocument({ documents, sessionId, maxBytes, ...file }: QaDocumentPreviewRequest): Promise<QaDocumentPreview>;
|
|
28
|
+
export declare function previewConvertibleDocument({ documents, sessionId, maxBytes, selection, ...file }: QaDocumentPreviewRequest): Promise<QaDocumentPreview>;
|
|
28
29
|
/** Native PDF or pipeline preview, after the caller has verified chat evidence. */
|
|
29
30
|
export declare function previewSourceDocument(request: QaDocumentPreviewRequest): Promise<QaDocumentPreview>;
|
|
30
31
|
//# sourceMappingURL=document-preview.d.ts.map
|