@yadsh/dsh-qa-surface 0.6.0 → 0.7.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 +148 -9
- package/capability-policy.json +1 -1
- package/cordis.patch.yml +2 -1
- package/lib/access/capability-catalog.js +144 -0
- package/lib/access/capability-catalog.js.map +1 -0
- package/lib/access/model.js +379 -0
- package/lib/access/model.js.map +1 -0
- package/lib/access/role-repository.js +195 -0
- package/lib/access/role-repository.js.map +1 -0
- package/lib/access/service.js +380 -0
- package/lib/access/service.js.map +1 -0
- package/lib/access/skill-metadata.js +234 -0
- package/lib/access/skill-metadata.js.map +1 -0
- package/lib/account-remotes.js +20 -10
- package/lib/account-remotes.js.map +1 -1
- package/lib/accounts/errors.js.map +1 -1
- package/lib/accounts/file.js.map +1 -1
- package/lib/accounts/store.js +202 -3
- package/lib/accounts/store.js.map +1 -1
- package/lib/admin/conversation-log.js +256 -0
- package/lib/admin/conversation-log.js.map +1 -0
- package/lib/admin/index.js +17 -0
- package/lib/admin/index.js.map +1 -0
- package/lib/admin/metrics.js +103 -0
- package/lib/admin/metrics.js.map +1 -0
- package/lib/admin/paging.js +23 -0
- package/lib/admin/paging.js.map +1 -0
- package/lib/admin/permissions.js +50 -0
- package/lib/admin/permissions.js.map +1 -0
- package/lib/admin/quality-store.js +485 -0
- package/lib/admin/quality-store.js.map +1 -0
- package/lib/admin/queue.js +107 -0
- package/lib/admin/queue.js.map +1 -0
- package/lib/admin/redaction.js +45 -0
- package/lib/admin/redaction.js.map +1 -0
- package/lib/admin/service.js +897 -0
- package/lib/admin/service.js.map +1 -0
- package/lib/admin/session-log.js +142 -0
- package/lib/admin/session-log.js.map +1 -0
- package/lib/attestation.js +6 -0
- package/lib/attestation.js.map +1 -1
- package/lib/cli.js +9 -6
- package/lib/cli.js.map +1 -1
- package/lib/client/QaSessionController.js +65 -15
- package/lib/client/QaSessionController.js.map +1 -1
- package/lib/client/QaSurface.js +144 -6
- package/lib/client/QaSurface.js.map +1 -1
- package/lib/client/QaTranscriptAdapter.js +1 -0
- package/lib/client/QaTranscriptAdapter.js.map +1 -1
- package/lib/client/admin/QaAdmin.js +458 -0
- package/lib/client/admin/QaAdmin.js.map +1 -0
- package/lib/client/admin/format.js +177 -0
- package/lib/client/admin/format.js.map +1 -0
- package/lib/client/admin/pages/Conversations.js +114 -0
- package/lib/client/admin/pages/Conversations.js.map +1 -0
- package/lib/client/admin/pages/Overview.js +24 -0
- package/lib/client/admin/pages/Overview.js.map +1 -0
- package/lib/client/admin/pages/Quality.js +71 -0
- package/lib/client/admin/pages/Quality.js.map +1 -0
- package/lib/client/admin/pages/Review.js +93 -0
- package/lib/client/admin/pages/Review.js.map +1 -0
- package/lib/client/admin/pages/Users.js +95 -0
- package/lib/client/admin/pages/Users.js.map +1 -0
- package/lib/client/admin/routes.js +127 -0
- package/lib/client/admin/routes.js.map +1 -0
- package/lib/client/admin/shared.js +91 -0
- package/lib/client/admin/shared.js.map +1 -0
- package/lib/client/admin/styles.js +111 -0
- package/lib/client/admin/styles.js.map +1 -0
- package/lib/client/attestation.js +14 -2
- package/lib/client/attestation.js.map +1 -1
- package/lib/client/components/QaChangelog.js +48 -0
- package/lib/client/components/QaChangelog.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 +61 -2
- package/lib/client/components/QaMessage.js.map +1 -1
- package/lib/client/create-session.js +1 -1
- package/lib/client/create-session.js.map +1 -1
- package/lib/client/index.js +33 -1
- package/lib/client/index.js.map +1 -1
- package/lib/client/project-session-state.js +10 -5
- package/lib/client/project-session-state.js.map +1 -1
- package/lib/client/role/RoleSelector.js +31 -0
- package/lib/client/role/RoleSelector.js.map +1 -0
- package/lib/client/session-sources.js +37 -1
- package/lib/client/session-sources.js.map +1 -1
- package/lib/client/settings/card.js +2 -2
- package/lib/client/settings/card.js.map +1 -1
- package/lib/client/settings/sections.js +0 -1
- package/lib/client/settings/sections.js.map +1 -1
- package/lib/client/styles.js +32 -0
- package/lib/client/styles.js.map +1 -1
- package/lib/client/types.js +1 -0
- package/lib/client/types.js.map +1 -1
- package/lib/client.js +10786 -5684
- package/lib/client.js.map +1 -1
- package/lib/config-resolvers/defaults.js +0 -2
- package/lib/config-resolvers/defaults.js.map +1 -1
- package/lib/config.js +0 -249
- package/lib/config.js.map +1 -1
- package/lib/enforcement/skill-policy.js +172 -0
- package/lib/enforcement/skill-policy.js.map +1 -0
- package/lib/enforcement/tool-grants.js +151 -0
- package/lib/enforcement/tool-grants.js.map +1 -0
- package/lib/index.js +230 -44
- package/lib/index.js.map +1 -1
- package/lib/personal-skills/service.js +10 -3
- package/lib/personal-skills/service.js.map +1 -1
- package/lib/qa-tools/index.js +4 -0
- package/lib/qa-tools/index.js.map +1 -1
- package/lib/resolve-config.js +0 -2
- package/lib/resolve-config.js.map +1 -1
- package/lib/secure-session.js +111 -32
- package/lib/secure-session.js.map +1 -1
- package/lib/typert.host.js +2237 -202
- package/lib/typert.remote-client.d.ts +49 -3
- package/lib/typert.remote-client.js +1863 -183
- package/lib/types/access/capability-catalog.d.ts +37 -0
- package/lib/types/access/model.d.ts +60 -0
- package/lib/types/access/role-repository.d.ts +32 -0
- package/lib/types/access/service.d.ts +57 -0
- package/lib/types/access/skill-metadata.d.ts +53 -0
- package/lib/types/account-remotes.d.ts +6 -0
- package/lib/types/accounts/errors.d.ts +1 -1
- package/lib/types/accounts/file.d.ts +16 -5
- package/lib/types/accounts/store.d.ts +83 -3
- package/lib/types/admin/conversation-log.d.ts +39 -0
- package/lib/types/admin/index.d.ts +24 -0
- package/lib/types/admin/metrics.d.ts +29 -0
- package/lib/types/admin/paging.d.ts +33 -0
- package/lib/types/admin/permissions.d.ts +10 -0
- package/lib/types/admin/quality-store.d.ts +82 -0
- package/lib/types/admin/queue.d.ts +21 -0
- package/lib/types/admin/redaction.d.ts +29 -0
- package/lib/types/admin/service.d.ts +105 -0
- package/lib/types/admin/session-log.d.ts +53 -0
- package/lib/types/attestation.d.ts +2 -0
- package/lib/types/client/QaSessionController.d.ts +14 -1
- package/lib/types/client/QaSurface.d.ts +7 -1
- package/lib/types/client/admin/QaAdmin.d.ts +17 -0
- package/lib/types/client/admin/format.d.ts +43 -0
- package/lib/types/client/admin/pages/Conversations.d.ts +21 -0
- package/lib/types/client/admin/pages/Overview.d.ts +13 -0
- package/lib/types/client/admin/pages/Quality.d.ts +18 -0
- package/lib/types/client/admin/pages/Review.d.ts +15 -0
- package/lib/types/client/admin/pages/Users.d.ts +22 -0
- package/lib/types/client/admin/routes.d.ts +50 -0
- package/lib/types/client/admin/shared.d.ts +53 -0
- package/lib/types/client/admin/styles.d.ts +11 -0
- package/lib/types/client/attestation.d.ts +8 -1
- package/lib/types/client/components/QaHeader.d.ts +5 -1
- package/lib/types/client/components/QaMessage.d.ts +14 -1
- package/lib/types/client/create-session.d.ts +2 -0
- package/lib/types/client/project-session-state.d.ts +2 -0
- package/lib/types/client/role/RoleSelector.d.ts +14 -0
- package/lib/types/client/session-sources.d.ts +9 -0
- package/lib/types/client/settings/sections.d.ts +0 -1
- package/lib/types/client/types.d.ts +39 -2
- package/lib/types/enforcement/skill-policy.d.ts +29 -0
- package/lib/types/enforcement/tool-grants.d.ts +84 -0
- package/lib/types/index.d.ts +62 -14
- package/lib/types/qa-tools/index.d.ts +2 -0
- package/lib/types/secure-session.d.ts +19 -1
- package/lib/types/types.d.ts +574 -5
- package/package.json +3 -3
- package/lib/client/settings/sections/documents.js +0 -88
- package/lib/client/settings/sections/documents.js.map +0 -1
- package/lib/documents/artifacts/ids.js +0 -43
- package/lib/documents/artifacts/ids.js.map +0 -1
- package/lib/documents/artifacts/manifest.js +0 -66
- package/lib/documents/artifacts/manifest.js.map +0 -1
- package/lib/documents/artifacts/store.js +0 -169
- package/lib/documents/artifacts/store.js.map +0 -1
- package/lib/documents/capabilities.js +0 -93
- package/lib/documents/capabilities.js.map +0 -1
- package/lib/documents/config.js +0 -302
- package/lib/documents/config.js.map +0 -1
- package/lib/documents/defaults.js +0 -78
- package/lib/documents/defaults.js.map +0 -1
- package/lib/documents/errors.js +0 -101
- package/lib/documents/errors.js.map +0 -1
- package/lib/documents/index.js +0 -80
- package/lib/documents/index.js.map +0 -1
- package/lib/documents/inspect/facts.js +0 -161
- package/lib/documents/inspect/facts.js.map +0 -1
- package/lib/documents/inspect/zip.js +0 -108
- package/lib/documents/inspect/zip.js.map +0 -1
- package/lib/documents/markdown/directives.js +0 -135
- package/lib/documents/markdown/directives.js.map +0 -1
- package/lib/documents/markdown/frontmatter.js +0 -35
- package/lib/documents/markdown/frontmatter.js.map +0 -1
- package/lib/documents/markdown/normalize.js +0 -113
- package/lib/documents/markdown/normalize.js.map +0 -1
- package/lib/documents/orchestrator/assets.js +0 -243
- package/lib/documents/orchestrator/assets.js.map +0 -1
- package/lib/documents/orchestrator/convert-document.js +0 -186
- package/lib/documents/orchestrator/convert-document.js.map +0 -1
- package/lib/documents/orchestrator/create-document.js +0 -292
- package/lib/documents/orchestrator/create-document.js.map +0 -1
- package/lib/documents/orchestrator/extract-document.js +0 -162
- package/lib/documents/orchestrator/extract-document.js.map +0 -1
- package/lib/documents/orchestrator/inspect-document.js +0 -89
- package/lib/documents/orchestrator/inspect-document.js.map +0 -1
- package/lib/documents/orchestrator/runtime-deps.js +0 -59
- package/lib/documents/orchestrator/runtime-deps.js.map +0 -1
- package/lib/documents/orchestrator/scope.js +0 -132
- package/lib/documents/orchestrator/scope.js.map +0 -1
- package/lib/documents/providers/docling.js +0 -247
- package/lib/documents/providers/docling.js.map +0 -1
- package/lib/documents/providers/libreoffice.js +0 -130
- package/lib/documents/providers/libreoffice.js.map +0 -1
- package/lib/documents/providers/markitdown.js +0 -89
- package/lib/documents/providers/markitdown.js.map +0 -1
- package/lib/documents/providers/pandoc.js +0 -161
- package/lib/documents/providers/pandoc.js.map +0 -1
- package/lib/documents/providers/process.js +0 -164
- package/lib/documents/providers/process.js.map +0 -1
- package/lib/documents/providers/registry.js +0 -152
- package/lib/documents/providers/registry.js.map +0 -1
- package/lib/documents/providers/shared.js +0 -75
- package/lib/documents/providers/shared.js.map +0 -1
- package/lib/documents/runtime.js +0 -114
- package/lib/documents/runtime.js.map +0 -1
- package/lib/documents/security/file-types.js +0 -188
- package/lib/documents/security/file-types.js.map +0 -1
- package/lib/documents/security/limits.js +0 -78
- package/lib/documents/security/limits.js.map +0 -1
- package/lib/documents/security/mime.js +0 -43
- package/lib/documents/security/mime.js.map +0 -1
- package/lib/documents/security/paths.js +0 -133
- package/lib/documents/security/paths.js.map +0 -1
- package/lib/documents/templates/registry.js +0 -147
- package/lib/documents/templates/registry.js.map +0 -1
- package/lib/documents/templates/resolver.js +0 -59
- package/lib/documents/templates/resolver.js.map +0 -1
- package/lib/documents/tools/convert.js +0 -125
- package/lib/documents/tools/convert.js.map +0 -1
- package/lib/documents/tools/create.js +0 -187
- package/lib/documents/tools/create.js.map +0 -1
- package/lib/documents/tools/index.js +0 -41
- package/lib/documents/tools/index.js.map +0 -1
- package/lib/documents/tools/inspect.js +0 -135
- package/lib/documents/tools/inspect.js.map +0 -1
- package/lib/documents/tools/shared.js +0 -88
- package/lib/documents/tools/shared.js.map +0 -1
- package/lib/documents/tools/to-markdown.js +0 -125
- package/lib/documents/tools/to-markdown.js.map +0 -1
- package/lib/documents/types.js +0 -12
- package/lib/documents/types.js.map +0 -1
- package/lib/types/client/settings/sections/documents.d.ts +0 -13
- package/lib/types/documents/artifacts/ids.d.ts +0 -14
- package/lib/types/documents/artifacts/manifest.d.ts +0 -32
- package/lib/types/documents/artifacts/store.d.ts +0 -67
- package/lib/types/documents/capabilities.d.ts +0 -32
- package/lib/types/documents/config.d.ts +0 -27
- package/lib/types/documents/defaults.d.ts +0 -161
- package/lib/types/documents/errors.d.ts +0 -42
- package/lib/types/documents/index.d.ts +0 -63
- package/lib/types/documents/inspect/facts.d.ts +0 -43
- package/lib/types/documents/inspect/zip.d.ts +0 -28
- package/lib/types/documents/markdown/directives.d.ts +0 -39
- package/lib/types/documents/markdown/frontmatter.d.ts +0 -15
- package/lib/types/documents/markdown/normalize.d.ts +0 -30
- package/lib/types/documents/orchestrator/assets.d.ts +0 -55
- package/lib/types/documents/orchestrator/convert-document.d.ts +0 -25
- package/lib/types/documents/orchestrator/create-document.d.ts +0 -18
- package/lib/types/documents/orchestrator/extract-document.d.ts +0 -24
- package/lib/types/documents/orchestrator/inspect-document.d.ts +0 -12
- package/lib/types/documents/orchestrator/runtime-deps.d.ts +0 -43
- package/lib/types/documents/orchestrator/scope.d.ts +0 -52
- package/lib/types/documents/providers/docling.d.ts +0 -54
- package/lib/types/documents/providers/libreoffice.d.ts +0 -40
- package/lib/types/documents/providers/markitdown.d.ts +0 -28
- package/lib/types/documents/providers/pandoc.d.ts +0 -42
- package/lib/types/documents/providers/process.d.ts +0 -54
- package/lib/types/documents/providers/registry.d.ts +0 -68
- package/lib/types/documents/providers/shared.d.ts +0 -27
- package/lib/types/documents/runtime.d.ts +0 -59
- package/lib/types/documents/security/file-types.d.ts +0 -39
- package/lib/types/documents/security/limits.d.ts +0 -24
- package/lib/types/documents/security/mime.d.ts +0 -13
- package/lib/types/documents/security/paths.d.ts +0 -38
- package/lib/types/documents/templates/registry.d.ts +0 -50
- package/lib/types/documents/templates/resolver.d.ts +0 -30
- package/lib/types/documents/tools/convert.d.ts +0 -9
- package/lib/types/documents/tools/create.d.ts +0 -14
- package/lib/types/documents/tools/index.d.ts +0 -33
- package/lib/types/documents/tools/inspect.d.ts +0 -9
- package/lib/types/documents/tools/shared.d.ts +0 -77
- package/lib/types/documents/tools/to-markdown.d.ts +0 -12
- package/lib/types/documents/types.d.ts +0 -294
|
@@ -18,6 +18,8 @@ export interface QaBoundProjectionInput {
|
|
|
18
18
|
readonly questions: readonly QaPendingQuestion[];
|
|
19
19
|
readonly operationError: string | null;
|
|
20
20
|
readonly policyReady: boolean;
|
|
21
|
+
/** Historical binding retained for transcript access after policy drift. */
|
|
22
|
+
readonly compatibilityReadOnly?: boolean;
|
|
21
23
|
readonly admissionPending: boolean;
|
|
22
24
|
readonly chatsRevision: number;
|
|
23
25
|
readonly viewingSubagent: QaSubagentView | null;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { QaSubrole } from "../../types.js";
|
|
2
|
+
export interface QaRoleSelectorProps {
|
|
3
|
+
readonly roles: readonly QaSubrole[];
|
|
4
|
+
readonly selected: string;
|
|
5
|
+
readonly conversationStarted: boolean;
|
|
6
|
+
readonly disabled?: boolean;
|
|
7
|
+
readonly onSelect: (subroleId: string) => void;
|
|
8
|
+
}
|
|
9
|
+
/** Visible only when the account can actually choose between profiles. */
|
|
10
|
+
export declare function QaRoleSelector(props: QaRoleSelectorProps): import("react/jsx-runtime").JSX.Element | null;
|
|
11
|
+
export declare function QaAdminPreviewBanner({ role }: {
|
|
12
|
+
readonly role: string;
|
|
13
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
//# sourceMappingURL=RoleSelector.d.ts.map
|
|
@@ -12,6 +12,8 @@ export declare class QaHostSourceBridge {
|
|
|
12
12
|
private bundles;
|
|
13
13
|
private signature;
|
|
14
14
|
private refreshing;
|
|
15
|
+
/** The refusal already reported, so a repeating failure reaches the console once. */
|
|
16
|
+
private refusal;
|
|
15
17
|
/** Bumped on reset so a stale in-flight fetch never lands. */
|
|
16
18
|
private generation;
|
|
17
19
|
constructor(sourceApi: QaSourceApi, token: () => string);
|
|
@@ -22,6 +24,13 @@ export declare class QaHostSourceBridge {
|
|
|
22
24
|
* Fetch the Host bundles of one chat; a changed payload republishes through
|
|
23
25
|
* the callback. Repeated calls coalesce while one is in flight, and a
|
|
24
26
|
* response that outlives the chat is dropped.
|
|
27
|
+
*
|
|
28
|
+
* A refused fetch is not the same fact as an empty bundle set: the panel
|
|
29
|
+
* renders both as "this answer carries no sources", so without a word here a
|
|
30
|
+
* rejected RPC — an unattested chat, a token the Host no longer accepts —
|
|
31
|
+
* would be indistinguishable from a chat that genuinely has none. The
|
|
32
|
+
* refusal is reported once per distinct reason, because this runs on every
|
|
33
|
+
* publish.
|
|
25
34
|
*/
|
|
26
35
|
refresh(sessionId: string, onChanged: () => void): Promise<void>;
|
|
27
36
|
}
|
|
@@ -15,7 +15,6 @@ export { AccessSection } from "./sections/access.js";
|
|
|
15
15
|
export { AccountsSection } from "./sections/accounts.js";
|
|
16
16
|
export { AttachmentsSection } from "./sections/attachments.js";
|
|
17
17
|
export { BrandingSection } from "./sections/branding.js";
|
|
18
|
-
export { DocumentsSection } from "./sections/documents.js";
|
|
19
18
|
export { EmbeddingSection } from "./sections/embedding.js";
|
|
20
19
|
export { InterfaceSection } from "./sections/interface.js";
|
|
21
20
|
export { LockdownSection } from "./sections/lockdown.js";
|
|
@@ -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 { QaAccountProfileInput, QaAccountSession, QaAccountStartersInput, QaAccountStarter, QaAccountUserPublic, QaApprovalDecision, QaClaimResult, QaLockdownProof, QaOwnershipEntry, QaPendingApproval, QaPendingQuestion, QaQuestionAnswerItem, QaSessionState, QaSkillDocument, QaSkillDraftInput, QaSkillRemoval, QaSkillSummary, QaSkillToolDescriptor, QaSkillValidation, QaSourceFilePreview, QaTurnSources, QaWhoamiResult } from "../types.js";
|
|
4
|
+
import type { QaAccountProfileInput, QaAccountSession, QaAccountStartersInput, QaAccountStarter, QaAccountUserPublic, QaAccessAdminSnapshot, QaApprovalDecision, QaClaimResult, QaLockdownProof, QaOwnershipEntry, QaPendingApproval, QaPendingQuestion, QaQuestionAnswerItem, QaSessionState, QaSkillDocument, QaSkillDraftInput, QaSkillRemoval, QaSkillSummary, QaSkillToolDescriptor, QaSkillValidation, QaSourceFilePreview, QaTurnSources, QaWhoamiResult, QaCapabilitySelection, QaCurrentAccess, QaSessionAccess, QaSkillActivationRecord, QaSkillAssignmentOverride, QaSubrole, QaUserAccess, QaAdminAuditEvent, QaAdminOverview, QaAdminPage, QaAdminUserDetail, QaAdminUserRow, QaAdminUserUpdate, QaAuditQuery, QaConversationDetail, QaConversationQuery, QaConversationReview, QaConversationReviewInput, QaConversationSummary, QaFeedbackQuery, QaFeedbackRow, QaMessageFeedback, QaMessageFeedbackInput, QaQualityMetrics, QaReviewQueueItem, QaReviewQueueRow, 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. */
|
|
@@ -29,7 +29,44 @@ export type QaSecureSession = (token: string, sessionId: string) => Promise<{
|
|
|
29
29
|
readonly error: unknown;
|
|
30
30
|
}>;
|
|
31
31
|
/** Host-authoritative creation: identity, cwd and policy never come from the browser. */
|
|
32
|
-
export type QaCreateSession = (token: string) => Promise<RemoteResult<string>>;
|
|
32
|
+
export type QaCreateSession = (token: string, subroleId: string | null, adminPreview: boolean) => Promise<RemoteResult<string>>;
|
|
33
|
+
/** Role selector plus administrator mutation channel. */
|
|
34
|
+
export interface QaAccessApi {
|
|
35
|
+
current(token: string): Promise<RemoteResult<QaCurrentAccess>>;
|
|
36
|
+
session(token: string, sessionId: string): Promise<RemoteResult<QaSessionAccess>>;
|
|
37
|
+
admin(token: string): Promise<RemoteResult<QaAccessAdminSnapshot>>;
|
|
38
|
+
createSubrole(token: string, input: QaSubrole): Promise<RemoteResult<QaSubrole>>;
|
|
39
|
+
updateSubrole(token: string, id: string, input: QaSubrole): Promise<RemoteResult<QaSubrole>>;
|
|
40
|
+
deleteSubrole(token: string, id: string, replacementId: string | null): Promise<RemoteResult<{
|
|
41
|
+
readonly deleted: boolean;
|
|
42
|
+
}>>;
|
|
43
|
+
updateCommon(token: string, input: QaCapabilitySelection): Promise<RemoteResult<QaCapabilitySelection>>;
|
|
44
|
+
updateAssignment(token: string, userId: string, input: QaUserAccess): Promise<RemoteResult<QaUserAccess>>;
|
|
45
|
+
updateSkillOverride(token: string, input: QaSkillAssignmentOverride): Promise<RemoteResult<readonly QaSkillAssignmentOverride[]>>;
|
|
46
|
+
skillActivations(token: string, sessionId: string): Promise<RemoteResult<readonly QaSkillActivationRecord[]>>;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* The administrative console's wire surface. Every call carries the caller's
|
|
50
|
+
* token and nothing else identifying: the Host resolves the actor, checks the
|
|
51
|
+
* permission the method needs and answers with the audience-safe refusal code
|
|
52
|
+
* the page renders.
|
|
53
|
+
*/
|
|
54
|
+
export interface QaAdminApi {
|
|
55
|
+
overview(token: string): Promise<RemoteResult<QaAdminOverview>>;
|
|
56
|
+
users(token: string, query: QaUserQuery, cursor: string | null, limit: number | null): Promise<RemoteResult<QaAdminPage<QaAdminUserRow>>>;
|
|
57
|
+
user(token: string, userId: string): Promise<RemoteResult<QaAdminUserDetail>>;
|
|
58
|
+
updateUser(token: string, userId: string, update: QaAdminUserUpdate): Promise<RemoteResult<QaAdminUserDetail>>;
|
|
59
|
+
conversations(token: string, query: QaConversationQuery, cursor: string | null, limit: number | null): Promise<RemoteResult<QaAdminPage<QaConversationSummary>>>;
|
|
60
|
+
conversation(token: string, conversationId: string): Promise<RemoteResult<QaConversationDetail>>;
|
|
61
|
+
feedback(token: string, query: QaFeedbackQuery, cursor: string | null, limit: number | null): Promise<RemoteResult<QaAdminPage<QaFeedbackRow>>>;
|
|
62
|
+
/** The signed-in user's own verdict on one of their assistant messages. */
|
|
63
|
+
rateMessage(token: string, conversationId: string, messageId: string, input: QaMessageFeedbackInput): Promise<RemoteResult<QaMessageFeedback>>;
|
|
64
|
+
reviewQueue(token: string, cursor: string | null, limit: number | null): Promise<RemoteResult<QaAdminPage<QaReviewQueueRow>>>;
|
|
65
|
+
queueConversation(token: string, conversationId: string, messageId: string | null): Promise<RemoteResult<QaReviewQueueItem>>;
|
|
66
|
+
saveReview(token: string, input: QaConversationReviewInput): Promise<RemoteResult<QaConversationReview>>;
|
|
67
|
+
metrics(token: string): Promise<RemoteResult<QaQualityMetrics>>;
|
|
68
|
+
audit(token: string, query: QaAuditQuery, cursor: string | null, limit: number | null): Promise<RemoteResult<QaAdminPage<QaAdminAuditEvent>>>;
|
|
69
|
+
}
|
|
33
70
|
/**
|
|
34
71
|
* Browser file-upload service (`ctx.fileUpload`), described structurally on
|
|
35
72
|
* purpose: files do not ride the prompt inline the way images do, they are
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { Agent } from "@deepseek-ai/dsh-agent";
|
|
2
|
+
import type { SkillSummary } from "@deepseek-ai/dsh-skill";
|
|
3
|
+
import type { PluginLogger } from "@yadsh/dsh-plugin-log";
|
|
4
|
+
import type { QaEffectiveCapabilityPolicy } from "../types.js";
|
|
5
|
+
import type { QaAgentToolGrants } from "./tool-grants.js";
|
|
6
|
+
declare const SKILL_NOT_AVAILABLE = "SKILL_NOT_AVAILABLE";
|
|
7
|
+
export interface QaSkillPolicyOptions {
|
|
8
|
+
readonly agent: Agent;
|
|
9
|
+
readonly policy: QaEffectiveCapabilityPolicy;
|
|
10
|
+
readonly discovered: ReadonlyMap<string, SkillSummary>;
|
|
11
|
+
/** The agent's live tool policy; loading a skill may widen it. */
|
|
12
|
+
readonly grants: QaAgentToolGrants;
|
|
13
|
+
readonly logger: PluginLogger;
|
|
14
|
+
/** Preview sessions exercise the real policy and label their own records. */
|
|
15
|
+
readonly preview?: boolean;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Agent-local skill consumer. The local `skill` registration shadows the
|
|
19
|
+
* standard loader; discovery, direct loading and a `/name` gesture all enforce
|
|
20
|
+
* the same frozen allow-list, and every successful load activates the tool
|
|
21
|
+
* grant the skill declares — still capped by the subrole's ceiling.
|
|
22
|
+
*
|
|
23
|
+
* Loading the instructions and widening the toolset is one operation: a skill
|
|
24
|
+
* that cannot be granted what it requires is refused instead of being handed
|
|
25
|
+
* instructions it has no tools to follow.
|
|
26
|
+
*/
|
|
27
|
+
export declare function installQaSkillPolicy(options: QaSkillPolicyOptions): () => void;
|
|
28
|
+
export { SKILL_NOT_AVAILABLE };
|
|
29
|
+
//# sourceMappingURL=skill-policy.d.ts.map
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import type { Agent } from "@deepseek-ai/dsh-agent";
|
|
2
|
+
import type { PluginLogger } from "@yadsh/dsh-plugin-log";
|
|
3
|
+
import type { QaSkillActivationOrigin, QaSkillActivationRecord, QaSkillDescriptor } from "../types.js";
|
|
4
|
+
/** One live grant: the skill that asked for tools and what it actually got. */
|
|
5
|
+
export interface QaSkillGrant {
|
|
6
|
+
readonly skillName: string;
|
|
7
|
+
readonly origin: QaSkillActivationOrigin;
|
|
8
|
+
readonly requestedTools: readonly string[];
|
|
9
|
+
readonly grantedTools: readonly string[];
|
|
10
|
+
readonly deniedTools: readonly string[];
|
|
11
|
+
readonly activatedAt: string;
|
|
12
|
+
}
|
|
13
|
+
export type QaSkillActivationOutcome = {
|
|
14
|
+
readonly status: "activated";
|
|
15
|
+
readonly grant: QaSkillGrant;
|
|
16
|
+
/** Present when a best-effort skill had to give up a required tool. */
|
|
17
|
+
readonly warning?: string;
|
|
18
|
+
} | {
|
|
19
|
+
readonly status: "rejected";
|
|
20
|
+
readonly reason: string;
|
|
21
|
+
};
|
|
22
|
+
export interface QaAgentToolGrantsOptions {
|
|
23
|
+
readonly agent: Agent;
|
|
24
|
+
/** Tools visible from the first model step; the restriction keeps admitting them. */
|
|
25
|
+
readonly baseTools: readonly string[];
|
|
26
|
+
/** Ceiling for grants, already narrowed to tools that exist right now. */
|
|
27
|
+
readonly grantableTools: readonly string[];
|
|
28
|
+
/** Normalized `metadata.qa-surface` of every discovered skill. */
|
|
29
|
+
readonly descriptors: ReadonlyMap<string, QaSkillDescriptor>;
|
|
30
|
+
readonly logger: PluginLogger;
|
|
31
|
+
/** Append one attempt to the session record for later review. */
|
|
32
|
+
readonly record?: (entry: QaSkillActivationRecord) => void;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* The scoped tool policy of one live agent.
|
|
36
|
+
*
|
|
37
|
+
* Two independent layers enforce the same effective set. `restrict()` decides
|
|
38
|
+
* what the model can see at the next step, and the admission's guard decides
|
|
39
|
+
* what may actually run; a grant widens both, and only up to the ceiling the
|
|
40
|
+
* subrole was configured with. A skill file can therefore ask for anything —
|
|
41
|
+
* the intersection with the role ceiling is what it gets.
|
|
42
|
+
*
|
|
43
|
+
* A restriction may only name tools the scope inherits, so a grant is verified
|
|
44
|
+
* by applying it: a name the registry refuses (agent-local, unregistered) is
|
|
45
|
+
* dropped from the grant instead of breaking the session.
|
|
46
|
+
*/
|
|
47
|
+
export declare class QaAgentToolGrants {
|
|
48
|
+
private readonly options;
|
|
49
|
+
private readonly active;
|
|
50
|
+
private readonly tools;
|
|
51
|
+
private disposeRestriction;
|
|
52
|
+
constructor(options: QaAgentToolGrantsOptions);
|
|
53
|
+
/** Whether the model would see this tool right now. */
|
|
54
|
+
effectiveTools(): ReadonlySet<string>;
|
|
55
|
+
/** Grants currently held, newest last; one entry per activated skill. */
|
|
56
|
+
activeGrants(): readonly QaSkillGrant[];
|
|
57
|
+
/**
|
|
58
|
+
* Activate one skill's declared tool requirements.
|
|
59
|
+
*
|
|
60
|
+
* The whole operation is atomic from the caller's point of view: either the
|
|
61
|
+
* grant is recorded and the restriction admits it, or nothing changed and
|
|
62
|
+
* the reason is returned. A strict skill refuses the activation outright; a
|
|
63
|
+
* best-effort one activates and reports what it had to give up.
|
|
64
|
+
* @param skillName - the skill the agent asked to load.
|
|
65
|
+
* @param origin - which activation path asked, for the session record.
|
|
66
|
+
* @returns the outcome, including the model-facing reason on refusal.
|
|
67
|
+
*/
|
|
68
|
+
activate(skillName: string, origin: QaSkillActivationOrigin): QaSkillActivationOutcome;
|
|
69
|
+
/** Record an audience refusal; no tool state changes. */
|
|
70
|
+
deny(skillName: string, origin: QaSkillActivationOrigin, reason: string): void;
|
|
71
|
+
/** Lift the restriction this instance owns. Safe to call more than once. */
|
|
72
|
+
dispose(): void;
|
|
73
|
+
/**
|
|
74
|
+
* Swap the scoped restriction, newest first.
|
|
75
|
+
*
|
|
76
|
+
* The new mask is installed before the previous one is lifted: restrictions
|
|
77
|
+
* intersect, so lifting first would leave a window in which the agent is
|
|
78
|
+
* unrestricted, and a rejected name would then leave it that way.
|
|
79
|
+
*/
|
|
80
|
+
private applyRestriction;
|
|
81
|
+
private restore;
|
|
82
|
+
private commit;
|
|
83
|
+
}
|
|
84
|
+
//# sourceMappingURL=tool-grants.d.ts.map
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { TypertRemoteService } from "@deepseek-ai/dsh-typert-protocol";
|
|
2
2
|
import type { Context } from "@deepseek-ai/cordis";
|
|
3
3
|
import type { QaTurnSources } from "./provenance/types.js";
|
|
4
|
-
import type { QaAccountProfileInput, QaAccountSession, QaAccountStartersInput, QaAccountUserPublic, QaApprovalDecision, QaClaimResult, QaLockdownProof, QaOwnershipEntry, QaPendingApproval, QaPendingQuestion, QaQuestionAnswerItem, QaSurfaceConfig, ResolvedQaSurfaceConfig, QaSkillDocument, QaSkillDraftInput, QaSkillRemoval, QaSkillSummary, QaSkillToolDescriptor, QaSkillValidation, QaSourceFilePreview, QaWhoamiResult, QaPrincipal } from "./types.js";
|
|
4
|
+
import type { QaAccountProfileInput, QaAccountSession, QaAccountStartersInput, QaAccountUserPublic, QaApprovalDecision, QaClaimResult, QaLockdownProof, QaOwnershipEntry, QaPendingApproval, QaPendingQuestion, QaQuestionAnswerItem, QaSurfaceConfig, ResolvedQaSurfaceConfig, QaSkillDocument, QaSkillDraftInput, QaSkillRemoval, QaSkillSummary, QaSkillToolDescriptor, QaSkillValidation, QaSourceFilePreview, QaWhoamiResult, QaPrincipal, QaAccessAdminSnapshot, QaAdminAuditEvent, QaAdminOverview, QaAdminPage, QaAdminUserDetail, QaAdminUserRow, QaAdminUserUpdate, QaAuditQuery, QaCapabilitySelection, QaConversationDetail, QaConversationQuery, QaConversationReview, QaConversationReviewInput, QaConversationSummary, QaCurrentAccess, QaFeedbackQuery, QaFeedbackRow, QaMessageFeedback, QaMessageFeedbackInput, QaQualityMetrics, QaReviewQueueItem, QaReviewQueueRow, QaSessionAccess, QaSkillActivationRecord, QaSkillAssignmentOverride, QaSubrole, QaUserAccess, QaUserQuery } from "./types.js";
|
|
5
5
|
export declare const name = "qa-surface";
|
|
6
6
|
export declare const inject: string[];
|
|
7
7
|
import { QA_SURFACE_SETTINGS_NAMESPACE } from "./shared/settings.js";
|
|
@@ -27,6 +27,13 @@ export declare class QaSurface extends TypertRemoteService {
|
|
|
27
27
|
private readonly tools;
|
|
28
28
|
/** Account-remote bodies; the wire signatures stay on this class. */
|
|
29
29
|
private readonly accountRemotes;
|
|
30
|
+
/** Roles, assignments, discovery and immutable per-session capability sets. */
|
|
31
|
+
private readonly access;
|
|
32
|
+
/**
|
|
33
|
+
* The administrative console: authorization, conversation queries over
|
|
34
|
+
* stored logs, quality records and their aggregations.
|
|
35
|
+
*/
|
|
36
|
+
private readonly admin;
|
|
30
37
|
/** Personal skills: storage, the DSH provider and the manual-edit watcher. */
|
|
31
38
|
private readonly personalSkills;
|
|
32
39
|
/** Personal-skill remote bodies; the wire signatures stay on this class. */
|
|
@@ -38,13 +45,13 @@ export declare class QaSurface extends TypertRemoteService {
|
|
|
38
45
|
private disposeRoute;
|
|
39
46
|
private routeKey;
|
|
40
47
|
/**
|
|
41
|
-
* The
|
|
42
|
-
*
|
|
43
|
-
* subsystem or the whole surface is disabled.
|
|
48
|
+
* The quality store opens its file on first use, so a deployment that never
|
|
49
|
+
* opens the admin console never grows one.
|
|
44
50
|
*/
|
|
45
|
-
private
|
|
46
|
-
private documentsKey;
|
|
51
|
+
private qualityStore;
|
|
47
52
|
constructor(ctx: Context, entry?: QaSurfaceConfig);
|
|
53
|
+
/** The quality store, opening its file the first time anyone needs it. */
|
|
54
|
+
private quality;
|
|
48
55
|
/** Resolve browser authentication to the caller only; never accepts an id. */
|
|
49
56
|
principalForToken(token: string): QaPrincipal | undefined;
|
|
50
57
|
/** Resolve only a directly QA-owned root session; delegated children fail closed. */
|
|
@@ -101,7 +108,45 @@ export declare class QaSurface extends TypertRemoteService {
|
|
|
101
108
|
* cwd is `<configured workspace>/.qa-users/<account UUID>` and the child is
|
|
102
109
|
* intentionally not registered or attached as another DSH workspace.
|
|
103
110
|
*/
|
|
104
|
-
createSession(token: string): Promise<string>;
|
|
111
|
+
createSession(token: string, subroleId: string | null, adminPreview: boolean): Promise<string>;
|
|
112
|
+
/** The selector model for the signed-in user; admin grants are irrelevant. */
|
|
113
|
+
accessCurrent(token: string): QaCurrentAccess;
|
|
114
|
+
/** The immutable role pinned to an existing session. */
|
|
115
|
+
accessSession(token: string, sessionId: string): QaSessionAccess;
|
|
116
|
+
/** Complete administrator projection; authorization is checked before discovery. */
|
|
117
|
+
accessAdminSnapshot(token: string): Promise<QaAccessAdminSnapshot>;
|
|
118
|
+
accessCreateSubrole(token: string, input: QaSubrole): QaSubrole;
|
|
119
|
+
accessUpdateSubrole(token: string, id: string, input: QaSubrole): QaSubrole;
|
|
120
|
+
accessDeleteSubrole(token: string, id: string, replacementId: string | null): {
|
|
121
|
+
readonly deleted: boolean;
|
|
122
|
+
};
|
|
123
|
+
accessUpdateCommon(token: string, input: QaCapabilitySelection): QaCapabilitySelection;
|
|
124
|
+
accessUpdateAssignment(token: string, userId: string, input: QaUserAccess): QaUserAccess;
|
|
125
|
+
/** Layer one administrator assignment over what a SKILL.md declares. */
|
|
126
|
+
accessUpdateSkillOverride(token: string, input: QaSkillAssignmentOverride): readonly QaSkillAssignmentOverride[];
|
|
127
|
+
/** What each skill activation actually granted in this session. */
|
|
128
|
+
accessSkillActivations(token: string, sessionId: string): readonly QaSkillActivationRecord[];
|
|
129
|
+
/** Counters, attention lines and the newest quality signals. */
|
|
130
|
+
adminOverview(token: string): Promise<QaAdminOverview>;
|
|
131
|
+
adminUsers(token: string, query: QaUserQuery, cursor: string | null, limit: number | null): Promise<QaAdminPage<QaAdminUserRow>>;
|
|
132
|
+
adminUser(token: string, userId: string): Promise<QaAdminUserDetail>;
|
|
133
|
+
/** Authorization role, status and subrole assignment of one account. */
|
|
134
|
+
adminUpdateUser(token: string, userId: string, update: QaAdminUserUpdate): Promise<QaAdminUserDetail>;
|
|
135
|
+
adminConversations(token: string, query: QaConversationQuery, cursor: string | null, limit: number | null): Promise<QaAdminPage<QaConversationSummary>>;
|
|
136
|
+
/** One conversation with its messages, tool calls and review state. */
|
|
137
|
+
adminConversation(token: string, conversationId: string): Promise<QaConversationDetail>;
|
|
138
|
+
adminFeedback(token: string, query: QaFeedbackQuery, cursor: string | null, limit: number | null): Promise<QaAdminPage<QaFeedbackRow>>;
|
|
139
|
+
/**
|
|
140
|
+
* Rate one of the caller's own assistant messages. The token names the only
|
|
141
|
+
* ratable conversation, exactly as the self-service profile write does.
|
|
142
|
+
*/
|
|
143
|
+
adminRateMessage(token: string, conversationId: string, messageId: string, input: QaMessageFeedbackInput): QaMessageFeedback;
|
|
144
|
+
adminReviewQueue(token: string, cursor: string | null, limit: number | null): Promise<QaAdminPage<QaReviewQueueRow>>;
|
|
145
|
+
/** Park a conversation for review without rating it. */
|
|
146
|
+
adminQueueConversation(token: string, conversationId: string, messageId: string | null): QaReviewQueueItem;
|
|
147
|
+
adminSaveReview(token: string, input: QaConversationReviewInput): QaConversationReview;
|
|
148
|
+
adminMetrics(token: string): Promise<QaQualityMetrics>;
|
|
149
|
+
adminAudit(token: string, query: QaAuditQuery, cursor: string | null, limit: number | null): Promise<QaAdminPage<QaAdminAuditEvent>>;
|
|
105
150
|
/** Pin and attest the effective policy. The browser supplies identity only. */
|
|
106
151
|
secureSession(token: string, sessionId: string): Promise<QaLockdownProof>;
|
|
107
152
|
/** Return canonical Host snapshots from plugin-owned durable provenance. */
|
|
@@ -169,13 +214,12 @@ export declare class QaSurface extends TypertRemoteService {
|
|
|
169
214
|
};
|
|
170
215
|
private refreshRoute;
|
|
171
216
|
/**
|
|
172
|
-
*
|
|
173
|
-
*
|
|
174
|
-
*
|
|
175
|
-
*
|
|
176
|
-
* for everything it declares.
|
|
217
|
+
* The document pipeline moved out of this plugin into `@yadsh/dsh-documents`.
|
|
218
|
+
* A deployment whose profile still carries the old `documents` section would
|
|
219
|
+
* otherwise lose its Docling endpoint and artifact root silently, so the
|
|
220
|
+
* leftover section is reported once per configuration change instead.
|
|
177
221
|
*/
|
|
178
|
-
private
|
|
222
|
+
private warnDocumentsMoved;
|
|
179
223
|
}
|
|
180
224
|
export { ConfigSchema, DEFAULT_QA_SURFACE_CONFIG, normalizeRoutePath, resolveConfig, } from "./config.js";
|
|
181
225
|
export { QaAttestationError } from "./attestation.js";
|
|
@@ -185,8 +229,12 @@ export { entryRedirectRow, entryRedirectScript } from "./entry-redirect.js";
|
|
|
185
229
|
export { registerQaNavigationRoute } from "./host-route.js";
|
|
186
230
|
export { QaIntegrationPrincipalBindings } from "./integration-principals.js";
|
|
187
231
|
export { qaToolDenial, qaToolPolicyPlan } from "./lockdown-policy.js";
|
|
188
|
-
export * from "./documents/index.js";
|
|
189
232
|
export { QaPolicyAdmission } from "./secure-session.js";
|
|
233
|
+
export { QaAccessService } from "./access/service.js";
|
|
234
|
+
export { QaRoleRepository } from "./access/role-repository.js";
|
|
235
|
+
export { QaAgentToolGrants } from "./enforcement/tool-grants.js";
|
|
236
|
+
export { defaultCapabilityConfig, normalizeCapabilityConfig, normalizeUserAccess, resolveCapabilityPolicy, resolveSkillAccess, } from "./access/model.js";
|
|
237
|
+
export { parseQaSkillMetadata, resolveSkillVisibility, } from "./access/skill-metadata.js";
|
|
190
238
|
export { QaPromptNotes, renderUserIdentity, QA_IDENTITY_NOTE, QA_SOURCES_NOTE, } from "./prompt-notes.js";
|
|
191
239
|
export * from "./provenance/index.js";
|
|
192
240
|
export type * from "./types.js";
|
|
@@ -28,6 +28,8 @@ export declare class QaTools implements QaToolActivation {
|
|
|
28
28
|
constructor(ctx: Context, options: QaToolsOptions);
|
|
29
29
|
/** Names currently registered on one agent; the admission guard reads this per call. */
|
|
30
30
|
activeToolNames(agent: Agent): readonly string[];
|
|
31
|
+
/** Shipped scope-local names, including entries not activated on an agent yet. */
|
|
32
|
+
catalogToolNames(): readonly string[];
|
|
31
33
|
dispose(): void;
|
|
32
34
|
/**
|
|
33
35
|
* The preset gate. An empty `activationPresets` leaves it open, which is only
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Agent } from "@deepseek-ai/dsh-agent";
|
|
2
2
|
import type { Context } from "@deepseek-ai/cordis";
|
|
3
3
|
import type { PluginLogger } from "@yadsh/dsh-plugin-log";
|
|
4
|
+
import type { QaResolvedSessionPolicy } from "./access/service.js";
|
|
4
5
|
import type { QaLockdownProof, ResolvedQaSurfaceConfig } from "./types.js";
|
|
5
6
|
/**
|
|
6
7
|
* The accounts half of admission, resolved per call by the entry (accounts
|
|
@@ -32,6 +33,10 @@ export declare class QaPolicyAdmission {
|
|
|
32
33
|
* it is registered and stops being callable once the agent is disposed.
|
|
33
34
|
*/
|
|
34
35
|
private readonly dynamicToolNames;
|
|
36
|
+
/** Resolve and freeze the session's subrole policy after its agent exists. */
|
|
37
|
+
private readonly capabilityPolicy?;
|
|
38
|
+
/** Scope-local catalog entries may be known before they are activated. */
|
|
39
|
+
private readonly knownDynamicToolNames;
|
|
35
40
|
private readonly appliedPolicies;
|
|
36
41
|
/** Host-trusted principal-scoped plugin tools enabled outside static config. */
|
|
37
42
|
private readonly principalScopedTools;
|
|
@@ -49,13 +54,24 @@ export declare class QaPolicyAdmission {
|
|
|
49
54
|
* skill loaded. Read per execution, so a tool becomes callable exactly when
|
|
50
55
|
* it is registered and stops being callable once the agent is disposed.
|
|
51
56
|
*/
|
|
52
|
-
dynamicToolNames?: (agent: Agent) => readonly string[]
|
|
57
|
+
dynamicToolNames?: (agent: Agent) => readonly string[],
|
|
58
|
+
/** Resolve and freeze the session's subrole policy after its agent exists. */
|
|
59
|
+
capabilityPolicy?: ((token: string, sessionId: string, agent: Agent) => Promise<QaResolvedSessionPolicy | undefined>) | undefined,
|
|
60
|
+
/** Scope-local catalog entries may be known before they are activated. */
|
|
61
|
+
knownDynamicToolNames?: () => readonly string[]);
|
|
53
62
|
/**
|
|
54
63
|
* Add tools whose own executor resolves the QA principal server-side.
|
|
55
64
|
* Enabling the contributing plugin is the operator decision; model arguments
|
|
56
65
|
* still cannot select an owner. The returned disposer mirrors tool lifetime.
|
|
57
66
|
*/
|
|
58
67
|
registerPrincipalScopedTools(names: readonly string[]): () => void;
|
|
68
|
+
/**
|
|
69
|
+
* Validate deployment-owned facts before a Host session is materialized.
|
|
70
|
+
* Agent-scoped facts (preset composition and tools) remain in secureSession,
|
|
71
|
+
* but a missing Workspace or mismatched permission preset must not leave a
|
|
72
|
+
* newly-created, permanently unusable chat behind.
|
|
73
|
+
*/
|
|
74
|
+
preflightDeployment(): void;
|
|
59
75
|
/**
|
|
60
76
|
* The mounted attachment store's verbatim root, when the backend exposes
|
|
61
77
|
* one. It sits outside every workspace, so the per-user fence would
|
|
@@ -85,6 +101,8 @@ export declare class QaPolicyAdmission {
|
|
|
85
101
|
*/
|
|
86
102
|
private liveAgent;
|
|
87
103
|
secureSession(token: string, sessionId: string): Promise<QaLockdownProof>;
|
|
104
|
+
/** Resolve the deployment facts shared by creation and full attestation. */
|
|
105
|
+
private deploymentPins;
|
|
88
106
|
/**
|
|
89
107
|
* Whether one session went through this boundary. The provenance note is
|
|
90
108
|
* written only for attested sessions, which is what keeps a deployment's
|