@yadsh/dsh-qa-surface 0.15.7 → 0.16.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 +8 -0
- package/lib/access/capability-catalog.js +11 -4
- package/lib/access/capability-catalog.js.map +1 -1
- package/lib/access/service.js +46 -5
- package/lib/access/service.js.map +1 -1
- package/lib/accounts/store.js +2 -2
- package/lib/accounts/store.js.map +1 -1
- package/lib/admin/service.js +4 -2
- package/lib/admin/service.js.map +1 -1
- package/lib/admin/session-log.js +3 -0
- package/lib/admin/session-log.js.map +1 -1
- package/lib/agent-scope.js +9 -0
- package/lib/agent-scope.js.map +1 -0
- package/lib/chat-sharing/native-fence.js +111 -0
- package/lib/chat-sharing/native-fence.js.map +1 -0
- package/lib/chat-sharing/resources.js +57 -0
- package/lib/chat-sharing/resources.js.map +1 -0
- package/lib/chat-sharing/store.js +193 -0
- package/lib/chat-sharing/store.js.map +1 -0
- package/lib/chat-sharing/transport.js +274 -0
- package/lib/chat-sharing/transport.js.map +1 -0
- package/lib/chat-sharing/turn-guard.js +154 -0
- package/lib/chat-sharing/turn-guard.js.map +1 -0
- package/lib/chat-sharing/types.js +2 -0
- package/lib/chat-sharing/types.js.map +1 -0
- package/lib/chat-sharing/uploads.js +55 -0
- package/lib/chat-sharing/uploads.js.map +1 -0
- package/lib/client/QaAccountsController.js +29 -2
- package/lib/client/QaAccountsController.js.map +1 -1
- package/lib/client/QaConfigController.js +7 -12
- package/lib/client/QaConfigController.js.map +1 -1
- package/lib/client/QaSessionController.js +186 -19
- package/lib/client/QaSessionController.js.map +1 -1
- package/lib/client/QaSurface.js +110 -9
- package/lib/client/QaSurface.js.map +1 -1
- package/lib/client/QaSurfaceGuard.js +6 -1
- package/lib/client/QaSurfaceGuard.js.map +1 -1
- package/lib/client/QaTranscriptAdapter.js +13 -3
- package/lib/client/QaTranscriptAdapter.js.map +1 -1
- package/lib/client/account-conversation.js +33 -0
- package/lib/client/account-conversation.js.map +1 -0
- package/lib/client/account-sessions.js +106 -0
- package/lib/client/account-sessions.js.map +1 -0
- package/lib/client/account-upload.js +30 -0
- package/lib/client/account-upload.js.map +1 -0
- package/lib/client/chat-artifacts.js +17 -3
- package/lib/client/chat-artifacts.js.map +1 -1
- package/lib/client/chat-sharing-api.js +2 -0
- package/lib/client/chat-sharing-api.js.map +1 -0
- package/lib/client/components/QaChangelog.js +57 -3
- package/lib/client/components/QaChangelog.js.map +1 -1
- package/lib/client/components/QaChatSharing.js +92 -0
- package/lib/client/components/QaChatSharing.js.map +1 -0
- package/lib/client/components/QaComposer.js +8 -4
- package/lib/client/components/QaComposer.js.map +1 -1
- package/lib/client/components/QaFileAttachment.js +12 -3
- package/lib/client/components/QaFileAttachment.js.map +1 -1
- package/lib/client/components/QaFilesPanel.js +11 -4
- package/lib/client/components/QaFilesPanel.js.map +1 -1
- package/lib/client/components/QaHeader.js +3 -3
- package/lib/client/components/QaHeader.js.map +1 -1
- package/lib/client/components/QaMessage.js +34 -9
- package/lib/client/components/QaMessage.js.map +1 -1
- package/lib/client/components/QaSidebar.js +1 -1
- package/lib/client/components/QaSidebar.js.map +1 -1
- package/lib/client/components/QaSourcesPanel.js +12 -4
- package/lib/client/components/QaSourcesPanel.js.map +1 -1
- package/lib/client/components/QaWorkspaceBrowser.js +28 -7
- package/lib/client/components/QaWorkspaceBrowser.js.map +1 -1
- package/lib/client/components/source-refs.js +42 -23
- package/lib/client/components/source-refs.js.map +1 -1
- package/lib/client/index.js +60 -6
- package/lib/client/index.js.map +1 -1
- package/lib/client/lineage.js +4 -3
- package/lib/client/lineage.js.map +1 -1
- package/lib/client/markdown/katex-css.js +1 -1
- package/lib/client/markdown/render.js +3 -4
- package/lib/client/markdown/render.js.map +1 -1
- package/lib/client/markdown/source-chip.js +4 -1
- package/lib/client/markdown/source-chip.js.map +1 -1
- package/lib/client/notifications/notification-dispatcher.js +50 -11
- package/lib/client/notifications/notification-dispatcher.js.map +1 -1
- package/lib/client/notifications/use-turn-notifications.js +107 -18
- package/lib/client/notifications/use-turn-notifications.js.map +1 -1
- package/lib/client/project-session-state.js +28 -13
- package/lib/client/project-session-state.js.map +1 -1
- package/lib/client/session-admission.js +9 -1
- package/lib/client/session-admission.js.map +1 -1
- package/lib/client/session-sources.js +44 -3
- package/lib/client/session-sources.js.map +1 -1
- package/lib/client/slash/useSlashNavigation.js +8 -5
- package/lib/client/slash/useSlashNavigation.js.map +1 -1
- package/lib/client/source-preview.js +1 -1
- package/lib/client/source-preview.js.map +1 -1
- package/lib/client/styles.js +9 -2
- package/lib/client/styles.js.map +1 -1
- package/lib/client/turn-sources.js +2 -1
- package/lib/client/turn-sources.js.map +1 -1
- package/lib/client/types.js.map +1 -1
- package/lib/client/workspace-download.js +42 -2
- package/lib/client/workspace-download.js.map +1 -1
- package/lib/client.js +3329 -947
- package/lib/client.js.map +1 -1
- package/lib/enforcement/skill-policy.js +29 -4
- package/lib/enforcement/skill-policy.js.map +1 -1
- package/lib/enforcement/skill-resource-paths.js +32 -0
- package/lib/enforcement/skill-resource-paths.js.map +1 -0
- package/lib/enforcement/structured-result.js +38 -0
- package/lib/enforcement/structured-result.js.map +1 -0
- package/lib/enforcement/tool-grants.js +3 -1
- package/lib/enforcement/tool-grants.js.map +1 -1
- package/lib/index.js +397 -14
- package/lib/index.js.map +1 -1
- package/lib/prompt-notes.js +18 -1
- package/lib/prompt-notes.js.map +1 -1
- package/lib/provenance/collector.js +13 -1
- package/lib/provenance/collector.js.map +1 -1
- package/lib/provenance/connectors.js +32 -8
- package/lib/provenance/connectors.js.map +1 -1
- package/lib/provenance/dedupe.js +8 -1
- package/lib/provenance/dedupe.js.map +1 -1
- package/lib/provenance/document-preview.js +19 -1
- package/lib/provenance/document-preview.js.map +1 -1
- package/lib/provenance/extractors.js +67 -1
- package/lib/provenance/extractors.js.map +1 -1
- package/lib/provenance/file-download.js +56 -0
- package/lib/provenance/file-download.js.map +1 -0
- package/lib/provenance/file-preview.js +12 -1
- package/lib/provenance/file-preview.js.map +1 -1
- package/lib/provenance/host-store.js +59 -10
- package/lib/provenance/host-store.js.map +1 -1
- package/lib/provenance/integration-extractor.js +63 -0
- package/lib/provenance/integration-extractor.js.map +1 -0
- package/lib/qa-tools/docs-tools.js +14 -0
- package/lib/qa-tools/docs-tools.js.map +1 -1
- package/lib/secure-session.js +9 -3
- package/lib/secure-session.js.map +1 -1
- package/lib/session-fork-host.js +157 -0
- package/lib/session-fork-host.js.map +1 -0
- package/lib/session-fork.js +34 -0
- package/lib/session-fork.js.map +1 -0
- package/lib/session-ownership.js +5 -1
- package/lib/session-ownership.js.map +1 -1
- package/lib/shared/session-lineage.js +6 -0
- package/lib/shared/session-lineage.js.map +1 -0
- package/lib/slash/draft-target.js +21 -0
- package/lib/slash/draft-target.js.map +1 -0
- package/lib/slash/remotes.js +39 -4
- package/lib/slash/remotes.js.map +1 -1
- package/lib/typert.host.js +1633 -236
- package/lib/typert.remote-client.d.ts +48 -1
- package/lib/typert.remote-client.js +1477 -234
- package/lib/types/access/capability-catalog.d.ts +1 -1
- package/lib/types/access/service.d.ts +7 -0
- package/lib/types/access.js +2 -0
- package/lib/types/access.js.map +1 -0
- package/lib/types/accounts/store.d.ts +1 -1
- package/lib/types/accounts.js +2 -0
- package/lib/types/accounts.js.map +1 -0
- package/lib/types/admin/session-log.d.ts +2 -0
- package/lib/types/admin.js +2 -0
- package/lib/types/admin.js.map +1 -0
- package/lib/types/agent-scope.d.ts +4 -0
- package/lib/types/capability.js +2 -0
- package/lib/types/capability.js.map +1 -0
- package/lib/types/chat-sharing/native-fence.d.ts +11 -0
- package/lib/types/chat-sharing/resources.d.ts +5 -0
- package/lib/types/chat-sharing/store.d.ts +28 -0
- package/lib/types/chat-sharing/transport.d.ts +31 -0
- package/lib/types/chat-sharing/turn-guard.d.ts +21 -0
- package/lib/types/chat-sharing/types.d.ts +25 -0
- package/lib/types/chat-sharing/uploads.d.ts +5 -0
- package/lib/types/client/QaAccountsController.d.ts +3 -0
- package/lib/types/client/QaConfigController.d.ts +3 -2
- package/lib/types/client/QaSessionController.d.ts +17 -3
- package/lib/types/client/QaSurface.d.ts +6 -1
- package/lib/types/client/account-conversation.d.ts +6 -0
- package/lib/types/client/account-sessions.d.ts +7 -0
- package/lib/types/client/account-upload.d.ts +15 -0
- package/lib/types/client/chat-sharing-api.d.ts +35 -0
- package/lib/types/client/components/QaChatSharing.d.ts +10 -0
- package/lib/types/client/components/QaComposer.d.ts +2 -0
- package/lib/types/client/components/QaFileAttachment.d.ts +3 -2
- package/lib/types/client/components/QaFilesPanel.d.ts +4 -1
- package/lib/types/client/components/QaMessage.d.ts +5 -2
- package/lib/types/client/components/QaWorkspaceBrowser.d.ts +8 -1
- package/lib/types/client/components/source-refs.d.ts +1 -0
- package/lib/types/client/lineage.d.ts +2 -2
- package/lib/types/client/notifications/notification-dispatcher.d.ts +10 -6
- package/lib/types/client/notifications/use-turn-notifications.d.ts +4 -0
- package/lib/types/client/project-session-state.d.ts +1 -0
- package/lib/types/client/session-admission.d.ts +2 -0
- package/lib/types/client/session-sources.d.ts +1 -0
- package/lib/types/client/turn-sources.d.ts +1 -1
- package/lib/types/client/types.d.ts +8 -1
- package/lib/types/client/workspace-download.d.ts +9 -1
- package/lib/types/config.js +2 -0
- package/lib/types/config.js.map +1 -0
- package/lib/types/documents.js +2 -0
- package/lib/types/documents.js.map +1 -0
- package/lib/types/enforcement/skill-resource-paths.d.ts +5 -0
- package/lib/types/enforcement/structured-result.d.ts +11 -0
- package/lib/types/expert-memory.js +2 -0
- package/lib/types/expert-memory.js.map +1 -0
- package/lib/types/index.d.ts +35 -1
- package/lib/types/policy.js +2 -0
- package/lib/types/policy.js.map +1 -0
- package/lib/types/prompt-notes.d.ts +2 -0
- package/lib/types/provenance/connectors.d.ts +4 -1
- package/lib/types/provenance/document-preview.d.ts +2 -0
- package/lib/types/provenance/extractors.d.ts +2 -0
- package/lib/types/provenance/file-download.d.ts +10 -0
- package/lib/types/provenance/host-store.d.ts +2 -0
- package/lib/types/provenance/integration-extractor.d.ts +5 -0
- package/lib/types/provenance/types.d.ts +2 -0
- package/lib/types/qa-tools/docs-tools.d.ts +2 -0
- package/lib/types/quality.js +7 -0
- package/lib/types/quality.js.map +1 -0
- package/lib/types/session-fork-host.d.ts +27 -0
- package/lib/types/session-fork.d.ts +7 -0
- package/lib/types/session.js +2 -0
- package/lib/types/session.js.map +1 -0
- package/lib/types/shared/session-lineage.d.ts +7 -0
- package/lib/types/skills.js +2 -0
- package/lib/types/skills.js.map +1 -0
- package/lib/types/slash/draft-target.d.ts +7 -0
- package/lib/types/slash/remotes.d.ts +7 -0
- package/lib/types/slash.js +2 -0
- package/lib/types/slash.js.map +1 -0
- package/lib/types/types/access.d.ts +43 -0
- package/lib/types/types/accounts.d.ts +173 -0
- package/lib/types/types/admin.d.ts +286 -0
- package/lib/types/types/capability.d.ts +230 -0
- package/lib/types/types/config.d.ts +594 -0
- package/lib/types/types/documents.d.ts +34 -0
- package/lib/types/types/expert-memory.d.ts +35 -0
- package/lib/types/types/policy.d.ts +54 -0
- package/lib/types/types/quality.d.ts +100 -0
- package/lib/types/types/session.d.ts +382 -0
- package/lib/types/types/skills.d.ts +143 -0
- package/lib/types/types/slash.d.ts +159 -0
- package/lib/types/types.d.ts +13 -2180
- package/package.json +8 -7
|
@@ -59,10 +59,14 @@ export declare function readNotificationPermission(): QaNotificationPermission;
|
|
|
59
59
|
* asks on load — or once per finished turn — spends it on the wrong moment.
|
|
60
60
|
*/
|
|
61
61
|
export declare function requestNotificationPermission(): Promise<QaNotificationPermission>;
|
|
62
|
-
/**
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
*/
|
|
67
|
-
|
|
62
|
+
/** One surface's desktop handles, retained until closed or retired. */
|
|
63
|
+
export declare class QaDesktopNotices {
|
|
64
|
+
private readonly handles;
|
|
65
|
+
retain(notice: Notification, sessionId: string, onOpen?: (sessionId: string) => void): void;
|
|
66
|
+
/** Revoke callbacks even where the operating system refuses close(). */
|
|
67
|
+
close(sessionId?: string): void;
|
|
68
|
+
keep(sessionIds: ReadonlySet<string>): void;
|
|
69
|
+
}
|
|
70
|
+
/** The session id stays in the callback, never in the desktop payload. */
|
|
71
|
+
export declare function raiseDesktopNotice(completion: QaTurnCompletion, onOpen?: (sessionId: string) => void, notices?: QaDesktopNotices): boolean;
|
|
68
72
|
//# sourceMappingURL=notification-dispatcher.d.ts.map
|
|
@@ -5,6 +5,10 @@ import { type QaChatActivity } from "./turn-completion-source.js";
|
|
|
5
5
|
export interface QaTurnNotificationsInput {
|
|
6
6
|
/** The sidebar's rows: this browser's chats with their running state. */
|
|
7
7
|
readonly chats: readonly QaChatActivity[];
|
|
8
|
+
/** Authenticated identity, null behind the gate or with accounts disabled. */
|
|
9
|
+
readonly principal: string | null;
|
|
10
|
+
/** False while the controller or host list is still restoring. */
|
|
11
|
+
readonly chatsReady?: boolean;
|
|
8
12
|
/**
|
|
9
13
|
* The chats this account owns outright, which is narrower than the rows: an
|
|
10
14
|
* admin's shared history lists chats it only reads, and the turn of such a
|
|
@@ -8,6 +8,7 @@ export interface QaBoundProjectionInput {
|
|
|
8
8
|
readonly sessionId: string;
|
|
9
9
|
/** Chat identity from the controller; see `QaSessionState.chatKey`. */
|
|
10
10
|
readonly chatKey: number;
|
|
11
|
+
readonly inheritedThroughSeq?: number;
|
|
11
12
|
readonly sessionSnapshot: ReturnType<SessionFace["getSnapshot"]>;
|
|
12
13
|
/**
|
|
13
14
|
* The Host's Inbox projection for this session: the messages waiting for the
|
|
@@ -2,6 +2,8 @@ import type { QaSecureSession } from "./types.js";
|
|
|
2
2
|
import type { ResolvedQaSurfaceConfig } from "../types.js";
|
|
3
3
|
export type QaAttestationOutcome = {
|
|
4
4
|
readonly ok: true;
|
|
5
|
+
readonly inheritedThroughSeq?: number;
|
|
6
|
+
readonly chatAccess?: import("../chat-sharing/types.js").QaChatAccess;
|
|
5
7
|
} | {
|
|
6
8
|
readonly ok: false;
|
|
7
9
|
/** The identity is absent or expired; the caller returns to the gate. */
|
|
@@ -14,6 +14,7 @@ export declare class QaHostSourceBridge {
|
|
|
14
14
|
private refreshing;
|
|
15
15
|
/** The refusal already reported, so a repeating failure reaches the console once. */
|
|
16
16
|
private refusal;
|
|
17
|
+
private sessionId;
|
|
17
18
|
/** Bumped on reset so a stale in-flight fetch never lands. */
|
|
18
19
|
private generation;
|
|
19
20
|
constructor(sourceApi: QaSourceApi, token: () => string);
|
|
@@ -8,7 +8,7 @@ export declare function chatLegacyOf(snapshot: ConversationSnapshot | undefined)
|
|
|
8
8
|
* metadata is persisted by DSH, this projection is identical on live updates
|
|
9
9
|
* and replay and requires no assistant-authored bibliography.
|
|
10
10
|
*/
|
|
11
|
-
export declare function projectTurnSources(snapshot: ConversationSnapshot | undefined, sessionId?: string, workspaceRoot?: string): readonly QaTurnSources[];
|
|
11
|
+
export declare function projectTurnSources(snapshot: ConversationSnapshot | undefined, sessionId?: string, workspaceRoot?: string, documentationRoot?: string): readonly QaTurnSources[];
|
|
12
12
|
/**
|
|
13
13
|
* The directory a projected source path is anchored on: the chat's own cwd.
|
|
14
14
|
*
|
|
@@ -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, 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, 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. */
|
|
@@ -30,6 +30,8 @@ export type QaSecureSession = (token: string, sessionId: string) => Promise<{
|
|
|
30
30
|
}>;
|
|
31
31
|
/** Host-authoritative creation: identity, cwd and policy never come from the browser. */
|
|
32
32
|
export type QaCreateSession = (token: string, subroleId: string | null, adminPreview: boolean) => Promise<RemoteResult<string>>;
|
|
33
|
+
/** Owner-scoped exact-history branch; the Host chooses all child policy. */
|
|
34
|
+
export type QaForkSession = (token: string, sourceId: string, answerSeq: number) => Promise<RemoteResult<string>>;
|
|
33
35
|
/**
|
|
34
36
|
* The Host's live read of the request ceiling (`qaSurface/queueStatus`), asked
|
|
35
37
|
* per send: how many questions the stand is answering and whether one more
|
|
@@ -146,6 +148,9 @@ export interface QaFileUpload {
|
|
|
146
148
|
}>;
|
|
147
149
|
}
|
|
148
150
|
export interface QaSourceApi {
|
|
151
|
+
documentWorkflowStatus?(token: string, sessionId: string, workflowId: string): Promise<RemoteResult<QaDocumentWorkflowStatus>>;
|
|
152
|
+
approveDocumentWorkflow?(token: string, sessionId: string, workflowId: string, revision: number, sha256: string): Promise<RemoteResult<QaDocumentWorkflowStatus>>;
|
|
153
|
+
readWorkspaceFileChunk?(token: string, sessionId: string, path: string, offset: number, version: string | null): Promise<RemoteResult<QaWorkspaceFileChunk>>;
|
|
149
154
|
sources(token: string, sessionId: string): Promise<{
|
|
150
155
|
readonly ok: true;
|
|
151
156
|
readonly value: readonly QaTurnSources[];
|
|
@@ -201,6 +206,7 @@ export interface QaSlashApi {
|
|
|
201
206
|
}
|
|
202
207
|
/** A source API with the account token already bound at the call site. */
|
|
203
208
|
export type QaBoundSourceApi = {
|
|
209
|
+
readWorkspaceFileChunk?(sessionId: string, path: string, offset: number, version: string | null): Promise<RemoteResult<QaWorkspaceFileChunk>>;
|
|
204
210
|
sources(sessionId: string): Promise<{
|
|
205
211
|
readonly ok: true;
|
|
206
212
|
readonly value: readonly QaTurnSources[];
|
|
@@ -339,6 +345,7 @@ export interface QaIntegrationTokenApi {
|
|
|
339
345
|
}
|
|
340
346
|
/** Account remotes exposed by the plugin's own typert namespace. */
|
|
341
347
|
export interface QaAccountsApi {
|
|
348
|
+
chatVisible?(token: string): Promise<RemoteResult<readonly import("../chat-sharing/types.js").QaChatAccess[]>>;
|
|
342
349
|
accountsWhoami(token: string): Promise<RemoteResult<QaWhoamiResult>>;
|
|
343
350
|
accountsLogin(email: string, password: string): Promise<RemoteResult<QaAccountSession>>;
|
|
344
351
|
accountsRegister(email: string, password: string): Promise<RemoteResult<QaAccountSession>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { QaWorkspaceFile } from "../types.js";
|
|
1
|
+
import type { QaWorkspaceFile, QaWorkspaceFileChunk } from "../types.js";
|
|
2
2
|
/**
|
|
3
3
|
* Handing one file of the chat's workspace to the person the turn produced it
|
|
4
4
|
* for.
|
|
@@ -13,4 +13,12 @@ import type { QaWorkspaceFile } from "../types.js";
|
|
|
13
13
|
export declare function fileNameOf(path: string): string;
|
|
14
14
|
/** Save one workspace file under its own name. */
|
|
15
15
|
export declare function downloadWorkspaceFile(file: QaWorkspaceFile): void;
|
|
16
|
+
/** Read one immutable file version in full; a refusal never saves partial bytes. */
|
|
17
|
+
export declare function downloadWorkspacePath(path: string, read: (offset: number, version: string | null) => Promise<{
|
|
18
|
+
readonly ok: true;
|
|
19
|
+
readonly value: QaWorkspaceFileChunk;
|
|
20
|
+
} | {
|
|
21
|
+
readonly ok: false;
|
|
22
|
+
readonly error: unknown;
|
|
23
|
+
}>): Promise<void>;
|
|
16
24
|
//# sourceMappingURL=workspace-download.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/types/config.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"documents.js","sourceRoot":"","sources":["../../src/types/documents.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { SkillResourceBase } from "@deepseek-ai/dsh-skill";
|
|
2
|
+
/** Guidance only: no file contents, path rewriting or permission grant. */
|
|
3
|
+
export declare function skillResourcePathHint(requested: unknown, loaded: ReadonlyMap<string, SkillResourceBase>, exists?: (candidate: string) => boolean): string | undefined;
|
|
4
|
+
export declare function skillResourceGuidance(resource: SkillResourceBase | undefined): string;
|
|
5
|
+
//# sourceMappingURL=skill-resource-paths.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Agent } from "@deepseek-ai/dsh-agent";
|
|
2
|
+
import type { Context } from "@deepseek-ai/cordis";
|
|
3
|
+
/**
|
|
4
|
+
* Native delegation's result channel is not a working capability. Admit only
|
|
5
|
+
* the exact child-owned capture registration, never a global/inherited tool
|
|
6
|
+
* with the same name. Registrations and session lineage are Host-owned; model
|
|
7
|
+
* arguments cannot create either. Schema validation and authoritative capture
|
|
8
|
+
* remain the native driver's responsibility.
|
|
9
|
+
*/
|
|
10
|
+
export declare function isDelegatedStructuredResult(ctx: Context, agent: Agent | undefined, name: string): boolean;
|
|
11
|
+
//# sourceMappingURL=structured-result.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"expert-memory.js","sourceRoot":"","sources":["../../src/types/expert-memory.ts"],"names":[],"mappings":""}
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import type { QaChatAccess, QaChatGrant, QaChatMode, QaChatAuthor, QaChatJson } from "./chat-sharing/types.js";
|
|
2
|
+
import type { SessionPageRequest, SessionFollowRequest, SessionPromptRequest, SessionPromptValue, SessionAttachmentRequest, SessionAttachmentValue, SessionRenameRequest, SessionRenameValue, SessionCancelValue, SessionUpdateQueueRequest, SessionUpdateQueueValue, SessionSearchRequest, SessionSelectModelRequest, SessionSelectModelValue } from "@deepseek-ai/dsh-api-session-controller/types";
|
|
1
3
|
import { TypertRemoteService } from "@deepseek-ai/dsh-typert-protocol";
|
|
2
4
|
import type { Context } from "@deepseek-ai/cordis";
|
|
3
5
|
import type { QaSurfaceConfigRefs } from "./config.js";
|
|
4
6
|
import type { QaAccountNotificationsInput } from "./types.js";
|
|
5
7
|
import type { QaTurnSources } from "./provenance/types.js";
|
|
6
|
-
import type { QaAccountProfileInput, QaAccountSession, QaAccountStartersInput, QaAccountUserPublic, QaApprovalDecision, QaClaimResult, QaDocumentPreview, 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, 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, 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";
|
|
7
9
|
export declare const name = "qa-surface";
|
|
8
10
|
export declare const inject: string[];
|
|
9
11
|
import { QA_SURFACE_SETTINGS_NAMESPACE } from "./shared/settings.js";
|
|
@@ -66,6 +68,10 @@ export declare class QaSurface extends TypertRemoteService {
|
|
|
66
68
|
* opens the admin console never grows one.
|
|
67
69
|
*/
|
|
68
70
|
private qualityStore;
|
|
71
|
+
private chatSharingStore;
|
|
72
|
+
private readonly chatTransport;
|
|
73
|
+
private readonly chatTurnGuard;
|
|
74
|
+
private sharing;
|
|
69
75
|
constructor(ctx: Context, entry?: Partial<QaSurfaceConfigRefs>);
|
|
70
76
|
/** The quality store, opening its file the first time anyone needs it. */
|
|
71
77
|
private quality;
|
|
@@ -236,6 +242,8 @@ export declare class QaSurface extends TypertRemoteService {
|
|
|
236
242
|
* intentionally not registered or attached as another DSH workspace.
|
|
237
243
|
*/
|
|
238
244
|
createSession(token: string, subroleId: string | null, adminPreview: boolean): Promise<string>;
|
|
245
|
+
/** Create an independently admitted ordinary branch of the caller's own chat. */
|
|
246
|
+
forkSession(token: string, sourceId: string, answerSeq: number): Promise<string>;
|
|
239
247
|
/** The selector model for the signed-in user; admin grants are irrelevant. */
|
|
240
248
|
accessCurrent(token: string): QaCurrentAccess;
|
|
241
249
|
/** The immutable role pinned to an existing session. */
|
|
@@ -341,6 +349,27 @@ export declare class QaSurface extends TypertRemoteService {
|
|
|
341
349
|
adminAudit(token: string, query: QaAuditQuery, cursor: string | null, limit: number | null): Promise<QaAdminPage<QaAdminAuditEvent>>;
|
|
342
350
|
/** Pin and attest the effective policy. The browser supplies identity only. */
|
|
343
351
|
secureSession(token: string, sessionId: string): Promise<QaLockdownProof>;
|
|
352
|
+
chatVisible(token: string): readonly QaChatAccess[];
|
|
353
|
+
chatAccess(token: string, sessionId: string): QaChatAccess;
|
|
354
|
+
chatGrants(token: string, sessionId: string): readonly QaChatGrant[];
|
|
355
|
+
chatSetGrant(token: string, sessionId: string, email: string, mode: QaChatMode | null): readonly QaChatGrant[];
|
|
356
|
+
chatAuthors(token: string, sessionId: string): readonly QaChatAuthor[];
|
|
357
|
+
chatAudit(token: string, sessionId: string, full: boolean): Promise<QaChatJson>;
|
|
358
|
+
chatAttachmentPath(token: string, sessionId: string, attachmentId: string): Promise<string>;
|
|
359
|
+
chatList(token: string, signal: AbortSignal): Promise<QaChatJson>;
|
|
360
|
+
chatSearch(token: string, request: SessionSearchRequest, signal: AbortSignal): Promise<QaChatJson>;
|
|
361
|
+
chatSelectModel(token: string, request: SessionSelectModelRequest): Promise<SessionSelectModelValue>;
|
|
362
|
+
chatPage(token: string, request: SessionPageRequest, signal: AbortSignal): Promise<QaChatJson>;
|
|
363
|
+
chatFollow(token: string, request: SessionFollowRequest, signal: AbortSignal): AsyncIterable<QaChatJson>;
|
|
364
|
+
chatControl(token: string, signal: AbortSignal): AsyncIterable<QaChatJson>;
|
|
365
|
+
chatProjections(token: string, sessionId: string, signal: AbortSignal): Promise<QaChatJson>;
|
|
366
|
+
chatPrompt(token: string, request: SessionPromptRequest, signal: AbortSignal): Promise<SessionPromptValue>;
|
|
367
|
+
chatAttachment(token: string, request: SessionAttachmentRequest): Promise<SessionAttachmentValue>;
|
|
368
|
+
chatRename(token: string, request: SessionRenameRequest): Promise<SessionRenameValue>;
|
|
369
|
+
chatCancel(token: string, sessionId: string): Promise<SessionCancelValue>;
|
|
370
|
+
chatUpdateQueue(token: string, request: SessionUpdateQueueRequest): Promise<SessionUpdateQueueValue>;
|
|
371
|
+
private admitChatRead;
|
|
372
|
+
private requireChatOwner;
|
|
344
373
|
/** Return canonical Host snapshots from plugin-owned durable provenance. */
|
|
345
374
|
sources(token: string, sessionId: string): Promise<readonly QaTurnSources[]>;
|
|
346
375
|
/**
|
|
@@ -395,6 +424,11 @@ export declare class QaSurface extends TypertRemoteService {
|
|
|
395
424
|
* reopening a cited source.
|
|
396
425
|
*/
|
|
397
426
|
readWorkspaceFile(token: string, sessionId: string, path: string): Promise<QaWorkspaceFile>;
|
|
427
|
+
/** Download one bounded chunk after revalidating this chat's ownership. */
|
|
428
|
+
readWorkspaceFileChunk(token: string, sessionId: string, path: string, offset: number, version: string | null): Promise<QaWorkspaceFileChunk>;
|
|
429
|
+
documentWorkflowStatus(token: string, sessionId: string, workflowId: string): Promise<QaDocumentWorkflowStatus>;
|
|
430
|
+
/** Browser-authenticated human consent; intentionally absent from the agent's tool registry. */
|
|
431
|
+
approveDocumentWorkflow(token: string, sessionId: string, workflowId: string, revision: number, sha256: string): Promise<QaDocumentWorkflowStatus>;
|
|
398
432
|
/**
|
|
399
433
|
* Render one Word document of the chat's workspace as a PDF for the panel.
|
|
400
434
|
*
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"policy.js","sourceRoot":"","sources":["../../src/types/policy.ts"],"names":[],"mappings":""}
|
|
@@ -31,6 +31,7 @@ export declare const QA_DELEGATION_NOTE = "dsh-qa-surface:delegation-naming";
|
|
|
31
31
|
export declare const QA_DOCUMENTS_NOTE = "dsh-qa-surface:attached-documents";
|
|
32
32
|
/** Note name carrying the deployment's rule about where an answer comes from. */
|
|
33
33
|
export declare const QA_SOURCE_PRIORITY_NOTE = "dsh-qa-surface:source-priority";
|
|
34
|
+
export declare const QA_BRANCH_NOTE = "dsh-qa-surface:chat-branch";
|
|
34
35
|
/**
|
|
35
36
|
* Built-in note texts. Each is the fallback for its settings template
|
|
36
37
|
* (`notes.*.template`); the placeholders mark the parts the injector
|
|
@@ -163,6 +164,7 @@ export declare class QaPromptNotes {
|
|
|
163
164
|
* farthest ancestor known at that moment.
|
|
164
165
|
*/
|
|
165
166
|
private rootSessionId;
|
|
167
|
+
private branchNotes;
|
|
166
168
|
/** The owner's email and profile, or nothing while the chat is anonymous. */
|
|
167
169
|
private identityOf;
|
|
168
170
|
}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { canonicalizeUrl } from "./normalize.js";
|
|
2
|
-
import type { SourceExtractor } from "./types.js";
|
|
2
|
+
import type { SourceExtractor, SourceExtractorContext } from "./types.js";
|
|
3
|
+
type UnknownRecord = Record<string, unknown>;
|
|
4
|
+
export declare function contextRecords(context: SourceExtractorContext): UnknownRecord[];
|
|
3
5
|
type UrlOptions = Parameters<typeof canonicalizeUrl>[1];
|
|
6
|
+
export declare function canonicalUri(item: UnknownRecord, urlOptions: UrlOptions): string | undefined;
|
|
4
7
|
export declare function createJiraExtractor(urlOptions?: UrlOptions): SourceExtractor;
|
|
5
8
|
export declare function createConfluenceExtractor(urlOptions?: UrlOptions): SourceExtractor;
|
|
6
9
|
export declare function createKnowledgeExtractor(urlOptions?: UrlOptions): SourceExtractor;
|
|
@@ -25,4 +25,6 @@ export interface QaDocumentPreviewRequest extends QaAllowedFileRequest {
|
|
|
25
25
|
* not told about that root refuses the file this check just accepted.
|
|
26
26
|
*/
|
|
27
27
|
export declare function previewConvertibleDocument({ documents, sessionId, maxBytes, ...file }: QaDocumentPreviewRequest): Promise<QaDocumentPreview>;
|
|
28
|
+
/** Native PDF or pipeline preview, after the caller has verified chat evidence. */
|
|
29
|
+
export declare function previewSourceDocument(request: QaDocumentPreviewRequest): Promise<QaDocumentPreview>;
|
|
28
30
|
//# sourceMappingURL=document-preview.d.ts.map
|
|
@@ -4,6 +4,8 @@ export declare const readFileExtractor: SourceExtractor;
|
|
|
4
4
|
export declare function createWebSearchExtractor(maxPromotedPerSearch?: number, urlOptions?: Parameters<typeof canonicalizeUrl>[1]): SourceExtractor;
|
|
5
5
|
export declare function createWebFetchExtractor(urlOptions?: Parameters<typeof canonicalizeUrl>[1]): SourceExtractor;
|
|
6
6
|
export declare const webFetchExtractor: SourceExtractor;
|
|
7
|
+
/** Document tools consume inputs; generated output paths stay artifacts. */
|
|
8
|
+
export declare const documentSourceExtractor: SourceExtractor;
|
|
7
9
|
export declare const fileSearchExtractor: SourceExtractor;
|
|
8
10
|
export declare class SourceExtractorRegistry {
|
|
9
11
|
private readonly extractors;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { QaWorkspaceFileChunk } from "../types.js";
|
|
2
|
+
import { type QaAllowedFileRequest } from "./file-preview.js";
|
|
3
|
+
/** Each RPC stays small; downloads never use the preview's byte limit. */
|
|
4
|
+
export declare const QA_DOWNLOAD_CHUNK_BYTES: number;
|
|
5
|
+
export declare const QA_DOWNLOAD_MAX_BYTES: number;
|
|
6
|
+
export declare function readWorkspaceFileChunk(request: QaAllowedFileRequest & {
|
|
7
|
+
readonly offset: number;
|
|
8
|
+
readonly version: string | null;
|
|
9
|
+
}): Promise<QaWorkspaceFileChunk>;
|
|
10
|
+
//# sourceMappingURL=file-download.d.ts.map
|
|
@@ -60,6 +60,8 @@ export declare class QaProvenanceHost {
|
|
|
60
60
|
private forgetAll;
|
|
61
61
|
bundles(sessionId: string): readonly QaTurnSources[];
|
|
62
62
|
sourceAllowed(sessionId: string, path: string): boolean;
|
|
63
|
+
/** Copy only evidence of turns present in the child's durable prefix. */
|
|
64
|
+
forkSnapshots(parentId: string, childId: string, throughTurn: number): void;
|
|
63
65
|
private seed;
|
|
64
66
|
private observeEvent;
|
|
65
67
|
private shouldCollect;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { SourceExtractor } from "./types.js";
|
|
2
|
+
import type { canonicalizeUrl } from "./normalize.js";
|
|
3
|
+
/** Successful provider retrievals with explicit addresses or object identity. */
|
|
4
|
+
export declare function integrationExtractor(options?: Parameters<typeof canonicalizeUrl>[1]): SourceExtractor;
|
|
5
|
+
//# sourceMappingURL=integration-extractor.d.ts.map
|
|
@@ -60,6 +60,8 @@ export interface SourceExtractorContext {
|
|
|
60
60
|
readonly origin: QaSourceOrigin;
|
|
61
61
|
/** Canonical session/workspace root used to make local paths portable. */
|
|
62
62
|
readonly workspaceRoot?: string;
|
|
63
|
+
/** Configured documentation root for replaying legacy docs_read results. */
|
|
64
|
+
readonly documentationRoot?: string;
|
|
63
65
|
}
|
|
64
66
|
export interface QaReportedSource {
|
|
65
67
|
readonly kind: QaSourceKind;
|
|
@@ -123,6 +123,8 @@ export interface QaDocsSearchResult extends QaDocsIdentity {
|
|
|
123
123
|
/** The outcome of one documentation read. */
|
|
124
124
|
export interface QaDocsReadResult extends QaDocsIdentity {
|
|
125
125
|
readonly path: string;
|
|
126
|
+
/** Actual read target, kept out of the model-facing rendering. */
|
|
127
|
+
readonly absolutePath: string;
|
|
126
128
|
readonly from: number;
|
|
127
129
|
readonly to: number;
|
|
128
130
|
readonly totalLines: number;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// ---------------------------------------------------------------------------
|
|
2
|
+
// Quality layer: user feedback, reviewer results, and the admin audit trail.
|
|
3
|
+
// These are the durable records the admin console reads and writes; every one
|
|
4
|
+
// is keyed to an exact conversation message, never to a conversation alone.
|
|
5
|
+
// ---------------------------------------------------------------------------
|
|
6
|
+
export {};
|
|
7
|
+
//# sourceMappingURL=quality.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quality.js","sourceRoot":"","sources":["../../src/types/quality.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,6EAA6E;AAC7E,8EAA8E;AAC9E,4EAA4E;AAC5E,8EAA8E"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { Context } from "@deepseek-ai/cordis";
|
|
2
|
+
import type { PluginLogger } from "@yadsh/dsh-plugin-log";
|
|
3
|
+
import type { QaAccounts } from "./accounts/store.js";
|
|
4
|
+
import type { QaAccessService } from "./access/service.js";
|
|
5
|
+
import type { QaPolicyAdmission } from "./secure-session.js";
|
|
6
|
+
import type { QaIntegrationPrincipalBindings } from "./integration-principals.js";
|
|
7
|
+
import type { QaProvenanceHost } from "./provenance/host-store.js";
|
|
8
|
+
import type { QaStoredSessionEraser } from "./admin/session-log.js";
|
|
9
|
+
import type { ResolvedQaSurfaceConfig } from "./types.js";
|
|
10
|
+
export interface QaForkHostOptions {
|
|
11
|
+
readonly ctx: Context;
|
|
12
|
+
readonly config: ResolvedQaSurfaceConfig;
|
|
13
|
+
readonly accounts: Pick<QaAccounts, "currentUser" | "ownerIdOf" | "sessionAccess" | "updateSessionAccess" | "releaseSessionReservation"> | undefined;
|
|
14
|
+
readonly access: Pick<QaAccessService, "isDelegatedChild" | "session" | "reserveSession" | "modelPolicyFor">;
|
|
15
|
+
readonly admission: Pick<QaPolicyAdmission, "secureSession" | "preflightDeployment">;
|
|
16
|
+
readonly principals: Pick<QaIntegrationPrincipalBindings, "attest">;
|
|
17
|
+
readonly provenance: Pick<QaProvenanceHost, "forkSnapshots" | "dropSession">;
|
|
18
|
+
readonly logger: PluginLogger;
|
|
19
|
+
readonly sessionFiles: QaStoredSessionEraser;
|
|
20
|
+
readonly sharing?: {
|
|
21
|
+
forkAuthors(sourceId: string, targetId: string, requests: readonly string[]): void;
|
|
22
|
+
dropSession(id: string): void;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
/** Native durable prefix and agent lifecycle, admitted as an independent QA root. */
|
|
26
|
+
export declare function forkQaSession(options: QaForkHostOptions, token: string, sourceId: string, answerSeq: number): Promise<string>;
|
|
27
|
+
//# sourceMappingURL=session-fork-host.d.ts.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { StoredSessionEvent } from "./admin/conversation-log.js";
|
|
2
|
+
/** Resolve a selected durable answer to the end of its completed turn. */
|
|
3
|
+
export declare function qaForkBoundary(events: readonly StoredSessionEvent[], answerSeq: number): {
|
|
4
|
+
readonly atSeq: number;
|
|
5
|
+
readonly turn: number;
|
|
6
|
+
};
|
|
7
|
+
//# sourceMappingURL=session-fork.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session.js","sourceRoot":"","sources":["../../src/types/session.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** A seeded ordinary child is a fork; delegated runs retain their own origin. */
|
|
2
|
+
export declare function qaDelegatedHeader(header: {
|
|
3
|
+
readonly parentSession?: unknown;
|
|
4
|
+
readonly origin?: unknown;
|
|
5
|
+
readonly isSeeded?: boolean;
|
|
6
|
+
}): boolean;
|
|
7
|
+
//# sourceMappingURL=session-lineage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skills.js","sourceRoot":"","sources":["../../src/types/skills.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export interface QaSlashDraftTarget {
|
|
2
|
+
readonly subroleId: string | null;
|
|
3
|
+
readonly adminPreview: boolean;
|
|
4
|
+
}
|
|
5
|
+
export declare function slashDraftTarget(subroleId: string | null, adminPreview: boolean): string;
|
|
6
|
+
export declare function parseSlashDraftTarget(target: string): QaSlashDraftTarget | undefined;
|
|
7
|
+
//# sourceMappingURL=draft-target.d.ts.map
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { Context } from "@deepseek-ai/cordis";
|
|
2
2
|
import type { PluginLogger } from "@yadsh/dsh-plugin-log";
|
|
3
3
|
import type { QaSlashCatalog, QaSlashExecution, QaSlashSubmitAttachment, ResolvedQaSurfaceConfig } from "../types.js";
|
|
4
|
+
import { type QaSlashNativeSkill } from "./catalog.js";
|
|
5
|
+
import { type QaSlashDraftTarget } from "./draft-target.js";
|
|
4
6
|
/**
|
|
5
7
|
* Host-side bodies of the slash remotes. The `@Remote`-decorated signatures
|
|
6
8
|
* stay on the `QaSurface` service class (typert code generation reads the class
|
|
@@ -19,6 +21,11 @@ export interface QaSlashRemotes {
|
|
|
19
21
|
}
|
|
20
22
|
export interface QaSlashRemotesOptions {
|
|
21
23
|
readonly ctx: Context;
|
|
24
|
+
/** Reads the preset scope with the authenticated draft role, without a session. */
|
|
25
|
+
readonly draftSkills?: (token: string, target: QaSlashDraftTarget) => Promise<{
|
|
26
|
+
readonly skills: readonly QaSlashNativeSkill[];
|
|
27
|
+
readonly grantedSkills: readonly string[] | undefined;
|
|
28
|
+
}>;
|
|
22
29
|
readonly getConfig: () => ResolvedQaSurfaceConfig;
|
|
23
30
|
readonly logger: PluginLogger;
|
|
24
31
|
/**
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slash.js","sourceRoot":"","sources":["../../src/types/slash.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { QaCapabilityConfig, QaCapabilityDescriptor, QaCapabilitySelection, QaSkillAccess, QaSubrole, QaUserAccess } from "./capability.js";
|
|
2
|
+
import type { QaAccountRole } from "./policy.js";
|
|
3
|
+
export type QaAccessAuditAction = "subrole.created" | "subrole.updated" | "subrole.deleted" | "common.updated" | "assignment.updated" | "skill.assignment-updated";
|
|
4
|
+
export interface QaAccessAuditEvent {
|
|
5
|
+
readonly timestamp: string;
|
|
6
|
+
readonly actorId: string;
|
|
7
|
+
readonly action: QaAccessAuditAction;
|
|
8
|
+
readonly targetId?: string;
|
|
9
|
+
/** JSON snapshots serialized at the storage boundary for a strict Remote type. */
|
|
10
|
+
readonly before?: string;
|
|
11
|
+
readonly after?: string;
|
|
12
|
+
}
|
|
13
|
+
/** Admin table row: credentials and token material are never projected. */
|
|
14
|
+
export interface QaAccessUser {
|
|
15
|
+
readonly id: string;
|
|
16
|
+
readonly email: string;
|
|
17
|
+
readonly displayName: string;
|
|
18
|
+
readonly accessRole: QaAccountRole;
|
|
19
|
+
readonly disabled: boolean;
|
|
20
|
+
readonly access: QaUserAccess;
|
|
21
|
+
}
|
|
22
|
+
/** Ordinary user's role selector data. */
|
|
23
|
+
export interface QaCurrentAccess {
|
|
24
|
+
readonly subroles: readonly QaSubrole[];
|
|
25
|
+
readonly defaultSubrole: string;
|
|
26
|
+
}
|
|
27
|
+
/** The role pinned to one existing session. */
|
|
28
|
+
export interface QaSessionAccess {
|
|
29
|
+
readonly subrole: QaSubrole;
|
|
30
|
+
readonly adminPreview: boolean;
|
|
31
|
+
}
|
|
32
|
+
/** One authoritative payload for the /qa/admin application. */
|
|
33
|
+
export interface QaAccessAdminSnapshot {
|
|
34
|
+
readonly config: QaCapabilityConfig;
|
|
35
|
+
/** Immutable capabilities inherited by every role; exposed read-only. */
|
|
36
|
+
readonly systemRequired: QaCapabilitySelection;
|
|
37
|
+
readonly catalog: readonly QaCapabilityDescriptor[];
|
|
38
|
+
/** Every discovered skill with its declared audience and grant ceiling. */
|
|
39
|
+
readonly skills: readonly QaSkillAccess[];
|
|
40
|
+
readonly users: readonly QaAccessUser[];
|
|
41
|
+
readonly audit: readonly QaAccessAuditEvent[];
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=access.d.ts.map
|