@pellux/goodvibes-agent 1.1.6 → 1.2.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/CHANGELOG.md +176 -0
- package/README.md +46 -30
- package/dist/package/{ast-grep-napi.linux-x64-gnu-mkk8xwww.node → ast-grep-napi.linux-x64-gnu-swtppvy9.node} +0 -0
- package/dist/package/{ast-grep-napi.linux-x64-musl-ryqtgdv6.node → ast-grep-napi.linux-x64-musl-ttfcdtap.node} +0 -0
- package/dist/package/main.js +132662 -91399
- package/docs/README.md +14 -7
- package/docs/channels-remote-and-api.md +8 -5
- package/docs/connected-host.md +14 -12
- package/docs/getting-started.md +56 -30
- package/docs/knowledge-artifacts-and-multimodal.md +7 -5
- package/docs/project-planning.md +2 -2
- package/docs/providers-and-routing.md +11 -3
- package/docs/tools-and-commands.md +114 -45
- package/docs/voice-and-live-tts.md +3 -1
- package/package.json +3 -2
- package/release/release-notes.md +130 -5
- package/release/release-readiness.json +120 -90
- package/src/agent/assistant-cockpit.ts +247 -0
- package/src/agent/autonomy-schedule-format.ts +96 -0
- package/src/agent/autonomy-schedule.ts +514 -0
- package/src/agent/channel-delivery-receipts.ts +292 -0
- package/src/agent/competitive-feature-inventory.ts +296 -0
- package/src/agent/document-registry-types.ts +106 -0
- package/src/agent/document-registry.ts +734 -0
- package/src/agent/harness-control.ts +2 -2
- package/src/agent/memory-prompt.ts +2 -2
- package/src/agent/operator-actions.ts +50 -6
- package/src/agent/persona-registry.ts +8 -0
- package/src/agent/project-context-files.ts +273 -0
- package/src/agent/prompt-context-receipts.ts +502 -0
- package/src/agent/reminder-schedule-format.ts +16 -2
- package/src/agent/research-run-registry.ts +582 -0
- package/src/agent/research-source-registry.ts +441 -0
- package/src/agent/routine-registry.ts +19 -3
- package/src/agent/routine-schedule-format.ts +27 -2
- package/src/agent/runtime-profile-starters.ts +7 -0
- package/src/agent/runtime-profile.ts +106 -4
- package/src/agent/schedule-edit-format.ts +129 -0
- package/src/agent/schedule-edit.ts +496 -0
- package/src/agent/schedule-next-routes.ts +42 -0
- package/src/agent/setup-wizard-checkpoint.ts +140 -0
- package/src/agent/setup-wizard.ts +447 -0
- package/src/agent/skill-registry-types.ts +102 -0
- package/src/agent/skill-registry.ts +81 -107
- package/src/agent/vibe-confirmation-routes.ts +62 -0
- package/src/agent/vibe-file.ts +285 -0
- package/src/cli/agent-knowledge-command.ts +45 -2
- package/src/cli/help.ts +3 -0
- package/src/cli/profiles-command.ts +25 -11
- package/src/config/agent-settings-policy.ts +1 -18
- package/src/input/agent-workspace-activation.ts +53 -0
- package/src/input/agent-workspace-artifact-browser-editor.ts +494 -0
- package/src/input/agent-workspace-artifact-metadata.ts +17 -0
- package/src/input/agent-workspace-basic-command-editors.ts +5 -1
- package/src/input/agent-workspace-categories.ts +153 -155
- package/src/input/agent-workspace-channel-triage.ts +481 -0
- package/src/input/agent-workspace-channels.ts +263 -0
- package/src/input/agent-workspace-command-editor.ts +152 -0
- package/src/input/agent-workspace-context-snapshot.ts +349 -0
- package/src/input/agent-workspace-delegation-editor-submission.ts +8 -0
- package/src/input/agent-workspace-document-editor.ts +502 -0
- package/src/input/agent-workspace-document-ops-editor.ts +523 -0
- package/src/input/agent-workspace-host-category.ts +1 -1
- package/src/input/agent-workspace-local-library-snapshot.ts +167 -0
- package/src/input/agent-workspace-model-compare-editor.ts +376 -0
- package/src/input/agent-workspace-model-compare-prompt-submission.ts +552 -0
- package/src/input/agent-workspace-model-compare-types.ts +82 -0
- package/src/input/agent-workspace-model-compare-utils.ts +35 -0
- package/src/input/agent-workspace-onboarding-categories.ts +141 -0
- package/src/input/agent-workspace-operations-command-editor-submission.ts +53 -0
- package/src/input/agent-workspace-operations-command-editors.ts +22 -0
- package/src/input/agent-workspace-research-report-editor.ts +212 -0
- package/src/input/agent-workspace-research-run-editor.ts +144 -0
- package/src/input/agent-workspace-research-source-editor.ts +167 -0
- package/src/input/agent-workspace-review-packet-snapshot.ts +593 -0
- package/src/input/agent-workspace-review-packet-utils.ts +265 -0
- package/src/input/agent-workspace-settings.ts +262 -30
- package/src/input/agent-workspace-setup-checkpoint-action.ts +127 -0
- package/src/input/agent-workspace-setup-snapshot.ts +198 -0
- package/src/input/agent-workspace-setup.ts +34 -1
- package/src/input/agent-workspace-snapshot.ts +162 -147
- package/src/input/agent-workspace-types.ts +287 -2
- package/src/input/agent-workspace.ts +18 -0
- package/src/input/command-registry.ts +9 -2
- package/src/input/commands/agent-runtime-profile-runtime.ts +28 -13
- package/src/input/commands/channels-runtime.ts +102 -114
- package/src/input/commands/delegation-runtime.ts +87 -24
- package/src/input/commands/knowledge-browser-flags.ts +12 -0
- package/src/input/commands/knowledge.ts +28 -14
- package/src/input/commands/operator-actions-runtime.ts +6 -3
- package/src/input/commands/schedule-runtime.ts +71 -14
- package/src/input/commands/session-content.ts +2 -2
- package/src/input/commands/shell-core.ts +2 -0
- package/src/input/commands/vibe-runtime.ts +140 -0
- package/src/input/commands.ts +2 -0
- package/src/input/connected-host-routes.ts +123 -0
- package/src/input/settings-modal-types.ts +14 -0
- package/src/main.ts +15 -15
- package/src/panels/qr-panel.ts +2 -2
- package/src/renderer/agent-workspace-context-lines.ts +686 -0
- package/src/renderer/agent-workspace.ts +30 -419
- package/src/renderer/settings-modal-helpers.ts +12 -0
- package/src/renderer/settings-modal.ts +12 -0
- package/src/runtime/bootstrap-command-context.ts +11 -1
- package/src/runtime/bootstrap-command-parts.ts +14 -3
- package/src/runtime/bootstrap-core.ts +43 -1
- package/src/runtime/bootstrap-shell.ts +6 -0
- package/src/runtime/bootstrap.ts +113 -30
- package/src/runtime/connected-host-auth.ts +3 -2
- package/src/runtime/execution-ledger.ts +231 -0
- package/src/runtime/services.ts +88 -10
- package/src/runtime/tool-permission-safety.ts +287 -0
- package/src/shell/session-continuity-hints.ts +39 -0
- package/src/tools/agent-artifacts-tool.ts +606 -0
- package/src/tools/agent-audit-tool.ts +155 -0
- package/src/tools/agent-autonomy-schedule-tool.ts +238 -0
- package/src/tools/agent-autonomy-tool.ts +140 -0
- package/src/tools/agent-channel-send-tool.ts +24 -2
- package/src/tools/agent-channels-tool.ts +140 -0
- package/src/tools/agent-computer-tool.ts +168 -0
- package/src/tools/agent-context-policy.ts +267 -10
- package/src/tools/agent-context-tool.ts +143 -0
- package/src/tools/agent-delegation-tool.ts +128 -0
- package/src/tools/agent-device-tool.ts +240 -0
- package/src/tools/agent-documents-tool.ts +684 -0
- package/src/tools/agent-execution-tool.ts +230 -0
- package/src/tools/agent-harness-agent-orchestration.ts +703 -0
- package/src/tools/agent-harness-autonomy-intake.ts +785 -0
- package/src/tools/agent-harness-autonomy-live-records.ts +588 -0
- package/src/tools/agent-harness-autonomy-queue-types.ts +88 -0
- package/src/tools/agent-harness-autonomy-queue.ts +560 -0
- package/src/tools/agent-harness-background-processes-types.ts +35 -0
- package/src/tools/agent-harness-background-processes.ts +794 -0
- package/src/tools/agent-harness-browser-cockpit-route.ts +219 -0
- package/src/tools/agent-harness-browser-control.ts +338 -0
- package/src/tools/agent-harness-channel-metadata.ts +168 -10
- package/src/tools/agent-harness-cli-command-policy.ts +110 -0
- package/src/tools/agent-harness-command-catalog.ts +4 -2
- package/src/tools/agent-harness-command-runner.ts +42 -0
- package/src/tools/agent-harness-connected-host-status.ts +7 -4
- package/src/tools/agent-harness-delegation-posture.ts +234 -19
- package/src/tools/agent-harness-document-ops-reviewer-readiness.ts +234 -0
- package/src/tools/agent-harness-document-ops-types.ts +72 -0
- package/src/tools/agent-harness-document-ops.ts +671 -0
- package/src/tools/agent-harness-execution-history.ts +489 -0
- package/src/tools/agent-harness-execution-posture.ts +382 -0
- package/src/tools/agent-harness-file-recovery.ts +135 -0
- package/src/tools/agent-harness-keybinding-metadata.ts +16 -12
- package/src/tools/agent-harness-learning-curator-common.ts +102 -0
- package/src/tools/agent-harness-learning-curator-consolidation.ts +295 -0
- package/src/tools/agent-harness-learning-curator-proposals.ts +606 -0
- package/src/tools/agent-harness-learning-curator-types.ts +151 -0
- package/src/tools/agent-harness-learning-curator.ts +417 -0
- package/src/tools/agent-harness-local-model-benchmarks.ts +199 -0
- package/src/tools/agent-harness-local-model-cookbook.ts +238 -0
- package/src/tools/agent-harness-local-model-endpoints.ts +673 -0
- package/src/tools/agent-harness-media-posture.ts +208 -2
- package/src/tools/agent-harness-memory-posture.ts +556 -0
- package/src/tools/agent-harness-metadata.ts +100 -168
- package/src/tools/agent-harness-mode-catalog.ts +84 -33
- package/src/tools/agent-harness-model-catalog.ts +162 -0
- package/src/tools/agent-harness-model-provider-health.ts +186 -0
- package/src/tools/agent-harness-model-readiness.ts +406 -0
- package/src/tools/agent-harness-model-routing-types.ts +266 -0
- package/src/tools/agent-harness-model-routing-utils.ts +30 -0
- package/src/tools/agent-harness-model-routing.ts +137 -190
- package/src/tools/agent-harness-operator-methods.ts +115 -133
- package/src/tools/agent-harness-pairing-posture.ts +431 -18
- package/src/tools/agent-harness-personal-ops-discovery.ts +533 -0
- package/src/tools/agent-harness-personal-ops-intake.ts +385 -0
- package/src/tools/agent-harness-personal-ops-lanes.ts +204 -0
- package/src/tools/agent-harness-personal-ops-records.ts +732 -0
- package/src/tools/agent-harness-personal-ops-runner.ts +637 -0
- package/src/tools/agent-harness-personal-ops-types.ts +222 -0
- package/src/tools/agent-harness-personal-ops.ts +606 -0
- package/src/tools/agent-harness-project-context.ts +144 -0
- package/src/tools/agent-harness-prompt-context.ts +589 -0
- package/src/tools/agent-harness-provider-account-metadata.ts +2 -2
- package/src/tools/agent-harness-release-evidence.ts +9 -7
- package/src/tools/agent-harness-release-readiness.ts +9 -7
- package/src/tools/agent-harness-research-briefing.ts +427 -0
- package/src/tools/agent-harness-research-queue.ts +250 -0
- package/src/tools/agent-harness-research-runs.ts +295 -0
- package/src/tools/agent-harness-research-workflow.ts +322 -0
- package/src/tools/agent-harness-security-posture.ts +2 -2
- package/src/tools/agent-harness-service-posture.ts +9 -9
- package/src/tools/agent-harness-session-metadata.ts +3 -3
- package/src/tools/agent-harness-setup-connected-host.ts +501 -0
- package/src/tools/agent-harness-setup-describe.ts +557 -0
- package/src/tools/agent-harness-setup-handoffs.ts +502 -0
- package/src/tools/agent-harness-setup-model-helpers.ts +101 -0
- package/src/tools/agent-harness-setup-plan.ts +253 -0
- package/src/tools/agent-harness-setup-posture-types.ts +218 -0
- package/src/tools/agent-harness-setup-posture-utils.ts +173 -0
- package/src/tools/agent-harness-setup-posture.ts +449 -221
- package/src/tools/agent-harness-setup-smoke.ts +508 -0
- package/src/tools/agent-harness-sudo-posture.ts +114 -0
- package/src/tools/agent-harness-tool-schema.ts +120 -7
- package/src/tools/agent-harness-tool-types.ts +78 -0
- package/src/tools/agent-harness-tool-utils.ts +43 -0
- package/src/tools/agent-harness-tool.ts +311 -370
- package/src/tools/agent-harness-ui-surface-metadata.ts +76 -69
- package/src/tools/agent-harness-ui-surface-types.ts +46 -0
- package/src/tools/agent-harness-vibe-health.ts +105 -0
- package/src/tools/agent-harness-workspace-action-runner.ts +149 -0
- package/src/tools/agent-harness-workspace-actions.ts +114 -8
- package/src/tools/agent-harness-workspace-editor-execution.ts +214 -0
- package/src/tools/agent-harness-workspace-editor-runner.ts +755 -0
- package/src/tools/agent-host-tool.ts +159 -0
- package/src/tools/agent-knowledge-ingest-tool.ts +34 -1
- package/src/tools/agent-learning-consolidation-core.ts +327 -0
- package/src/tools/agent-learning-consolidation-tool.ts +758 -0
- package/src/tools/agent-memory-tool.ts +214 -0
- package/src/tools/agent-model-compare-export.ts +315 -0
- package/src/tools/agent-model-compare-handoff.ts +592 -0
- package/src/tools/agent-model-compare-judgment.ts +633 -0
- package/src/tools/agent-model-compare-run.ts +722 -0
- package/src/tools/agent-model-compare-tool.ts +698 -0
- package/src/tools/agent-model-compare-types.ts +191 -0
- package/src/tools/agent-model-compare-utils.ts +93 -0
- package/src/tools/agent-models-tool.ts +208 -0
- package/src/tools/agent-operator-action-tool.ts +1 -1
- package/src/tools/agent-operator-method-tool.ts +643 -0
- package/src/tools/agent-personal-ops-tool.ts +197 -0
- package/src/tools/agent-policy-explanation.ts +415 -0
- package/src/tools/agent-research-report-tool.ts +608 -0
- package/src/tools/agent-research-runs-tool.ts +434 -0
- package/src/tools/agent-research-sources-tool.ts +443 -0
- package/src/tools/agent-research-tool.ts +687 -0
- package/src/tools/agent-review-packet-presets-core.ts +757 -0
- package/src/tools/agent-review-packet-presets-tool.ts +466 -0
- package/src/tools/agent-review-packet-share-tool.ts +305 -0
- package/src/tools/agent-route-planner-candidates-setup.ts +411 -0
- package/src/tools/agent-route-planner-candidates-surfaces.ts +432 -0
- package/src/tools/agent-route-planner-candidates-work.ts +251 -0
- package/src/tools/agent-route-planner-helpers.ts +667 -0
- package/src/tools/agent-route-planner.ts +185 -0
- package/src/tools/agent-route-tool.ts +105 -0
- package/src/tools/agent-schedule-edit-tool.ts +210 -0
- package/src/tools/agent-schedule-tool.ts +282 -0
- package/src/tools/agent-security-tool.ts +145 -0
- package/src/tools/agent-sessions-tool.ts +122 -0
- package/src/tools/agent-settings-import-tool.ts +104 -0
- package/src/tools/agent-settings-tool.ts +176 -0
- package/src/tools/agent-setup-tool.ts +226 -0
- package/src/tools/agent-support-tool.ts +122 -0
- package/src/tools/agent-terminal-process-tools.ts +167 -0
- package/src/tools/agent-tool-policy-guard-types.ts +77 -0
- package/src/tools/agent-tool-policy-guard.ts +110 -89
- package/src/tools/agent-vibe-tool.ts +297 -0
- package/src/tools/agent-work-plan-tool.ts +265 -6
- package/src/tools/agent-workspace-tool.ts +305 -0
- package/src/tools/artifact-archive.ts +169 -0
- package/src/tools/tool-definition-compaction.ts +36 -0
- package/src/tools/tool-execution-safety.ts +41 -0
- package/src/version.ts +1 -1
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { CommandContext } from '../input/command-registry.ts';
|
|
2
2
|
import type { AgentWorkspaceChannelStatus } from '../input/agent-workspace-channels.ts';
|
|
3
|
-
import {
|
|
3
|
+
import { readAgentChannelDeliveryReceipts } from '../agent/channel-delivery-receipts.ts';
|
|
4
|
+
import { buildAgentWorkspaceChannelTriage, type AgentWorkspaceChannelTriage } from '../input/agent-workspace-channel-triage.ts';
|
|
5
|
+
import { buildAgentWorkspaceChannelSetupGuide, buildAgentWorkspaceChannels } from '../input/agent-workspace-channels.ts';
|
|
4
6
|
import { previewHarnessText } from './agent-harness-text.ts';
|
|
5
7
|
|
|
6
8
|
export interface AgentHarnessChannelArgs {
|
|
@@ -18,6 +20,11 @@ type ChannelResolution =
|
|
|
18
20
|
| { readonly status: 'ambiguous'; readonly input: string; readonly candidates: readonly Record<string, unknown>[] }
|
|
19
21
|
| { readonly status: 'missing_lookup'; readonly usage: string };
|
|
20
22
|
|
|
23
|
+
type ChannelSetupGuideResolution =
|
|
24
|
+
| { readonly status: 'found'; readonly guide: Record<string, unknown> }
|
|
25
|
+
| { readonly status: 'ambiguous'; readonly input: string; readonly candidates: readonly Record<string, unknown>[] }
|
|
26
|
+
| { readonly status: 'missing_lookup'; readonly usage: string };
|
|
27
|
+
|
|
21
28
|
function readString(value: unknown): string {
|
|
22
29
|
return typeof value === 'string' ? value.trim() : '';
|
|
23
30
|
}
|
|
@@ -60,12 +67,28 @@ function describeChannelCandidate(channel: AgentWorkspaceChannelStatus): Record<
|
|
|
60
67
|
setupState: channel.setupState,
|
|
61
68
|
ready: channel.ready,
|
|
62
69
|
delivery: channel.delivery,
|
|
63
|
-
modelRoute: channelModelRoute(),
|
|
70
|
+
modelRoute: channelModelRoute(channel.id),
|
|
64
71
|
};
|
|
65
72
|
}
|
|
66
73
|
|
|
67
|
-
function channelModelRoute(): string {
|
|
68
|
-
return
|
|
74
|
+
function channelModelRoute(channelId?: string): string {
|
|
75
|
+
return channelId
|
|
76
|
+
? `channels action:"channel" channelId:"${channelId}"`
|
|
77
|
+
: 'channels action:"status"';
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
function channelSetupGuideModelRoute(channelId?: string): string {
|
|
81
|
+
return channelId
|
|
82
|
+
? `channels action:"setup" channelId:"${channelId}"`
|
|
83
|
+
: 'channels action:"setup"';
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
function channelDeliveriesModelRoute(): string {
|
|
87
|
+
return 'channels action:"deliveries"';
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
function channelTriageModelRoute(): string {
|
|
91
|
+
return 'channels action:"triage"';
|
|
69
92
|
}
|
|
70
93
|
|
|
71
94
|
function describeChannel(
|
|
@@ -88,7 +111,8 @@ function describeChannel(
|
|
|
88
111
|
missingConfigKeys: channel.missingRequiredKeys,
|
|
89
112
|
defaultTargetKeys: channel.defaultTargetKeys,
|
|
90
113
|
configuredDefaultTargetKeys: channel.configuredDefaultTargetKeys,
|
|
91
|
-
modelRoute: channelModelRoute(),
|
|
114
|
+
modelRoute: channelModelRoute(channel.id),
|
|
115
|
+
setupGuideRoute: channelSetupGuideModelRoute(channel.id),
|
|
92
116
|
...(options.lookup ? { lookup: options.lookup } : {}),
|
|
93
117
|
...(options.includeParameters
|
|
94
118
|
? {
|
|
@@ -110,8 +134,8 @@ function describeChannel(
|
|
|
110
134
|
`/channels doctor ${channel.id}`,
|
|
111
135
|
`/channels setup ${channel.id}`,
|
|
112
136
|
],
|
|
113
|
-
settingsFilter: `
|
|
114
|
-
connectedHostBoundary: '
|
|
137
|
+
settingsFilter: `settings action:"list" prefix:"surfaces.${channel.id}" includeHidden:true`,
|
|
138
|
+
connectedHostBoundary: 'host action:"capability" query:"delivery"',
|
|
115
139
|
deliveryTargetShape: 'surface[:route[:label]]',
|
|
116
140
|
exampleTarget: `${channel.id}:route:Label`,
|
|
117
141
|
},
|
|
@@ -124,14 +148,25 @@ function describeChannel(
|
|
|
124
148
|
|
|
125
149
|
export function channelReadinessCatalogStatus(context: CommandContext): Record<string, unknown> {
|
|
126
150
|
const channels = buildAgentWorkspaceChannels(context);
|
|
151
|
+
const guide = buildAgentWorkspaceChannelSetupGuide(channels);
|
|
127
152
|
return {
|
|
128
|
-
modes: ['channels', 'channel'],
|
|
153
|
+
modes: ['channels', 'channel', 'channel_setup_guide', 'channel_triage', 'channel_deliveries'],
|
|
154
|
+
modelRoute: 'channels action:"status"',
|
|
129
155
|
channels: channels.length,
|
|
130
156
|
enabled: channels.filter((channel) => channel.enabled).length,
|
|
131
157
|
ready: channels.filter((channel) => channel.ready).length,
|
|
132
158
|
attention: channels.filter((channel) => channel.enabled && channel.setupState !== 'ready').length,
|
|
159
|
+
setupGuide: {
|
|
160
|
+
status: guide.status,
|
|
161
|
+
currentChannelId: guide.currentChannelId,
|
|
162
|
+
currentStepId: guide.currentStepId,
|
|
163
|
+
progressLabel: guide.progressLabel,
|
|
164
|
+
modelRoute: channelSetupGuideModelRoute(guide.currentChannelId ?? undefined),
|
|
165
|
+
},
|
|
133
166
|
readOnly: true,
|
|
134
167
|
deliveryTool: 'agent_channel_send',
|
|
168
|
+
triage: channelTriageModelRoute(),
|
|
169
|
+
deliveryReceipts: channelDeliveriesModelRoute(),
|
|
135
170
|
};
|
|
136
171
|
}
|
|
137
172
|
|
|
@@ -150,6 +185,12 @@ export function listHarnessChannels(context: CommandContext, args: AgentHarnessC
|
|
|
150
185
|
enabled: channels.filter((channel) => channel.enabled).length,
|
|
151
186
|
ready: channels.filter((channel) => channel.ready).length,
|
|
152
187
|
attention: channels.filter((channel) => channel.enabled && channel.setupState !== 'ready').length,
|
|
188
|
+
setupGuide: {
|
|
189
|
+
status: buildAgentWorkspaceChannelSetupGuide(channels).status,
|
|
190
|
+
modelRoute: channelSetupGuideModelRoute(),
|
|
191
|
+
},
|
|
192
|
+
triage: channelTriageModelRoute(),
|
|
193
|
+
deliveryReceipts: channelDeliveriesModelRoute(),
|
|
153
194
|
policy: 'Read-only channel readiness catalog. It returns key names, setup state, delivery posture, and model routes without printing secrets or sending messages.',
|
|
154
195
|
};
|
|
155
196
|
}
|
|
@@ -159,7 +200,7 @@ export function describeHarnessChannel(context: CommandContext, args: AgentHarne
|
|
|
159
200
|
if (!lookup) {
|
|
160
201
|
return {
|
|
161
202
|
status: 'missing_lookup',
|
|
162
|
-
usage: 'channel requires channelId, target, or query. Use
|
|
203
|
+
usage: 'channels action:"channel" requires channelId, target, or query. Use channels action:"status" to inspect available channel ids.',
|
|
163
204
|
};
|
|
164
205
|
}
|
|
165
206
|
const channels = buildAgentWorkspaceChannels(context);
|
|
@@ -183,6 +224,123 @@ export function describeHarnessChannel(context: CommandContext, args: AgentHarne
|
|
|
183
224
|
}
|
|
184
225
|
return {
|
|
185
226
|
status: 'missing_lookup',
|
|
186
|
-
usage: `Unknown channel ${lookup.input}. Use
|
|
227
|
+
usage: `Unknown channel ${lookup.input}. Use channels action:"status" to inspect available channel ids.`,
|
|
228
|
+
};
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
export function describeHarnessChannelSetupGuide(context: CommandContext, args: AgentHarnessChannelArgs): ChannelSetupGuideResolution {
|
|
232
|
+
const channels = buildAgentWorkspaceChannels(context);
|
|
233
|
+
const lookup = channelLookupFromArgs(args);
|
|
234
|
+
if (!lookup) {
|
|
235
|
+
const guide = buildAgentWorkspaceChannelSetupGuide(channels);
|
|
236
|
+
return {
|
|
237
|
+
status: 'found',
|
|
238
|
+
guide: {
|
|
239
|
+
mode: 'channel_setup_guide',
|
|
240
|
+
guide,
|
|
241
|
+
routes: {
|
|
242
|
+
channels: 'channels action:"status"',
|
|
243
|
+
currentChannel: guide.currentChannelId ? channelSetupGuideModelRoute(guide.currentChannelId) : null,
|
|
244
|
+
},
|
|
245
|
+
policy: guide.policy,
|
|
246
|
+
},
|
|
247
|
+
};
|
|
248
|
+
}
|
|
249
|
+
const normalized = lookup.input.toLowerCase();
|
|
250
|
+
const exact = channels.find((channel) => channel.id === lookup.input || channel.id.toLowerCase() === normalized || channel.label.toLowerCase() === normalized);
|
|
251
|
+
if (exact) {
|
|
252
|
+
const guide = buildAgentWorkspaceChannelSetupGuide(channels, { channelId: exact.id });
|
|
253
|
+
return {
|
|
254
|
+
status: 'found',
|
|
255
|
+
guide: {
|
|
256
|
+
mode: 'channel_setup_guide',
|
|
257
|
+
guide,
|
|
258
|
+
lookup: { ...lookup, resolvedBy: exact.id === lookup.input ? 'id' : 'case-insensitive' },
|
|
259
|
+
routes: {
|
|
260
|
+
channel: channelModelRoute(exact.id),
|
|
261
|
+
channels: 'channels action:"status"',
|
|
262
|
+
},
|
|
263
|
+
policy: guide.policy,
|
|
264
|
+
},
|
|
265
|
+
};
|
|
266
|
+
}
|
|
267
|
+
const searched = channels.filter((channel) => channelSearchText(channel).includes(normalized));
|
|
268
|
+
if (searched.length === 1) {
|
|
269
|
+
const channel = searched[0]!;
|
|
270
|
+
const guide = buildAgentWorkspaceChannelSetupGuide(channels, { channelId: channel.id });
|
|
271
|
+
return {
|
|
272
|
+
status: 'found',
|
|
273
|
+
guide: {
|
|
274
|
+
mode: 'channel_setup_guide',
|
|
275
|
+
guide,
|
|
276
|
+
lookup: { ...lookup, resolvedBy: 'search' },
|
|
277
|
+
routes: {
|
|
278
|
+
channel: channelModelRoute(channel.id),
|
|
279
|
+
channels: 'channels action:"status"',
|
|
280
|
+
},
|
|
281
|
+
policy: guide.policy,
|
|
282
|
+
},
|
|
283
|
+
};
|
|
284
|
+
}
|
|
285
|
+
if (searched.length > 1) {
|
|
286
|
+
return {
|
|
287
|
+
status: 'ambiguous',
|
|
288
|
+
input: lookup.input,
|
|
289
|
+
candidates: searched.slice(0, 8).map(describeChannelCandidate),
|
|
290
|
+
};
|
|
291
|
+
}
|
|
292
|
+
return {
|
|
293
|
+
status: 'missing_lookup',
|
|
294
|
+
usage: `Unknown channel setup guide target ${lookup.input}. Use channels action:"status" to inspect available channel ids.`,
|
|
295
|
+
};
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
export function describeHarnessChannelDeliveries(context: CommandContext, args: AgentHarnessChannelArgs): Record<string, unknown> {
|
|
299
|
+
const shellPaths = context.workspace?.shellPaths;
|
|
300
|
+
if (!shellPaths) {
|
|
301
|
+
return {
|
|
302
|
+
mode: 'channel_deliveries',
|
|
303
|
+
status: 'unavailable',
|
|
304
|
+
receipts: [],
|
|
305
|
+
policy: 'Read-only delivery receipts require Agent shell path context. Sends still require explicit confirmation.',
|
|
306
|
+
nextActions: ['Open a normal Agent workspace before relying on channel delivery receipts.'],
|
|
307
|
+
};
|
|
308
|
+
}
|
|
309
|
+
const limit = readLimit(args.limit, 20);
|
|
310
|
+
const snapshot = readAgentChannelDeliveryReceipts(shellPaths);
|
|
311
|
+
const receipts = snapshot.receipts.slice(0, limit).map((receipt) => ({
|
|
312
|
+
receiptId: receipt.id,
|
|
313
|
+
createdAt: receipt.createdAt,
|
|
314
|
+
source: receipt.source,
|
|
315
|
+
status: receipt.status,
|
|
316
|
+
target: receipt.target,
|
|
317
|
+
title: receipt.title,
|
|
318
|
+
messageLength: receipt.messageLength,
|
|
319
|
+
messageDigest: receipt.messageDigest,
|
|
320
|
+
messagePreview: receipt.messagePreview,
|
|
321
|
+
strategyCount: receipt.strategyCount,
|
|
322
|
+
responseId: receipt.responseId ?? null,
|
|
323
|
+
userRoute: receipt.userRoute,
|
|
324
|
+
modelRoute: receipt.modelRoute,
|
|
325
|
+
authorization: receipt.authorization,
|
|
326
|
+
}));
|
|
327
|
+
return {
|
|
328
|
+
mode: 'channel_deliveries',
|
|
329
|
+
status: snapshot.parseError ? 'attention' : snapshot.exists ? 'ready' : 'empty',
|
|
330
|
+
path: snapshot.path,
|
|
331
|
+
total: snapshot.receipts.length,
|
|
332
|
+
returned: receipts.length,
|
|
333
|
+
receipts,
|
|
334
|
+
routes: {
|
|
335
|
+
command: '/channels deliveries',
|
|
336
|
+
sendTool: 'agent_channel_send',
|
|
337
|
+
channels: 'channels action:"status"',
|
|
338
|
+
},
|
|
339
|
+
...(snapshot.parseError ? { parseError: snapshot.parseError } : {}),
|
|
340
|
+
policy: 'Read-only confirmed delivery history. Receipt targets redact webhook/link addresses, message bodies are bounded/redacted, and new sends still require explicit user confirmation.',
|
|
187
341
|
};
|
|
188
342
|
}
|
|
343
|
+
|
|
344
|
+
export async function describeHarnessChannelTriage(context: CommandContext, args: AgentHarnessChannelArgs): Promise<AgentWorkspaceChannelTriage> {
|
|
345
|
+
return buildAgentWorkspaceChannelTriage(context, args);
|
|
346
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import type { CommandExecutionPolicy } from './agent-harness-metadata.ts';
|
|
2
|
+
|
|
3
|
+
function agentHarnessModes(...modes: readonly string[]): string {
|
|
4
|
+
return `agent_harness ${modes.map((mode) => `mode:"${mode}"`).join(', ')}`;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
function settingsActions(...actions: readonly string[]): string {
|
|
8
|
+
return `settings ${actions.map((action) => `action:"${action}"`).join('|')}`;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
function hostActions(...actions: readonly string[]): string {
|
|
12
|
+
return `host ${actions.map((action) => `action:"${action}"`).join('|')}`;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export function describeCliCommandPolicy(commandName: string): CommandExecutionPolicy {
|
|
16
|
+
const root = commandName.trim().toLowerCase();
|
|
17
|
+
const confirmation = 'agent_harness CLI command modes are discovery-only. Use first-class model tools, workspace actions, slash-command mirrors, or an explicit external shell request to execute equivalent CLI workflows.';
|
|
18
|
+
if ([
|
|
19
|
+
'app',
|
|
20
|
+
'bridge',
|
|
21
|
+
'control-plane',
|
|
22
|
+
'controlplane',
|
|
23
|
+
'cp',
|
|
24
|
+
'daemon',
|
|
25
|
+
'http-listener',
|
|
26
|
+
'launch',
|
|
27
|
+
'listener',
|
|
28
|
+
'remote',
|
|
29
|
+
'serve',
|
|
30
|
+
'server',
|
|
31
|
+
'service',
|
|
32
|
+
'services',
|
|
33
|
+
'start',
|
|
34
|
+
'surface',
|
|
35
|
+
'surfaces',
|
|
36
|
+
'web',
|
|
37
|
+
'webhook',
|
|
38
|
+
].includes(root)) {
|
|
39
|
+
return {
|
|
40
|
+
effect: 'unknown',
|
|
41
|
+
confirmation,
|
|
42
|
+
boundary: 'Blocked package CLI token. Agent can launch its own TUI and use public connected-host routes, but it does not manage connected-host lifecycle, listeners, servers, route relays, remotes, web surfaces, or webhook listeners.',
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
if (root === 'tui' || root === 'onboarding' || root === 'help' || root === 'version' || root === 'completion') {
|
|
46
|
+
return {
|
|
47
|
+
effect: root === 'tui' || root === 'onboarding' ? 'ui-navigation' : 'read-only',
|
|
48
|
+
confirmation,
|
|
49
|
+
preferredModelTool: root === 'onboarding' || root === 'tui'
|
|
50
|
+
? agentHarnessModes('workspace', 'workspace_actions', 'workspace_action', 'run_workspace_action')
|
|
51
|
+
: agentHarnessModes('cli_commands', 'cli_command'),
|
|
52
|
+
boundary: 'Top-level CLI launch, setup, help, version, and completion commands are package entrypoint surfaces; use in-process workspace and slash-command routes from the model when operating inside the TUI.',
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
if (root === 'run') {
|
|
56
|
+
return {
|
|
57
|
+
effect: 'mixed',
|
|
58
|
+
confirmation,
|
|
59
|
+
preferredModelTool: 'current Agent conversation response; do not invoke hidden nested CLI run',
|
|
60
|
+
boundary: 'The CLI run command starts a non-interactive Agent turn from a process entrypoint. Do not create hidden nested turns from agent_harness; answer the user directly in the current conversation.',
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
if (root === 'status' || root === 'doctor' || root === 'auth' || root === 'compat' || root === 'models' || root === 'providers' || root === 'tasks') {
|
|
64
|
+
return {
|
|
65
|
+
effect: 'read-only',
|
|
66
|
+
confirmation,
|
|
67
|
+
preferredModelTool: root === 'tasks' ? 'agent_operator_briefing' : `${hostActions('status', 'services', 'service', 'capabilities')} or ${settingsActions('list', 'get')} or ${agentHarnessModes('tools')}`,
|
|
68
|
+
boundary: 'Diagnostics and posture commands are readable from Agent-owned settings, provider, model, and connected-host capability surfaces without taking connected-host lifecycle ownership.',
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
if (root === 'profiles' || root === 'personas' || root === 'skills' || root === 'memory' || root === 'routines' || root === 'sessions' || root === 'bundle') {
|
|
72
|
+
return {
|
|
73
|
+
effect: 'local-state',
|
|
74
|
+
confirmation,
|
|
75
|
+
preferredModelTool: root === 'profiles' ? agentHarnessModes('workspace_actions', 'workspace_action', 'run_workspace_action') : 'agent_local_registry',
|
|
76
|
+
boundary: 'Local library/profile/session/bundle CLI commands operate on Agent-local data. Mutations require explicit user intent and should use first-class Agent-local tools where available.',
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
if (root === 'knowledge' || root === 'ask' || root === 'search') {
|
|
80
|
+
return {
|
|
81
|
+
effect: 'mixed',
|
|
82
|
+
confirmation,
|
|
83
|
+
preferredModelTool: root === 'knowledge' ? 'agent_knowledge or agent_knowledge_ingest' : 'agent_knowledge',
|
|
84
|
+
boundary: 'Agent Knowledge CLI commands must stay on isolated Agent Knowledge routes and never fall back to default or non-Agent knowledge spaces.',
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
if (root === 'delegate') {
|
|
88
|
+
return {
|
|
89
|
+
effect: 'delegated-work',
|
|
90
|
+
confirmation,
|
|
91
|
+
preferredModelTool: agentHarnessModes('workspace_actions', 'workspace_action', 'run_workspace_action'),
|
|
92
|
+
boundary: 'Delegation is explicit user-directed work only; no hidden background review or separate Agent job should be created implicitly.',
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
if (root === 'subscription' || root === 'secrets' || root === 'pair') {
|
|
96
|
+
return {
|
|
97
|
+
effect: root === 'pair' ? 'external-network' : 'mixed',
|
|
98
|
+
confirmation,
|
|
99
|
+
preferredModelTool: root === 'pair'
|
|
100
|
+
? agentHarnessModes('workspace_actions', 'workspace_action', 'run_workspace_action')
|
|
101
|
+
: `${settingsActions('list', 'get', 'set', 'reset')} or ${agentHarnessModes('workspace_actions')}`,
|
|
102
|
+
boundary: 'Provider subscription, secret, and pairing flows can expose credentials or external account state. Use only explicit user-directed flows and prefer secret refs over raw values.',
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
return {
|
|
106
|
+
effect: 'unknown',
|
|
107
|
+
confirmation,
|
|
108
|
+
boundary: 'Inspect the CLI help, parser result, and preferred model routes before using an equivalent command path.',
|
|
109
|
+
};
|
|
110
|
+
}
|
|
@@ -58,7 +58,7 @@ function commandMatches(command: SlashCommand, query: string): boolean {
|
|
|
58
58
|
|
|
59
59
|
function describeCommand(command: SlashCommand, lookup?: CommandDetailLookup): Record<string, unknown> {
|
|
60
60
|
const policy = describeCommandPolicy(command.name);
|
|
61
|
-
const modelRoute = previewText(policy.preferredModelTool ??
|
|
61
|
+
const modelRoute = previewText(policy.preferredModelTool ?? `workspace action:"command" commandName:"${command.name}"`);
|
|
62
62
|
return {
|
|
63
63
|
name: command.name,
|
|
64
64
|
slash: `/${command.name}`,
|
|
@@ -71,6 +71,8 @@ function describeCommand(command: SlashCommand, lookup?: CommandDetailLookup): R
|
|
|
71
71
|
inspect: `agent_harness mode:"command" commandName:"${command.name}"`,
|
|
72
72
|
run: `agent_harness mode:"run_command" commandName:"${command.name}" confirm:true explicitUserRequest:"..."`,
|
|
73
73
|
preferred: modelRoute,
|
|
74
|
+
directInspect: `workspace action:"command" commandName:"${command.name}"`,
|
|
75
|
+
directRun: `workspace action:"run_command" commandName:"${command.name}" confirm:true explicitUserRequest:"..."`,
|
|
74
76
|
},
|
|
75
77
|
...(lookup ? {
|
|
76
78
|
lookup: {
|
|
@@ -93,7 +95,7 @@ function describeCommandCandidate(command: SlashCommand): Record<string, unknown
|
|
|
93
95
|
aliases: command.aliases ?? [],
|
|
94
96
|
summary: previewText(command.description),
|
|
95
97
|
effect: policy.effect,
|
|
96
|
-
modelRoute: previewText(policy.preferredModelTool ??
|
|
98
|
+
modelRoute: previewText(policy.preferredModelTool ?? `workspace action:"command" commandName:"${command.name}"`),
|
|
97
99
|
...(command.argsHint ? { argsHint: command.argsHint } : {}),
|
|
98
100
|
};
|
|
99
101
|
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { CommandContext } from '../input/command-registry.ts';
|
|
2
|
+
import { resolveHarnessCommandDetail, type CommandDetailLookup } from './agent-harness-command-catalog.ts';
|
|
3
|
+
import type { AgentHarnessToolArgs, AgentHarnessToolDeps } from './agent-harness-tool-types.ts';
|
|
4
|
+
import { error, output, requireConfirmedAction } from './agent-harness-tool-utils.ts';
|
|
5
|
+
|
|
6
|
+
function invocationArgsFromLookup(lookup: CommandDetailLookup): readonly string[] {
|
|
7
|
+
return lookup.resolvedBy === 'description' ? [] : lookup.parsedArgs;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
function safeCommandDisplay(name: string): string {
|
|
11
|
+
return `/${name}`;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export async function runCommand(deps: AgentHarnessToolDeps, args: AgentHarnessToolArgs): Promise<{ readonly success: boolean; readonly output?: string; readonly error?: string }> {
|
|
15
|
+
const confirmationError = requireConfirmedAction(args, 'Slash command invocation');
|
|
16
|
+
if (confirmationError) return error(confirmationError);
|
|
17
|
+
const resolved = resolveHarnessCommandDetail(deps.commandRegistry, args);
|
|
18
|
+
if (resolved?.status === 'ambiguous') {
|
|
19
|
+
return error(`Ambiguous slash command ${resolved.input}. Candidates: ${JSON.stringify(resolved.candidates)}`);
|
|
20
|
+
}
|
|
21
|
+
if (!resolved) return error('run_command requires a valid command, commandName, target, or query. Use mode:"commands" to inspect available commands.');
|
|
22
|
+
|
|
23
|
+
const printed: string[] = [];
|
|
24
|
+
const toolContext: CommandContext = {
|
|
25
|
+
...deps.commandContext,
|
|
26
|
+
print: (text: string) => {
|
|
27
|
+
printed.push(text);
|
|
28
|
+
},
|
|
29
|
+
renderRequest: () => {},
|
|
30
|
+
executeCommand: async (name: string, commandArgs: string[]) => {
|
|
31
|
+
return deps.commandRegistry.execute(name, commandArgs, toolContext);
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
const commandArgs = invocationArgsFromLookup(resolved.lookup);
|
|
35
|
+
const handled = await deps.commandRegistry.execute(resolved.command.name, [...commandArgs], toolContext);
|
|
36
|
+
if (!handled) return error(`Unknown slash command /${resolved.command.name}.`);
|
|
37
|
+
return output([
|
|
38
|
+
`Command ${safeCommandDisplay(resolved.command.name)} completed.`,
|
|
39
|
+
`Resolved by ${resolved.lookup.source} ${resolved.lookup.resolvedBy}.`,
|
|
40
|
+
printed.length > 0 ? printed.join('\n') : '(no text output)',
|
|
41
|
+
].join('\n'));
|
|
42
|
+
}
|
|
@@ -88,9 +88,12 @@ export async function connectedHostStatusSummary(
|
|
|
88
88
|
return {
|
|
89
89
|
ownership: 'external-connected-host',
|
|
90
90
|
readOnly: true,
|
|
91
|
-
modelRoute: '
|
|
91
|
+
modelRoute: 'host action:"status" or action:"services"',
|
|
92
|
+
compatibilityRoutes: {
|
|
93
|
+
modelRoute: 'agent_harness mode:"connected_host_status" or mode:"service_posture"',
|
|
94
|
+
},
|
|
92
95
|
timeoutMs: CONNECTED_HOST_STATUS_TIMEOUT_MS,
|
|
93
|
-
lifecycle: 'GoodVibes Agent can inspect
|
|
96
|
+
lifecycle: 'GoodVibes Agent can inspect daemon readiness and use confirmed operator methods for supported lifecycle/listener changes.',
|
|
94
97
|
paths: {
|
|
95
98
|
workingDirectory,
|
|
96
99
|
homeDirectory,
|
|
@@ -140,9 +143,9 @@ export async function connectedHostStatusSummary(
|
|
|
140
143
|
blockedCapabilities: blockedConnectedHostCapabilities().length,
|
|
141
144
|
},
|
|
142
145
|
...(options.includeParameters ? { modelAccess: {
|
|
143
|
-
diagnostics: 'Use
|
|
146
|
+
diagnostics: 'Use host action:"status" for live readiness, action:"services|service" for endpoint posture, and action:"capabilities|capability" for capability inventory.',
|
|
144
147
|
daemonAliases: 'mode:"daemon_status" is an alias for mode:"connected_host_status"; mode:"daemon" is an alias for mode:"connected_host".',
|
|
145
|
-
|
|
148
|
+
lifecycle: 'Use setup or agent_operator_method with confirm:true and explicitUserRequest for supported daemon service methods.',
|
|
146
149
|
cliMirrors: ['goodvibes-agent status --json', 'goodvibes-agent doctor', 'goodvibes-agent compat'],
|
|
147
150
|
tuiMirrors: ['Agent Workspace -> Home -> Host compatibility', 'Agent Workspace -> Home -> Doctor diagnostics', 'Agent Workspace -> Home -> Review health'],
|
|
148
151
|
},
|