@yadsh/dsh-qa-surface 0.11.2 → 0.12.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.
Files changed (50) hide show
  1. package/lib/access/service.js +2 -1
  2. package/lib/access/service.js.map +1 -1
  3. package/lib/client/QaSurface.js +9 -2
  4. package/lib/client/QaSurface.js.map +1 -1
  5. package/lib/client/components/QaChangelog.js +29 -9
  6. package/lib/client/components/QaChangelog.js.map +1 -1
  7. package/lib/client/components/QaSidebar.js +13 -15
  8. package/lib/client/components/QaSidebar.js.map +1 -1
  9. package/lib/client/settings/card.js +2 -2
  10. package/lib/client/settings/card.js.map +1 -1
  11. package/lib/client/settings/sections/docs.js +41 -0
  12. package/lib/client/settings/sections/docs.js.map +1 -0
  13. package/lib/client/settings/sections.js +1 -0
  14. package/lib/client/settings/sections.js.map +1 -1
  15. package/lib/client/styles.js +1 -2
  16. package/lib/client/styles.js.map +1 -1
  17. package/lib/client.js +306 -194
  18. package/lib/client.js.map +1 -1
  19. package/lib/config-resolvers/defaults.js +4 -0
  20. package/lib/config-resolvers/defaults.js.map +1 -1
  21. package/lib/config-resolvers/integration.js +7 -7
  22. package/lib/config-resolvers/integration.js.map +1 -1
  23. package/lib/config-resolvers/tools.js +25 -0
  24. package/lib/config-resolvers/tools.js.map +1 -1
  25. package/lib/config.js +15 -0
  26. package/lib/config.js.map +1 -1
  27. package/lib/index.js +6 -1
  28. package/lib/index.js.map +1 -1
  29. package/lib/qa-tools/catalog.js +13 -2
  30. package/lib/qa-tools/catalog.js.map +1 -1
  31. package/lib/qa-tools/docs-tools.js +269 -24
  32. package/lib/qa-tools/docs-tools.js.map +1 -1
  33. package/lib/qa-tools/index.js +1 -0
  34. package/lib/qa-tools/index.js.map +1 -1
  35. package/lib/secure-session.js +11 -13
  36. package/lib/secure-session.js.map +1 -1
  37. package/lib/shared/docs-version.js +19 -0
  38. package/lib/shared/docs-version.js.map +1 -0
  39. package/lib/typert.host.js +70 -68
  40. package/lib/typert.remote-client.js +69 -67
  41. package/lib/types/client/settings/sections/docs.d.ts +15 -0
  42. package/lib/types/client/settings/sections.d.ts +1 -0
  43. package/lib/types/config-resolvers/integration.d.ts +5 -5
  44. package/lib/types/config-resolvers/tools.d.ts +9 -0
  45. package/lib/types/qa-tools/catalog.d.ts +6 -1
  46. package/lib/types/qa-tools/docs-tools.d.ts +15 -0
  47. package/lib/types/qa-tools/index.d.ts +6 -1
  48. package/lib/types/shared/docs-version.d.ts +15 -0
  49. package/lib/types/types.d.ts +22 -0
  50. package/package.json +3 -3
@@ -2,5 +2,14 @@ import type { QaSurfaceConfig, ResolvedQaSurfaceConfig } from "../types.js";
2
2
  type ToolsSlice = ResolvedQaSurfaceConfig["tools"];
3
3
  /** Resolve the QA tool delivery domain: activation trigger, policy, and scope. */
4
4
  export declare function resolveTools(input: QaSurfaceConfig): ToolsSlice;
5
+ /**
6
+ * The version one search runs under, or `""` when the deployment's default is
7
+ * off, unset, or not what the call is about.
8
+ *
9
+ * The readers take a single fallback, and a switch that is off must not fall
10
+ * back at all — the value stays configured for the day it is turned on, and an
11
+ * enabled-but-empty pair is simply no default.
12
+ */
13
+ export declare function docsDefaultVersionOf(tools: ResolvedQaSurfaceConfig["tools"]): string;
5
14
  export {};
6
15
  //# sourceMappingURL=tools.d.ts.map
@@ -23,7 +23,12 @@ export interface QaToolsSelfcheckDeps {
23
23
  * Documentation root the two readers use, or `""` for the `docs/` directory
24
24
  * inside each chat's own workspace.
25
25
  */
26
- readonly docsRoot?: string;
26
+ readonly docsRoot?: string | (() => string);
27
+ /**
28
+ * Version a search without `version` and without `path` stays inside, or `""`
29
+ * for a search across every edition the corpus carries.
30
+ */
31
+ readonly docsDefaultVersion?: string | (() => string);
27
32
  }
28
33
  /**
29
34
  * Build the shipped QA tool catalog.
@@ -19,6 +19,14 @@ import type { ToolDefinition } from "@deepseek-ai/dsh-tools";
19
19
  * names are accepted as filters. A path the convention does not describe is
20
20
  * still searched and still read — it simply carries no identity.
21
21
  *
22
+ * A real corpus also carries its own working material: the stand publishes an
23
+ * asset tree, inventories and triage notes beside the documents, under leading
24
+ * underscores. None of that is what a question is asked about, and an inventory
25
+ * names every module and version there is, so a walk that met it first spent the
26
+ * whole answer on it. The walk therefore visits the documented modules first,
27
+ * loose files next, and the underscored service material last — searched, but
28
+ * never at the expense of the documents.
29
+ *
22
30
  * Nothing here is destructive and building it registers nothing: like the rest
23
31
  * of the catalog these are side-effect-free definitions, and the workspace root
24
32
  * is read from `exec.agent` at call time.
@@ -67,6 +75,13 @@ interface QaDocsExecution {
67
75
  export interface QaDocsOptions {
68
76
  /** Absolute documentation root, or `""` for `<chat workspace>/docs`. */
69
77
  readonly root?: string;
78
+ /**
79
+ * Documentation version a search stays inside when the caller named neither
80
+ * `version` nor `path`; `""` (the default) leaves every edition in scope. The
81
+ * deployment sets it so a chat's questions do not have to carry the stand's
82
+ * edition, and an explicit `version` or `path` still decides for itself.
83
+ */
84
+ readonly defaultVersion?: string;
70
85
  }
71
86
  /** The resolved documentation root of one call. */
72
87
  export interface QaDocsRoot {
@@ -9,7 +9,12 @@ export interface QaToolsOptions {
9
9
  readonly activationMode: string;
10
10
  readonly activationPresets: readonly string[];
11
11
  /** Documentation root the readers use; `""` reads each chat's own `docs/`. */
12
- readonly docsRoot: string;
12
+ readonly docsRoot: string | (() => string);
13
+ /**
14
+ * Version a search falls back to when the model named neither `version` nor
15
+ * `path`; `""` searches every edition the corpus carries.
16
+ */
17
+ readonly docsDefaultVersion: string | (() => string);
13
18
  }
14
19
  /**
15
20
  * The QA tool subsystem: one catalog, one per-agent activation manager, and the
@@ -0,0 +1,15 @@
1
+ /**
2
+ * The documentation version grammar, shared by the Host and the browser half.
3
+ *
4
+ * This module must stay dependency-free: the settings card bundle inlines the
5
+ * resolver that validates a configured default version, and a browser build
6
+ * must not pull the QA tool runtime — or the Node builtins it reads files with
7
+ * — into the page just to learn what a version looks like.
8
+ */
9
+ /**
10
+ * Whether a path segment — or a configured default version — is a documentation
11
+ * version. A default the corpus can never match is refused where it is written
12
+ * rather than answered with an empty search.
13
+ */
14
+ export declare function isDocumentationVersion(value: string): boolean;
15
+ //# sourceMappingURL=docs-version.d.ts.map
@@ -721,6 +721,21 @@ export interface QaSurfaceConfig {
721
721
  * per-user directory, which is otherwise unreadable to those tools.
722
722
  */
723
723
  readonly docsRoot?: string;
724
+ /**
725
+ * Documentation version `docs_search` stays inside when the model named
726
+ * neither `version` nor `path`. A corpus carries several editions of the
727
+ * same module, and a chat asked about "the product" answers out of whichever
728
+ * edition it happened to read first; naming the stand's edition here lets a
729
+ * search default to it, and an explicit `version` or `path` still decides
730
+ * for itself.
731
+ */
732
+ readonly docsDefaultVersion?: string;
733
+ /**
734
+ * Whether `docsDefaultVersion` is applied. The value stays configured while
735
+ * the switch is off, so a stand can turn the default back on without
736
+ * retyping it.
737
+ */
738
+ readonly docsDefaultVersionEnabled?: boolean;
724
739
  };
725
740
  readonly lockdown?: {
726
741
  readonly enabled?: boolean;
@@ -1002,6 +1017,13 @@ export interface ResolvedQaSurfaceConfig {
1002
1017
  * `docs/` directory inside each chat's own workspace.
1003
1018
  */
1004
1019
  readonly docsRoot: string;
1020
+ /**
1021
+ * Version a search without `version` and without `path` stays inside, or
1022
+ * `""` for a search across every edition the corpus carries.
1023
+ */
1024
+ readonly docsDefaultVersion: string;
1025
+ /** Whether the deployment's default version is in force. */
1026
+ readonly docsDefaultVersionEnabled: boolean;
1005
1027
  };
1006
1028
  readonly sources: {
1007
1029
  readonly enabled: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yadsh/dsh-qa-surface",
3
- "version": "0.11.2",
3
+ "version": "0.12.0",
4
4
  "description": "A focused end-user QA surface backed by native DeepSeek Harness sessions",
5
5
  "repository": {
6
6
  "type": "git",
@@ -133,10 +133,10 @@
133
133
  "dependencies": {
134
134
  "yaml": "^2.9.0",
135
135
  "zod": "^4.4.3",
136
- "@yadsh/dsh-audit-core": "^0.1.0",
137
136
  "@yadsh/dsh-documents": "^0.5.1",
138
- "@yadsh/dsh-plugin-log": "^0.4.0",
137
+ "@yadsh/dsh-audit-core": "^0.1.0",
139
138
  "@yadsh/dsh-audit-ui": "^0.1.1",
139
+ "@yadsh/dsh-plugin-log": "^0.4.0",
140
140
  "@yadsh/dsh-plugin-kit": "^0.3.0"
141
141
  },
142
142
  "devDependencies": {