@yadsh/dsh-qa-surface 0.4.0 → 0.6.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 +235 -14
- package/compatibility.json +10 -1
- package/cordis.patch.yml +17 -0
- package/lib/account-remotes.js +10 -0
- package/lib/account-remotes.js.map +1 -1
- package/lib/accounts/credentials.js +12 -4
- package/lib/accounts/credentials.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 +38 -1
- package/lib/accounts/store.js.map +1 -1
- package/lib/approvals.js +179 -0
- package/lib/approvals.js.map +1 -0
- package/lib/cli.js +10 -0
- package/lib/cli.js.map +1 -1
- package/lib/client/QaAccountsController.js +29 -0
- package/lib/client/QaAccountsController.js.map +1 -1
- package/lib/client/QaSessionController.js +261 -48
- package/lib/client/QaSessionController.js.map +1 -1
- package/lib/client/QaSurface.js +138 -56
- package/lib/client/QaSurface.js.map +1 -1
- package/lib/client/QaSurfaceGuard.js +96 -0
- package/lib/client/QaSurfaceGuard.js.map +1 -0
- package/lib/client/QaTranscriptAdapter.js +11 -5
- package/lib/client/QaTranscriptAdapter.js.map +1 -1
- package/lib/client/approvals.js +104 -0
- package/lib/client/approvals.js.map +1 -0
- package/lib/client/attestation.js +3 -0
- package/lib/client/attestation.js.map +1 -1
- package/lib/client/components/QaApproval.js +23 -0
- package/lib/client/components/QaApproval.js.map +1 -0
- package/lib/client/components/QaChangelog.js +55 -0
- package/lib/client/components/QaChangelog.js.map +1 -1
- package/lib/client/components/QaComposer.js +1 -1
- package/lib/client/components/QaComposer.js.map +1 -1
- package/lib/client/components/QaHeader.js +2 -8
- package/lib/client/components/QaHeader.js.map +1 -1
- package/lib/client/components/QaMessage.js +20 -7
- package/lib/client/components/QaMessage.js.map +1 -1
- package/lib/client/components/QaModal.js +24 -6
- package/lib/client/components/QaModal.js.map +1 -1
- package/lib/client/components/QaQuestions.js +96 -0
- package/lib/client/components/QaQuestions.js.map +1 -0
- package/lib/client/components/QaSidebar.js +2 -6
- package/lib/client/components/QaSidebar.js.map +1 -1
- package/lib/client/components/QaSourcesPanel.js +6 -5
- package/lib/client/components/QaSourcesPanel.js.map +1 -1
- package/lib/client/components/QaWidthHandle.js +21 -1
- package/lib/client/components/QaWidthHandle.js.map +1 -1
- package/lib/client/components/surface-utils.js +2 -0
- package/lib/client/components/surface-utils.js.map +1 -1
- package/lib/client/index.js +81 -22
- package/lib/client/index.js.map +1 -1
- package/lib/client/panels/PanelHost.js +209 -0
- package/lib/client/panels/PanelHost.js.map +1 -0
- package/lib/client/panels/PanelLauncher.js +39 -0
- package/lib/client/panels/PanelLauncher.js.map +1 -0
- package/lib/client/panels/contract.js +2 -0
- package/lib/client/panels/contract.js.map +1 -0
- package/lib/client/panels/index.js +2 -0
- package/lib/client/panels/index.js.map +1 -0
- package/lib/client/panels/registry.js +171 -0
- package/lib/client/panels/registry.js.map +1 -0
- package/lib/client/project-session-state.js +8 -3
- package/lib/client/project-session-state.js.map +1 -1
- package/lib/client/questions.js +114 -0
- package/lib/client/questions.js.map +1 -0
- package/lib/client/settings/card.js +2 -2
- package/lib/client/settings/card.js.map +1 -1
- package/lib/client/settings/sections/accounts.js +3 -1
- package/lib/client/settings/sections/accounts.js.map +1 -1
- package/lib/client/settings/sections/documents.js +88 -0
- package/lib/client/settings/sections/documents.js.map +1 -0
- package/lib/client/settings/sections/interface.js +2 -0
- package/lib/client/settings/sections/interface.js.map +1 -1
- package/lib/client/settings/sections/sources.js +2 -0
- package/lib/client/settings/sections/sources.js.map +1 -1
- package/lib/client/settings/sections.js +1 -0
- package/lib/client/settings/sections.js.map +1 -1
- package/lib/client/settings-extensions/contract.js +2 -0
- package/lib/client/settings-extensions/contract.js.map +1 -0
- package/lib/client/settings-extensions/index.js +2 -0
- package/lib/client/settings-extensions/index.js.map +1 -0
- package/lib/client/settings-extensions/registry.js +63 -0
- package/lib/client/settings-extensions/registry.js.map +1 -0
- package/lib/client/settlement.js +51 -5
- package/lib/client/settlement.js.map +1 -1
- package/lib/client/source-preview.js +24 -0
- package/lib/client/source-preview.js.map +1 -0
- package/lib/client/styles.js +199 -32
- package/lib/client/styles.js.map +1 -1
- package/lib/client/subagent-codenames.js +109 -0
- package/lib/client/subagent-codenames.js.map +1 -0
- package/lib/client/types.js +3 -0
- package/lib/client/types.js.map +1 -1
- package/lib/client/user-settings/GeneralSettingsPage.js +13 -0
- package/lib/client/user-settings/GeneralSettingsPage.js.map +1 -0
- package/lib/client/user-settings/ProfileSettingsPage.js +59 -0
- package/lib/client/user-settings/ProfileSettingsPage.js.map +1 -0
- package/lib/client/user-settings/SkillCatalog.js +23 -0
- package/lib/client/user-settings/SkillCatalog.js.map +1 -0
- package/lib/client/user-settings/SkillEditor.js +89 -0
- package/lib/client/user-settings/SkillEditor.js.map +1 -0
- package/lib/client/user-settings/SkillToolPicker.js +58 -0
- package/lib/client/user-settings/SkillToolPicker.js.map +1 -0
- package/lib/client/user-settings/SkillsSettingsPage.js +171 -0
- package/lib/client/user-settings/SkillsSettingsPage.js.map +1 -0
- package/lib/client/user-settings/StartersSettingsPage.js +78 -0
- package/lib/client/user-settings/StartersSettingsPage.js.map +1 -0
- package/lib/client/user-settings/UserSettingsDialog.js +50 -0
- package/lib/client/user-settings/UserSettingsDialog.js.map +1 -0
- package/lib/client/user-settings/copy.js +84 -0
- package/lib/client/user-settings/copy.js.map +1 -0
- package/lib/client/user-settings/draft.js +127 -0
- package/lib/client/user-settings/draft.js.map +1 -0
- package/lib/client/user-settings/fields.js +24 -0
- package/lib/client/user-settings/fields.js.map +1 -0
- package/lib/client.js +6629 -1579
- package/lib/client.js.map +1 -1
- package/lib/config-resolvers/accounts.js +30 -0
- package/lib/config-resolvers/accounts.js.map +1 -1
- package/lib/config-resolvers/basics.js +4 -2
- package/lib/config-resolvers/basics.js.map +1 -1
- package/lib/config-resolvers/defaults.js +27 -0
- package/lib/config-resolvers/defaults.js.map +1 -1
- package/lib/config-resolvers/lockdown.js +11 -0
- package/lib/config-resolvers/lockdown.js.map +1 -1
- package/lib/config-resolvers/session.js +2 -2
- package/lib/config-resolvers/session.js.map +1 -1
- package/lib/config-resolvers/shared.js +9 -0
- package/lib/config-resolvers/shared.js.map +1 -1
- package/lib/config-resolvers/sources.js +2 -0
- package/lib/config-resolvers/sources.js.map +1 -1
- package/lib/config-resolvers/tools.js +37 -0
- package/lib/config-resolvers/tools.js.map +1 -0
- package/lib/config-resolvers/ui.js +2 -0
- package/lib/config-resolvers/ui.js.map +1 -1
- package/lib/config.js +299 -2
- package/lib/config.js.map +1 -1
- package/lib/documents/artifacts/ids.js +43 -0
- package/lib/documents/artifacts/ids.js.map +1 -0
- package/lib/documents/artifacts/manifest.js +66 -0
- package/lib/documents/artifacts/manifest.js.map +1 -0
- package/lib/documents/artifacts/store.js +169 -0
- package/lib/documents/artifacts/store.js.map +1 -0
- package/lib/documents/capabilities.js +93 -0
- package/lib/documents/capabilities.js.map +1 -0
- package/lib/documents/config.js +302 -0
- package/lib/documents/config.js.map +1 -0
- package/lib/documents/defaults.js +78 -0
- package/lib/documents/defaults.js.map +1 -0
- package/lib/documents/errors.js +101 -0
- package/lib/documents/errors.js.map +1 -0
- package/lib/documents/index.js +80 -0
- package/lib/documents/index.js.map +1 -0
- package/lib/documents/inspect/facts.js +161 -0
- package/lib/documents/inspect/facts.js.map +1 -0
- package/lib/documents/inspect/zip.js +108 -0
- package/lib/documents/inspect/zip.js.map +1 -0
- package/lib/documents/markdown/directives.js +135 -0
- package/lib/documents/markdown/directives.js.map +1 -0
- package/lib/documents/markdown/frontmatter.js +35 -0
- package/lib/documents/markdown/frontmatter.js.map +1 -0
- package/lib/documents/markdown/normalize.js +113 -0
- package/lib/documents/markdown/normalize.js.map +1 -0
- package/lib/documents/orchestrator/assets.js +243 -0
- package/lib/documents/orchestrator/assets.js.map +1 -0
- package/lib/documents/orchestrator/convert-document.js +186 -0
- package/lib/documents/orchestrator/convert-document.js.map +1 -0
- package/lib/documents/orchestrator/create-document.js +292 -0
- package/lib/documents/orchestrator/create-document.js.map +1 -0
- package/lib/documents/orchestrator/extract-document.js +162 -0
- package/lib/documents/orchestrator/extract-document.js.map +1 -0
- package/lib/documents/orchestrator/inspect-document.js +89 -0
- package/lib/documents/orchestrator/inspect-document.js.map +1 -0
- package/lib/documents/orchestrator/runtime-deps.js +59 -0
- package/lib/documents/orchestrator/runtime-deps.js.map +1 -0
- package/lib/documents/orchestrator/scope.js +132 -0
- package/lib/documents/orchestrator/scope.js.map +1 -0
- package/lib/documents/providers/docling.js +247 -0
- package/lib/documents/providers/docling.js.map +1 -0
- package/lib/documents/providers/libreoffice.js +130 -0
- package/lib/documents/providers/libreoffice.js.map +1 -0
- package/lib/documents/providers/markitdown.js +89 -0
- package/lib/documents/providers/markitdown.js.map +1 -0
- package/lib/documents/providers/pandoc.js +161 -0
- package/lib/documents/providers/pandoc.js.map +1 -0
- package/lib/documents/providers/process.js +164 -0
- package/lib/documents/providers/process.js.map +1 -0
- package/lib/documents/providers/registry.js +152 -0
- package/lib/documents/providers/registry.js.map +1 -0
- package/lib/documents/providers/shared.js +75 -0
- package/lib/documents/providers/shared.js.map +1 -0
- package/lib/documents/runtime.js +114 -0
- package/lib/documents/runtime.js.map +1 -0
- package/lib/documents/security/file-types.js +188 -0
- package/lib/documents/security/file-types.js.map +1 -0
- package/lib/documents/security/limits.js +78 -0
- package/lib/documents/security/limits.js.map +1 -0
- package/lib/documents/security/mime.js +43 -0
- package/lib/documents/security/mime.js.map +1 -0
- package/lib/documents/security/paths.js +133 -0
- package/lib/documents/security/paths.js.map +1 -0
- package/lib/documents/templates/registry.js +147 -0
- package/lib/documents/templates/registry.js.map +1 -0
- package/lib/documents/templates/resolver.js +59 -0
- package/lib/documents/templates/resolver.js.map +1 -0
- package/lib/documents/tools/convert.js +125 -0
- package/lib/documents/tools/convert.js.map +1 -0
- package/lib/documents/tools/create.js +187 -0
- package/lib/documents/tools/create.js.map +1 -0
- package/lib/documents/tools/index.js +41 -0
- package/lib/documents/tools/index.js.map +1 -0
- package/lib/documents/tools/inspect.js +135 -0
- package/lib/documents/tools/inspect.js.map +1 -0
- package/lib/documents/tools/shared.js +88 -0
- package/lib/documents/tools/shared.js.map +1 -0
- package/lib/documents/tools/to-markdown.js +125 -0
- package/lib/documents/tools/to-markdown.js.map +1 -0
- package/lib/documents/types.js +12 -0
- package/lib/documents/types.js.map +1 -0
- package/lib/index.js +299 -24
- package/lib/index.js.map +1 -1
- package/lib/integration-principals.js +22 -0
- package/lib/integration-principals.js.map +1 -0
- package/lib/lockdown-policy.js +15 -3
- package/lib/lockdown-policy.js.map +1 -1
- package/lib/personal-skills/errors.js +9 -0
- package/lib/personal-skills/errors.js.map +1 -0
- package/lib/personal-skills/host.js +80 -0
- package/lib/personal-skills/host.js.map +1 -0
- package/lib/personal-skills/index.js +10 -0
- package/lib/personal-skills/index.js.map +1 -0
- package/lib/personal-skills/paths.js +127 -0
- package/lib/personal-skills/paths.js.map +1 -0
- package/lib/personal-skills/provider.js +109 -0
- package/lib/personal-skills/provider.js.map +1 -0
- package/lib/personal-skills/remotes.js +40 -0
- package/lib/personal-skills/remotes.js.map +1 -0
- package/lib/personal-skills/service.js +686 -0
- package/lib/personal-skills/service.js.map +1 -0
- package/lib/personal-skills/skill-file.js +278 -0
- package/lib/personal-skills/skill-file.js.map +1 -0
- package/lib/personal-skills/skill-format.js +202 -0
- package/lib/personal-skills/skill-format.js.map +1 -0
- package/lib/personal-skills/watcher.js +96 -0
- package/lib/personal-skills/watcher.js.map +1 -0
- package/lib/profile.js +6 -4
- package/lib/profile.js.map +1 -1
- package/lib/prompt-notes.js +19 -0
- package/lib/prompt-notes.js.map +1 -1
- package/lib/provenance/file-preview.js +68 -21
- package/lib/provenance/file-preview.js.map +1 -1
- package/lib/provenance/host-store.js +69 -20
- package/lib/provenance/host-store.js.map +1 -1
- package/lib/provenance/index.js +1 -0
- package/lib/provenance/index.js.map +1 -1
- package/lib/provenance/normalize.js +3 -1
- package/lib/provenance/normalize.js.map +1 -1
- package/lib/provenance/reported.js +37 -12
- package/lib/provenance/reported.js.map +1 -1
- package/lib/provenance/snapshot-store.js +154 -0
- package/lib/provenance/snapshot-store.js.map +1 -0
- package/lib/qa-tools/activation-detector.js +53 -0
- package/lib/qa-tools/activation-detector.js.map +1 -0
- package/lib/qa-tools/activation-manager.js +111 -0
- package/lib/qa-tools/activation-manager.js.map +1 -0
- package/lib/qa-tools/catalog.js +108 -0
- package/lib/qa-tools/catalog.js.map +1 -0
- package/lib/qa-tools/durable-marker.js +115 -0
- package/lib/qa-tools/durable-marker.js.map +1 -0
- package/lib/qa-tools/index.js +83 -0
- package/lib/qa-tools/index.js.map +1 -0
- package/lib/qa-tools/lifecycle.js +64 -0
- package/lib/qa-tools/lifecycle.js.map +1 -0
- package/lib/qa-tools/types.js +2 -0
- package/lib/qa-tools/types.js.map +1 -0
- package/lib/questions.js +185 -0
- package/lib/questions.js.map +1 -0
- package/lib/resolve-config.js +5 -0
- package/lib/resolve-config.js.map +1 -1
- package/lib/secure-session.js +104 -20
- package/lib/secure-session.js.map +1 -1
- package/lib/session-ownership.js +55 -0
- package/lib/session-ownership.js.map +1 -0
- package/lib/starters.js +117 -0
- package/lib/starters.js.map +1 -0
- package/lib/typert.host.js +1162 -77
- package/lib/typert.remote-client.d.ts +27 -1
- package/lib/typert.remote-client.js +879 -14
- package/lib/types/account-remotes.d.ts +3 -1
- package/lib/types/accounts/credentials.d.ts +6 -0
- package/lib/types/accounts/errors.d.ts +1 -1
- package/lib/types/accounts/file.d.ts +10 -0
- package/lib/types/accounts/store.d.ts +15 -1
- package/lib/types/approvals.d.ts +65 -0
- package/lib/types/client/QaAccountsController.d.ts +7 -1
- package/lib/types/client/QaSessionController.d.ts +50 -1
- package/lib/types/client/QaSurface.d.ts +21 -4
- package/lib/types/client/QaSurfaceGuard.d.ts +27 -0
- package/lib/types/client/QaTranscriptAdapter.d.ts +7 -0
- package/lib/types/client/approvals.d.ts +39 -0
- package/lib/types/client/components/QaApproval.d.ts +13 -0
- package/lib/types/client/components/QaComposer.d.ts +3 -1
- package/lib/types/client/components/QaHeader.d.ts +3 -1
- package/lib/types/client/components/QaModal.d.ts +5 -4
- package/lib/types/client/components/QaQuestions.d.ts +13 -0
- package/lib/types/client/components/QaSidebar.d.ts +8 -11
- package/lib/types/client/components/QaWidthHandle.d.ts +13 -0
- package/lib/types/client/index.d.ts +1 -0
- package/lib/types/client/panels/PanelHost.d.ts +18 -0
- package/lib/types/client/panels/PanelLauncher.d.ts +5 -0
- package/lib/types/client/panels/contract.d.ts +83 -0
- package/lib/types/client/panels/index.d.ts +3 -0
- package/lib/types/client/panels/registry.d.ts +40 -0
- package/lib/types/client/project-session-state.d.ts +13 -1
- package/lib/types/client/questions.d.ts +45 -0
- package/lib/types/client/settings/sections/documents.d.ts +13 -0
- package/lib/types/client/settings/sections.d.ts +1 -0
- package/lib/types/client/settings-extensions/contract.d.ts +32 -0
- package/lib/types/client/settings-extensions/index.d.ts +3 -0
- package/lib/types/client/settings-extensions/registry.d.ts +15 -0
- package/lib/types/client/settlement.d.ts +41 -5
- package/lib/types/client/source-preview.d.ts +8 -0
- package/lib/types/client/styles.d.ts +2 -0
- package/lib/types/client/subagent-codenames.d.ts +18 -0
- package/lib/types/client/types.d.ts +82 -3
- package/lib/types/client/user-settings/GeneralSettingsPage.d.ts +14 -0
- package/lib/types/client/user-settings/ProfileSettingsPage.d.ts +18 -0
- package/lib/types/client/user-settings/SkillCatalog.d.ts +16 -0
- package/lib/types/client/user-settings/SkillEditor.d.ts +42 -0
- package/lib/types/client/user-settings/SkillToolPicker.d.ts +17 -0
- package/lib/types/client/user-settings/SkillsSettingsPage.d.ts +15 -0
- package/lib/types/client/user-settings/StartersSettingsPage.d.ts +14 -0
- package/lib/types/client/user-settings/UserSettingsDialog.d.ts +43 -0
- package/lib/types/client/user-settings/copy.d.ts +25 -0
- package/lib/types/client/user-settings/draft.d.ts +51 -0
- package/lib/types/client/user-settings/fields.d.ts +43 -0
- package/lib/types/config-resolvers/shared.d.ts +7 -0
- package/lib/types/config-resolvers/tools.d.ts +6 -0
- package/lib/types/documents/artifacts/ids.d.ts +14 -0
- package/lib/types/documents/artifacts/manifest.d.ts +32 -0
- package/lib/types/documents/artifacts/store.d.ts +67 -0
- package/lib/types/documents/capabilities.d.ts +32 -0
- package/lib/types/documents/config.d.ts +27 -0
- package/lib/types/documents/defaults.d.ts +161 -0
- package/lib/types/documents/errors.d.ts +42 -0
- package/lib/types/documents/index.d.ts +63 -0
- package/lib/types/documents/inspect/facts.d.ts +43 -0
- package/lib/types/documents/inspect/zip.d.ts +28 -0
- package/lib/types/documents/markdown/directives.d.ts +39 -0
- package/lib/types/documents/markdown/frontmatter.d.ts +15 -0
- package/lib/types/documents/markdown/normalize.d.ts +30 -0
- package/lib/types/documents/orchestrator/assets.d.ts +55 -0
- package/lib/types/documents/orchestrator/convert-document.d.ts +25 -0
- package/lib/types/documents/orchestrator/create-document.d.ts +18 -0
- package/lib/types/documents/orchestrator/extract-document.d.ts +24 -0
- package/lib/types/documents/orchestrator/inspect-document.d.ts +12 -0
- package/lib/types/documents/orchestrator/runtime-deps.d.ts +43 -0
- package/lib/types/documents/orchestrator/scope.d.ts +52 -0
- package/lib/types/documents/providers/docling.d.ts +54 -0
- package/lib/types/documents/providers/libreoffice.d.ts +40 -0
- package/lib/types/documents/providers/markitdown.d.ts +28 -0
- package/lib/types/documents/providers/pandoc.d.ts +42 -0
- package/lib/types/documents/providers/process.d.ts +54 -0
- package/lib/types/documents/providers/registry.d.ts +68 -0
- package/lib/types/documents/providers/shared.d.ts +27 -0
- package/lib/types/documents/runtime.d.ts +59 -0
- package/lib/types/documents/security/file-types.d.ts +39 -0
- package/lib/types/documents/security/limits.d.ts +24 -0
- package/lib/types/documents/security/mime.d.ts +13 -0
- package/lib/types/documents/security/paths.d.ts +38 -0
- package/lib/types/documents/templates/registry.d.ts +50 -0
- package/lib/types/documents/templates/resolver.d.ts +30 -0
- package/lib/types/documents/tools/convert.d.ts +9 -0
- package/lib/types/documents/tools/create.d.ts +14 -0
- package/lib/types/documents/tools/index.d.ts +33 -0
- package/lib/types/documents/tools/inspect.d.ts +9 -0
- package/lib/types/documents/tools/shared.d.ts +77 -0
- package/lib/types/documents/tools/to-markdown.d.ts +12 -0
- package/lib/types/documents/types.d.ts +294 -0
- package/lib/types/index.d.ts +103 -5
- package/lib/types/integration-principals.d.ts +9 -0
- package/lib/types/lockdown-policy.d.ts +12 -2
- package/lib/types/personal-skills/errors.d.ts +11 -0
- package/lib/types/personal-skills/host.d.ts +42 -0
- package/lib/types/personal-skills/index.d.ts +10 -0
- package/lib/types/personal-skills/paths.d.ts +39 -0
- package/lib/types/personal-skills/provider.d.ts +33 -0
- package/lib/types/personal-skills/remotes.d.ts +35 -0
- package/lib/types/personal-skills/service.d.ts +131 -0
- package/lib/types/personal-skills/skill-file.d.ts +64 -0
- package/lib/types/personal-skills/skill-format.d.ts +100 -0
- package/lib/types/personal-skills/watcher.d.ts +39 -0
- package/lib/types/profile.d.ts +13 -0
- package/lib/types/prompt-notes.d.ts +9 -0
- package/lib/types/provenance/file-preview.d.ts +47 -4
- package/lib/types/provenance/host-store.d.ts +7 -1
- package/lib/types/provenance/index.d.ts +1 -0
- package/lib/types/provenance/reported.d.ts +9 -1
- package/lib/types/provenance/snapshot-store.d.ts +23 -0
- package/lib/types/qa-tools/activation-detector.d.ts +29 -0
- package/lib/types/qa-tools/activation-manager.d.ts +47 -0
- package/lib/types/qa-tools/catalog.d.ts +40 -0
- package/lib/types/qa-tools/durable-marker.d.ts +16 -0
- package/lib/types/qa-tools/index.d.ts +40 -0
- package/lib/types/qa-tools/lifecycle.d.ts +44 -0
- package/lib/types/qa-tools/types.d.ts +45 -0
- package/lib/types/questions.d.ts +83 -0
- package/lib/types/secure-session.d.ts +45 -4
- package/lib/types/session-ownership.d.ts +30 -0
- package/lib/types/starters.d.ts +45 -0
- package/lib/types/types.d.ts +282 -7
- package/lib/types/user-workspace.d.ts +5 -1
- package/lib/user-workspace.js +21 -6
- package/lib/user-workspace.js.map +1 -1
- package/package.json +22 -9
- package/scripts/repair-session-events.mjs +260 -0
- package/lib/client/components/QaProfile.js +0 -64
- package/lib/client/components/QaProfile.js.map +0 -1
- package/lib/types/client/components/QaProfile.d.ts +0 -25
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { Agent } from "@deepseek-ai/dsh-agent";
|
|
2
|
+
import type { Context } from "@deepseek-ai/cordis";
|
|
3
|
+
import type { PluginLogger } from "@yadsh/dsh-plugin-log";
|
|
4
|
+
import type { QaToolActivation } from "./types.js";
|
|
5
|
+
export interface QaToolsOptions {
|
|
6
|
+
readonly logger: PluginLogger;
|
|
7
|
+
readonly dynamicActivation: boolean;
|
|
8
|
+
readonly activationSkill: string;
|
|
9
|
+
readonly activationMode: string;
|
|
10
|
+
readonly activationPresets: readonly string[];
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* The QA tool subsystem: one catalog, one per-agent activation manager, and the
|
|
14
|
+
* two edges that drive it — the skill-result detector and the agent lifecycle.
|
|
15
|
+
*
|
|
16
|
+
* `dsh-qa-surface` owns the tools but never registers them at boot. Nothing in
|
|
17
|
+
* the catalog reaches the model until an agent it belongs to loads the
|
|
18
|
+
* activation skill, so the initial request of a session carries only the
|
|
19
|
+
* composition's own schemas.
|
|
20
|
+
*/
|
|
21
|
+
export declare class QaTools implements QaToolActivation {
|
|
22
|
+
private readonly ctx;
|
|
23
|
+
private readonly options;
|
|
24
|
+
private readonly manager;
|
|
25
|
+
private readonly detector;
|
|
26
|
+
private readonly lifecycle;
|
|
27
|
+
private readonly catalogTools;
|
|
28
|
+
constructor(ctx: Context, options: QaToolsOptions);
|
|
29
|
+
/** Names currently registered on one agent; the admission guard reads this per call. */
|
|
30
|
+
activeToolNames(agent: Agent): readonly string[];
|
|
31
|
+
dispose(): void;
|
|
32
|
+
/**
|
|
33
|
+
* The preset gate. An empty `activationPresets` leaves it open, which is only
|
|
34
|
+
* coherent when this plugin serves a single agent composition; naming the QA
|
|
35
|
+
* preset keeps an unrelated DSH agent from unlocking the same catalog by
|
|
36
|
+
* loading a skill of the same name.
|
|
37
|
+
*/
|
|
38
|
+
private isManagedAgent;
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { Agent } from "@deepseek-ai/dsh-agent";
|
|
2
|
+
import type { Context } from "@deepseek-ai/cordis";
|
|
3
|
+
import type { PluginLogger } from "@yadsh/dsh-plugin-log";
|
|
4
|
+
import type { QaToolActivationManager } from "./activation-manager.js";
|
|
5
|
+
export interface QaToolActivationLifecycleOptions {
|
|
6
|
+
readonly manager: QaToolActivationManager;
|
|
7
|
+
readonly logger: PluginLogger;
|
|
8
|
+
/** Whether this agent's composition participates in QA tool activation. */
|
|
9
|
+
readonly isManagedAgent: (agent: Agent) => boolean;
|
|
10
|
+
/**
|
|
11
|
+
* `true` waits for the activation skill; `false` attaches the catalog to
|
|
12
|
+
* every managed agent as soon as it is created.
|
|
13
|
+
*/
|
|
14
|
+
readonly dynamicActivation: boolean;
|
|
15
|
+
/** The skill name whose load unlocks the tools in dynamic mode. */
|
|
16
|
+
readonly activationSkill: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Owns the arrival and departure edges of one agent's QA tool surface.
|
|
20
|
+
*
|
|
21
|
+
* Arrival: in dynamic mode a resumed session is recognized by the durable
|
|
22
|
+
* marker in its own log and gets its current catalog back before the first
|
|
23
|
+
* model step, while a fresh session waits for the detector. In immediate mode
|
|
24
|
+
* every managed agent is served at creation.
|
|
25
|
+
*
|
|
26
|
+
* Departure: the exact registrations this plugin made are unwound when the
|
|
27
|
+
* agent is disposed, so an agent that leaves never leaves a scoped tool behind.
|
|
28
|
+
*/
|
|
29
|
+
export declare class QaToolActivationLifecycle {
|
|
30
|
+
private readonly ctx;
|
|
31
|
+
private readonly options;
|
|
32
|
+
private readonly disposers;
|
|
33
|
+
constructor(ctx: Context, options: QaToolActivationLifecycleOptions);
|
|
34
|
+
/**
|
|
35
|
+
* Restore a resumed activation, or attach immediately in the compatibility
|
|
36
|
+
* mode. A fresh managed session ends this handler inactive by design: the
|
|
37
|
+
* tools arrive when the model loads the activation skill.
|
|
38
|
+
*/
|
|
39
|
+
private onAgentCreated;
|
|
40
|
+
private attach;
|
|
41
|
+
private onAgentDisposed;
|
|
42
|
+
dispose(): void;
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=lifecycle.d.ts.map
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { Agent } from "@deepseek-ai/dsh-agent";
|
|
2
|
+
import type { ToolDefinition } from "@deepseek-ai/dsh-tools";
|
|
3
|
+
/**
|
|
4
|
+
* One entry of the QA tool catalog.
|
|
5
|
+
*
|
|
6
|
+
* `group` and `tags` are passive metadata: the MVP activation policy activates
|
|
7
|
+
* the whole catalog and never filters on them. They exist so a later
|
|
8
|
+
* `activationMode` can select subsets without touching the tool definitions.
|
|
9
|
+
*/
|
|
10
|
+
export interface QaToolDescriptor {
|
|
11
|
+
readonly definition: ToolDefinition;
|
|
12
|
+
/** Capability bucket reserved for a future grouped activation mode. */
|
|
13
|
+
readonly group?: string;
|
|
14
|
+
/** Free-form labels reserved for a future search/unlock mode. */
|
|
15
|
+
readonly tags?: readonly string[];
|
|
16
|
+
}
|
|
17
|
+
/** Why one activation ran; the origin only shapes logging and the event guard. */
|
|
18
|
+
export type QaToolActivationOrigin = "skill" | "restore" | "immediate";
|
|
19
|
+
/** Runtime activation state of one live agent. */
|
|
20
|
+
export interface QaToolActivationState {
|
|
21
|
+
status: "inactive" | "activating" | "active";
|
|
22
|
+
/** Catalog version whose tools are registered; set once `status` is active. */
|
|
23
|
+
catalogVersion?: string | undefined;
|
|
24
|
+
/** Exact disposers returned by `tools.register()`, in registration order. */
|
|
25
|
+
disposers: (() => void)[];
|
|
26
|
+
}
|
|
27
|
+
/** Outcome of one activation attempt. */
|
|
28
|
+
export type QaToolActivationResult = {
|
|
29
|
+
readonly status: "activated";
|
|
30
|
+
readonly count: number;
|
|
31
|
+
} | {
|
|
32
|
+
readonly status: "already-active";
|
|
33
|
+
} | {
|
|
34
|
+
readonly status: "failed";
|
|
35
|
+
readonly error: unknown;
|
|
36
|
+
};
|
|
37
|
+
/** The activation subsystem's observable surface, injected into the admission gate. */
|
|
38
|
+
export interface QaToolActivation {
|
|
39
|
+
/**
|
|
40
|
+
* Names currently registered on one live agent. The admission guard evaluates
|
|
41
|
+
* this per execution, so a tool becomes callable exactly when it appears here.
|
|
42
|
+
*/
|
|
43
|
+
activeToolNames(agent: Agent): readonly string[];
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import type { Agent } from "@deepseek-ai/dsh-agent";
|
|
2
|
+
import type { Context } from "@deepseek-ai/cordis";
|
|
3
|
+
import type { PluginLogger } from "@yadsh/dsh-plugin-log";
|
|
4
|
+
import type { QaSessionOwnership } from "./session-ownership.js";
|
|
5
|
+
import type { QaPendingQuestion, QaQuestionAnswerItem } from "./types.js";
|
|
6
|
+
/**
|
|
7
|
+
* The harness user-questions contract this seam reads and writes, declared
|
|
8
|
+
* structurally on purpose: the plugin neither mounts the service nor depends on
|
|
9
|
+
* its package, so it stays loadable in a deployment that composes no questions
|
|
10
|
+
* at all. Shapes follow `@deepseek-ai/dsh-user-questions` `src/types.ts` at the
|
|
11
|
+
* tested harness release (`AskUserQuestionItem` / `AskUserQuestionAnswer`).
|
|
12
|
+
*/
|
|
13
|
+
export interface QaQuestionOption {
|
|
14
|
+
readonly label: string;
|
|
15
|
+
readonly description?: string;
|
|
16
|
+
}
|
|
17
|
+
export interface QaQuestionItem {
|
|
18
|
+
readonly id: string;
|
|
19
|
+
readonly question: string;
|
|
20
|
+
readonly detail?: string;
|
|
21
|
+
readonly header?: string;
|
|
22
|
+
readonly options?: readonly QaQuestionOption[];
|
|
23
|
+
readonly multiSelect?: boolean;
|
|
24
|
+
}
|
|
25
|
+
export interface QaQuestionRequest {
|
|
26
|
+
readonly questions: readonly QaQuestionItem[];
|
|
27
|
+
readonly agent?: Agent;
|
|
28
|
+
readonly signal?: AbortSignal;
|
|
29
|
+
}
|
|
30
|
+
/** What the answerer waterfall accepts as its value. */
|
|
31
|
+
export interface QaQuestionAnswer {
|
|
32
|
+
readonly answers: readonly QaQuestionAnswerItem[];
|
|
33
|
+
}
|
|
34
|
+
/** What the model reads when the deployment does not answer questions. */
|
|
35
|
+
export declare const QA_QUESTIONS_UNSUPPORTED = "questions are not answered in this assistant view; ask the user in plain text instead";
|
|
36
|
+
/**
|
|
37
|
+
* User questions in the QA view.
|
|
38
|
+
*
|
|
39
|
+
* `ask_user_question` reaches the browser through the harness answerer
|
|
40
|
+
* waterfall, and the stock DSH web bundle mounts its own answerer in every
|
|
41
|
+
* page. Behind the QA overlay that answerer is unreachable, so a question asked
|
|
42
|
+
* of a QA chat would sit in front of nobody. This gate claims the request for
|
|
43
|
+
* attested chats before the generic browser bridge sees it:
|
|
44
|
+
*
|
|
45
|
+
* - `interaction.questions: interactive` parks the request until the operator
|
|
46
|
+
* answers or closes it in the QA view, and the answer becomes the waterfall's
|
|
47
|
+
* value.
|
|
48
|
+
* - `unsupported` (default) refuses with a reason the model can act on, rather
|
|
49
|
+
* than letting the turn stall on a card no one can see.
|
|
50
|
+
*
|
|
51
|
+
* Nothing is ever answered on the operator's behalf, and a request from a
|
|
52
|
+
* session this deployment did not attest is handed back to the chain untouched.
|
|
53
|
+
*/
|
|
54
|
+
export declare class QaQuestionGate {
|
|
55
|
+
private readonly ctx;
|
|
56
|
+
private readonly interactive;
|
|
57
|
+
private readonly ownership;
|
|
58
|
+
private readonly logger;
|
|
59
|
+
private readonly pending;
|
|
60
|
+
private readonly disposers;
|
|
61
|
+
constructor(ctx: Context, interactive: () => boolean, ownership: QaSessionOwnership, logger: PluginLogger);
|
|
62
|
+
/** Claim question requests for the chats this deployment answers. */
|
|
63
|
+
install(): void;
|
|
64
|
+
/** Questions of one chat, oldest first: what the QA view renders. */
|
|
65
|
+
list(sessionId: string): readonly QaPendingQuestion[];
|
|
66
|
+
/**
|
|
67
|
+
* Apply the operator's answers; an unknown or foreign id is refused. The
|
|
68
|
+
* parked request is authoritative: a label the question never offered is
|
|
69
|
+
* dropped, and a free-text answer replaces the choice in a single-select
|
|
70
|
+
* rather than accompanying it, so the model only ever reads a real answer.
|
|
71
|
+
*/
|
|
72
|
+
answer(sessionId: string, requestId: string, answers: readonly QaQuestionAnswerItem[]): boolean;
|
|
73
|
+
/** Close a request without answering it. */
|
|
74
|
+
cancel(sessionId: string, requestId: string): boolean;
|
|
75
|
+
/** Detach the listener and fail every parked request. Wired as an effect. */
|
|
76
|
+
dispose(): void;
|
|
77
|
+
private handle;
|
|
78
|
+
/** Park one request until the operator answers it, or the turn ends. */
|
|
79
|
+
private park;
|
|
80
|
+
/** Fail the questions one session's agent owns; a disposed agent cannot ask. */
|
|
81
|
+
private settleOwner;
|
|
82
|
+
}
|
|
83
|
+
//# sourceMappingURL=questions.d.ts.map
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Agent } from "@deepseek-ai/dsh-agent";
|
|
1
2
|
import type { Context } from "@deepseek-ai/cordis";
|
|
2
3
|
import type { PluginLogger } from "@yadsh/dsh-plugin-log";
|
|
3
4
|
import type { QaLockdownProof, ResolvedQaSurfaceConfig } from "./types.js";
|
|
@@ -25,25 +26,65 @@ export declare class QaPolicyAdmission {
|
|
|
25
26
|
private readonly config;
|
|
26
27
|
private readonly logger;
|
|
27
28
|
private readonly accounts?;
|
|
29
|
+
/**
|
|
30
|
+
* Names the QA tool catalog attached to one agent after its activation
|
|
31
|
+
* skill loaded. Read per execution, so a tool becomes callable exactly when
|
|
32
|
+
* it is registered and stops being callable once the agent is disposed.
|
|
33
|
+
*/
|
|
34
|
+
private readonly dynamicToolNames;
|
|
28
35
|
private readonly appliedPolicies;
|
|
36
|
+
/** Host-trusted principal-scoped plugin tools enabled outside static config. */
|
|
37
|
+
private readonly principalScopedTools;
|
|
29
38
|
/**
|
|
30
39
|
* Sessions the QA surface has attested. The provenance note is written for
|
|
31
40
|
* exactly these, and a delegated child resolves through its root session, so
|
|
32
41
|
* one set answers for the whole chat.
|
|
33
42
|
*/
|
|
34
43
|
private readonly attested;
|
|
35
|
-
private readonly
|
|
44
|
+
private readonly workspaceAccess;
|
|
36
45
|
private readonly disposeWorkspaceGuard;
|
|
37
|
-
constructor(ctx: Context, config: () => ResolvedQaSurfaceConfig, logger: PluginLogger, accounts?: QaAccountsGate | undefined
|
|
46
|
+
constructor(ctx: Context, config: () => ResolvedQaSurfaceConfig, logger: PluginLogger, accounts?: QaAccountsGate | undefined,
|
|
47
|
+
/**
|
|
48
|
+
* Names the QA tool catalog attached to one agent after its activation
|
|
49
|
+
* skill loaded. Read per execution, so a tool becomes callable exactly when
|
|
50
|
+
* it is registered and stops being callable once the agent is disposed.
|
|
51
|
+
*/
|
|
52
|
+
dynamicToolNames?: (agent: Agent) => readonly string[]);
|
|
53
|
+
/**
|
|
54
|
+
* Add tools whose own executor resolves the QA principal server-side.
|
|
55
|
+
* Enabling the contributing plugin is the operator decision; model arguments
|
|
56
|
+
* still cannot select an owner. The returned disposer mirrors tool lifetime.
|
|
57
|
+
*/
|
|
58
|
+
registerPrincipalScopedTools(names: readonly string[]): () => void;
|
|
38
59
|
/**
|
|
39
60
|
* The mounted attachment store's verbatim root, when the backend exposes
|
|
40
61
|
* one. It sits outside every workspace, so the per-user fence would
|
|
41
62
|
* otherwise deny the model the exact file an upload produced and the prompt
|
|
42
63
|
* points it at. A backend without a resolvable root simply keeps the fence
|
|
43
64
|
* closed — attachments then only work where reads are not fenced per user.
|
|
65
|
+
* Source preview asks for the same root, so one upload is readable by both.
|
|
66
|
+
*/
|
|
67
|
+
attachmentRoot(): string | undefined;
|
|
68
|
+
/**
|
|
69
|
+
* The live agent for one session, resuming a Session the Host has not
|
|
70
|
+
* materialized in this process.
|
|
71
|
+
*
|
|
72
|
+
* DSH builds an agent on demand: a session's journal opens straight from
|
|
73
|
+
* persistence (`session/page` reads the durable log), and only Agent-bound
|
|
74
|
+
* operations — a prompt, a model selection, renaming, an upload — resolve or
|
|
75
|
+
* resume one. So a chat from an earlier Host run has a readable transcript
|
|
76
|
+
* and no agent at all, and attestation, which pins the tool policy ON that
|
|
77
|
+
* agent, is the first thing here that needs one. Refusing instead would make
|
|
78
|
+
* every restored chat unopenable until something else in the Host happened
|
|
79
|
+
* to wake it.
|
|
80
|
+
*
|
|
81
|
+
* The resume composes the session's OWN recorded preset — the same
|
|
82
|
+
* composition a stock prompt would produce — so a session composed outside
|
|
83
|
+
* the QA preset still lands on the mismatch refusals below ("composition
|
|
84
|
+
* mismatch"), and the adoption and permission checks stay the gate.
|
|
44
85
|
*/
|
|
45
|
-
private
|
|
46
|
-
secureSession(token: string, sessionId: string): QaLockdownProof
|
|
86
|
+
private liveAgent;
|
|
87
|
+
secureSession(token: string, sessionId: string): Promise<QaLockdownProof>;
|
|
47
88
|
/**
|
|
48
89
|
* Whether one session went through this boundary. The provenance note is
|
|
49
90
|
* written only for attested sessions, which is what keeps a deployment's
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { Context } from "@deepseek-ai/cordis";
|
|
2
|
+
/**
|
|
3
|
+
* Which sessions belong to this deployment.
|
|
4
|
+
*
|
|
5
|
+
* The admission boundary attests chat roots. A delegated child never appears
|
|
6
|
+
* there — its scope chain does not reach the chat's own agent context — so it
|
|
7
|
+
* inherits its chat from the session that created it. Both interactive seams
|
|
8
|
+
* (tool approvals and user questions) read ownership from here, which is what
|
|
9
|
+
* keeps one chat answered by exactly one surface.
|
|
10
|
+
*/
|
|
11
|
+
export declare class QaSessionOwnership {
|
|
12
|
+
private readonly isAttested;
|
|
13
|
+
/** Child session → the attested chat that owns it. */
|
|
14
|
+
private readonly inherited;
|
|
15
|
+
private disposeListener;
|
|
16
|
+
private installed;
|
|
17
|
+
constructor(isAttested: (sessionId: string) => boolean);
|
|
18
|
+
/** Listen for the children of an attested chat; safe to call from each seam. */
|
|
19
|
+
install(ctx: Context): void;
|
|
20
|
+
/** The attested chat behind a session: itself, or the root it inherited. */
|
|
21
|
+
rootOf(sessionId: string): string | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* Drop one session's inheritance. Called when its agent is gone; the chat's
|
|
24
|
+
* own claim needs no bookkeeping here, because it resolves through the
|
|
25
|
+
* admission's attested set, which owns that lifetime.
|
|
26
|
+
*/
|
|
27
|
+
forget(sessionId: string): void;
|
|
28
|
+
dispose(): void;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=session-ownership.d.ts.map
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { QaAccountStarters, QaAccountStartersInput, QaAccountStarter } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Per-account starter messages: the labeled buttons above an empty composer,
|
|
4
|
+
* and what each of them sends. Shape, limits, and the normalization both
|
|
5
|
+
* halves of the plugin agree on. Deliberately free of Node built-ins — the
|
|
6
|
+
* accounts store and the browser-side form import these same rules, the same
|
|
7
|
+
* way profile.ts does for the self-declared identity.
|
|
8
|
+
*/
|
|
9
|
+
/** Most starter buttons one account may store. */
|
|
10
|
+
export declare const QA_STARTERS_MAX_ITEMS = 12;
|
|
11
|
+
/** Longest accepted button label. */
|
|
12
|
+
export declare const QA_STARTERS_MAX_LABEL = 80;
|
|
13
|
+
/** Longest accepted prompt one button sends. */
|
|
14
|
+
export declare const QA_STARTERS_MAX_PROMPT = 2000;
|
|
15
|
+
/** The starters of an account that never customized them. */
|
|
16
|
+
export declare function emptyStarters(): QaAccountStarters;
|
|
17
|
+
/**
|
|
18
|
+
* Read one stored (or wire-delivered) starters record into its public shape.
|
|
19
|
+
* Unknown or hand-edited input degrades to the readable subset instead of
|
|
20
|
+
* throwing, mirroring the profile read path: a malformed record must never
|
|
21
|
+
* cost the account its session.
|
|
22
|
+
*/
|
|
23
|
+
export declare function normalizeStarters(value: unknown): QaAccountStarters;
|
|
24
|
+
/** Validated starters values, before the store persists them. */
|
|
25
|
+
export type QaStartersWrite = QaAccountStartersInput;
|
|
26
|
+
export type QaStartersWriteResult = {
|
|
27
|
+
readonly ok: true;
|
|
28
|
+
readonly value: QaStartersWrite;
|
|
29
|
+
} | {
|
|
30
|
+
readonly ok: false;
|
|
31
|
+
readonly message: string;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Validate one full-replace starters write. Values are cleaned the same way
|
|
35
|
+
* the read path cleans them, but limits are refused with a message instead of
|
|
36
|
+
* truncated, so a user pasting an essay learns why it was not stored.
|
|
37
|
+
*/
|
|
38
|
+
export declare function validateStartersWrite(input: unknown): QaStartersWriteResult;
|
|
39
|
+
/**
|
|
40
|
+
* The buttons an empty composer shows: the account's own starters first,
|
|
41
|
+
* then the deployment's suggestions unless the account hid them. An anonymous
|
|
42
|
+
* visitor (no starters of their own) sees exactly the deployment's list.
|
|
43
|
+
*/
|
|
44
|
+
export declare function effectiveQuickQuestions(own: QaAccountStarters | undefined, defaults: readonly string[]): readonly QaAccountStarter[];
|
|
45
|
+
//# sourceMappingURL=starters.d.ts.map
|