@pellux/goodvibes-agent 1.5.5 → 1.5.6
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/CHANGELOG.md +9 -0
- package/README.md +1 -1
- package/dist/package/main.js +94130 -79335
- package/docs/tools-and-commands.md +2 -1
- package/package.json +6 -3
- package/src/agent/autonomy-schedule-format.ts +1 -1
- package/src/agent/autonomy-schedule.ts +3 -3
- package/src/agent/calendar/calendar-oauth-service.ts +324 -0
- package/src/agent/calendar-subscription-registry.ts +497 -0
- package/src/agent/email/email-service.ts +57 -0
- package/src/agent/email/smtp-client.ts +30 -10
- package/src/agent/memory-prompt.ts +143 -12
- package/src/agent/operator-actions.ts +26 -22
- package/src/agent/prompt-context-receipts.ts +45 -18
- package/src/agent/reminder-schedule-format.ts +1 -1
- package/src/agent/reminder-schedule.ts +3 -3
- package/src/agent/routine-schedule-format.ts +2 -2
- package/src/agent/routine-schedule-promotion.ts +5 -5
- package/src/agent/routine-schedule-receipts.ts +2 -2
- package/src/agent/schedule-edit-format.ts +1 -1
- package/src/agent/schedule-edit.ts +5 -5
- package/src/agent/session-registration.ts +281 -0
- package/src/agent/vibe-file.ts +50 -0
- package/src/cli/local-library-command-shared.ts +146 -0
- package/src/cli/management.ts +2 -1
- package/src/cli/personas-command.ts +252 -0
- package/src/cli/resume-relaunch-notice.ts +151 -0
- package/src/cli/routines-command.ts +25 -2
- package/src/cli/service-posture.ts +3 -2
- package/src/cli/skill-bundle-command.ts +175 -0
- package/src/cli/skills-command.ts +309 -0
- package/src/cli/status.ts +43 -7
- package/src/cli/tui-startup.ts +24 -1
- package/src/config/agent-settings-policy.ts +0 -1
- package/src/config/secret-config.ts +4 -0
- package/src/core/conversation-rendering.ts +20 -11
- package/src/core/focus-tracker.ts +41 -0
- package/src/core/system-message-noise.ts +108 -0
- package/src/core/system-message-router.ts +54 -1
- package/src/core/thinking-overlay.ts +83 -0
- package/src/input/agent-workspace-access-command-editor-submission.ts +75 -108
- package/src/input/agent-workspace-access-command-editors.ts +108 -128
- package/src/input/agent-workspace-activation.ts +15 -0
- package/src/input/agent-workspace-basic-command-editor-submission.ts +292 -513
- package/src/input/agent-workspace-basic-command-editors.ts +433 -564
- package/src/input/agent-workspace-calendar-connect-editor.ts +116 -0
- package/src/input/agent-workspace-calendar-oauth-editor.ts +152 -0
- package/src/input/agent-workspace-calendar-subscribe-editor.ts +128 -0
- package/src/input/agent-workspace-categories.ts +7 -2
- package/src/input/agent-workspace-channel-command-editor-submission.ts +38 -52
- package/src/input/agent-workspace-channel-command-editors.ts +42 -46
- package/src/input/agent-workspace-command-editor-engine.ts +133 -0
- package/src/input/agent-workspace-command-editor.ts +4 -0
- package/src/input/agent-workspace-direct-editor-submission.ts +59 -0
- package/src/input/agent-workspace-email-connect-editor.ts +162 -0
- package/src/input/agent-workspace-knowledge-command-editor-submission.ts +52 -81
- package/src/input/agent-workspace-knowledge-command-editors.ts +71 -71
- package/src/input/agent-workspace-library-command-editor-submission.ts +10 -28
- package/src/input/agent-workspace-library-command-editors.ts +16 -2
- package/src/input/agent-workspace-live-counters.ts +55 -0
- package/src/input/agent-workspace-mcp-command-editor-submission.ts +60 -82
- package/src/input/agent-workspace-mcp-command-editors.ts +52 -0
- package/src/input/agent-workspace-media-command-editor-submission.ts +12 -39
- package/src/input/agent-workspace-media-command-editors.ts +10 -8
- package/src/input/agent-workspace-memory-command-editor-submission.ts +76 -151
- package/src/input/agent-workspace-memory-command-editors.ts +116 -141
- package/src/input/agent-workspace-operations-command-editor-submission.ts +131 -184
- package/src/input/agent-workspace-operations-command-editors.ts +150 -162
- package/src/input/agent-workspace-provider-command-editor-submission.ts +60 -106
- package/src/input/agent-workspace-provider-command-editors.ts +58 -68
- package/src/input/agent-workspace-search.ts +8 -1
- package/src/input/agent-workspace-session-command-editor-submission.ts +104 -132
- package/src/input/agent-workspace-session-command-editors.ts +160 -195
- package/src/input/agent-workspace-settings.ts +40 -1
- package/src/input/agent-workspace-skill-bundle-command-editor-submission.ts +55 -71
- package/src/input/agent-workspace-skill-bundle-command-editors.ts +65 -69
- package/src/input/agent-workspace-snapshot-builders.ts +431 -0
- package/src/input/agent-workspace-snapshot-config.ts +43 -0
- package/src/input/agent-workspace-snapshot.ts +198 -432
- package/src/input/agent-workspace-task-command-editor-submission.ts +34 -44
- package/src/input/agent-workspace-task-command-editors.ts +27 -28
- package/src/input/agent-workspace-types.ts +35 -1
- package/src/input/agent-workspace.ts +5 -14
- package/src/input/command-registry.ts +23 -1
- package/src/input/commands/calendar-connect-runtime.ts +226 -0
- package/src/input/commands/calendar-runtime.ts +110 -7
- package/src/input/commands/calendar-subscription-runtime.ts +225 -0
- package/src/input/commands/email-runtime.ts +100 -40
- package/src/input/commands/knowledge.ts +1 -1
- package/src/input/commands/network-scan-runtime.ts +75 -0
- package/src/input/commands/operator-actions-runtime.ts +9 -6
- package/src/input/commands/personas-runtime.ts +1 -1
- package/src/input/commands/schedule-runtime.ts +4 -4
- package/src/input/commands/session-content.ts +13 -1
- package/src/input/commands/session-workflow.ts +15 -20
- package/src/input/commands/session.ts +3 -1
- package/src/input/commands/shell-core.ts +20 -6
- package/src/input/commands.ts +2 -2
- package/src/input/delete-key-policy.ts +46 -0
- package/src/input/feed-context-factory.ts +10 -0
- package/src/input/handler-feed.ts +87 -0
- package/src/input/handler-modal-routes.ts +6 -1
- package/src/input/handler.ts +5 -0
- package/src/input/panel-paste-flood-guard.ts +94 -0
- package/src/input/settings-modal-types.ts +5 -3
- package/src/input/settings-modal.ts +21 -0
- package/src/main.ts +36 -36
- package/src/permissions/approval-posture.ts +141 -0
- package/src/renderer/agent-workspace-context-lines.ts +10 -2
- package/src/renderer/compositor.ts +27 -4
- package/src/renderer/diff.ts +61 -18
- package/src/renderer/fullscreen-primitives.ts +37 -18
- package/src/renderer/markdown.ts +20 -10
- package/src/renderer/modal-factory.ts +25 -15
- package/src/renderer/overlay-box.ts +23 -12
- package/src/renderer/process-indicator.ts +8 -3
- package/src/renderer/prompt-content-width.ts +16 -0
- package/src/renderer/settings-modal-helpers.ts +2 -0
- package/src/renderer/settings-modal.ts +2 -0
- package/src/renderer/startup-theme-probe.ts +35 -0
- package/src/renderer/status-glyphs.ts +11 -15
- package/src/renderer/system-message.ts +17 -2
- package/src/renderer/term-caps.ts +318 -0
- package/src/renderer/terminal-bg-probe.ts +373 -0
- package/src/renderer/terminal-escapes.ts +24 -0
- package/src/renderer/theme-mode-config.ts +87 -0
- package/src/renderer/theme.ts +241 -0
- package/src/renderer/thinking.ts +12 -3
- package/src/renderer/tool-call.ts +7 -3
- package/src/renderer/ui-factory.ts +92 -36
- package/src/renderer/ui-primitives.ts +33 -93
- package/src/runtime/bootstrap-core.ts +15 -0
- package/src/runtime/bootstrap-hook-bridge.ts +6 -0
- package/src/runtime/bootstrap-shell.ts +2 -0
- package/src/runtime/bootstrap.ts +68 -5
- package/src/runtime/calendar-boot-refresh.ts +105 -0
- package/src/runtime/lan-scan-consent.ts +253 -0
- package/src/runtime/services.ts +127 -2
- package/src/runtime/session-spine-rest-transport.ts +160 -0
- package/src/runtime/terminal-output-guard.ts +6 -1
- package/src/runtime/ui-services.ts +3 -0
- package/src/shell/agent-workspace-fullscreen.ts +5 -0
- package/src/shell/terminal-focus-mode.ts +120 -0
- package/src/shell/ui-openers.ts +13 -4
- package/src/tools/agent-harness-autonomy-intake.ts +5 -5
- package/src/tools/agent-harness-autonomy-queue.ts +1 -1
- package/src/tools/agent-harness-background-processes.ts +2 -1
- package/src/tools/agent-harness-metadata.ts +16 -8
- package/src/tools/agent-harness-operator-methods.ts +44 -8
- package/src/tools/agent-harness-personal-ops-discovery.ts +57 -10
- package/src/tools/agent-harness-personal-ops-lanes.ts +17 -5
- package/src/tools/agent-harness-personal-ops-operations.ts +7 -7
- package/src/tools/agent-harness-personal-ops-types.ts +6 -0
- package/src/tools/agent-harness-prompt-context.ts +26 -12
- package/src/tools/agent-harness-workspace-actions.ts +4 -0
- package/src/tools/agent-local-registry-args.ts +117 -0
- package/src/tools/agent-local-registry-memory.ts +227 -0
- package/src/tools/agent-local-registry-tool.ts +19 -237
- package/src/tools/agent-operator-briefing-tool.ts +2 -2
- package/src/tools/agent-operator-method-tool.ts +13 -0
- package/src/tools/agent-policy-explanation.ts +39 -4
- package/src/tools/agent-schedule-tool.ts +5 -5
- package/src/utils/terminal-width.ts +98 -1
- package/src/version.ts +1 -1
- package/src/cli/local-library-command.ts +0 -825
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import type { AgentWorkspaceEditorKind, AgentWorkspaceLocalEditor } from './agent-workspace-types.ts';
|
|
2
|
+
import type { AgentWorkspaceEditorSpecEntry } from './agent-workspace-command-editor-engine.ts';
|
|
3
|
+
import { createAgentWorkspaceEditorFromTable } from './agent-workspace-command-editor-engine.ts';
|
|
2
4
|
|
|
3
5
|
export type AgentWorkspaceProviderCommandEditorKind = Extract<
|
|
4
6
|
AgentWorkspaceEditorKind,
|
|
@@ -14,73 +16,57 @@ export function isAgentWorkspaceProviderCommandEditorKind(kind: AgentWorkspaceEd
|
|
|
14
16
|
|| kind === 'provider-account-repair';
|
|
15
17
|
}
|
|
16
18
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
return {
|
|
69
|
-
kind,
|
|
70
|
-
mode: 'create',
|
|
71
|
-
title: 'Add Custom Provider',
|
|
72
|
-
selectedFieldIndex: 0,
|
|
73
|
-
message: 'Add an OpenAI-compatible provider for Agent chat/model routing. Type yes on the final field to confirm.',
|
|
74
|
-
fields: [
|
|
75
|
-
{ id: 'name', label: 'Provider name', value: '', required: true, multiline: false, hint: 'Letters, numbers, hyphens, and underscores only.' },
|
|
76
|
-
{ id: 'baseUrl', label: 'Base URL', value: '', required: true, multiline: false, hint: 'OpenAI-compatible base URL, such as http://127.0.0.1:8000/v1.' },
|
|
77
|
-
{ id: 'apiKey', label: 'API key', value: '', required: false, multiline: false, hint: 'Optional API key. Prefer a local provider or a secret-backed provider config when possible.', redact: true },
|
|
78
|
-
{ id: 'confirm', label: 'Confirm', value: '', required: true, multiline: false, hint: 'Type yes to run /provider add with --yes.' },
|
|
79
|
-
],
|
|
80
|
-
};
|
|
81
|
-
}
|
|
82
|
-
return {
|
|
83
|
-
kind,
|
|
19
|
+
const PROVIDER_COMMAND_EDITOR_SPECS: Readonly<Record<AgentWorkspaceProviderCommandEditorKind, AgentWorkspaceEditorSpecEntry<AgentWorkspaceProviderCommandEditorKind>>> = {
|
|
20
|
+
'provider-use': {
|
|
21
|
+
mode: 'create',
|
|
22
|
+
title: 'Use Provider',
|
|
23
|
+
selectedFieldIndex: 0,
|
|
24
|
+
message: 'Switch the Agent chat provider through the TUI command router. Add a model id when you want an exact provider/model route.',
|
|
25
|
+
fields: [
|
|
26
|
+
{ id: 'provider', label: 'Provider id', value: '', required: true, multiline: false, hint: 'Provider row id, such as openai-subscriber, openai, anthropic, or a custom provider.' },
|
|
27
|
+
{ id: 'model', label: 'Model id', value: '', required: false, multiline: false, hint: 'Optional model id or provider:model registry key. Blank uses the provider default selectable model.' },
|
|
28
|
+
],
|
|
29
|
+
},
|
|
30
|
+
'provider-inspect': {
|
|
31
|
+
mode: 'create',
|
|
32
|
+
title: 'Inspect Provider',
|
|
33
|
+
selectedFieldIndex: 0,
|
|
34
|
+
message: 'Inspect provider auth and setup routes from the Agent TUI without changing provider selection.',
|
|
35
|
+
fields: [
|
|
36
|
+
{ id: 'provider', label: 'Provider id', value: '', required: true, multiline: false, hint: 'Provider row id to inspect.' },
|
|
37
|
+
],
|
|
38
|
+
},
|
|
39
|
+
'provider-routes': {
|
|
40
|
+
mode: 'create',
|
|
41
|
+
title: 'Inspect Provider Routes',
|
|
42
|
+
selectedFieldIndex: 0,
|
|
43
|
+
message: 'Inspect provider account routes from the Agent TUI without changing routing or auth.',
|
|
44
|
+
fields: [
|
|
45
|
+
{ id: 'provider', label: 'Provider id', value: '', required: true, multiline: false, hint: 'Provider row id to inspect.' },
|
|
46
|
+
],
|
|
47
|
+
},
|
|
48
|
+
'provider-account-repair': {
|
|
49
|
+
mode: 'create',
|
|
50
|
+
title: 'Review Provider Account Repair',
|
|
51
|
+
selectedFieldIndex: 0,
|
|
52
|
+
message: 'Show provider account repair guidance from the Agent TUI without starting login or storing tokens.',
|
|
53
|
+
fields: [
|
|
54
|
+
{ id: 'provider', label: 'Provider id', value: '', required: true, multiline: false, hint: 'Provider row id to inspect.' },
|
|
55
|
+
],
|
|
56
|
+
},
|
|
57
|
+
'provider-add': {
|
|
58
|
+
mode: 'create',
|
|
59
|
+
title: 'Add Custom Provider',
|
|
60
|
+
selectedFieldIndex: 0,
|
|
61
|
+
message: 'Add an OpenAI-compatible provider for Agent chat/model routing. Type yes on the final field to confirm.',
|
|
62
|
+
fields: [
|
|
63
|
+
{ id: 'name', label: 'Provider name', value: '', required: true, multiline: false, hint: 'Letters, numbers, hyphens, and underscores only.' },
|
|
64
|
+
{ id: 'baseUrl', label: 'Base URL', value: '', required: true, multiline: false, hint: 'OpenAI-compatible base URL, such as http://127.0.0.1:8000/v1.' },
|
|
65
|
+
{ id: 'apiKey', label: 'API key', value: '', required: false, multiline: false, hint: 'Optional API key. Prefer a local provider or a secret-backed provider config when possible.', redact: true },
|
|
66
|
+
{ id: 'confirm', label: 'Confirm', value: '', required: true, multiline: false, hint: 'Type yes to run /provider add with --yes.' },
|
|
67
|
+
],
|
|
68
|
+
},
|
|
69
|
+
'provider-remove': {
|
|
84
70
|
mode: 'delete',
|
|
85
71
|
title: 'Remove Custom Provider',
|
|
86
72
|
selectedFieldIndex: 0,
|
|
@@ -89,5 +75,9 @@ export function createAgentWorkspaceProviderCommandEditor(kind: AgentWorkspacePr
|
|
|
89
75
|
{ id: 'name', label: 'Provider name', value: '', required: true, multiline: false, hint: 'Existing custom provider name.' },
|
|
90
76
|
{ id: 'confirm', label: 'Confirm', value: '', required: true, multiline: false, hint: 'Type yes to run /provider remove with --yes.' },
|
|
91
77
|
],
|
|
92
|
-
}
|
|
78
|
+
},
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
export function createAgentWorkspaceProviderCommandEditor(kind: AgentWorkspaceProviderCommandEditorKind): AgentWorkspaceLocalEditor {
|
|
82
|
+
return createAgentWorkspaceEditorFromTable(kind, PROVIDER_COMMAND_EDITOR_SPECS);
|
|
93
83
|
}
|
|
@@ -136,7 +136,14 @@ export function clearAgentWorkspaceActionSearch(host: AgentWorkspaceSearchHost):
|
|
|
136
136
|
if (!host.actionSearchActive) return;
|
|
137
137
|
host.actionSearchActive = false;
|
|
138
138
|
host.actionSearchQuery = '';
|
|
139
|
-
|
|
139
|
+
// selectedActionIndex was an index into the SEARCH RESULTS, which can span
|
|
140
|
+
// every category. Reinterpreting that number as an index into the
|
|
141
|
+
// originating category's own (unrelated) action list silently highlights
|
|
142
|
+
// an arbitrary, wrong action — the highlight desyncs from what the user
|
|
143
|
+
// was just looking at. There is no principled position to preserve across
|
|
144
|
+
// an arbitrary category switch, so return to the top of the list, same as
|
|
145
|
+
// beginning/typing/backspacing a search already does.
|
|
146
|
+
host.selectedActionIndex = 0;
|
|
140
147
|
host.status = 'Action search cleared.';
|
|
141
148
|
host.clampSelection();
|
|
142
149
|
}
|
|
@@ -1,199 +1,171 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { AgentWorkspaceLocalEditor } from './agent-workspace-types.ts';
|
|
2
2
|
import type { AgentWorkspaceSessionCommandEditorKind } from './agent-workspace-session-command-editors.ts';
|
|
3
3
|
import { isAgentWorkspaceSessionCommandEditorKind } from './agent-workspace-session-command-editors.ts';
|
|
4
4
|
import { quoteSlashCommandArg } from './slash-command-parser.ts';
|
|
5
|
+
import type { AgentWorkspaceCommandEditorSubmission, AgentWorkspaceCommandSubmissionHandler, AgentWorkspaceFieldReader } from './agent-workspace-command-editor-engine.ts';
|
|
6
|
+
import { buildCommandEditorSubmissionFromTable, dispatchCommandEditorSubmission, editorMessageSubmission, isAffirmative } from './agent-workspace-command-editor-engine.ts';
|
|
5
7
|
|
|
6
|
-
type
|
|
7
|
-
|
|
8
|
-
export type AgentWorkspaceSessionCommandEditorSubmission =
|
|
9
|
-
| {
|
|
10
|
-
readonly kind: 'editor';
|
|
11
|
-
readonly editor: AgentWorkspaceLocalEditor;
|
|
12
|
-
readonly status: string;
|
|
13
|
-
readonly actionResult?: AgentWorkspaceActionResult;
|
|
14
|
-
}
|
|
15
|
-
| {
|
|
16
|
-
readonly kind: 'dispatch';
|
|
17
|
-
readonly command: string;
|
|
18
|
-
readonly status: string;
|
|
19
|
-
readonly actionResult: AgentWorkspaceActionResult;
|
|
20
|
-
};
|
|
8
|
+
export type AgentWorkspaceSessionCommandEditorSubmission = AgentWorkspaceCommandEditorSubmission;
|
|
21
9
|
|
|
22
10
|
export function isAgentWorkspaceSessionCommandSubmissionKind(kind: string): kind is AgentWorkspaceSessionCommandEditorKind {
|
|
23
11
|
return isAgentWorkspaceSessionCommandEditorKind(kind as AgentWorkspaceSessionCommandEditorKind);
|
|
24
12
|
}
|
|
25
13
|
|
|
26
|
-
function
|
|
27
|
-
return
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
function unconfirmed(editor: AgentWorkspaceLocalEditor, message: string): AgentWorkspaceSessionCommandEditorSubmission {
|
|
31
|
-
return {
|
|
32
|
-
kind: 'editor',
|
|
33
|
-
editor: { ...editor, message },
|
|
34
|
-
status: message,
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
function dispatch(command: string, title: string, detail: string, safety: AgentWorkspaceActionResult['safety']): AgentWorkspaceSessionCommandEditorSubmission {
|
|
39
|
-
return {
|
|
40
|
-
kind: 'dispatch',
|
|
41
|
-
command,
|
|
42
|
-
status: `${title}.`,
|
|
43
|
-
actionResult: { kind: 'dispatched', title, detail, command, safety },
|
|
44
|
-
};
|
|
14
|
+
function unconfirmed(editor: AgentWorkspaceLocalEditor, message: string): AgentWorkspaceCommandEditorSubmission {
|
|
15
|
+
return editorMessageSubmission(editor, message);
|
|
45
16
|
}
|
|
46
17
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
readField: AgentWorkspaceFieldReader,
|
|
50
|
-
): AgentWorkspaceSessionCommandEditorSubmission {
|
|
51
|
-
if (editor.kind === 'conversation-export') {
|
|
18
|
+
const SESSION_COMMAND_SUBMISSION_HANDLERS: Readonly<Record<AgentWorkspaceSessionCommandEditorKind, AgentWorkspaceCommandSubmissionHandler>> = {
|
|
19
|
+
'conversation-export': (editor, readField) => {
|
|
52
20
|
if (!isAffirmative(readField('confirm'))) return unconfirmed(editor, 'Conversation export not confirmed. Type yes, then press Enter.');
|
|
53
|
-
return
|
|
21
|
+
return dispatchCommandEditorSubmission(
|
|
54
22
|
`/export ${quoteSlashCommandArg(readField('format'))} ${quoteSlashCommandArg(readField('path'))} --yes`,
|
|
55
23
|
'Opening conversation export',
|
|
56
24
|
'The workspace handed a confirmed conversation export command to the shell-owned command router.',
|
|
57
25
|
'safe',
|
|
58
26
|
);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
const command = eventKind.length > 0
|
|
64
|
-
? `/conversation ${subcommand} ${quoteSlashCommandArg(eventKind)}`
|
|
65
|
-
: `/conversation ${subcommand}`;
|
|
66
|
-
return dispatch(
|
|
67
|
-
command,
|
|
68
|
-
editor.kind === 'conversation-groups' ? 'Opening transcript groups' : 'Opening transcript events',
|
|
69
|
-
'The workspace handed read-only transcript structure inspection to the shell-owned command router.',
|
|
70
|
-
'read-only',
|
|
71
|
-
);
|
|
72
|
-
}
|
|
73
|
-
if (editor.kind === 'conversation-find') {
|
|
27
|
+
},
|
|
28
|
+
'conversation-events': (editor, readField) => conversationEventsOrGroups(editor, readField),
|
|
29
|
+
'conversation-groups': (editor, readField) => conversationEventsOrGroups(editor, readField),
|
|
30
|
+
'conversation-find': (_editor, readField) => {
|
|
74
31
|
const kind = readField('kind');
|
|
75
32
|
const command = kind.length > 0
|
|
76
33
|
? `/conversation find ${quoteSlashCommandArg(readField('query'))} ${quoteSlashCommandArg(kind)}`
|
|
77
34
|
: `/conversation find ${quoteSlashCommandArg(readField('query'))}`;
|
|
78
|
-
return
|
|
35
|
+
return dispatchCommandEditorSubmission(
|
|
79
36
|
command,
|
|
80
37
|
'Opening transcript search',
|
|
81
38
|
'The workspace handed read-only transcript search to the shell-owned command router.',
|
|
82
39
|
'read-only',
|
|
83
40
|
);
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
}
|
|
93
|
-
if (editor.kind === 'session-save') {
|
|
41
|
+
},
|
|
42
|
+
'effort-level': (_editor, readField) => dispatchCommandEditorSubmission(
|
|
43
|
+
`/effort ${quoteSlashCommandArg(readField('level'))}`,
|
|
44
|
+
'Opening reasoning effort change',
|
|
45
|
+
'The workspace handed reasoning effort selection to the shell-owned command router.',
|
|
46
|
+
'safe',
|
|
47
|
+
),
|
|
48
|
+
'session-save': (editor, readField) => {
|
|
94
49
|
if (!isAffirmative(readField('confirm'))) return unconfirmed(editor, 'Session save not confirmed. Type yes, then press Enter.');
|
|
95
|
-
return
|
|
50
|
+
return dispatchCommandEditorSubmission(
|
|
96
51
|
`/save ${quoteSlashCommandArg(readField('name'))}`,
|
|
97
52
|
'Opening session save',
|
|
98
53
|
'The workspace handed a confirmed session save command to the shell-owned command router.',
|
|
99
54
|
'safe',
|
|
100
55
|
);
|
|
101
|
-
}
|
|
102
|
-
|
|
56
|
+
},
|
|
57
|
+
'session-load': (editor, readField) => {
|
|
103
58
|
if (!isAffirmative(readField('confirm'))) return unconfirmed(editor, 'Session load not confirmed. Type yes, then press Enter.');
|
|
104
|
-
return
|
|
59
|
+
return dispatchCommandEditorSubmission(
|
|
105
60
|
`/load ${quoteSlashCommandArg(readField('name'))}`,
|
|
106
61
|
'Opening session load',
|
|
107
62
|
'The workspace handed a confirmed session load command to the shell-owned command router.',
|
|
108
63
|
'safe',
|
|
109
64
|
);
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
}
|
|
143
|
-
if (editor.kind === 'session-search') {
|
|
144
|
-
return dispatch(
|
|
145
|
-
`/session search ${quoteSlashCommandArg(readField('query'))}`,
|
|
146
|
-
'Opening saved-session search',
|
|
147
|
-
'The workspace handed saved-session search to the shell-owned command router.',
|
|
148
|
-
'read-only',
|
|
149
|
-
);
|
|
150
|
-
}
|
|
151
|
-
if (editor.kind === 'session-delete') {
|
|
65
|
+
},
|
|
66
|
+
'session-rename': (_editor, readField) => dispatchCommandEditorSubmission(
|
|
67
|
+
`/session rename ${quoteSlashCommandArg(readField('name'))}`,
|
|
68
|
+
'Opening session rename',
|
|
69
|
+
'The workspace handed current-session rename to the shell-owned command router.',
|
|
70
|
+
'safe',
|
|
71
|
+
),
|
|
72
|
+
'session-resume': (_editor, readField) => dispatchCommandEditorSubmission(
|
|
73
|
+
`/session resume ${quoteSlashCommandArg(readField('target'))}`,
|
|
74
|
+
'Opening session resume',
|
|
75
|
+
'The workspace handed saved-session resume to the shell-owned command router.',
|
|
76
|
+
'safe',
|
|
77
|
+
),
|
|
78
|
+
'session-info': (_editor, readField) => dispatchCommandEditorSubmission(
|
|
79
|
+
`/session info ${quoteSlashCommandArg(readField('target'))}`,
|
|
80
|
+
'Opening session inspection',
|
|
81
|
+
'The workspace handed read-only saved-session inspection to the shell-owned command router.',
|
|
82
|
+
'read-only',
|
|
83
|
+
),
|
|
84
|
+
'session-export-saved': (_editor, readField) => dispatchCommandEditorSubmission(
|
|
85
|
+
`/session export ${quoteSlashCommandArg(readField('target'))} ${quoteSlashCommandArg(readField('format'))}`,
|
|
86
|
+
'Opening saved-session export',
|
|
87
|
+
'The workspace handed saved-session transcript export to the shell-owned command router.',
|
|
88
|
+
'read-only',
|
|
89
|
+
),
|
|
90
|
+
'session-search': (_editor, readField) => dispatchCommandEditorSubmission(
|
|
91
|
+
`/session search ${quoteSlashCommandArg(readField('query'))}`,
|
|
92
|
+
'Opening saved-session search',
|
|
93
|
+
'The workspace handed saved-session search to the shell-owned command router.',
|
|
94
|
+
'read-only',
|
|
95
|
+
),
|
|
96
|
+
'session-delete': (editor, readField) => {
|
|
152
97
|
if (!isAffirmative(readField('confirm'))) return unconfirmed(editor, 'Session delete not confirmed. Type yes, then press Enter.');
|
|
153
|
-
return
|
|
98
|
+
return dispatchCommandEditorSubmission(
|
|
154
99
|
`/session delete ${quoteSlashCommandArg(readField('target'))} --yes`,
|
|
155
100
|
'Opening saved-session delete',
|
|
156
101
|
'The workspace handed confirmed saved-session deletion to the shell-owned command router.',
|
|
157
102
|
'safe',
|
|
158
103
|
);
|
|
159
|
-
}
|
|
160
|
-
|
|
104
|
+
},
|
|
105
|
+
'session-fork': (_editor, readField) => {
|
|
161
106
|
const name = readField('name');
|
|
162
|
-
return
|
|
107
|
+
return dispatchCommandEditorSubmission(
|
|
163
108
|
name.length > 0 ? `/session fork ${quoteSlashCommandArg(name)}` : '/session fork',
|
|
164
109
|
'Opening session fork',
|
|
165
110
|
'The workspace handed current-session fork to the shell-owned command router.',
|
|
166
111
|
'safe',
|
|
167
112
|
);
|
|
168
|
-
}
|
|
169
|
-
|
|
113
|
+
},
|
|
114
|
+
'session-graph': (_editor, readField) => {
|
|
170
115
|
const sessionId = readField('sessionId');
|
|
171
116
|
const format = readField('format');
|
|
172
117
|
const parts = ['/session', 'graph'];
|
|
173
118
|
if (sessionId.length > 0) parts.push('--session', quoteSlashCommandArg(sessionId));
|
|
174
119
|
if (format.length > 0) parts.push('--format', quoteSlashCommandArg(format));
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
command,
|
|
120
|
+
return dispatchCommandEditorSubmission(
|
|
121
|
+
parts.join(' '),
|
|
178
122
|
'Opening session graph',
|
|
179
123
|
'The workspace handed read-only session graph inspection to the shell-owned command router.',
|
|
180
124
|
'read-only',
|
|
181
125
|
);
|
|
182
|
-
}
|
|
183
|
-
|
|
126
|
+
},
|
|
127
|
+
'mode-preset': (editor, readField) => {
|
|
184
128
|
if (!isAffirmative(readField('confirm'))) return unconfirmed(editor, 'Interaction mode change not confirmed. Type yes, then press Enter.');
|
|
185
|
-
return
|
|
129
|
+
return dispatchCommandEditorSubmission(
|
|
186
130
|
`/mode ${quoteSlashCommandArg(readField('preset'))} --yes`,
|
|
187
131
|
'Opening interaction mode change',
|
|
188
132
|
'The workspace handed a confirmed interaction mode command to the shell-owned command router.',
|
|
189
133
|
'safe',
|
|
190
134
|
);
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
135
|
+
},
|
|
136
|
+
'mode-domain': (editor, readField) => {
|
|
137
|
+
if (!isAffirmative(readField('confirm'))) return unconfirmed(editor, 'Domain verbosity change not confirmed. Type yes, then press Enter.');
|
|
138
|
+
return dispatchCommandEditorSubmission(
|
|
139
|
+
`/mode set-domain ${quoteSlashCommandArg(readField('domain'))} ${quoteSlashCommandArg(readField('verbosity'))} --yes`,
|
|
140
|
+
'Opening domain verbosity change',
|
|
141
|
+
'The workspace handed a confirmed domain verbosity command to the shell-owned command router.',
|
|
142
|
+
'safe',
|
|
143
|
+
);
|
|
144
|
+
},
|
|
145
|
+
};
|
|
146
|
+
|
|
147
|
+
function conversationEventsOrGroups(editor: AgentWorkspaceLocalEditor, readField: AgentWorkspaceFieldReader): AgentWorkspaceCommandEditorSubmission {
|
|
148
|
+
const subcommand = editor.kind === 'conversation-groups' ? 'groups' : 'events';
|
|
149
|
+
const eventKind = readField('kind');
|
|
150
|
+
const command = eventKind.length > 0
|
|
151
|
+
? `/conversation ${subcommand} ${quoteSlashCommandArg(eventKind)}`
|
|
152
|
+
: `/conversation ${subcommand}`;
|
|
153
|
+
return dispatchCommandEditorSubmission(
|
|
154
|
+
command,
|
|
155
|
+
editor.kind === 'conversation-groups' ? 'Opening transcript groups' : 'Opening transcript events',
|
|
156
|
+
'The workspace handed read-only transcript structure inspection to the shell-owned command router.',
|
|
157
|
+
'read-only',
|
|
158
|
+
);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
export function buildAgentWorkspaceSessionCommandEditorSubmission(
|
|
162
|
+
editor: AgentWorkspaceLocalEditor,
|
|
163
|
+
readField: AgentWorkspaceFieldReader,
|
|
164
|
+
): AgentWorkspaceCommandEditorSubmission {
|
|
165
|
+
return buildCommandEditorSubmissionFromTable(
|
|
166
|
+
editor.kind as AgentWorkspaceSessionCommandEditorKind,
|
|
167
|
+
editor,
|
|
168
|
+
readField,
|
|
169
|
+
SESSION_COMMAND_SUBMISSION_HANDLERS,
|
|
198
170
|
);
|
|
199
171
|
}
|