@yadsh/dsh-qa-surface 0.15.1 → 0.15.3
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/lib/access/model.js +15 -0
- package/lib/access/model.js.map +1 -1
- package/lib/access/service.js +56 -16
- package/lib/access/service.js.map +1 -1
- package/lib/attestation.js.map +1 -1
- package/lib/client/QaAccountsController.js +3 -1
- package/lib/client/QaAccountsController.js.map +1 -1
- package/lib/client/QaSessionController.js +66 -18
- package/lib/client/QaSessionController.js.map +1 -1
- package/lib/client/QaSurface.js +64 -2
- package/lib/client/QaSurface.js.map +1 -1
- package/lib/client/QaTranscriptAdapter.js +46 -8
- package/lib/client/QaTranscriptAdapter.js.map +1 -1
- package/lib/client/admin/pages/Users.js +2 -2
- package/lib/client/admin/pages/Users.js.map +1 -1
- package/lib/client/attestation.js +13 -5
- package/lib/client/attestation.js.map +1 -1
- package/lib/client/chat-artifacts.js +94 -0
- package/lib/client/chat-artifacts.js.map +1 -0
- package/lib/client/chat-files.js +24 -14
- package/lib/client/chat-files.js.map +1 -1
- package/lib/client/clipboard.js +86 -0
- package/lib/client/clipboard.js.map +1 -0
- package/lib/client/components/QaAuthGate.js +41 -5
- package/lib/client/components/QaAuthGate.js.map +1 -1
- package/lib/client/components/QaChangelog.js +46 -0
- package/lib/client/components/QaChangelog.js.map +1 -1
- package/lib/client/components/QaFileAttachment.js +7 -5
- package/lib/client/components/QaFileAttachment.js.map +1 -1
- package/lib/client/components/QaFilesPanel.js +7 -3
- package/lib/client/components/QaFilesPanel.js.map +1 -1
- package/lib/client/components/QaMessage.js +27 -24
- package/lib/client/components/QaMessage.js.map +1 -1
- package/lib/client/components/QaWorkspaceBrowser.js +18 -25
- package/lib/client/components/QaWorkspaceBrowser.js.map +1 -1
- package/lib/client/components/copy-hint.js +10 -0
- package/lib/client/components/copy-hint.js.map +1 -0
- package/lib/client/markdown/CodeBlock.js +6 -13
- package/lib/client/markdown/CodeBlock.js.map +1 -1
- package/lib/client/project-session-state.js +1 -0
- package/lib/client/project-session-state.js.map +1 -1
- package/lib/client/settings/styles.js +1 -1
- package/lib/client/styles.js +11 -4
- package/lib/client/styles.js.map +1 -1
- package/lib/client/user-settings/IntegrationTokensPage.js +4 -12
- package/lib/client/user-settings/IntegrationTokensPage.js.map +1 -1
- package/lib/client/user-settings/PasswordSettingsPage.js +6 -1
- package/lib/client/user-settings/PasswordSettingsPage.js.map +1 -1
- package/lib/client/workspace-download.js +32 -0
- package/lib/client/workspace-download.js.map +1 -0
- package/lib/client/workspace-paths.js +55 -0
- package/lib/client/workspace-paths.js.map +1 -0
- package/lib/client.js +727 -253
- package/lib/client.js.map +1 -1
- package/lib/enforcement/skill-policy.js +2 -1
- package/lib/enforcement/skill-policy.js.map +1 -1
- package/lib/index.js +26 -10
- package/lib/index.js.map +1 -1
- package/lib/secure-session.js +36 -11
- package/lib/secure-session.js.map +1 -1
- package/lib/slash/catalog.js.map +1 -1
- package/lib/typert.host.js +75 -75
- package/lib/typert.remote-client.js +75 -75
- package/lib/types/access/model.d.ts +13 -0
- package/lib/types/access/service.d.ts +26 -0
- package/lib/types/attestation.d.ts +1 -1
- package/lib/types/client/QaAccountsController.d.ts +2 -0
- package/lib/types/client/QaSessionController.d.ts +13 -0
- package/lib/types/client/QaTranscriptAdapter.d.ts +6 -0
- package/lib/types/client/attestation.d.ts +7 -3
- package/lib/types/client/chat-artifacts.d.ts +10 -0
- package/lib/types/client/chat-files.d.ts +13 -8
- package/lib/types/client/clipboard.d.ts +37 -0
- package/lib/types/client/components/QaAuthGate.d.ts +4 -2
- package/lib/types/client/components/QaFileAttachment.d.ts +13 -4
- package/lib/types/client/components/QaFilesPanel.d.ts +15 -2
- package/lib/types/client/components/QaMessage.d.ts +10 -2
- package/lib/types/client/components/QaWorkspaceBrowser.d.ts +7 -1
- package/lib/types/client/components/copy-hint.d.ts +8 -0
- package/lib/types/client/project-session-state.d.ts +5 -0
- package/lib/types/client/workspace-download.d.ts +16 -0
- package/lib/types/client/workspace-paths.d.ts +25 -0
- package/lib/types/index.d.ts +6 -4
- package/lib/types/secure-session.d.ts +4 -0
- package/lib/types/slash/catalog.d.ts +5 -0
- package/lib/types/types.d.ts +26 -0
- package/locale/en.json +6 -0
- package/package.json +5 -3
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The answer a person reads names a file; it does not say where the deployment
|
|
3
|
+
* keeps the account that owns it.
|
|
4
|
+
*
|
|
5
|
+
* A model quoting a path it was handed prints it verbatim, and a QA deployment
|
|
6
|
+
* gives every account its own directory under one parent, so a path printed
|
|
7
|
+
* with an account identifier is a sentence about the server's layout — and
|
|
8
|
+
* stand dialogs below the signature line can be read by other accounts of the
|
|
9
|
+
* same server. The document tools report workspace-relative names, which is
|
|
10
|
+
* the fix at the source; this is the repair for what still arrives, because a
|
|
11
|
+
* model can rebuild a path from the working directory it is told, and because
|
|
12
|
+
* an answer written before this change is durable history that replays.
|
|
13
|
+
*/
|
|
14
|
+
/** Characters a literal path may carry into a regular expression. */
|
|
15
|
+
function escapeForRegex(value) {
|
|
16
|
+
return value.replace(/[.*+?^${}()|[\]\\]/gu, String.raw `\$&`);
|
|
17
|
+
}
|
|
18
|
+
/** One or two separators, either convention, as a regular-expression source. */
|
|
19
|
+
const SEPARATOR = String.raw `[\\\/]+`;
|
|
20
|
+
const TRAILING_SEPARATOR = String.raw `[\\\/]?`;
|
|
21
|
+
/**
|
|
22
|
+
* The workspace root spelled so either separator convention matches it: a
|
|
23
|
+
* container records forward slashes, a browser on Windows may print backslashes
|
|
24
|
+
* at the same position, and a mask that only reads one of them leaks on the
|
|
25
|
+
* other. A leading separator is kept, so what replaces the root reads as a name
|
|
26
|
+
* inside the workspace rather than as a path leading out of nowhere.
|
|
27
|
+
*/
|
|
28
|
+
function rootPattern(workspaceRoot) {
|
|
29
|
+
const segments = workspaceRoot
|
|
30
|
+
.split(/[/\\]/u)
|
|
31
|
+
.filter((segment) => segment !== "")
|
|
32
|
+
.map((segment) => escapeForRegex(segment));
|
|
33
|
+
const leading = /^[/\\]/u.test(workspaceRoot) ? SEPARATOR : "";
|
|
34
|
+
return new RegExp(`${leading}${segments.join(SEPARATOR)}${TRAILING_SEPARATOR}`, "gu");
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Rewrite an answer so a file is named, not located.
|
|
38
|
+
*
|
|
39
|
+
* The chat's own workspace directory is removed, leaving the spelling the
|
|
40
|
+
* producing tool reports and the workspace reads take. The per-account
|
|
41
|
+
* partition is removed the same way even when the root is unknown or the answer
|
|
42
|
+
* quotes a different chat's file, because the identifier inside it is the part
|
|
43
|
+
* that must not be printed. A path that is neither of those is left alone: a
|
|
44
|
+
* reader told about `/etc/hosts` is not being shown this deployment's layout.
|
|
45
|
+
*/
|
|
46
|
+
export function toWorkspaceRelativeText(text, workspaceRoot) {
|
|
47
|
+
if (!text.includes("/") && !text.includes("\\"))
|
|
48
|
+
return text;
|
|
49
|
+
const root = workspaceRoot?.trim();
|
|
50
|
+
const masked = root === undefined || root === ""
|
|
51
|
+
? text
|
|
52
|
+
: text.replace(rootPattern(root), "");
|
|
53
|
+
return masked.replace(/[/\\](?:[^/\\\s]+[/\\])*?\.qa-users[/\\][^/\\\s]+[/\\]/gu, "");
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=workspace-paths.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspace-paths.js","sourceRoot":"","sources":["../../src/client/workspace-paths.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,qEAAqE;AACrE,SAAS,cAAc,CAAC,KAAa;IACnC,OAAO,KAAK,CAAC,OAAO,CAAC,sBAAsB,EAAE,MAAM,CAAC,GAAG,CAAA,KAAK,CAAC,CAAC;AAChE,CAAC;AAED,gFAAgF;AAChF,MAAM,SAAS,GAAG,MAAM,CAAC,GAAG,CAAA,SAAS,CAAC;AACtC,MAAM,kBAAkB,GAAG,MAAM,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