@sparkelf/dsh-knowledge-base 0.0.0-stage → 0.1.1

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 (67) hide show
  1. package/LICENSE +21 -0
  2. package/SKILL.md +147 -0
  3. package/cordis.patch.yml +5 -0
  4. package/i18n/zh.json +10 -0
  5. package/lib/client.js +18308 -0
  6. package/lib/client.js.map +1 -0
  7. package/lib/index.js +6005 -0
  8. package/lib/types/api.d.ts +620 -0
  9. package/lib/types/client/KnowledgeAudit.d.ts +39 -0
  10. package/lib/types/client/KnowledgeContextMenu.d.ts +121 -0
  11. package/lib/types/client/KnowledgeCreateDialog.d.ts +134 -0
  12. package/lib/types/client/KnowledgeFileTree.d.ts +117 -0
  13. package/lib/types/client/KnowledgeHome.d.ts +102 -0
  14. package/lib/types/client/KnowledgeIndexing.d.ts +60 -0
  15. package/lib/types/client/KnowledgeListing.d.ts +174 -0
  16. package/lib/types/client/KnowledgeLoading.d.ts +41 -0
  17. package/lib/types/client/KnowledgeMenuIcon.d.ts +27 -0
  18. package/lib/types/client/KnowledgePanel.d.ts +58 -0
  19. package/lib/types/client/KnowledgePermissionOverview.d.ts +147 -0
  20. package/lib/types/client/KnowledgePermissions.d.ts +47 -0
  21. package/lib/types/client/KnowledgeProgressPanel.d.ts +53 -0
  22. package/lib/types/client/KnowledgeReferencePicker.d.ts +81 -0
  23. package/lib/types/client/KnowledgeSearch.d.ts +83 -0
  24. package/lib/types/client/KnowledgeSectionHeader.d.ts +71 -0
  25. package/lib/types/client/KnowledgeSelectionBar.d.ts +45 -0
  26. package/lib/types/client/KnowledgeSettings.d.ts +96 -0
  27. package/lib/types/client/KnowledgeSettingsSection.d.ts +21 -0
  28. package/lib/types/client/KnowledgeShareDialog.d.ts +70 -0
  29. package/lib/types/client/KnowledgeTemplates.d.ts +43 -0
  30. package/lib/types/client/KnowledgeTrash.d.ts +62 -0
  31. package/lib/types/client/MenuGlyphs.d.ts +37 -0
  32. package/lib/types/client/auditPaging.d.ts +40 -0
  33. package/lib/types/client/departmentFolders.d.ts +57 -0
  34. package/lib/types/client/deployTarget.d.ts +34 -0
  35. package/lib/types/client/index.d.ts +40 -0
  36. package/lib/types/client/insertReadiness.d.ts +60 -0
  37. package/lib/types/client/knowledgeMenuCopy.d.ts +23 -0
  38. package/lib/types/client/locales.d.ts +505 -0
  39. package/lib/types/client/openInSidebar.d.ts +62 -0
  40. package/lib/types/client/ownerLabel.d.ts +39 -0
  41. package/lib/types/client/paging.d.ts +69 -0
  42. package/lib/types/client/permissionRows.d.ts +265 -0
  43. package/lib/types/client/progressRules.d.ts +54 -0
  44. package/lib/types/client/referenceTargets.d.ts +60 -0
  45. package/lib/types/client/roleSummary.d.ts +47 -0
  46. package/lib/types/client/saveAudit.d.ts +87 -0
  47. package/lib/types/client/shareRelations.d.ts +81 -0
  48. package/lib/types/client/useFavorites.d.ts +49 -0
  49. package/lib/types/client/useFileDrop.d.ts +171 -0
  50. package/lib/types/client/useFileDropHook.d.ts +64 -0
  51. package/lib/types/client/usePinnedPaths.d.ts +39 -0
  52. package/lib/types/client/useTreeState.d.ts +46 -0
  53. package/lib/types/client/useViewMode.d.ts +39 -0
  54. package/lib/types/deploy.d.ts +209 -0
  55. package/lib/types/extract.d.ts +144 -0
  56. package/lib/types/extractionQueue.d.ts +154 -0
  57. package/lib/types/index.d.ts +899 -0
  58. package/lib/types/permissions.d.ts +237 -0
  59. package/lib/types/protocol.d.ts +229 -0
  60. package/lib/types/remote.d.ts +105 -0
  61. package/lib/types/trash.d.ts +142 -0
  62. package/lib/types/viewMetadata.d.ts +20 -0
  63. package/lib/types/views.d.ts +923 -0
  64. package/package.json +109 -4
  65. package/skills/kb-organize/SKILL.md +365 -0
  66. package/skills/kb-organize/i18n/zh.json +10 -0
  67. package/README.md +0 -3
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Knowledge-base Client plugin.
3
+ *
4
+ * Registers three official DSH surfaces:
5
+ * - `sidebar.panellist` gives the left-sidebar menu entry.
6
+ * - The matching `main` key gives the management page the entry selects. The
7
+ * page replaces the conversation area and carries its own master-detail
8
+ * layout: a menu and the knowledge tree on the left, a content region on the
9
+ * right.
10
+ * - `settings.section` gives the connection and status page.
11
+ *
12
+ * @module @sparkelf/dsh-knowledge-base/client
13
+ */
14
+ import type { Context as ClientContext } from '@deepseek-ai/cordis';
15
+ import { type KnowledgeKey } from './locales.ts';
16
+ declare module '@deepseek-ai/dsh-client-ui-slots' {
17
+ interface LocaleNamespaceMap {
18
+ 'settings.knowledgeBase': KnowledgeKey;
19
+ }
20
+ }
21
+ /**
22
+ * Client services required for these contributions.
23
+ *
24
+ * `sessions` and `workspaces` are here because the `@`-reference dialog inserts into a
25
+ * conversation draft, and that insert resolves the target session's scope through
26
+ * `ctx.sessions` before it can write anything. Without the injection the service is not
27
+ * on this plugin's ctx at all: the call throws `cannot get property "sessions" without
28
+ * inject`, `referenceInChat` catches it into a `console.warn`, and the reader sees a
29
+ * dialog that closes and inserts nothing -- the exact "clicked, nothing happened"
30
+ * symptom this injection fixes at the root rather than by reporting the failure.
31
+ *
32
+ * `workspaces` is the other half: the mention is spelled relative to the workspace that
33
+ * owns the session, so the insert needs that root to project the path.
34
+ */
35
+ export declare const inject: string[];
36
+ /**
37
+ * Register the knowledge-base navigation entry and Settings section.
38
+ * @param ctx - DSH client context with locale and slot registries.
39
+ */
40
+ export declare function apply(ctx: ClientContext): void;
@@ -0,0 +1,60 @@
1
+ /**
2
+ * When to keep waiting for a freshly created conversation, and when to give up.
3
+ *
4
+ * Lifted out of the picker's `createNew` because the part worth testing is a decision,
5
+ * not a render: "retry, insert, or report failure" is a pure function of two booleans
6
+ * and a clock, and the failure mode when it is wrong is silence — the dialog closes and
7
+ * nothing happens, which is exactly the bug class this whole surface exists to end.
8
+ *
9
+ * @module @sparkelf/dsh-knowledge-base/client
10
+ */
11
+ /** What one readiness attempt found. */
12
+ export interface ReadinessProbe {
13
+ /** Whether a session id could be resolved at all (the catalog has it). */
14
+ hasTarget: boolean;
15
+ /** Whether the insert actually landed (the workspace could resolve the root). */
16
+ inserted: boolean;
17
+ }
18
+ /** What the caller should do next. */
19
+ export type ReadinessAction =
20
+ /** Try again shortly: the ordinary race, not a refusal. */
21
+ 'retry'
22
+ /** Everything landed. */
23
+ | 'done'
24
+ /** Out of time with no session to target. */
25
+ | 'failed-no-target'
26
+ /** Out of time with a session but nothing inserted. */
27
+ | 'failed-insert';
28
+ /**
29
+ * Decide the next move for one readiness attempt.
30
+ *
31
+ * The deadline is passed in rather than read here so the decision is reproducible in a
32
+ * test: a function that read the clock itself could only be tested by waiting.
33
+ *
34
+ * The ordering matters. "No target yet" and "target but no insert" are different
35
+ * failures and get different messages; collapsing them would tell a reader "could not
36
+ * insert" when in fact no conversation was ever identified.
37
+ * @param probe - what this attempt observed.
38
+ * @param expired - whether the wait budget is already spent.
39
+ * @returns The action the caller should take.
40
+ */
41
+ export declare function decideReadiness(probe: ReadinessProbe, expired: boolean): ReadinessAction;
42
+ /**
43
+ * Whether the wait budget is spent.
44
+ *
45
+ * Split out and tested because the naive version of this comparison is what broke: a
46
+ * deadline computed inside the retry function is recomputed on every pass, so it never
47
+ * expires and the "report a failure" branch becomes unreachable. A test that pins
48
+ * `deadline === now` to `true` is the cheapest way to keep that from coming back.
49
+ * @param now - current epoch milliseconds.
50
+ * @param deadline - the instant the budget runs out.
51
+ * @returns True once `now` has reached the deadline.
52
+ */
53
+ export declare function isExpired(now: number, deadline: number): boolean;
54
+ /**
55
+ * The deadline for a wait that starts now.
56
+ * @param now - current epoch milliseconds.
57
+ * @param budgetMs - how long the caller is willing to wait.
58
+ * @returns The instant the budget runs out.
59
+ */
60
+ export declare function deadlineFrom(now: number, budgetMs: number): number;
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Copy for the Share dialog.
3
+ *
4
+ * The context menu's own labels are NOT here: they are `action*` keys in the shared
5
+ * namespace (`locales.ts`), because they are the same sentences the rest of the knowledge
6
+ * surface uses for the same verbs, and two copies of one sentence drift. What stays local
7
+ * is the dialog's copy, which is longer, dialog-specific, and not addressable from the
8
+ * settings namespace -- putting it in `locales.ts` would also mean touching a file several
9
+ * other changes are editing at once.
10
+ *
11
+ * `SHARE_ZH` is typed as the English record, so a key added to one and forgotten in the
12
+ * other fails to compile rather than rendering an English sentence inside a Chinese
13
+ * dialog.
14
+ *
15
+ * @module @sparkelf/dsh-knowledge-base/client
16
+ */
17
+ import type { ShareDialogCopy } from './KnowledgeShareDialog.tsx';
18
+ /**
19
+ * Resolve the share-dialog copy for one locale tag.
20
+ * @param locale - the reader's locale tag, as the page received it.
21
+ * @returns The English or Chinese record.
22
+ */
23
+ export declare function shareCopyFor(locale: string | undefined): ShareDialogCopy;
@@ -0,0 +1,505 @@
1
+ /**
2
+ * Knowledge-base Settings copy, in the shape every locale-backed DSH client
3
+ * plugin uses: one English object is the key set, and each other locale is a
4
+ * complete record over that key set so a missing translation fails to compile.
5
+ *
6
+ * @module @sparkelf/dsh-knowledge-base/client/locales
7
+ */
8
+ /** English knowledge-base copy. */
9
+ export declare const en: {
10
+ readonly nav: "Knowledge base";
11
+ readonly title: "Knowledge base";
12
+ readonly description: "Browse the mounted knowledge tree. Retrieval reads those directories directly, so there is nothing to index.";
13
+ readonly storageMode: "Storage";
14
+ readonly storageModeIntro: "Storage location";
15
+ readonly storageModeLocal: "Local";
16
+ readonly storageModeRemote: "Remote (NFS)";
17
+ readonly storageModeLocalHint: "Stored in the workspace. No mount or sync.";
18
+ readonly storageModeRemoteHint: "Documents live in a shared NFS view that is synchronized from the authoritative tree. Requires a mount and a storage host.";
19
+ readonly connection: "Connection";
20
+ readonly host: "Storage host";
21
+ readonly actualRoot: "Authoritative path";
22
+ readonly viewRoot: "Your view";
23
+ readonly mountPoint: "Mounted at";
24
+ readonly backendUnset: "Not configured";
25
+ readonly backendError: "DataOps knowledge API is not answering:";
26
+ readonly status: "Status";
27
+ readonly visibleFiles: "Visible files";
28
+ readonly unknown: "Unknown";
29
+ readonly lastSync: "Last synced";
30
+ readonly neverSynced: "Never";
31
+ readonly indexing: "Scanning";
32
+ readonly idle: "Idle";
33
+ readonly actions: "Actions";
34
+ readonly buildIndex: "Rescan";
35
+ readonly refresh: "Refresh";
36
+ readonly loading: "Loading…";
37
+ readonly unavailable: "Knowledge base is unavailable.";
38
+ readonly unavailableDetail: "The plugin could not reach its own Host routes. This state is shown instead of hidden so the failure is diagnosable.";
39
+ readonly unauthorized: "Your DataOps session cannot read the knowledge base.";
40
+ readonly retry: "Retry";
41
+ readonly grants: "Authorized paths";
42
+ readonly grantsEmpty: "No paths are authorized for you yet.";
43
+ readonly grantsManaged: "Authorization is managed in DataOps.";
44
+ readonly menu: "Sections";
45
+ readonly 'menu.search': "Search";
46
+ readonly actionDownload: "Download";
47
+ readonly actionRename: "Rename…";
48
+ readonly actionPin: "Pin";
49
+ readonly actionUnpin: "Unpin";
50
+ readonly actionReference: "Reference in chat";
51
+ readonly actionPermissions: "Permissions…";
52
+ readonly renamePrompt: "New name";
53
+ readonly renameFailed: "Could not rename: the file may already exist or you may not have write access.";
54
+ readonly downloadFailed: "Could not download this file.";
55
+ readonly 'menu.home': "Home";
56
+ readonly 'menu.permissions': "Permissions";
57
+ readonly 'menu.indexing': "Directories & counts";
58
+ readonly 'menu.trash': "Trash";
59
+ readonly brand: "Wanxiang Knowledge";
60
+ readonly collapseRail: "Collapse the sidebar";
61
+ readonly expandRail: "Expand the sidebar";
62
+ readonly sectionKnowledge: "Knowledge base";
63
+ readonly sectionPinned: "Pinned";
64
+ readonly actionFilter: "Filter this tree";
65
+ readonly actionNew: "New knowledge document";
66
+ readonly filterPlaceholder: "Filter by file name…";
67
+ readonly filterNoMatch: "No file in this tree matches that filter.";
68
+ readonly homeNewTitle: "New";
69
+ readonly homeNewBody: "Start a knowledge document from a blank page.";
70
+ readonly homeUploadTitle: "Upload";
71
+ readonly homeUploadBody: "Bring existing files into the knowledge base.";
72
+ readonly homeTemplateTitle: "Templates";
73
+ readonly homeTemplateBody: "Start from a template the team already uses.";
74
+ readonly homeTabRecent: "Recently opened";
75
+ readonly homeTabMine: "Owned by me";
76
+ readonly homeTabShared: "Shares";
77
+ readonly homeTabStarred: "Starred";
78
+ readonly homeColTitle: "Title";
79
+ readonly homeColLocation: "Location";
80
+ readonly homeColOwner: "Owner";
81
+ readonly cardItemNewDoc: "New document";
82
+ readonly cardItemNewFolder: "New folder";
83
+ readonly cardItemUploadFile: "Upload file";
84
+ readonly cardItemUploadFolder: "Upload folder";
85
+ readonly cardItemOpenTemplates: "Open template library";
86
+ readonly uploadDone: "Uploaded {n} file(s).";
87
+ readonly uploadPartial: "Uploaded {ok}, failed {failed}: {names}";
88
+ readonly cardNotYet: "Not available in this build yet";
89
+ readonly cardBusyCreating: "Creating...";
90
+ readonly cardCreated: "Created";
91
+ readonly cardCreateFailed: "Could not create it";
92
+ readonly cardNeedsPath: "Enter a name first";
93
+ readonly templateTitle: "Template library";
94
+ readonly templateSearch: "Search templates";
95
+ readonly templateEmpty: "No templates yet. Add one under Manage.";
96
+ readonly templateUnavailable: "Templates could not be read just now. Try again later.";
97
+ readonly templateLoading: "Loading templates...";
98
+ readonly templateClose: "Close";
99
+ readonly templatePick: "Use this template";
100
+ readonly homeColOwnerUnset: "Not recorded";
101
+ readonly homeColCreated: "Created";
102
+ readonly homeColOpened: "Last opened";
103
+ readonly homeEmpty: "Nothing here yet.";
104
+ readonly trashEmpty: "Trash is empty";
105
+ readonly trashPending: "Deleting a document is not enabled yet. The knowledge tree is shared, and how long a deletion is kept is still being decided.";
106
+ readonly mountPointMissing: "The knowledge tree is not mounted in this workspace.";
107
+ readonly viewNotBuilt: "Your visible directory has not been generated yet.";
108
+ readonly viewNotBuiltHint: "It is generated on first read, or from \"Rebuild my visible directory\".";
109
+ readonly path: "Path";
110
+ readonly subjectType: "Principal kind";
111
+ readonly subjectId: "Principal";
112
+ readonly permission: "Permission";
113
+ readonly grant: "Grant";
114
+ readonly granting: "Granting…";
115
+ readonly grantDone: "Granted.";
116
+ readonly grantNeedsPath: "Enter a path and a principal.";
117
+ readonly grantNeedsUser: "A user principal takes a user UUID, not a username.";
118
+ readonly revoke: "Revoke";
119
+ readonly revokeDone: "Revoked.";
120
+ readonly colPrincipal: "Principal";
121
+ readonly colKind: "Kind";
122
+ readonly colPermission: "Permission";
123
+ readonly colResources: "Accessible paths";
124
+ readonly colLatest: "Latest grant";
125
+ readonly actionsUnit: "{count} permission(s)";
126
+ readonly resourcesUnit: "{count} path(s)";
127
+ readonly grantsUnit: "{count} grant(s)";
128
+ readonly grantsByPrincipal: "Authorized by principal";
129
+ readonly grantsByPrincipalHint: "One row per principal: what it may do, and which paths that covers.";
130
+ readonly actionRead: "Read only";
131
+ readonly actionWrite: "Read and write";
132
+ readonly actionManage: "Manage";
133
+ readonly grantedAt: "Granted at";
134
+ readonly 'subject.user': "User";
135
+ readonly 'subject.user.hint': "User UUID, or pick from the list";
136
+ readonly 'subject.role': "Role";
137
+ readonly 'subject.role.hint': "Role code, or pick from the list";
138
+ readonly 'subject.department': "Department";
139
+ readonly 'subject.department.hint': "Department code, or pick from the list";
140
+ readonly 'subject.group': "Group";
141
+ readonly 'subject.group.hint': "Group code, or pick from the list";
142
+ readonly chooseOption: "Choose…";
143
+ readonly pickerUnavailable: "The directory is unavailable; type the identifier instead.";
144
+ readonly rescan: "Rescan";
145
+ readonly referenceFile: "Reference in chat";
146
+ readonly refPickerTitle: "Reference in a conversation";
147
+ readonly refPickerHint: "Choose the conversation that should receive this reference.";
148
+ readonly refPickerSearch: "Filter conversations";
149
+ readonly refPickerNew: "New conversation";
150
+ readonly refPickerNewHint: "Start a fresh conversation with this reference already in the draft.";
151
+ readonly refPickerCreating: "Starting a conversation…";
152
+ readonly refPickerNoSessions: "No conversations yet. Start a new one above.";
153
+ readonly refPickerNoMatch: "No conversation matches that filter.";
154
+ readonly refPickerNoTarget: "The host did not return a conversation to reference.";
155
+ readonly refPickerCreateFailed: "Could not start a conversation. Try again, or pick an existing one.";
156
+ readonly refPickerDone: "Reference added to the conversation draft.";
157
+ readonly refPickerDismiss: "Dismiss";
158
+ readonly pinFile: "Pin";
159
+ readonly unpinFile: "Unpin";
160
+ readonly viewSection: "Visible tree";
161
+ readonly viewExplainer: "Grants decide what a user may read, but the workspace mounts the shared export, so a view must also be built on disk. Sync rebuilds your own view from what DataOps currently allows.";
162
+ readonly viewSync: "Rebuild my visible tree";
163
+ readonly viewSyncing: "Rebuilding…";
164
+ readonly viewSynced: "Checked {considered} paths, {resolved} allowed; linked {linked}, removed {unlinked}.";
165
+ readonly viewSyncFailed: "Could not rebuild the view.";
166
+ readonly permNew: "New grant";
167
+ readonly permNewHint: "Grant a principal access to one path.";
168
+ readonly permCount: "{count} principal(s)";
169
+ readonly overviewByPerson: "By person";
170
+ readonly overviewByResource: "By resource";
171
+ readonly overviewEmpty: "No grants yet. Grant a document or folder to someone to see them here.";
172
+ readonly overviewHeld: "{count} item(s)";
173
+ readonly overviewRoles: "Roles";
174
+ readonly overviewActions: "Actions";
175
+ readonly overviewRolesHeading: "Roles in use";
176
+ readonly overviewNoActions: "None";
177
+ readonly grantDialogHint: "Pick the principal kind first: the backend matches a different identifier per kind.";
178
+ readonly colExpiry: "Valid until";
179
+ readonly expiryNever: "No expiry";
180
+ readonly overviewTabsLabel: "Grant views";
181
+ readonly overviewStatPrincipals: "Principals";
182
+ readonly overviewStatResources: "Paths";
183
+ readonly overviewStatGrants: "Grants";
184
+ readonly overviewStatRoles: "Roles in use";
185
+ readonly overviewColResource: "Resource";
186
+ readonly overviewColHolders: "Who has access";
187
+ readonly overviewColKindOfResource: "Type";
188
+ readonly overviewKindFile: "File";
189
+ readonly overviewKindDirectory: "Folder";
190
+ readonly revokeConfirmTitle: "Revoke this access?";
191
+ readonly revokeConfirmBody: "This removes {count} grant(s) for {name}. The file itself is untouched.";
192
+ readonly revokeConfirmNeeds: "Removes every grant this row lists.";
193
+ readonly confirm: "Confirm";
194
+ readonly cancel: "Cancel";
195
+ readonly revoking: "Revoking…";
196
+ readonly colDirectory: "Directory";
197
+ readonly colFileCount: "Files";
198
+ readonly colSearchable: "Searchable";
199
+ readonly colLastChange: "Last change";
200
+ readonly searchableYes: "Searchable";
201
+ readonly searchableNo: "Not searchable";
202
+ readonly partialCountMark: "+";
203
+ readonly partialCountHint: "A subdirectory could not be read, so this count is a lower bound.";
204
+ readonly rootDirectory: "All files";
205
+ readonly directoriesEmpty: "No directory to report yet.";
206
+ readonly rescanAll: "Rescan all";
207
+ readonly rescanRow: "Rescan";
208
+ readonly colTrashName: "Name";
209
+ readonly colTrashOrigin: "Original location";
210
+ readonly colTrashDeletedAt: "Deleted at";
211
+ readonly colTrashRetention: "Retention left";
212
+ readonly trashRestore: "Restore";
213
+ readonly trashRestored: "Restored. If access to it was withdrawn while it sat here, it stays hidden.";
214
+ readonly trashNoExpiry: "No expiry";
215
+ readonly trashReadFailed: "Could not read the trash.";
216
+ readonly trashWriteFailed: "That did not go through.";
217
+ readonly trashPurge: "Delete permanently";
218
+ readonly trashEmptyRow: "Trash is empty";
219
+ readonly permissionReadable: "You may read this";
220
+ readonly permissionDenied: "Not authorized for you";
221
+ readonly rescanning: "Scanning…";
222
+ readonly rescanDone: "Rescanned.";
223
+ readonly rescanFailed: "Could not rescan.";
224
+ readonly notMounted: "Not mounted";
225
+ readonly previewEmpty: "Select a file to preview it.";
226
+ readonly previewBinary: "This file is binary and cannot be shown as text.";
227
+ readonly previewBinarySize: "This file is binary and cannot be shown as text. {size} bytes.";
228
+ readonly previewFailed: "Could not read this file.";
229
+ readonly previewTruncated: "This file is large; only the start is shown.";
230
+ readonly modifiedAt: "Modified";
231
+ readonly openedInSidebar: "Opened in the file window on the right.";
232
+ readonly copyCode: "Copy";
233
+ readonly copiedCode: "Copied";
234
+ readonly retrieval: "Retrieval";
235
+ readonly recentFiles: "Files, newest changes shown with their time";
236
+ readonly searchPlaceholder: "Search by file name or content…";
237
+ readonly searching: "Searching…";
238
+ readonly searchEmpty: "No document matches that term.";
239
+ readonly treeEmpty: "No documents in the knowledge base yet.";
240
+ readonly searchFailed: "Search failed.";
241
+ readonly filesUnit: "files";
242
+ readonly indexStarted: "Rescan started.";
243
+ readonly indexFailed: "Could not scan the directories.";
244
+ readonly readOnly: "Read-only here";
245
+ readonly deploy: "Deployment";
246
+ readonly deployIntro: "Prepare document parsing and the shared storage export. Every step is safe to run again.";
247
+ readonly deployHost: "Target host";
248
+ readonly deployNoHosts: "No SSH hosts are configured";
249
+ readonly deployHostsError: "Could not read the SSH host list:";
250
+ readonly deployNoCredential: "This host has no credential configured. Add one in the SSH Manager first.";
251
+ readonly deployRun: "Run";
252
+ readonly deployRunning: "Running…";
253
+ readonly deploySucceeded: "Succeeded";
254
+ readonly deployFailed: "Failed";
255
+ readonly 'step.probe': "Check environment";
256
+ readonly 'step.mineru-install': "Install MinerU and models";
257
+ readonly 'step.mineru-service': "Start the parsing service";
258
+ readonly 'step.mineru-verify': "Verify parsing";
259
+ readonly 'step.nfs-deploy': "Deploy the storage export";
260
+ readonly 'step.nfs-verify': "Verify hardlinks across NFS";
261
+ readonly outlineTitle: "Outline";
262
+ readonly gridRoot: "Knowledge base";
263
+ readonly viewList: "List";
264
+ readonly viewGrid: "Grid";
265
+ readonly viewExplorer: "System file tree";
266
+ readonly filesSelected: "{count} selected";
267
+ readonly moveSelected: "Move to…";
268
+ readonly pinSelected: "Pin";
269
+ readonly clearSelection: "Clear";
270
+ readonly moveFailed: "Could not move: {reason}";
271
+ readonly 'menu.settings': "Settings";
272
+ readonly settingsReviewHeading: "Review before publishing";
273
+ readonly settingsReviewHint: "";
274
+ readonly settingsReviewLabel: "Require review";
275
+ readonly settingsReviewOn: "On";
276
+ readonly settingsReviewOff: "Off";
277
+ readonly settingsReadOnly: "You can read these settings but not change them: changing review requires write access.";
278
+ readonly settingsLoading: "Loading settings...";
279
+ readonly settingsLoadFailed: "Could not read the settings.";
280
+ readonly settingsSaved: "Saved.";
281
+ readonly settingsSaveFailed: "Could not save the setting.";
282
+ readonly settingsPendingHeading: "Waiting for review";
283
+ readonly settingsPendingHint: "";
284
+ readonly settingsPendingEmpty: "Nothing is waiting for review.";
285
+ readonly pendingReadOnly: "You can see the queue but not decide it: approving or rejecting requires write access.";
286
+ readonly pendingApproved: "Approved and published.";
287
+ readonly pendingRejected: "Rejected and discarded.";
288
+ readonly pendingDecideFailed: "Could not record the decision.";
289
+ readonly colPendingWhen: "Submitted";
290
+ readonly colPendingSubmitter: "Submitter";
291
+ readonly colPendingTarget: "Target";
292
+ readonly colPendingSize: "Size";
293
+ readonly colPendingDecision: "Decision";
294
+ readonly pendingApprove: "Approve";
295
+ readonly pendingReject: "Reject";
296
+ readonly auditActionApprove: "Approve";
297
+ readonly auditActionReject: "Reject";
298
+ readonly auditOutcomeRejected: "Rejected";
299
+ readonly settingsAuditHeading: "Audit trail";
300
+ readonly settingsAuditHint: "";
301
+ readonly settingsAuditEmpty: "No recorded changes yet.";
302
+ readonly colAuditWhen: "When";
303
+ readonly colAuditActor: "Actor";
304
+ readonly colAuditAction: "Action";
305
+ readonly colAuditTarget: "Target";
306
+ readonly colAuditOutcome: "Result";
307
+ readonly auditActionCreate: "Create";
308
+ readonly auditActionUpload: "Upload";
309
+ readonly auditActionMove: "Move";
310
+ readonly auditActionEdit: "Edit";
311
+ readonly auditOutcomeApplied: "Applied";
312
+ readonly auditOutcomePending: "Pending review";
313
+ readonly storageProtocol: "Protocol";
314
+ readonly protocolNfs: "NFS";
315
+ readonly protocolSshfs: "SSHFS";
316
+ readonly protocolNfsHint: "Mounts the export directly. Needs the storage host to accept NFS from this host.";
317
+ readonly protocolSshfsHint: "Mounts over SSH. Use it where NFS cannot reach, such as a host behind NAT.";
318
+ readonly nfsServer: "NFS server";
319
+ readonly nfsServerPlaceholder: "e.g. 10.0.0.5";
320
+ readonly sshHost: "Host";
321
+ readonly sshHostPlaceholder: "e.g. 154.201.72.205";
322
+ readonly sshUser: "User";
323
+ readonly sshUserPlaceholder: "e.g. root";
324
+ readonly sshPort: "Port";
325
+ readonly sshRemotePath: "Remote path";
326
+ readonly sshRemotePathPlaceholder: "e.g. /srv/kb-nfs";
327
+ readonly sshMountOptions: "Mount options";
328
+ readonly sshMountOptionsPlaceholder: "e.g. ro,allow_other";
329
+ readonly sshKey: "Private key";
330
+ readonly sshKeyUnset: "Not set";
331
+ readonly sshKeyConfigured: "Configured";
332
+ readonly sshKeyMissing: "Not configured";
333
+ readonly save: "Save";
334
+ readonly saving: "Saving...";
335
+ readonly savedOk: "Saved.";
336
+ readonly savedRestart: "Mount changes take effect after the workspace container restarts.";
337
+ readonly saveBadPort: "Port must be a whole number between 1 and 65535.";
338
+ readonly bucketGlobal: "Everyone";
339
+ readonly bucketDepartment: "Department";
340
+ readonly bucketPersonal: "Personal";
341
+ readonly 'step.nfs-mount': "Mount the storage export";
342
+ readonly 'step.sshfs-mount': "Mount the share over SSHFS";
343
+ readonly 'step.sshfs-verify': "Verify the SSHFS mount";
344
+ readonly deployLocalOnly: "Deployment steps run on a remote host. This workspace stores documents locally, so there is nothing to deploy.";
345
+ readonly shareGroupReceived: "Inbound";
346
+ readonly shareGroupGiven: "Outbound";
347
+ readonly shareColRelation: "Sharing";
348
+ readonly shareColAudience: "Shared with";
349
+ readonly shareColPermission: "Permission";
350
+ readonly shareReceivedEmpty: "Nothing has been shared with you yet.";
351
+ readonly shareGivenEmpty: "You have not shared anything yet.";
352
+ readonly shareGivenRelation: "Me → {audience}";
353
+ readonly shareReceivedRelation: "From resource owner";
354
+ readonly shareUnknownAudience: "Unknown principal";
355
+ readonly refPickerBack: "Back";
356
+ readonly actionFavoriteMany: "Add {n} to favourites";
357
+ readonly actionUnfavoriteMany: "Remove {n} from favourites";
358
+ readonly actionCopyMany: "Copy {n} items";
359
+ readonly actionCutMany: "Cut {n} items";
360
+ readonly actionDeleteMany: "Delete {n} items (move to trash)";
361
+ readonly refPickerBatchTitle: "Reference {n} items in a chat";
362
+ readonly refPickerFailed: "Could not insert the reference into that chat.";
363
+ readonly dropHomeHint: "Drop to upload into your personal folder";
364
+ readonly progressTitle: "Progress";
365
+ readonly progressRoot: "Root";
366
+ readonly overviewByRole: "By role";
367
+ readonly sourceDirect: "Direct";
368
+ readonly sourceViaRole: "Via role {role}";
369
+ readonly sourceUnavailable: "Inheritance unavailable (requires admin access)";
370
+ readonly emptyByPerson: "No account is granted access directly.";
371
+ readonly emptyByRole: "No role is granted access.";
372
+ readonly emptyByResource: "No resource is granted access.";
373
+ readonly actionsUnknown: "Unknown";
374
+ readonly actionsUnknownHint: "Could not determine the full permission set";
375
+ readonly colAccount: "Account";
376
+ readonly colSource: "Source";
377
+ readonly roleMemberCount: "{count} member(s)";
378
+ readonly homeStarredEmpty: "Nothing starred yet.";
379
+ readonly menuExtractMarkdown: "Extract Markdown";
380
+ readonly extractRunning: "Extracting…";
381
+ readonly extractDone: "Markdown extracted";
382
+ readonly extractExists: "Markdown already exists";
383
+ readonly extractUnsupported: "This file type cannot be extracted";
384
+ readonly extractFailed: "Extraction failed: {reason}";
385
+ readonly dropFailed: "{ok} uploaded, {n} failed: {names}";
386
+ readonly dropDismiss: "Dismiss";
387
+ readonly dropUploading: "Uploading…";
388
+ readonly dropNeedsFolder: "Drop onto a folder";
389
+ readonly dropNoFiles: "No files to upload";
390
+ readonly progressUploadGroup: "Uploads";
391
+ readonly progressExtractGroup: "Extractions";
392
+ readonly progressUploading: "Uploading {done}/{total}";
393
+ readonly progressPending: "Queued";
394
+ readonly progressExtracting: "Extracting";
395
+ readonly progressExtractingVia: "Extracting ({via})";
396
+ readonly progressSucceeded: "Done";
397
+ readonly progressFailed: "Failed: {reason}";
398
+ readonly progressUnsupported: "This file type has no extractor";
399
+ readonly progressRetry: "Retry";
400
+ readonly progressCollapse: "Collapse";
401
+ readonly progressExpand: "Expand";
402
+ readonly progressSummary: "{uploaded} uploaded, {failed} failed";
403
+ readonly progressSummaryExtract: "{done} extracted, {failed} failed";
404
+ readonly progressRetrying: "Retrying…";
405
+ readonly progressRetryFailed: "Retry failed: {reason}";
406
+ readonly auditPagePrev: "Previous";
407
+ readonly auditPageNext: "Next";
408
+ readonly auditPageOf: "Page {page} of {pages}";
409
+ readonly auditPageSize: "Rows";
410
+ readonly auditPageSizeOption: "{size}";
411
+ readonly auditPageTotal: "{total} entries";
412
+ readonly settingsMineruHeading: "MinerU service address";
413
+ readonly settingsMineruHint: "Where documents are parsed. Leave it empty to use the port this deployment was configured with.";
414
+ readonly settingsMineruPlaceholder: "Leave empty to derive from the configured port";
415
+ readonly settingsMineruDerived: "Currently derived from the configured port.";
416
+ readonly settingsMineruExplicit: "Currently using the address above.";
417
+ readonly settingsSave: "Save";
418
+ readonly settingsSaving: "Saving…";
419
+ readonly ownerGlobal: "Everyone";
420
+ readonly ownerSelf: "Me";
421
+ readonly favoriteMark: "Favorited";
422
+ readonly actionCopy: "Copy";
423
+ readonly actionCut: "Cut";
424
+ readonly actionPaste: "Paste";
425
+ readonly actionPasteCopy: "Paste as copy";
426
+ readonly actionPasteCut: "Paste as move";
427
+ readonly actionDelete: "Delete";
428
+ readonly actionFavorite: "Add to favorites";
429
+ readonly actionUnfavorite: "Remove from favorites";
430
+ readonly actionShare: "Share";
431
+ readonly pasteFailed: "Could not paste.";
432
+ readonly deleteFailed: "Could not delete.";
433
+ readonly templateSubtitle: "Start from a document your team already agreed on.";
434
+ readonly templateTabLibrary: "Templates";
435
+ readonly templateTabManage: "Manage";
436
+ readonly templateUseInto: "Create in";
437
+ readonly templateUsing: "Copying…";
438
+ readonly templateUsed: "Created {path}";
439
+ readonly templateUseFailed: "Could not use this template.";
440
+ readonly templateNoMatch: "No template matches that search.";
441
+ readonly templateUnavailableReason: "Templates could not be read: {reason}";
442
+ readonly templateFileBadge: "file";
443
+ readonly templateAdd: "Add template";
444
+ readonly templateEdit: "Edit";
445
+ readonly templateRemove: "Take offline";
446
+ readonly templateManageEmpty: "No templates yet. Add one to get started.";
447
+ readonly templateName: "Name";
448
+ readonly templateNamePlaceholder: "For example: weekly report";
449
+ readonly templateDescription: "Description";
450
+ readonly templateDescriptionPlaceholder: "One line about when to use it";
451
+ readonly templateCategory: "Category";
452
+ readonly templateCategoryPlaceholder: "For example: report";
453
+ readonly templateTags: "Tags";
454
+ readonly templateTagsPlaceholder: "Comma separated, optional";
455
+ readonly templateDocument: "Document";
456
+ readonly templateFileChosen: "Using {name}";
457
+ readonly templateFileKept: "Keeping the stored file: {name}";
458
+ readonly templateFileUnreadable: "Could not read that file.";
459
+ readonly templateNeedTitle: "Give the template a name.";
460
+ readonly templateNeedFile: "Choose a document for the template.";
461
+ readonly templateSave: "Save";
462
+ readonly templateSaving: "Saving…";
463
+ readonly templateSaved: "Template saved.";
464
+ readonly templateSaveFailed: "Could not save the template.";
465
+ readonly templateRemoveTitle: "Take this template offline?";
466
+ readonly templateRemoveBody: "\"{name}\" will stop appearing in the library. The document is removed too.";
467
+ readonly templateRemoved: "Template taken offline.";
468
+ readonly templateRemoveFailed: "Could not take the template offline.";
469
+ readonly 'menu.audit': "Audit";
470
+ readonly auditTabReview: "Review";
471
+ readonly auditTabLog: "Log";
472
+ readonly auditTabsLabel: "Audit views";
473
+ readonly readFailed: "Could not read the authorization list.";
474
+ readonly grantFailed: "Could not grant access.";
475
+ readonly revokeFailed: "Could not revoke access.";
476
+ readonly createDialogHint: "Name it, then choose where it goes.";
477
+ readonly createUploadHint: "Choose files, then where they go.";
478
+ readonly createName: "Name";
479
+ readonly createDocPlaceholder: "For example: meeting-notes";
480
+ readonly createFolderPlaceholder: "For example: 2026-specs";
481
+ readonly createDestinationPicker: "Location";
482
+ readonly createDestination: "Destination";
483
+ readonly createAtRoot: "Top level";
484
+ readonly createAtUp: "Up one level";
485
+ readonly createLoading: "Loading folders…";
486
+ readonly createNoSubfolders: "No folders inside this one.";
487
+ readonly createListingFailed: "Could not list this folder; you can still create here.";
488
+ readonly createWillCreate: "Will create: {path}";
489
+ readonly createSubmit: "Create";
490
+ readonly createUpload: "Upload";
491
+ readonly createProgress: "Uploading {done}/{total}…";
492
+ readonly createPickFiles: "Choose at least one file.";
493
+ readonly createFiles: "Files";
494
+ readonly createMoreFiles: "+{n} more";
495
+ readonly createDone: "Created {path}";
496
+ readonly createNameEmpty: "Enter a name.";
497
+ readonly createNameSeparator: "A name cannot contain / or \\";
498
+ readonly createNameTraversal: "A name cannot be . or ..";
499
+ readonly deployAboutRemote: "What remote deployment does";
500
+ readonly deployAboutRemoteBody: "A remote deployment syncs documents from a shared NFS or SSHFS export. Its wizard prepares that host, installs the parsing service, and verifies the mount.";
501
+ };
502
+ /** Stable key set shared by every knowledge-base locale. */
503
+ export type KnowledgeKey = keyof typeof en;
504
+ /** Chinese knowledge-base copy. */
505
+ export declare const zh: Record<KnowledgeKey, string>;