@agi-fans/dsh-tui 0.18.0 → 0.20.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 (227) hide show
  1. package/lib/CHANGELOG.md +115 -1
  2. package/lib/chrome/box.d.ts +2 -0
  3. package/lib/chrome/box.js +6 -12
  4. package/lib/chrome/box.js.map +1 -1
  5. package/lib/chrome/code-highlight.d.ts +26 -18
  6. package/lib/chrome/code-highlight.js +114 -39
  7. package/lib/chrome/code-highlight.js.map +1 -1
  8. package/lib/chrome/diff-render.d.ts +1 -2
  9. package/lib/chrome/diff-render.js +41 -90
  10. package/lib/chrome/diff-render.js.map +1 -1
  11. package/lib/chrome/main-screen-renderer.d.ts +52 -30
  12. package/lib/chrome/main-screen-renderer.js +1730 -79
  13. package/lib/chrome/main-screen-renderer.js.map +1 -1
  14. package/lib/chrome/markdown.js +144 -101
  15. package/lib/chrome/markdown.js.map +1 -1
  16. package/lib/chrome/math.d.ts +4 -0
  17. package/lib/chrome/math.js +340 -0
  18. package/lib/chrome/math.js.map +1 -0
  19. package/lib/chrome/md-style.d.ts +3 -0
  20. package/lib/chrome/md-style.js.map +1 -1
  21. package/lib/chrome/mermaid.d.ts +6 -0
  22. package/lib/chrome/mermaid.js +56 -0
  23. package/lib/chrome/mermaid.js.map +1 -0
  24. package/lib/chrome/renderer.d.ts +78 -0
  25. package/lib/chrome/renderer.js.map +1 -1
  26. package/lib/chrome/status-config.d.ts +5 -0
  27. package/lib/chrome/status-config.js +3 -0
  28. package/lib/chrome/status-config.js.map +1 -1
  29. package/lib/chrome/status-line.d.ts +0 -21
  30. package/lib/chrome/status-line.js +8 -65
  31. package/lib/chrome/status-line.js.map +1 -1
  32. package/lib/chrome/terminal-images.d.ts +31 -0
  33. package/lib/chrome/terminal-images.js +34 -0
  34. package/lib/chrome/terminal-images.js.map +1 -0
  35. package/lib/chrome/theme.d.ts +23 -6
  36. package/lib/chrome/theme.js +217 -109
  37. package/lib/chrome/theme.js.map +1 -1
  38. package/lib/chrome/tool-args.d.ts +24 -1
  39. package/lib/chrome/tool-args.js +40 -1
  40. package/lib/chrome/tool-args.js.map +1 -1
  41. package/lib/chrome/tool-renderers.d.ts +11 -0
  42. package/lib/chrome/tool-renderers.js +55 -5
  43. package/lib/chrome/tool-renderers.js.map +1 -1
  44. package/lib/chrome/welcome-tips.js +2 -2
  45. package/lib/chrome/welcome-tips.js.map +1 -1
  46. package/lib/chrome/width.d.ts +7 -3
  47. package/lib/chrome/width.js +78 -14
  48. package/lib/chrome/width.js.map +1 -1
  49. package/lib/commands/diff.js +49 -3
  50. package/lib/commands/diff.js.map +1 -1
  51. package/lib/commands/export.js +28 -5
  52. package/lib/commands/export.js.map +1 -1
  53. package/lib/commands/files.d.ts +8 -0
  54. package/lib/commands/files.js +137 -0
  55. package/lib/commands/files.js.map +1 -0
  56. package/lib/commands/plugins.d.ts +8 -0
  57. package/lib/commands/plugins.js +158 -0
  58. package/lib/commands/plugins.js.map +1 -0
  59. package/lib/commands/session-configuration.d.ts +4 -0
  60. package/lib/commands/session-configuration.js +39 -8
  61. package/lib/commands/session-configuration.js.map +1 -1
  62. package/lib/commands/session.js +47 -15
  63. package/lib/commands/session.js.map +1 -1
  64. package/lib/commands/steer.js +2 -2
  65. package/lib/commands/steer.js.map +1 -1
  66. package/lib/commands/terminal.d.ts +7 -0
  67. package/lib/commands/terminal.js +99 -0
  68. package/lib/commands/terminal.js.map +1 -0
  69. package/lib/definition.d.ts +180 -14
  70. package/lib/definition.js.map +1 -1
  71. package/lib/input/clipboard.d.ts +12 -7
  72. package/lib/input/clipboard.js +79 -20
  73. package/lib/input/clipboard.js.map +1 -1
  74. package/lib/input/composer-files.d.ts +26 -0
  75. package/lib/input/composer-files.js +50 -0
  76. package/lib/input/composer-files.js.map +1 -0
  77. package/lib/input/editor-discovery.d.ts +21 -0
  78. package/lib/input/editor-discovery.js +99 -0
  79. package/lib/input/editor-discovery.js.map +1 -0
  80. package/lib/input/editor.d.ts +26 -1
  81. package/lib/input/editor.js +126 -12
  82. package/lib/input/editor.js.map +1 -1
  83. package/lib/input/external-editor.d.ts +5 -2
  84. package/lib/input/external-editor.js +14 -12
  85. package/lib/input/external-editor.js.map +1 -1
  86. package/lib/input/fuzzy-search.d.ts +9 -0
  87. package/lib/input/fuzzy-search.js +113 -0
  88. package/lib/input/fuzzy-search.js.map +1 -0
  89. package/lib/input/keybindings-config.d.ts +1 -1
  90. package/lib/input/keybindings-config.js +7 -1
  91. package/lib/input/keybindings-config.js.map +1 -1
  92. package/lib/input/keys.d.ts +17 -0
  93. package/lib/input/keys.js +21 -5
  94. package/lib/input/keys.js.map +1 -1
  95. package/lib/input/mouse-policy.d.ts +3 -0
  96. package/lib/input/mouse-policy.js +14 -0
  97. package/lib/input/mouse-policy.js.map +1 -0
  98. package/lib/input/paste-burst.d.ts +16 -0
  99. package/lib/input/paste-burst.js +61 -0
  100. package/lib/input/paste-burst.js.map +1 -0
  101. package/lib/input/text-selection.d.ts +20 -0
  102. package/lib/input/text-selection.js +195 -0
  103. package/lib/input/text-selection.js.map +1 -0
  104. package/lib/runtime/composer-images.d.ts +1 -0
  105. package/lib/runtime/composer-images.js +11 -3
  106. package/lib/runtime/composer-images.js.map +1 -1
  107. package/lib/runtime/file-open.d.ts +2 -0
  108. package/lib/runtime/file-open.js +12 -0
  109. package/lib/runtime/file-open.js.map +1 -0
  110. package/lib/runtime/file-review.d.ts +24 -0
  111. package/lib/runtime/file-review.js +188 -0
  112. package/lib/runtime/file-review.js.map +1 -0
  113. package/lib/runtime/herdr-agent.d.ts +7 -15
  114. package/lib/runtime/herdr-agent.js +151 -79
  115. package/lib/runtime/herdr-agent.js.map +1 -1
  116. package/lib/runtime/hook-settings.d.ts +17 -0
  117. package/lib/runtime/hook-settings.js +57 -0
  118. package/lib/runtime/hook-settings.js.map +1 -0
  119. package/lib/runtime/human-interaction.js +1 -1
  120. package/lib/runtime/human-interaction.js.map +1 -1
  121. package/lib/runtime/image-preview.d.ts +8 -0
  122. package/lib/runtime/image-preview.js +119 -0
  123. package/lib/runtime/image-preview.js.map +1 -0
  124. package/lib/runtime/plain-tui.d.ts +2 -0
  125. package/lib/runtime/plain-tui.js +2 -2
  126. package/lib/runtime/plain-tui.js.map +1 -1
  127. package/lib/runtime/plugin-settings.d.ts +17 -0
  128. package/lib/runtime/plugin-settings.js +154 -0
  129. package/lib/runtime/plugin-settings.js.map +1 -0
  130. package/lib/runtime/provider-local.d.ts +58 -7
  131. package/lib/runtime/provider-local.js +1394 -137
  132. package/lib/runtime/provider-local.js.map +1 -1
  133. package/lib/runtime/runner.js +3 -3
  134. package/lib/runtime/runner.js.map +1 -1
  135. package/lib/runtime/session-archive.d.ts +5 -0
  136. package/lib/runtime/session-archive.js +114 -0
  137. package/lib/runtime/session-archive.js.map +1 -0
  138. package/lib/runtime/subagent-model-selection.d.ts +5 -0
  139. package/lib/runtime/subagent-model-selection.js +15 -0
  140. package/lib/runtime/subagent-model-selection.js.map +1 -0
  141. package/lib/runtime/terminal-notifications.d.ts +8 -0
  142. package/lib/runtime/terminal-notifications.js +16 -0
  143. package/lib/runtime/terminal-notifications.js.map +1 -1
  144. package/lib/runtime/terminal-reader.d.ts +11 -0
  145. package/lib/runtime/terminal-reader.js +87 -0
  146. package/lib/runtime/terminal-reader.js.map +1 -0
  147. package/lib/runtime/tool-presentation.js +43 -30
  148. package/lib/runtime/tool-presentation.js.map +1 -1
  149. package/lib/session/composer-drafts.d.ts +20 -0
  150. package/lib/session/composer-drafts.js +103 -0
  151. package/lib/session/composer-drafts.js.map +1 -0
  152. package/lib/session/conversation-turns.d.ts +16 -0
  153. package/lib/session/conversation-turns.js +33 -0
  154. package/lib/session/conversation-turns.js.map +1 -0
  155. package/lib/session/feature-toggles.d.ts +79 -0
  156. package/lib/session/feature-toggles.js +139 -0
  157. package/lib/session/feature-toggles.js.map +1 -0
  158. package/lib/session/fold-policy.d.ts +4 -0
  159. package/lib/session/fold-policy.js +4 -0
  160. package/lib/session/fold-policy.js.map +1 -0
  161. package/lib/session/interaction-adapter.d.ts +2 -2
  162. package/lib/session/interaction-adapter.js +156 -25
  163. package/lib/session/interaction-adapter.js.map +1 -1
  164. package/lib/session/job-notice.d.ts +4 -0
  165. package/lib/session/job-notice.js +44 -3
  166. package/lib/session/job-notice.js.map +1 -1
  167. package/lib/session/message-queue.d.ts +22 -0
  168. package/lib/session/message-queue.js +157 -0
  169. package/lib/session/message-queue.js.map +1 -0
  170. package/lib/session/project-file-search.js +3 -21
  171. package/lib/session/project-file-search.js.map +1 -1
  172. package/lib/session/session-controller.d.ts +11 -18
  173. package/lib/session/session-controller.js +246 -100
  174. package/lib/session/session-controller.js.map +1 -1
  175. package/lib/session/session-library.d.ts +11 -3
  176. package/lib/session/session-library.js +48 -8
  177. package/lib/session/session-library.js.map +1 -1
  178. package/lib/session/session-tree.d.ts +26 -0
  179. package/lib/session/session-tree.js +112 -0
  180. package/lib/session/session-tree.js.map +1 -0
  181. package/lib/session/steering.d.ts +3 -0
  182. package/lib/session/steering.js +9 -0
  183. package/lib/session/steering.js.map +1 -0
  184. package/lib/session/tui-settings.d.ts +23 -1
  185. package/lib/session/tui-settings.js +15 -2
  186. package/lib/session/tui-settings.js.map +1 -1
  187. package/lib/session/workflow-projection.d.ts +9 -0
  188. package/lib/session/workflow-projection.js +44 -0
  189. package/lib/session/workflow-projection.js.map +1 -0
  190. package/lib/views/agent-hub.js +9 -4
  191. package/lib/views/agent-hub.js.map +1 -1
  192. package/lib/views/autocomplete.js +5 -25
  193. package/lib/views/autocomplete.js.map +1 -1
  194. package/lib/views/document-reader.d.ts +34 -0
  195. package/lib/views/document-reader.js +145 -0
  196. package/lib/views/document-reader.js.map +1 -0
  197. package/lib/views/event-views.d.ts +26 -2
  198. package/lib/views/event-views.js +196 -42
  199. package/lib/views/event-views.js.map +1 -1
  200. package/lib/views/hotkeys.d.ts +2 -0
  201. package/lib/views/hotkeys.js +20 -8
  202. package/lib/views/hotkeys.js.map +1 -1
  203. package/lib/views/prompt-selector.d.ts +33 -3
  204. package/lib/views/prompt-selector.js +287 -43
  205. package/lib/views/prompt-selector.js.map +1 -1
  206. package/lib/views/prompt-tree.d.ts +11 -0
  207. package/lib/views/prompt-tree.js +74 -0
  208. package/lib/views/prompt-tree.js.map +1 -0
  209. package/lib/views/session-files.d.ts +7 -0
  210. package/lib/views/session-files.js +62 -0
  211. package/lib/views/session-files.js.map +1 -0
  212. package/lib/views/settings-list.d.ts +32 -4
  213. package/lib/views/settings-list.js +148 -37
  214. package/lib/views/settings-list.js.map +1 -1
  215. package/lib/views/transcript-render.d.ts +117 -18
  216. package/lib/views/transcript-render.js +1084 -126
  217. package/lib/views/transcript-render.js.map +1 -1
  218. package/lib/views/transcript-types.d.ts +80 -2
  219. package/lib/views/transcript-types.js +11 -0
  220. package/lib/views/transcript-types.js.map +1 -1
  221. package/lib/views/workspace-changes.d.ts +27 -0
  222. package/lib/views/workspace-changes.js +128 -0
  223. package/lib/views/workspace-changes.js.map +1 -0
  224. package/package.json +77 -41
  225. package/lib/chrome/style.d.ts +0 -22
  226. package/lib/chrome/style.js +0 -23
  227. package/lib/chrome/style.js.map +0 -1
@@ -0,0 +1,17 @@
1
+ /** Schema-driven configuration using path edits and revision-checked writes. */
2
+ import type { Context } from '@deepseek-ai/cordis';
3
+ import z from '@deepseek-ai/schemastery';
4
+ import type { PluginSettingsEntry } from '../views/settings-list.ts';
5
+ export interface ConfigField {
6
+ path: string[];
7
+ schema: z;
8
+ secret: boolean;
9
+ /** Compound values containing secrets must be edited through their owner's form. */
10
+ protected: boolean;
11
+ }
12
+ /** Flatten ordinary objects while retaining arrays and unions as atomic fields. */
13
+ export declare function configFields(schema: z, path?: string[]): ConfigField[];
14
+ export declare function configValue(value: unknown, path: readonly string[]): unknown;
15
+ export declare function parseConfigValue(field: ConfigField, text: string): unknown;
16
+ export declare function pluginSettingsEntries(ctx: Context): PluginSettingsEntry[];
17
+ export declare function editPluginSettings(ctx: Context, ns: string, signal: AbortSignal): Promise<void>;
@@ -0,0 +1,154 @@
1
+ /** Schema-driven configuration using path edits and revision-checked writes. */
2
+ import { randomUUID } from 'node:crypto';
3
+ import { credentialRef } from '@deepseek-ai/dsh-credentials';
4
+ import z from '@deepseek-ai/schemastery';
5
+ function containsSecret(schema, seen = new Set()) {
6
+ if (seen.has(schema))
7
+ return false;
8
+ seen.add(schema);
9
+ return schema.meta.role === 'secret' || [schema.inner, ...schema.list ?? [], ...Object.values(schema.dict ?? {})]
10
+ .some(child => child !== undefined && containsSecret(child, seen));
11
+ }
12
+ /** Flatten ordinary objects while retaining arrays and unions as atomic fields. */
13
+ export function configFields(schema, path = []) {
14
+ if (schema.meta.hidden || schema.meta.disabled)
15
+ return [];
16
+ if (schema.type === 'object')
17
+ return Object.entries(schema.dict ?? {}).flatMap(([key, child]) => configFields(child, [...path, key]));
18
+ if (schema.type === 'intersect')
19
+ return (schema.list ?? []).flatMap(child => configFields(child, path));
20
+ if (path.length === 0)
21
+ return [];
22
+ const secret = schema.meta.role === 'secret';
23
+ return [{ path, schema, secret, protected: !secret && containsSecret(schema) }];
24
+ }
25
+ export function configValue(value, path) {
26
+ for (const key of path) {
27
+ if (value === null || typeof value !== 'object')
28
+ return undefined;
29
+ value = value[key];
30
+ }
31
+ return value;
32
+ }
33
+ function hasOverride(value, path) {
34
+ for (const key of path) {
35
+ if (value === null || typeof value !== 'object' || !Object.hasOwn(value, key))
36
+ return false;
37
+ value = value[key];
38
+ }
39
+ return true;
40
+ }
41
+ function display(value) {
42
+ return value === undefined ? 'not set' : typeof value === 'string' ? value : JSON.stringify(value);
43
+ }
44
+ function credentialPath(field, fields) {
45
+ const path = [...field.path.slice(0, -1), 'apiKeyEnv'];
46
+ return field.secret && field.path.at(-1) === 'apiKey' && fields.some(item => item.path.join('.') === path.join('.')) ? path : undefined;
47
+ }
48
+ function fieldDescription(section, field, fields) {
49
+ const refPath = credentialPath(field, fields);
50
+ const reference = refPath === undefined ? undefined : configValue(section.value, refPath);
51
+ const inline = section.secrets?.find(secret => secret.path.join('.') === field.path.join('.'))?.set;
52
+ const value = field.secret ? `secret · ${inline ? 'configured' : typeof reference === 'string' && reference !== '' ? 'credential reference configured' : 'not set'}`
53
+ : field.protected ? 'protected · use /auth or the owner configuration' : display(configValue(section.value, field.path));
54
+ const override = hasOverride(section.user, field.path) || refPath !== undefined && hasOverride(section.user, refPath);
55
+ const help = field.schema.meta.description;
56
+ return `${value} · ${override ? 'profile override' : 'inherited'}${typeof help === 'string' && help !== '' ? ` · ${help}` : ''}`;
57
+ }
58
+ export function parseConfigValue(field, text) {
59
+ const value = field.schema.type === 'string' ? text : JSON.parse(text);
60
+ field.schema(value);
61
+ return value;
62
+ }
63
+ const list = { presentation: 'fullscreen-list', optionLayout: 'compact', filterable: true, allowCustom: false };
64
+ export function pluginSettingsEntries(ctx) {
65
+ return ctx.settings.describe({ redactSecrets: true }).flatMap(section => {
66
+ const fields = configFields(new z(section.schema));
67
+ const label = String(section.ns).replace(/[-_]+/gu, ' ').replace(/^./u, first => first.toUpperCase());
68
+ return fields.length === 0 ? [] : [{ id: String(section.ns), label,
69
+ description: `${section.ns} · ${fields.length} fields · ${ctx.settings.writable ? 'Edits apply live to this profile; Esc returns to Settings.' : 'This profile is read-only.'}` }];
70
+ });
71
+ }
72
+ export async function editPluginSettings(ctx, ns, signal) {
73
+ while (!signal.aborted) {
74
+ // Re-read after every write; never carry a stale editor into another field.
75
+ const section = ctx.settings.describe({ redactSecrets: true }).find(item => item.ns === ns);
76
+ if (section === undefined) {
77
+ ctx.tui.notice(`No editable configuration for ${ns}.`, { level: 'error' });
78
+ return;
79
+ }
80
+ const fields = configFields(new z(section.schema));
81
+ const selected = await ctx.tui.prompt({ ...list, title: String(section.ns), question: 'Choose a field',
82
+ options: fields.map((field, index) => ({ label: field.path.join('.'), value: String(index),
83
+ description: fieldDescription(section, field, fields) })), signal });
84
+ if (selected === null)
85
+ break;
86
+ const field = fields[Number(selected)];
87
+ if (field === undefined || field.protected)
88
+ continue;
89
+ if (!ctx.settings.writable) {
90
+ ctx.tui.notice('This profile is read-only.');
91
+ continue;
92
+ }
93
+ const action = await ctx.tui.prompt({ title: field.path.join('.'), question: 'Set a value or restore inheritance',
94
+ detail: field.secret ? 'Secret values are never shown. Reset removes the profile value and its paired credential reference; inherited credentials may still apply.' : `Current: ${display(configValue(section.value, field.path))}\nInherited: ${display(configValue(section.base, field.path))}`,
95
+ options: [{ label: 'Set value', value: 'set' }, { label: 'Reset to inherited', value: 'reset' }], allowCustom: false, signal });
96
+ if (action === null || signal.aborted)
97
+ continue;
98
+ try {
99
+ if (action === 'reset') {
100
+ validateModelSelection(section, field, configValue(section.base, field.path));
101
+ const refPath = credentialPath(field, fields);
102
+ await ctx.settings.mutate(ns, [{ op: 'unset', path: field.path }, ...(refPath === undefined ? [] : [{ op: 'unset', path: refPath }])], section.revision);
103
+ }
104
+ else {
105
+ const constants = field.schema.type === 'boolean' ? [true, false] : field.schema.type === 'union'
106
+ && field.schema.list?.every(child => child.type === 'const') ? field.schema.list.map(child => child.value) : undefined;
107
+ const text = await ctx.tui.prompt({ title: field.path.join('.'), question: field.schema.type === 'string' ? 'Enter a value' : 'Enter a JSON value',
108
+ ...(field.secret ? {} : { detail: field.schema.toString() }), secret: field.secret,
109
+ ...(constants === undefined ? { allowCustom: true } : { allowCustom: false, options: constants.map(value => ({ label: display(value), value: JSON.stringify(value) })) }), signal });
110
+ if (text === null || signal.aborted)
111
+ continue;
112
+ const value = parseConfigValue(field, text);
113
+ await saveValue(ctx, section, field, value);
114
+ }
115
+ ctx.tui.notice(`${ns}.${field.path.join('.')}: ${action === 'reset' ? 'inherited value restored' : 'saved'}.`);
116
+ }
117
+ catch (error) {
118
+ // Secret validation messages may echo their input.
119
+ ctx.tui.notice(field.secret ? 'Could not save the secret. Refresh the field and check its format or credential storage.' : error instanceof Error ? error.message : String(error), { level: 'error' });
120
+ }
121
+ }
122
+ }
123
+ function validateModelSelection(section, field, value) {
124
+ if (section.ns === 'subagent-model-selection-settings') {
125
+ const enabled = field.path[0] === 'enabled' ? value : configValue(section.value, ['enabled']);
126
+ const models = field.path[0] === 'allowedModels' ? value : configValue(section.value, ['allowedModels']);
127
+ if (enabled === true && (!Array.isArray(models) || models.length === 0))
128
+ throw new Error('Set at least one allowedModels route before enabling subagent model selection.');
129
+ }
130
+ }
131
+ async function saveValue(ctx, section, field, value) {
132
+ validateModelSelection(section, field, value);
133
+ const fields = configFields(new z(section.schema));
134
+ const envPath = credentialPath(field, fields);
135
+ if (envPath !== undefined) {
136
+ // Persist the key through Harness credentials; the profile holds only the
137
+ // reference. A fresh slot avoids changing an existing key if the fenced
138
+ // profile write loses a race after credential storage finishes.
139
+ if (ctx.settings.describe({ redactSecrets: true }).find(item => item.ns === section.ns)?.revision !== section.revision)
140
+ throw new Error('Configuration changed. Refresh and retry.');
141
+ const ref = credentialRef(`OMDSH_${[section.ns, ...field.path.slice(0, -1)].join('_').toUpperCase().replace(/[^A-Z0-9]+/gu, '_')}_API_KEY_${randomUUID().replace(/-/gu, '').toUpperCase()}`);
142
+ await ctx.credentials.set(ref, String(value));
143
+ try {
144
+ await ctx.settings.mutate(section.ns, [{ op: 'unset', path: field.path }, { op: 'set', path: envPath, value: String(ref) }], section.revision);
145
+ }
146
+ catch (error) {
147
+ await ctx.credentials.unset(ref);
148
+ throw error;
149
+ }
150
+ }
151
+ else
152
+ await ctx.settings.mutate(section.ns, [{ op: 'set', path: field.path, value }], section.revision);
153
+ }
154
+ //# sourceMappingURL=plugin-settings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin-settings.js","sourceRoot":"","sources":["../../src/runtime/plugin-settings.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAGhF,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;AAE5D,OAAO,CAAC,MAAM,0BAA0B,CAAA;AAYxC,SAAS,cAAc,CAAC,MAAS,EAAE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AAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAA;AAC1G,CAAC"}
@@ -11,13 +11,16 @@
11
11
  * @module @agi-fans/dsh-tui
12
12
  */
13
13
  import { HerdrAgentReporter } from './herdr-agent.ts';
14
+ import { type ImageProtocol } from '../chrome/terminal-images.ts';
14
15
  import type { Context } from '@deepseek-ai/cordis';
15
16
  import type { SessionEvent } from '@deepseek-ai/dsh-session';
16
- import { type TuiAgentBehaviorSettingsBinding, type TuiCommand, type TuiPrompt, type TuiNoticeOptions, type TuiRecentSession, type TuiService, type TuiSessionControls, type TuiSessionStats, type TuiStatus, type TuiInputImage, type TuiInspectedSubagent, type TuiLoopStatus, type TuiSubagentRoster, type TuiSubmission } from '../definition.ts';
17
+ import type { WorkspaceChangesSummary } from '@deepseek-ai/dsh-workspace-changes';
18
+ import type { FileAttachmentRef } from '@deepseek-ai/dsh-attachment';
19
+ import { type TuiAgentBehaviorSettingsBinding, type TuiCommand, type TuiOutputOptions, type TuiPrompt, type TuiNoticeOptions, type TuiRecentSession, type TuiService, type TuiSessionControls, type TuiSessionStats, type TuiStatus, type TuiTranscriptReplacement, type TuiInputImage, type TuiInspectedSubagent, type TuiLoopStatus, type TuiSubagentRoster, type TuiSubmission, type TuiPendingInputs } from '../definition.ts';
17
20
  import { type DirReader, type PathSearcher } from '../views/path-complete.ts';
18
21
  import { type FileSearcher, type SessionSearcher } from '../views/at-complete.ts';
19
22
  import { type ClipboardReader, type ClipboardWriter } from '../input/clipboard.ts';
20
- import { type TuiPrefs } from '../views/settings-list.ts';
23
+ import { type PluginSettingsEntry, type TuiPrefs } from '../views/settings-list.ts';
21
24
  import { type StreamDelta } from '../views/event-views.ts';
22
25
  import { type RenderSink } from '../chrome/renderer.ts';
23
26
  import { type ThemeName } from '../chrome/theme.ts';
@@ -35,6 +38,11 @@ export interface Config extends TuiSettings {
35
38
  historyPath?: string;
36
39
  /** Optional `{ key-id: action }` JSON file. */
37
40
  keybindingsPath?: string;
41
+ /**
42
+ * Profile home. Feature toggles are edited in the Profile patch under it,
43
+ * which is why this row needs the path the composition already resolved.
44
+ */
45
+ dshHome?: string;
38
46
  }
39
47
  /**
40
48
  * Row schema. The durable preferences ride as volatile fields, so a settings
@@ -45,32 +53,50 @@ export declare const Config: z<Schemastery.ObjectS<NoInfer<{
45
53
  theme: z<"dark" | "light" | "midnight" | "solarized" | "catppuccin" | "dracula" | "nord" | "gruvbox" | "rose-pine" | "mono", "dark" | "light" | "midnight" | "solarized" | "catppuccin" | "dracula" | "nord" | "gruvbox" | "rose-pine" | "mono", "volatile-defined">;
46
54
  colors: z<boolean, boolean, "volatile">;
47
55
  motion: z<"full" | "reduced" | "off", "full" | "reduced" | "off", "volatile-defined">;
56
+ mathMode: z<"auto" | "source", "auto" | "source", "volatile-defined">;
57
+ mermaidMode: z<"auto" | "source", "auto" | "source", "volatile-defined">;
58
+ editor: z<"auto" | "code" | "cursor" | "codium" | "nvim" | "vim" | "nano" | "vi", "auto" | "code" | "cursor" | "codium" | "nvim" | "vim" | "nano" | "vi", "volatile-defined">;
48
59
  terminalProgress: z<boolean, boolean, "volatile-defined">;
60
+ pasteProtection: z<boolean, boolean, "volatile-defined">;
61
+ copyOnSelect: z<boolean, boolean, "volatile-defined">;
62
+ mouseInteraction: z<"auto" | "tui" | "native", "auto" | "tui" | "native", "volatile-defined">;
63
+ foldDensity: z<"standard" | "compact" | "detailed" | "verbose", "standard" | "compact" | "detailed" | "verbose", "volatile-defined">;
49
64
  expandTools: z<boolean, boolean, "volatile-defined">;
50
65
  checkUpdates: z<boolean, boolean, "volatile-defined">;
51
66
  startupChangelog: z<"summary" | "expanded" | "hidden", "summary" | "expanded" | "hidden", "volatile-defined">;
52
67
  notifications: z<"off" | "long-running" | "always", "off" | "long-running" | "always", "volatile-defined">;
68
+ notificationFocus: z<"always" | "unfocused", "always" | "unfocused", "volatile-defined">;
53
69
  notificationThreshold: z<"15s" | "30s" | "1m" | "2m", "15s" | "30s" | "1m" | "2m", "volatile-defined">;
54
70
  statusBar: z<any, any, "volatile" | "volatile-defined">;
55
71
  statusPreset: z<"minimal" | "compact" | "full", "minimal" | "compact" | "full", "volatile">;
56
72
  model: z<string, string, "plain">;
57
73
  historyPath: z<string, string, "plain">;
58
74
  keybindingsPath: z<string, string, "plain">;
75
+ dshHome: z<string, string, "plain">;
59
76
  }>>, Schemastery.ObjectT<NoInfer<{
60
77
  theme: z<"dark" | "light" | "midnight" | "solarized" | "catppuccin" | "dracula" | "nord" | "gruvbox" | "rose-pine" | "mono", "dark" | "light" | "midnight" | "solarized" | "catppuccin" | "dracula" | "nord" | "gruvbox" | "rose-pine" | "mono", "volatile-defined">;
61
78
  colors: z<boolean, boolean, "volatile">;
62
79
  motion: z<"full" | "reduced" | "off", "full" | "reduced" | "off", "volatile-defined">;
80
+ mathMode: z<"auto" | "source", "auto" | "source", "volatile-defined">;
81
+ mermaidMode: z<"auto" | "source", "auto" | "source", "volatile-defined">;
82
+ editor: z<"auto" | "code" | "cursor" | "codium" | "nvim" | "vim" | "nano" | "vi", "auto" | "code" | "cursor" | "codium" | "nvim" | "vim" | "nano" | "vi", "volatile-defined">;
63
83
  terminalProgress: z<boolean, boolean, "volatile-defined">;
84
+ pasteProtection: z<boolean, boolean, "volatile-defined">;
85
+ copyOnSelect: z<boolean, boolean, "volatile-defined">;
86
+ mouseInteraction: z<"auto" | "tui" | "native", "auto" | "tui" | "native", "volatile-defined">;
87
+ foldDensity: z<"standard" | "compact" | "detailed" | "verbose", "standard" | "compact" | "detailed" | "verbose", "volatile-defined">;
64
88
  expandTools: z<boolean, boolean, "volatile-defined">;
65
89
  checkUpdates: z<boolean, boolean, "volatile-defined">;
66
90
  startupChangelog: z<"summary" | "expanded" | "hidden", "summary" | "expanded" | "hidden", "volatile-defined">;
67
91
  notifications: z<"off" | "long-running" | "always", "off" | "long-running" | "always", "volatile-defined">;
92
+ notificationFocus: z<"always" | "unfocused", "always" | "unfocused", "volatile-defined">;
68
93
  notificationThreshold: z<"15s" | "30s" | "1m" | "2m", "15s" | "30s" | "1m" | "2m", "volatile-defined">;
69
94
  statusBar: z<any, any, "volatile" | "volatile-defined">;
70
95
  statusPreset: z<"minimal" | "compact" | "full", "minimal" | "compact" | "full", "volatile">;
71
96
  model: z<string, string, "plain">;
72
97
  historyPath: z<string, string, "plain">;
73
98
  keybindingsPath: z<string, string, "plain">;
99
+ dshHome: z<string, string, "plain">;
74
100
  }>>, "plain">;
75
101
  /** The minimal terminal surface a LocalTui drives (process streams satisfy it). */
76
102
  export interface TerminalLike {
@@ -89,8 +115,15 @@ export interface TerminalLike {
89
115
  /** Optional resize subscription; returns a disposer. */
90
116
  onResize?(listener: () => void): () => void;
91
117
  }
118
+ interface PluginSettingsBinding {
119
+ entries(): readonly PluginSettingsEntry[];
120
+ edit(id: string, signal: AbortSignal): Promise<void>;
121
+ }
92
122
  export declare class LocalTui implements TuiService {
93
123
  #private;
124
+ get interactive(): boolean;
125
+ openFileInEditor(path: string): void;
126
+ stageFileAttachment(file: FileAttachmentRef): void;
94
127
  /**
95
128
  * @param term - terminal surface (injectable for tests).
96
129
  * @param model - model label for the status line.
@@ -110,12 +143,19 @@ export declare class LocalTui implements TuiService {
110
143
  searchSessions?: SessionSearcher;
111
144
  autocompleteDebounceMs?: number;
112
145
  historyPath?: string;
146
+ draftsPath?: string;
113
147
  keybindingsPath?: string;
148
+ /**
149
+ * Profile patch the Features section edits. Absent leaves the section
150
+ * out entirely rather than presenting toggles that cannot be written.
151
+ */
152
+ featurePatch?: string;
114
153
  readClipboard?: ClipboardReader;
115
154
  readClipboardImage?: ClipboardImageReader;
116
155
  readClipboardFiles?: ClipboardFileReader;
117
156
  readImagePath?: ImagePathReader;
118
157
  deferInitialRender?: boolean;
158
+ imageProtocol?: ImageProtocol | 'none';
119
159
  terminalProfile?: 'direct' | 'multiplexer' | 'conpty';
120
160
  alternateScreenOverlays?: boolean;
121
161
  resizeDebounceMs?: number;
@@ -123,14 +163,17 @@ export declare class LocalTui implements TuiService {
123
163
  /** Herdr lifecycle reporter; production injects an environment-aware one. */
124
164
  herdrReporter?: HerdrAgentReporter;
125
165
  });
126
- event(event: SessionEvent, presentation?: TuiToolPresentation): void;
166
+ event(event: SessionEvent, presentation?: TuiToolPresentation, workspace?: WorkspaceChangesSummary): void;
167
+ setWorkspaceSummary(turn: number, summary: WorkspaceChangesSummary): void;
127
168
  /**
128
169
  * Fold one live `agent/assistant-stream` chunk into the transcript and
129
170
  * schedule the streaming reveal. Durable settlement follows on the session
130
171
  * log as `assistant/message` or `assistant/attempt`.
131
172
  */
132
173
  streamDelta(delta: StreamDelta): void;
133
- setStatus(status: TuiStatus): void;
174
+ setStatus(status: TuiStatus, options?: {
175
+ root?: boolean;
176
+ }): void;
134
177
  setModel(model: string, reasoningEffort?: string): void;
135
178
  setLoopStatus(status: TuiLoopStatus | undefined): void;
136
179
  setSubagents(roster: TuiSubagentRoster | undefined): void;
@@ -143,9 +186,9 @@ export declare class LocalTui implements TuiService {
143
186
  setImageValidator(validate?: (image: TuiInputImage) => Promise<void>): void;
144
187
  toolCallContext(callId: string): string | undefined;
145
188
  notice(text: string, options?: TuiNoticeOptions): void;
146
- commandOutput(command: string, text: string): void;
189
+ commandOutput(command: string, text: string, options?: TuiOutputOptions): void;
147
190
  prompt(request: TuiPrompt): Promise<string | null>;
148
- replaceSession(events: readonly SessionEvent[], presentations?: ReadonlyMap<number, TuiToolPresentation>, status?: TuiStatus): void;
191
+ replaceSession(events: readonly SessionEvent[], presentations?: ReadonlyMap<number, TuiToolPresentation>, status?: TuiStatus, reason?: TuiTranscriptReplacement): void;
149
192
  setSession(info: {
150
193
  id: string;
151
194
  title?: string;
@@ -159,6 +202,8 @@ export declare class LocalTui implements TuiService {
159
202
  prefs(): TuiPrefs;
160
203
  /** Called after a live `/settings` change. */
161
204
  setPrefsPersist(persist: (prefs: TuiPrefs) => void): void;
205
+ /** Bind the native Plugins section; unbinding cancels and drains its active form. */
206
+ bindPluginSettings(binding: PluginSettingsBinding): () => Promise<void>;
162
207
  bindAgentBehaviorSettings(binding: TuiAgentBehaviorSettingsBinding): () => void;
163
208
  readInput(signal?: AbortSignal): Promise<TuiSubmission | null>;
164
209
  /** Compatibility helper for provider-level text editing tests and embedders. */
@@ -166,14 +211,19 @@ export declare class LocalTui implements TuiService {
166
211
  restoreInput(submission: TuiSubmission): void;
167
212
  resolveQueueEdit(submission: TuiSubmission | null): void;
168
213
  onInterrupt(listener: () => void): () => void;
214
+ readonly pendingInputs: TuiPendingInputs;
215
+ setQueueHandler(handler: (signal: AbortSignal) => Promise<void>): () => void;
169
216
  onQueueEdit(listener: () => void): () => void;
170
217
  onRewind(listener: () => void): () => void;
171
218
  onInspectSubagent(listener: (id: string) => void): () => void;
172
219
  onInspectClose(listener: () => void): () => void;
173
220
  onInspectSubmit(listener: (submission: TuiSubmission) => void): () => void;
174
- dispose(): void;
221
+ setSteerHandler(handler: (text: string) => void): () => void;
222
+ dispose(): Promise<void>;
175
223
  /** Re-render the current frame (resize reflow). */
176
224
  refresh(): void;
225
+ /** Resolve one bounded tmux probe without overwriting an explicit preference. */
226
+ setTmuxMouseEnabled(enabled: boolean | undefined): void;
177
227
  }
178
228
  /**
179
229
  * Mount the local terminal provider as the tui service.
@@ -181,3 +231,4 @@ export declare class LocalTui implements TuiService {
181
231
  * @param config - model label and color switch.
182
232
  */
183
233
  export declare function apply(ctx: Context, config: Config): void;
234
+ export {};