@agi-fans/dsh-tui 0.20.0 → 0.22.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/lib/CHANGELOG.md +249 -3
- package/lib/chrome/box.d.ts +47 -16
- package/lib/chrome/box.js +172 -130
- package/lib/chrome/box.js.map +1 -1
- package/lib/chrome/code-highlight.d.ts +15 -0
- package/lib/chrome/code-highlight.js +60 -4
- package/lib/chrome/code-highlight.js.map +1 -1
- package/lib/chrome/command-output.d.ts +29 -2
- package/lib/chrome/command-output.js +100 -4
- package/lib/chrome/command-output.js.map +1 -1
- package/lib/chrome/main-screen-renderer.d.ts +18 -0
- package/lib/chrome/main-screen-renderer.js +58 -5
- package/lib/chrome/main-screen-renderer.js.map +1 -1
- package/lib/chrome/markdown.js +30 -10
- package/lib/chrome/markdown.js.map +1 -1
- package/lib/chrome/relative-time.d.ts +17 -0
- package/lib/chrome/relative-time.js +36 -0
- package/lib/chrome/relative-time.js.map +1 -1
- package/lib/chrome/renderer.d.ts +9 -0
- package/lib/chrome/renderer.js +1 -1
- package/lib/chrome/renderer.js.map +1 -1
- package/lib/chrome/secret-mask.d.ts +35 -0
- package/lib/chrome/secret-mask.js +180 -0
- package/lib/chrome/secret-mask.js.map +1 -0
- package/lib/chrome/status-config.d.ts +161 -51
- package/lib/chrome/status-config.js +237 -126
- package/lib/chrome/status-config.js.map +1 -1
- package/lib/chrome/status-line.d.ts +3 -2
- package/lib/chrome/status-line.js +105 -63
- package/lib/chrome/status-line.js.map +1 -1
- package/lib/chrome/terminal-colors.d.ts +85 -0
- package/lib/chrome/terminal-colors.js +230 -0
- package/lib/chrome/terminal-colors.js.map +1 -0
- package/lib/chrome/terminal-images.d.ts +9 -1
- package/lib/chrome/terminal-images.js +27 -4
- package/lib/chrome/terminal-images.js.map +1 -1
- package/lib/chrome/theme.d.ts +32 -9
- package/lib/chrome/theme.js +616 -520
- package/lib/chrome/theme.js.map +1 -1
- package/lib/chrome/tool-args.d.ts +1 -1
- package/lib/chrome/tool-args.js +3 -1
- package/lib/chrome/tool-args.js.map +1 -1
- package/lib/chrome/tool-renderers.d.ts +2 -0
- package/lib/chrome/tool-renderers.js +69 -3
- package/lib/chrome/tool-renderers.js.map +1 -1
- package/lib/chrome/tools-list.d.ts +1 -4
- package/lib/chrome/tools-list.js +1 -41
- package/lib/chrome/tools-list.js.map +1 -1
- package/lib/chrome/welcome-tips.d.ts +20 -7
- package/lib/chrome/welcome-tips.js +22 -41
- package/lib/chrome/welcome-tips.js.map +1 -1
- package/lib/commands/auth-ids.d.ts +25 -0
- package/lib/commands/auth-ids.js +27 -0
- package/lib/commands/auth-ids.js.map +1 -0
- package/lib/commands/auth-input.d.ts +34 -0
- package/lib/commands/auth-input.js +96 -0
- package/lib/commands/auth-input.js.map +1 -0
- package/lib/commands/auth-providers.d.ts +39 -0
- package/lib/commands/auth-providers.js +125 -0
- package/lib/commands/auth-providers.js.map +1 -0
- package/lib/commands/auth.d.ts +16 -22
- package/lib/commands/auth.js +346 -299
- package/lib/commands/auth.js.map +1 -1
- package/lib/commands/btw.d.ts +27 -0
- package/lib/commands/btw.js +59 -0
- package/lib/commands/btw.js.map +1 -0
- package/lib/commands/diff.js +30 -5
- package/lib/commands/diff.js.map +1 -1
- package/lib/commands/export.d.ts +1 -1
- package/lib/commands/export.js +5 -3
- package/lib/commands/export.js.map +1 -1
- package/lib/commands/files.d.ts +17 -1
- package/lib/commands/files.js +69 -61
- package/lib/commands/files.js.map +1 -1
- package/lib/commands/integrations.js +18 -6
- package/lib/commands/integrations.js.map +1 -1
- package/lib/commands/jobs.d.ts +19 -4
- package/lib/commands/jobs.js +50 -7
- package/lib/commands/jobs.js.map +1 -1
- package/lib/commands/model.js +109 -76
- package/lib/commands/model.js.map +1 -1
- package/lib/commands/permission.js +46 -13
- package/lib/commands/permission.js.map +1 -1
- package/lib/commands/plugins.js +196 -42
- package/lib/commands/plugins.js.map +1 -1
- package/lib/commands/schedule.d.ts +29 -0
- package/lib/commands/schedule.js +228 -0
- package/lib/commands/schedule.js.map +1 -0
- package/lib/commands/session-configuration.d.ts +1 -1
- package/lib/commands/session-configuration.js +29 -28
- package/lib/commands/session-configuration.js.map +1 -1
- package/lib/commands/session.js +75 -80
- package/lib/commands/session.js.map +1 -1
- package/lib/commands/terminal.d.ts +24 -4
- package/lib/commands/terminal.js +38 -94
- package/lib/commands/terminal.js.map +1 -1
- package/lib/commands/trajectory.js +4 -1
- package/lib/commands/trajectory.js.map +1 -1
- package/lib/definition.d.ts +150 -11
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/input/actions.d.ts +51 -0
- package/lib/input/actions.js +120 -0
- package/lib/input/actions.js.map +1 -0
- package/lib/input/editor-discovery.js +2 -2
- package/lib/input/editor-discovery.js.map +1 -1
- package/lib/input/editor.d.ts +0 -10
- package/lib/input/editor.js +11 -9
- package/lib/input/editor.js.map +1 -1
- package/lib/input/image-paste.d.ts +19 -1
- package/lib/input/image-paste.js +82 -1
- package/lib/input/image-paste.js.map +1 -1
- package/lib/input/keybindings-config.d.ts +15 -4
- package/lib/input/keybindings-config.js +57 -35
- package/lib/input/keybindings-config.js.map +1 -1
- package/lib/input/keys.d.ts +18 -0
- package/lib/input/keys.js +48 -3
- package/lib/input/keys.js.map +1 -1
- package/lib/input/wheel-scroll.d.ts +46 -0
- package/lib/input/wheel-scroll.js +69 -0
- package/lib/input/wheel-scroll.js.map +1 -0
- package/lib/prompt-intents.d.ts +182 -0
- package/lib/prompt-intents.js +127 -0
- package/lib/prompt-intents.js.map +1 -0
- package/lib/runtime/agent-profile.d.ts +5 -0
- package/lib/runtime/agent-profile.js +12 -0
- package/lib/runtime/agent-profile.js.map +1 -1
- package/lib/runtime/approval-rules.d.ts +59 -0
- package/lib/runtime/approval-rules.js +179 -0
- package/lib/runtime/approval-rules.js.map +1 -0
- package/lib/runtime/btw-policy.d.ts +7 -0
- package/lib/runtime/btw-policy.js +18 -0
- package/lib/runtime/btw-policy.js.map +1 -0
- package/lib/runtime/btw.d.ts +47 -0
- package/lib/runtime/btw.js +200 -0
- package/lib/runtime/btw.js.map +1 -0
- package/lib/runtime/cancellable.d.ts +75 -0
- package/lib/runtime/cancellable.js +76 -0
- package/lib/runtime/cancellable.js.map +1 -0
- package/lib/runtime/composer-images.js +5 -4
- package/lib/runtime/composer-images.js.map +1 -1
- package/lib/runtime/composer-shell.d.ts +30 -0
- package/lib/runtime/composer-shell.js +150 -0
- package/lib/runtime/composer-shell.js.map +1 -0
- package/lib/runtime/file-recovery-local.d.ts +73 -0
- package/lib/runtime/file-recovery-local.js +351 -0
- package/lib/runtime/file-recovery-local.js.map +1 -0
- package/lib/runtime/file-recovery-recording.d.ts +23 -0
- package/lib/runtime/file-recovery-recording.js +131 -0
- package/lib/runtime/file-recovery-recording.js.map +1 -0
- package/lib/runtime/file-recovery-review.d.ts +3 -0
- package/lib/runtime/file-recovery-review.js +130 -0
- package/lib/runtime/file-recovery-review.js.map +1 -0
- package/lib/runtime/file-recovery-store.d.ts +83 -0
- package/lib/runtime/file-recovery-store.js +329 -0
- package/lib/runtime/file-recovery-store.js.map +1 -0
- package/lib/runtime/file-recovery-worker.d.ts +22 -0
- package/lib/runtime/file-recovery-worker.js +153 -0
- package/lib/runtime/file-recovery-worker.js.map +1 -0
- package/lib/runtime/file-review.d.ts +6 -3
- package/lib/runtime/file-review.js +44 -7
- package/lib/runtime/file-review.js.map +1 -1
- package/lib/runtime/herdr-agent.d.ts +4 -13
- package/lib/runtime/herdr-agent.js +19 -63
- package/lib/runtime/herdr-agent.js.map +1 -1
- package/lib/runtime/plain-tui.d.ts +2 -0
- package/lib/runtime/plain-tui.js +7 -1
- package/lib/runtime/plain-tui.js.map +1 -1
- package/lib/runtime/plugin-settings.d.ts +25 -2
- package/lib/runtime/plugin-settings.js +329 -31
- package/lib/runtime/plugin-settings.js.map +1 -1
- package/lib/runtime/provider-local.d.ts +81 -24
- package/lib/runtime/provider-local.js +1807 -608
- package/lib/runtime/provider-local.js.map +1 -1
- package/lib/runtime/runner.js +52 -12
- package/lib/runtime/runner.js.map +1 -1
- package/lib/runtime/session-archive.d.ts +6 -0
- package/lib/runtime/session-archive.js +129 -3
- package/lib/runtime/session-archive.js.map +1 -1
- package/lib/runtime/session-runtime.js +1 -1
- package/lib/runtime/session-runtime.js.map +1 -1
- package/lib/runtime/settings-preferences.d.ts +5 -0
- package/lib/runtime/settings-preferences.js +34 -0
- package/lib/runtime/settings-preferences.js.map +1 -0
- package/lib/runtime/startup-notices.js +2 -0
- package/lib/runtime/startup-notices.js.map +1 -1
- package/lib/runtime/terminal-modes.d.ts +47 -0
- package/lib/runtime/terminal-modes.js +86 -0
- package/lib/runtime/terminal-modes.js.map +1 -0
- package/lib/runtime/terminal-notifications.d.ts +3 -5
- package/lib/runtime/terminal-notifications.js +4 -8
- package/lib/runtime/terminal-notifications.js.map +1 -1
- package/lib/runtime/terminal-probe.d.ts +36 -0
- package/lib/runtime/terminal-probe.js +37 -0
- package/lib/runtime/terminal-probe.js.map +1 -0
- package/lib/runtime/terminal-session.d.ts +57 -0
- package/lib/runtime/terminal-session.js +164 -0
- package/lib/runtime/terminal-session.js.map +1 -0
- package/lib/runtime/terminal-state.d.ts +29 -0
- package/lib/runtime/terminal-state.js +62 -0
- package/lib/runtime/terminal-state.js.map +1 -0
- package/lib/runtime/tool-presentation.js +50 -14
- package/lib/runtime/tool-presentation.js.map +1 -1
- package/lib/session/external-agents.d.ts +5 -0
- package/lib/session/external-agents.js +27 -0
- package/lib/session/external-agents.js.map +1 -0
- package/lib/session/feature-toggles.d.ts +1 -1
- package/lib/session/feature-toggles.js +1 -1
- package/lib/session/interaction-adapter.d.ts +1 -6
- package/lib/session/interaction-adapter.js +95 -18
- package/lib/session/interaction-adapter.js.map +1 -1
- package/lib/session/message-queue.js +1 -1
- package/lib/session/message-queue.js.map +1 -1
- package/lib/session/model-readiness.d.ts +16 -0
- package/lib/session/model-readiness.js +43 -0
- package/lib/session/model-readiness.js.map +1 -0
- package/lib/session/package-metadata.d.ts +8 -0
- package/lib/session/package-metadata.js +8 -0
- package/lib/session/package-metadata.js.map +1 -1
- package/lib/session/project-context.d.ts +5 -0
- package/lib/session/project-context.js +36 -0
- package/lib/session/project-context.js.map +1 -1
- package/lib/session/session-controller.d.ts +10 -13
- package/lib/session/session-controller.js +183 -98
- package/lib/session/session-controller.js.map +1 -1
- package/lib/session/session-library.js +2 -0
- package/lib/session/session-library.js.map +1 -1
- package/lib/session/session-tree.d.ts +3 -0
- package/lib/session/session-tree.js +3 -1
- package/lib/session/session-tree.js.map +1 -1
- package/lib/session/subagent-roster.d.ts +2 -1
- package/lib/session/subagent-roster.js +24 -3
- package/lib/session/subagent-roster.js.map +1 -1
- package/lib/session/subagent-tracker.d.ts +6 -2
- package/lib/session/subagent-tracker.js +49 -2
- package/lib/session/subagent-tracker.js.map +1 -1
- package/lib/session/tui-settings.d.ts +47 -13
- package/lib/session/tui-settings.js +76 -34
- package/lib/session/tui-settings.js.map +1 -1
- package/lib/session/working-directory.d.ts +4 -0
- package/lib/session/working-directory.js +4 -0
- package/lib/session/working-directory.js.map +1 -0
- package/lib/session/worktrees.d.ts +13 -0
- package/lib/session/worktrees.js +49 -0
- package/lib/session/worktrees.js.map +1 -0
- package/lib/views/approval-rule.d.ts +3 -0
- package/lib/views/approval-rule.js +4 -0
- package/lib/views/approval-rule.js.map +1 -0
- package/lib/views/at-complete.d.ts +8 -0
- package/lib/views/at-complete.js +64 -2
- package/lib/views/at-complete.js.map +1 -1
- package/lib/views/autocomplete.d.ts +22 -2
- package/lib/views/autocomplete.js +70 -40
- package/lib/views/autocomplete.js.map +1 -1
- package/lib/views/copy-targets.d.ts +13 -14
- package/lib/views/copy-targets.js +42 -54
- package/lib/views/copy-targets.js.map +1 -1
- package/lib/views/document-reader.js +18 -5
- package/lib/views/document-reader.js.map +1 -1
- package/lib/views/event-views.d.ts +1 -1
- package/lib/views/event-views.js +60 -6
- package/lib/views/event-views.js.map +1 -1
- package/lib/views/file-actions.d.ts +12 -0
- package/lib/views/file-actions.js +72 -0
- package/lib/views/file-actions.js.map +1 -0
- package/lib/views/history-search.js +15 -21
- package/lib/views/history-search.js.map +1 -1
- package/lib/views/hotkeys.d.ts +8 -1
- package/lib/views/hotkeys.js +53 -26
- package/lib/views/hotkeys.js.map +1 -1
- package/lib/views/list-navigation.d.ts +62 -0
- package/lib/views/list-navigation.js +73 -0
- package/lib/views/list-navigation.js.map +1 -0
- package/lib/views/list-view.d.ts +99 -0
- package/lib/views/list-view.js +165 -0
- package/lib/views/list-view.js.map +1 -0
- package/lib/views/prompt-selector.d.ts +34 -4
- package/lib/views/prompt-selector.js +270 -134
- package/lib/views/prompt-selector.js.map +1 -1
- package/lib/views/session-files.d.ts +1 -2
- package/lib/views/session-files.js +1 -11
- package/lib/views/session-files.js.map +1 -1
- package/lib/views/settings-list.d.ts +51 -10
- package/lib/views/settings-list.js +267 -315
- package/lib/views/settings-list.js.map +1 -1
- package/lib/views/trajectory-timeline.d.ts +72 -0
- package/lib/views/trajectory-timeline.js +133 -0
- package/lib/views/trajectory-timeline.js.map +1 -0
- package/lib/views/trajectory.d.ts +15 -4
- package/lib/views/trajectory.js +557 -123
- package/lib/views/trajectory.js.map +1 -1
- package/lib/views/transcript-export.js +9 -0
- package/lib/views/transcript-export.js.map +1 -1
- package/lib/views/transcript-render.d.ts +97 -25
- package/lib/views/transcript-render.js +542 -170
- package/lib/views/transcript-render.js.map +1 -1
- package/lib/views/transcript-search.d.ts +39 -6
- package/lib/views/transcript-search.js +46 -11
- package/lib/views/transcript-search.js.map +1 -1
- package/lib/views/transcript-types.d.ts +63 -5
- package/lib/views/transcript-types.js +23 -11
- package/lib/views/transcript-types.js.map +1 -1
- package/package.json +95 -65
- package/lib/commands/loop.d.ts +0 -52
- package/lib/commands/loop.js +0 -307
- package/lib/commands/loop.js.map +0 -1
- package/lib/commands/steer.d.ts +0 -5
- package/lib/commands/steer.js +0 -24
- package/lib/commands/steer.js.map +0 -1
- package/lib/runtime/terminal-reader.d.ts +0 -11
- package/lib/runtime/terminal-reader.js +0 -87
- package/lib/runtime/terminal-reader.js.map +0 -1
- package/lib/views/agent-hub.d.ts +0 -32
- package/lib/views/agent-hub.js +0 -206
- package/lib/views/agent-hub.js.map +0 -1
- package/lib/views/copy-selector.d.ts +0 -51
- package/lib/views/copy-selector.js +0 -139
- package/lib/views/copy-selector.js.map +0 -1
package/lib/commands/files.js
CHANGED
|
@@ -1,70 +1,59 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* File attachments: one surface for adding a file to the composer and for
|
|
3
|
+
* reading back everything this session has already attached.
|
|
4
|
+
*
|
|
5
|
+
* There used to be a `/files` browser as well — a full-screen directory walker
|
|
6
|
+
* with its own workspace search and a deliverables view. It was a file manager
|
|
7
|
+
* inside a chat, which is not what a chat needs: `@` already completes any path
|
|
8
|
+
* in the workspace, a tool card's paths already open a preview, and the Agent
|
|
9
|
+
* already reports the files it wrote. Nothing it offered was unreachable without
|
|
10
|
+
* it, and it cost the reader a mode to learn.
|
|
11
|
+
*/
|
|
2
12
|
import { createReadStream } from 'node:fs';
|
|
3
|
-
import {
|
|
4
|
-
import { basename,
|
|
13
|
+
import { stat } from 'node:fs/promises';
|
|
14
|
+
import { basename, resolve } from 'node:path';
|
|
5
15
|
import { homedir } from 'node:os';
|
|
6
|
-
import {
|
|
16
|
+
import { logAttachments } from "../views/session-files.js";
|
|
7
17
|
import { filePreview, openSystemFile, reviewFiles } from "../runtime/file-review.js";
|
|
8
18
|
import { previewImages } from "../runtime/image-preview.js";
|
|
9
19
|
import { registerCommands } from "./registration.js";
|
|
20
|
+
import { askPrompt } from "../prompt-intents.js";
|
|
21
|
+
import { currentWorkingDirectory } from "../session/working-directory.js";
|
|
10
22
|
export const name = 'omdsh-command-files';
|
|
11
23
|
export const inject = ['commands', 'tui', 'attachments'];
|
|
12
24
|
export function userPath(input, cwd) {
|
|
13
25
|
const unquoted = input.replace(/^(?:"(.*)"|'(.*)')$/u, '$1$2');
|
|
14
26
|
return resolve(cwd, unquoted.startsWith('~/') ? homedir() + unquoted.slice(1) : unquoted);
|
|
15
27
|
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
const directory = dirname(path);
|
|
25
|
-
const files = (await readdir(directory, { withFileTypes: true })).filter(entry => entry.isFile())
|
|
26
|
-
.sort((a, b) => a.name.localeCompare(b.name)).slice(0, 500)
|
|
27
|
-
.map(entry => ({ path: resolve(directory, entry.name), label: entry.name }));
|
|
28
|
-
if (!files.some(file => file.path === path))
|
|
29
|
-
files.push({ path, label: basename(path) });
|
|
30
|
-
await reviewFiles(ctx.tui, `Files · ${directory}`, directory, files, index => filePreview(files[index].path, invocation.signal), invocation.signal, files.findIndex(file => file.path === path), false);
|
|
31
|
-
path = directory;
|
|
32
|
-
continue;
|
|
33
|
-
}
|
|
34
|
-
const entries = (await readdir(path, { withFileTypes: true })).filter(entry => entry.name !== '.git' && entry.name !== 'node_modules')
|
|
35
|
-
.sort((a, b) => Number(b.isDirectory()) - Number(a.isDirectory()) || a.name.localeCompare(b.name));
|
|
36
|
-
const page = entries.slice(0, 500);
|
|
37
|
-
if (ctx.tui.interactive !== true)
|
|
38
|
-
return { kind: 'success', text: page.map(entry => entry.name + (entry.isDirectory() ? '/' : '')).join('\n') };
|
|
39
|
-
const answer = await ctx.tui.prompt({ title: `Files · ${path}`, question: path, presentation: 'fullscreen-list', optionLayout: 'compact',
|
|
40
|
-
allowCustom: false, filterable: true, signal: invocation.signal, notify: false,
|
|
41
|
-
detail: entries.length > page.length ? `Showing ${page.length} of ${entries.length} entries; /files <path> opens a specific path.` : 'Shift+P shows this session’s deliverables.',
|
|
42
|
-
options: [{ label: '../', value: dirname(path) }, ...page.map(entry => ({ label: entry.name + (entry.isDirectory() ? '/' : ''), value: resolve(path, entry.name) }))],
|
|
43
|
-
actions: [{ key: 'P', label: 'deliverables', valuePrefix: 'present:' }] });
|
|
44
|
-
if (answer === null)
|
|
45
|
-
break;
|
|
46
|
-
if (answer.startsWith('present:')) {
|
|
47
|
-
const files = deliverableFiles(invocation.agent.session.snapshotEvents()).map(path => ({ path, label: path }));
|
|
48
|
-
if (files.length === 0) {
|
|
49
|
-
ctx.tui.notice('No deliverables in this session.');
|
|
50
|
-
continue;
|
|
51
|
-
}
|
|
52
|
-
await reviewFiles(ctx.tui, 'Deliverables', cwd, files, index => filePreview(resolve(cwd, files[index]?.path ?? ''), invocation.signal), invocation.signal, undefined, false);
|
|
53
|
-
}
|
|
54
|
-
else
|
|
55
|
-
path = answer;
|
|
56
|
-
}
|
|
57
|
-
return { kind: 'success' };
|
|
58
|
-
}
|
|
28
|
+
/** Staged leaf names the picker offers, mapped back to the durable reference. */
|
|
29
|
+
const ADD_CANDIDATE_PREFIX = 'add:';
|
|
30
|
+
/**
|
|
31
|
+
* One attachment surface, not three. A path argument attaches immediately; no
|
|
32
|
+
* argument opens the session's stored attachments with an Add entry at the top,
|
|
33
|
+
* so reading what is there and adding something new are the same gesture
|
|
34
|
+
* instead of two commands the reader has to keep apart.
|
|
35
|
+
*/
|
|
59
36
|
export async function attachFile(ctx, invocation) {
|
|
37
|
+
const input = invocation.rawInput.trim();
|
|
38
|
+
// A bare `/attach` reads this session's log, which needs no composer; asking
|
|
39
|
+
// for a path, or offering to add one, is the part that does.
|
|
40
|
+
if (input === '' && ctx.tui.interactive !== true)
|
|
41
|
+
return listAttachments(ctx, invocation);
|
|
42
|
+
if (input === '')
|
|
43
|
+
return attachments(ctx, invocation);
|
|
60
44
|
if (ctx.tui.interactive !== true || ctx.tui.stageFileAttachment === undefined)
|
|
61
45
|
return { kind: 'error', text: 'File drafts require an interactive composer.' };
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
46
|
+
return stageAttachment(ctx, invocation, input);
|
|
47
|
+
}
|
|
48
|
+
/** Plain-mode list: the same rows the picker offers, as transcript text. */
|
|
49
|
+
function listAttachments(_ctx, invocation) {
|
|
50
|
+
const refs = logAttachments(invocation.agent.session.snapshotEvents());
|
|
51
|
+
return { kind: 'success', text: refs.map(ref => `${ref.name ?? ref.attachmentId} · ${ref.bytes} bytes`).join('\n') || 'No attachments in this session.' };
|
|
52
|
+
}
|
|
53
|
+
async function stageAttachment(ctx, invocation, input) {
|
|
54
|
+
if (ctx.tui.stageFileAttachment === undefined)
|
|
55
|
+
return { kind: 'error', text: 'File drafts require an interactive composer.' };
|
|
56
|
+
const path = userPath(input, currentWorkingDirectory(ctx, invocation.agent.session));
|
|
68
57
|
const info = await stat(path);
|
|
69
58
|
if (!info.isFile())
|
|
70
59
|
return { kind: 'error', text: 'Select a regular file to attach.' };
|
|
@@ -80,16 +69,32 @@ export async function attachFile(ctx, invocation) {
|
|
|
80
69
|
}
|
|
81
70
|
}
|
|
82
71
|
async function attachments(ctx, invocation) {
|
|
83
|
-
const refs = logAttachments(invocation.agent.session.snapshotEvents());
|
|
84
72
|
if (ctx.tui.interactive !== true)
|
|
85
|
-
return
|
|
73
|
+
return listAttachments(ctx, invocation);
|
|
86
74
|
while (!invocation.signal.aborted) {
|
|
87
|
-
|
|
88
|
-
|
|
75
|
+
// Re-read every pass: adding a file during this loop has to show up in it.
|
|
76
|
+
const refs = logAttachments(invocation.agent.session.snapshotEvents());
|
|
77
|
+
const answer = await ctx.tui.prompt({
|
|
78
|
+
title: 'Attachments',
|
|
79
|
+
question: ctx.tui.stageFileAttachment === undefined ? 'Choose a stored attachment' : 'Choose a stored attachment, or add a file',
|
|
80
|
+
presentation: 'card', filterable: true, allowCustom: false, signal: invocation.signal,
|
|
89
81
|
notify: false,
|
|
90
|
-
options:
|
|
82
|
+
options: [
|
|
83
|
+
...(ctx.tui.stageFileAttachment === undefined
|
|
84
|
+
? []
|
|
85
|
+
: [{ label: 'Add a file', value: ADD_CANDIDATE_PREFIX, description: 'Attach a new file from disk without sending it' }]),
|
|
86
|
+
...refs.map((ref, index) => ({ label: ref.name ?? String(ref.attachmentId), value: String(index), description: `${ref.bytes.toLocaleString()} bytes · ${'mediaType' in ref ? ref.mediaType : 'file'}` })),
|
|
87
|
+
],
|
|
88
|
+
});
|
|
91
89
|
if (answer === null)
|
|
92
90
|
break;
|
|
91
|
+
if (answer === ADD_CANDIDATE_PREFIX && ctx.tui.stageFileAttachment !== undefined) {
|
|
92
|
+
const staged = await stageAttachment(ctx, invocation, await ctx.tui.prompt(askPrompt({ title: 'Attach file', question: 'Path to the file', signal: invocation.signal })) ?? '');
|
|
93
|
+
if (staged.kind === 'error')
|
|
94
|
+
return staged;
|
|
95
|
+
// The list the reader just left is now stale; reopen it with the new row.
|
|
96
|
+
continue;
|
|
97
|
+
}
|
|
93
98
|
const ref = refs[Number(answer)];
|
|
94
99
|
if (ref === undefined)
|
|
95
100
|
continue;
|
|
@@ -129,9 +134,12 @@ export function apply(ctx) {
|
|
|
129
134
|
}
|
|
130
135
|
};
|
|
131
136
|
registerCommands(ctx, [
|
|
132
|
-
{
|
|
133
|
-
|
|
134
|
-
|
|
137
|
+
{
|
|
138
|
+
name: 'attach',
|
|
139
|
+
description: 'Attach a file to the composer, or review what this session already attached',
|
|
140
|
+
input: { hint: '[path]' },
|
|
141
|
+
handler: safe(attachFile),
|
|
142
|
+
},
|
|
135
143
|
], 'omdsh file interaction');
|
|
136
144
|
}
|
|
137
145
|
//# sourceMappingURL=files.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"files.js","sourceRoot":"","sources":["../../src/commands/files.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"files.js","sourceRoot":"","sources":["../../src/commands/files.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAC1C,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CA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B,CAAC,GAAG,EAAE;QACpB;YACE,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,6EAA6E;YAC1F,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YACzB,OAAO,EAAE,IAAI,CAAC,UAAU,CAAC;SAC1B;KACF,EAAE,wBAAwB,CAAC,CAAA;AAC9B,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** Integration discovery commands registered through dsh-commands. */
|
|
2
2
|
import { registerCommands } from "./registration.js";
|
|
3
3
|
export const name = 'omdsh-command-integrations';
|
|
4
|
-
export const inject = ['commands'];
|
|
4
|
+
export const inject = ['commands', 'tui'];
|
|
5
5
|
function compactDescription(value, maxLength = 140) {
|
|
6
6
|
const normalized = value.replace(/\s+/gu, ' ').trim();
|
|
7
7
|
return normalized.length <= maxLength ? normalized : normalized.slice(0, maxLength - 1).trimEnd() + '…';
|
|
@@ -18,11 +18,11 @@ export function mcpCatalogText(tools) {
|
|
|
18
18
|
servers.set(match[1], rows);
|
|
19
19
|
}
|
|
20
20
|
if (servers.size === 0) {
|
|
21
|
-
return 'No MCP tools are
|
|
21
|
+
return 'No MCP tools are available to this session. This does not establish whether a server is connected.';
|
|
22
22
|
}
|
|
23
23
|
const total = [...servers.values()].reduce((count, rows) => count + rows.length, 0);
|
|
24
24
|
return [
|
|
25
|
-
`MCP
|
|
25
|
+
`MCP Tools · ${servers.size} server${servers.size === 1 ? '' : 's'} represented · ${total} tool${total === 1 ? '' : 's'}`,
|
|
26
26
|
...[...servers].flatMap(([server, rows]) => [
|
|
27
27
|
'',
|
|
28
28
|
`**${server} · ${rows.length} tool${rows.length === 1 ? '' : 's'}**`,
|
|
@@ -32,18 +32,30 @@ export function mcpCatalogText(tools) {
|
|
|
32
32
|
]),
|
|
33
33
|
].join('\n');
|
|
34
34
|
}
|
|
35
|
-
function showMcp(ctx, invocation) {
|
|
35
|
+
async function showMcp(ctx, invocation) {
|
|
36
36
|
if (invocation.rawInput.trim() !== '')
|
|
37
37
|
return { kind: 'error', text: 'Usage: /mcp' };
|
|
38
38
|
const tools = ctx.get('tools')?.schemas(invocation.agent).map(schema => ({
|
|
39
39
|
name: schema.name,
|
|
40
40
|
description: schema.description,
|
|
41
41
|
})) ?? [];
|
|
42
|
-
|
|
42
|
+
const manager = ctx.get('pluginManager');
|
|
43
|
+
const entries = manager === undefined ? undefined : (await manager.listPlugins()).filter(entry => entry.moduleName === '@deepseek-ai/dsh-mcp-client');
|
|
44
|
+
invocation.signal.throwIfAborted();
|
|
45
|
+
const text = [
|
|
46
|
+
'## MCP',
|
|
47
|
+
'Configure project servers in `.dsh/mcp.json` or home servers in `~/.dsh/mcp.json`, then restart omdsh.',
|
|
48
|
+
'', '### Plugin registration',
|
|
49
|
+
...(entries === undefined ? ['Registration status is unavailable in this host.'] : entries.length === 0 ? ['No MCP client entries are registered.'] : entries.map(entry => `- \`${entry.entryId}\` · ${entry.enabled ? entry.fiberPhase ?? 'not mounted' : 'disabled'}`)),
|
|
50
|
+
'',
|
|
51
|
+
'Plugin registration and tool availability do not verify transport health or authentication.',
|
|
52
|
+
'', mcpCatalogText(tools),
|
|
53
|
+
].join('\n');
|
|
54
|
+
return { kind: 'success', text };
|
|
43
55
|
}
|
|
44
56
|
export function apply(ctx) {
|
|
45
57
|
registerCommands(ctx, [
|
|
46
|
-
{ name: 'mcp', description: '
|
|
58
|
+
{ name: 'mcp', description: 'Inspect MCP registration and available tools', handler: invocation => showMcp(ctx, invocation) },
|
|
47
59
|
], 'omdsh integration commands');
|
|
48
60
|
}
|
|
49
61
|
//# sourceMappingURL=integrations.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integrations.js","sourceRoot":"","sources":["../../src/commands/integrations.ts"],"names":[],"mappings":"AAAA,sEAAsE;
|
|
1
|
+
{"version":3,"file":"integrations.js","sourceRoot":"","sources":["../../src/commands/integrations.ts"],"names":[],"mappings":"AAAA,sEAAsE;AAMtE,OAAO,EAAE,gBAAgB,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;QACpB,EAAE,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE,8CAA8C,EAAE,OAAO,EAAE,UAAU,CAAC,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,UAAU,CAAC,EAAE;KAC9H,EAAE,4BAA4B,CAAC,CAAA;AAClC,CAAC"}
|
package/lib/commands/jobs.d.ts
CHANGED
|
@@ -1,14 +1,29 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Human-facing background-job surface over the Harness job registry.
|
|
3
|
-
* `/jobs` lists this session's jobs
|
|
4
|
-
*
|
|
5
|
-
*
|
|
3
|
+
* `/jobs` lists this session's jobs, `/jobs <id>` replays one run's observer-only
|
|
4
|
+
* narration, and `/jobs kill <id>` requests cancellation.
|
|
5
|
+
*
|
|
6
|
+
* Reading `stdout` and `stderr` stays with the model: those channels feed the
|
|
7
|
+
* registry's consuming cursor, so a human read would steal the model's next
|
|
8
|
+
* `job_output`. The `log` channel is the opposite — the Harness marks it as
|
|
9
|
+
* producer narration that only observers see, which is why a workflow's phase
|
|
10
|
+
* lines can be replayed here without taking anything from the model.
|
|
11
|
+
*
|
|
6
12
|
* @module @agi-fans/dsh-tui/command-jobs
|
|
7
13
|
*/
|
|
8
14
|
import type { Context } from '@deepseek-ai/cordis';
|
|
9
|
-
import { type JobView } from '@deepseek-ai/dsh-jobs';
|
|
15
|
+
import { type JobOutputRead, type JobView } from '@deepseek-ai/dsh-jobs';
|
|
10
16
|
export declare const name = "omdsh-command-jobs";
|
|
11
17
|
export declare const inject: string[];
|
|
12
18
|
/** Markdown panel for `/jobs`; `now` is injected so the rendering stays pure. */
|
|
13
19
|
export declare function jobsText(jobs: readonly JobView[], now: number): string;
|
|
20
|
+
/**
|
|
21
|
+
* The observer-only narration of one run, newest last.
|
|
22
|
+
*
|
|
23
|
+
* `readAt` from zero reads retained bytes at absolute offsets without moving the
|
|
24
|
+
* model's cursor; only `log` chunks are printed, because `stdout` and `stderr`
|
|
25
|
+
* belong to the model's own read. A lossy read says so rather than pretending the
|
|
26
|
+
* run started where retention begins.
|
|
27
|
+
*/
|
|
28
|
+
export declare function runText(snapshot: JobView, read: JobOutputRead, now: number): string;
|
|
14
29
|
export declare function apply(ctx: Context): void;
|
package/lib/commands/jobs.js
CHANGED
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Human-facing background-job surface over the Harness job registry.
|
|
3
|
-
* `/jobs` lists this session's jobs
|
|
4
|
-
*
|
|
5
|
-
*
|
|
3
|
+
* `/jobs` lists this session's jobs, `/jobs <id>` replays one run's observer-only
|
|
4
|
+
* narration, and `/jobs kill <id>` requests cancellation.
|
|
5
|
+
*
|
|
6
|
+
* Reading `stdout` and `stderr` stays with the model: those channels feed the
|
|
7
|
+
* registry's consuming cursor, so a human read would steal the model's next
|
|
8
|
+
* `job_output`. The `log` channel is the opposite — the Harness marks it as
|
|
9
|
+
* producer narration that only observers see, which is why a workflow's phase
|
|
10
|
+
* lines can be replayed here without taking anything from the model.
|
|
11
|
+
*
|
|
6
12
|
* @module @agi-fans/dsh-tui/command-jobs
|
|
7
13
|
*/
|
|
8
14
|
import { JobId } from '@deepseek-ai/dsh-jobs';
|
|
@@ -37,7 +43,7 @@ export function jobsText(jobs, now) {
|
|
|
37
43
|
'|---|---|---|',
|
|
38
44
|
...jobs.map(job => `| \`${job.id}\` | ${statusCell(job, now)} | ${(job.label || '—').replace(/\|/gu, '\\|')} |`),
|
|
39
45
|
'',
|
|
40
|
-
'`/jobs kill <id>` stops a running job.',
|
|
46
|
+
'`/jobs <id>` replays a run\'s narration. `/jobs kill <id>` stops a running job.',
|
|
41
47
|
].join('\n');
|
|
42
48
|
}
|
|
43
49
|
function killJob(ctx, invocation) {
|
|
@@ -55,6 +61,41 @@ function killJob(ctx, invocation) {
|
|
|
55
61
|
return { kind: 'error', text: error instanceof Error ? error.message : String(error) };
|
|
56
62
|
}
|
|
57
63
|
}
|
|
64
|
+
/**
|
|
65
|
+
* The observer-only narration of one run, newest last.
|
|
66
|
+
*
|
|
67
|
+
* `readAt` from zero reads retained bytes at absolute offsets without moving the
|
|
68
|
+
* model's cursor; only `log` chunks are printed, because `stdout` and `stderr`
|
|
69
|
+
* belong to the model's own read. A lossy read says so rather than pretending the
|
|
70
|
+
* run started where retention begins.
|
|
71
|
+
*/
|
|
72
|
+
export function runText(snapshot, read, now) {
|
|
73
|
+
const narration = read.chunks.filter(chunk => chunk.channel === 'log');
|
|
74
|
+
const header = `${snapshot.label || snapshot.kind} · ${statusCell(snapshot, now)}`;
|
|
75
|
+
if (narration.length === 0) {
|
|
76
|
+
return [header, '', read.chunks.length === 0
|
|
77
|
+
? 'This run has not narrated anything yet.'
|
|
78
|
+
: 'This run only wrote model-facing output, which stays with the model.'].join('\n');
|
|
79
|
+
}
|
|
80
|
+
return [
|
|
81
|
+
header,
|
|
82
|
+
'',
|
|
83
|
+
...(read.lossy ? ['Earlier narration is no longer retained.', ''] : []),
|
|
84
|
+
...narration.map(chunk => (chunk.gapBefore === true ? '…\n' : '') + chunk.text.replace(/\n$/u, '')),
|
|
85
|
+
].join('\n');
|
|
86
|
+
}
|
|
87
|
+
function showRun(ctx, invocation, id) {
|
|
88
|
+
const sessionId = invocation.agent.session.id;
|
|
89
|
+
const snapshot = ctx.jobs.list(sessionId).find(job => String(job.id) === id);
|
|
90
|
+
if (snapshot === undefined)
|
|
91
|
+
return { kind: 'error', text: `No job ${id} in this session.` };
|
|
92
|
+
try {
|
|
93
|
+
return { kind: 'success', text: runText(snapshot, ctx.jobs.readAt(JobId(id), 0, sessionId), Date.now()) };
|
|
94
|
+
}
|
|
95
|
+
catch (error) {
|
|
96
|
+
return { kind: 'error', text: error instanceof Error ? error.message : String(error) };
|
|
97
|
+
}
|
|
98
|
+
}
|
|
58
99
|
function showJobs(ctx, invocation) {
|
|
59
100
|
const raw = invocation.rawInput.trim();
|
|
60
101
|
if (raw === '') {
|
|
@@ -67,14 +108,16 @@ function showJobs(ctx, invocation) {
|
|
|
67
108
|
return { kind: 'error', text: 'Usage: /jobs kill <id>' };
|
|
68
109
|
return killJob(ctx, { ...invocation, rawInput: id });
|
|
69
110
|
}
|
|
70
|
-
|
|
111
|
+
if (rest.length === 0)
|
|
112
|
+
return showRun(ctx, invocation, verb);
|
|
113
|
+
return { kind: 'error', text: 'Usage: /jobs [<id>|kill <id>]' };
|
|
71
114
|
}
|
|
72
115
|
export function apply(ctx) {
|
|
73
116
|
registerCommands(ctx, [
|
|
74
117
|
{
|
|
75
118
|
name: 'jobs',
|
|
76
|
-
description: 'List background jobs or stop one',
|
|
77
|
-
input: { hint: '[kill <id>]' },
|
|
119
|
+
description: 'List background jobs, replay one run, or stop one',
|
|
120
|
+
input: { hint: '[<id>|kill <id>]' },
|
|
78
121
|
handler: invocation => showJobs(ctx, invocation),
|
|
79
122
|
},
|
|
80
123
|
], 'omdsh jobs command');
|
package/lib/commands/jobs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jobs.js","sourceRoot":"","sources":["../../src/commands/jobs.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"jobs.js","sourceRoot":"","sources":["../../src/commands/jobs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAIH,OAAO,EAAE,KAAK,EAAoC,MAAM,uBAAuB,CAAA;AAC/E,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AAEpD,MAAM,CAAC,MAAM,IAAI,GAAG,oBAAoB,CAAA;AACxC,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,UAAU,EAAE,MAAM,CAAC,CAAA;AAE1C,SAAS,OAAO,CAAC,QAAiB,EAAE,GAAW;IAC7C,MAAM,GAAG,GAAG,QAAQ,CAAC,UAAU,IAAI,GAAG,CAAA;IACtC,OAAO,cAAc,CAAC,IAAI,CAAC,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