@pellux/goodvibes-agent 1.0.30 → 1.0.33
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 +42 -1
- package/README.md +7 -5
- package/dist/package/main.js +7323 -2268
- package/docs/README.md +2 -2
- package/docs/channels-remote-and-api.md +6 -2
- package/docs/connected-host.md +26 -5
- package/docs/getting-started.md +30 -10
- package/docs/knowledge-artifacts-and-multimodal.md +16 -4
- package/docs/project-planning.md +2 -2
- package/docs/providers-and-routing.md +3 -2
- package/docs/release-and-publishing.md +15 -11
- package/docs/tools-and-commands.md +20 -8
- package/package.json +8 -3
- package/release/live-verification/live-verification.json +148 -0
- package/release/live-verification/live-verification.md +187 -0
- package/release/performance-snapshot.json +57 -0
- package/release/release-notes.md +28 -0
- package/release/release-readiness.json +581 -0
- package/src/cli/agent-knowledge-command.ts +5 -5
- package/src/cli/agent-knowledge-format.ts +11 -0
- package/src/cli/agent-knowledge-runtime.ts +92 -13
- package/src/cli/bundle-command.ts +5 -4
- package/src/cli/entrypoint.ts +5 -2
- package/src/cli/external-runtime.ts +2 -15
- package/src/cli/management.ts +4 -3
- package/src/input/commands/guidance-runtime.ts +1 -1
- package/src/input/commands/knowledge.ts +2 -2
- package/src/runtime/bootstrap.ts +2 -2
- package/src/runtime/connected-host-auth.ts +16 -0
- package/src/tools/agent-channel-send-tool.ts +5 -7
- package/src/tools/agent-harness-channel-metadata.ts +177 -0
- package/src/tools/agent-harness-connected-host-status.ts +1 -1
- package/src/tools/agent-harness-delegation-posture.ts +216 -0
- package/src/tools/agent-harness-keybinding-metadata.ts +57 -22
- package/src/tools/agent-harness-mcp-metadata.ts +246 -0
- package/src/tools/agent-harness-media-posture.ts +282 -0
- package/src/tools/agent-harness-metadata.ts +21 -4
- package/src/tools/agent-harness-model-routing.ts +501 -0
- package/src/tools/agent-harness-notification-metadata.ts +217 -0
- package/src/tools/agent-harness-operator-methods.ts +285 -0
- package/src/tools/agent-harness-pairing-posture.ts +265 -0
- package/src/tools/agent-harness-provider-account-metadata.ts +203 -0
- package/src/tools/agent-harness-release-evidence.ts +364 -0
- package/src/tools/agent-harness-release-readiness.ts +298 -0
- package/src/tools/agent-harness-security-posture.ts +646 -0
- package/src/tools/agent-harness-service-posture.ts +201 -0
- package/src/tools/agent-harness-session-metadata.ts +282 -0
- package/src/tools/agent-harness-setup-posture.ts +295 -0
- package/src/tools/agent-harness-tool-schema.ts +103 -27
- package/src/tools/agent-harness-tool.ts +209 -236
- package/src/tools/agent-harness-ui-surface-metadata.ts +1 -1
- package/src/tools/agent-harness-workspace-actions.ts +232 -0
- package/src/tools/agent-knowledge-ingest-tool.ts +6 -8
- package/src/tools/agent-knowledge-tool.ts +122 -23
- package/src/tools/agent-local-registry-tool.ts +4 -5
- package/src/tools/agent-media-generate-tool.ts +4 -6
- package/src/tools/agent-notify-tool.ts +5 -6
- package/src/tools/agent-operator-action-tool.ts +6 -8
- package/src/tools/agent-operator-briefing-tool.ts +3 -4
- package/src/tools/agent-reminder-schedule-tool.ts +6 -7
- package/src/tools/agent-tool-policy-guard.ts +8 -17
- package/src/tools/agent-work-plan-tool.ts +3 -4
- package/src/version.ts +2 -2
|
@@ -2,42 +2,37 @@ import type { Tool } from '@pellux/goodvibes-sdk/platform/types';
|
|
|
2
2
|
import type { ToolRegistry } from '@pellux/goodvibes-sdk/platform/tools';
|
|
3
3
|
import type { CommandContext, CommandRegistry } from '../input/command-registry.ts';
|
|
4
4
|
import { buildAgentWorkspaceCommandEditorSubmission, isAgentWorkspaceCommandEditorKind } from '../input/agent-workspace-command-editor.ts';
|
|
5
|
-
import { createAgentWorkspaceEditor } from '../input/agent-workspace-activation.ts';
|
|
6
|
-
import { AGENT_WORKSPACE_CATEGORIES } from '../input/agent-workspace-categories.ts';
|
|
7
5
|
import { isAffirmative, splitList } from '../input/agent-workspace-editors.ts';
|
|
8
6
|
import { createAgentWorkspaceLearnedBehavior } from '../input/agent-workspace-learned-behavior.ts';
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import type {
|
|
12
|
-
AgentWorkspaceAction,
|
|
13
|
-
AgentWorkspaceCategory,
|
|
14
|
-
AgentWorkspaceEditorKind,
|
|
15
|
-
AgentWorkspaceLocalEditor,
|
|
16
|
-
AgentWorkspaceLocalLibraryItem,
|
|
17
|
-
AgentWorkspaceRuntimeSnapshot,
|
|
18
|
-
} from '../input/agent-workspace-types.ts';
|
|
7
|
+
import type { AgentWorkspaceAction, AgentWorkspaceLocalEditor } from '../input/agent-workspace-types.ts';
|
|
8
|
+
import { channelReadinessCatalogStatus, describeHarnessChannel, listHarnessChannels } from './agent-harness-channel-metadata.ts';
|
|
19
9
|
import { blockedHarnessCliCommandTokens, describeHarnessCliCommand, listHarnessCliCommands, totalHarnessCliCommands } from './agent-harness-cli-metadata.ts';
|
|
20
10
|
import { describeHarnessCommand, listHarnessCommands, resolveHarnessCommandDetail, type CommandDetailLookup } from './agent-harness-command-catalog.ts';
|
|
11
|
+
import { delegationPostureCatalogStatus, delegationPostureSummary, describeHarnessDelegationRoute } from './agent-harness-delegation-posture.ts';
|
|
21
12
|
import { describeHarnessKeybinding, listHarnessKeybindings, listHarnessShortcuts, resetHarnessKeybinding, runHarnessKeybinding, setHarnessKeybinding, totalHarnessKeybindings, totalHarnessShortcuts } from './agent-harness-keybinding-metadata.ts';
|
|
13
|
+
import { describeHarnessMediaProvider, mediaPostureCatalogStatus, mediaPostureSummary } from './agent-harness-media-posture.ts';
|
|
14
|
+
import { describeHarnessNotificationTarget, listHarnessNotificationTargets, notificationTargetCatalogStatus } from './agent-harness-notification-metadata.ts';
|
|
22
15
|
import { describeHarnessPanel, listHarnessPanels, openHarnessPanel, totalHarnessPanels } from './agent-harness-panel-metadata.ts';
|
|
23
16
|
import { connectedHostStatusSummary } from './agent-harness-connected-host-status.ts';
|
|
24
|
-
import {
|
|
17
|
+
import { runLocalWorkspaceAction, runLocalWorkspaceEditorAction } from './agent-harness-local-operations.ts';
|
|
18
|
+
import { describeHarnessMcpServer, mcpServerCatalogStatus, mcpServerSummary } from './agent-harness-mcp-metadata.ts';
|
|
19
|
+
import { describeHarnessModelRoute, modelRoutingCatalogStatus, modelRoutingSummary } from './agent-harness-model-routing.ts';
|
|
25
20
|
import { describeHarnessModelTool, listHarnessModelTools } from './agent-harness-model-tool-catalog.ts';
|
|
21
|
+
import { describeHarnessOperatorMethod, operatorMethodCatalogStatus, operatorMethodSummary } from './agent-harness-operator-methods.ts';
|
|
22
|
+
import { describeHarnessPairingRoute, pairingPostureCatalogStatus, pairingPostureSummary } from './agent-harness-pairing-posture.ts';
|
|
23
|
+
import { describeHarnessProviderAccount, providerAccountCatalogStatus, providerAccountSummary } from './agent-harness-provider-account-metadata.ts';
|
|
24
|
+
import { describeHarnessReleaseEvidenceArtifact, releaseEvidenceBundleStatus, releaseEvidenceSummary } from './agent-harness-release-evidence.ts';
|
|
25
|
+
import { describeHarnessReleaseReadinessItem, releaseReadinessInventoryStatus, releaseReadinessSummary } from './agent-harness-release-readiness.ts';
|
|
26
|
+
import { describeHarnessSecurityFinding, describeHarnessSupportBundle, securityPostureCatalogStatus, securityPostureSummary, supportBundleCatalogStatus, supportBundleSummary } from './agent-harness-security-posture.ts';
|
|
27
|
+
import { describeHarnessSession, sessionCatalogStatus, sessionSummary } from './agent-harness-session-metadata.ts';
|
|
28
|
+
import { describeHarnessServiceEndpoint, servicePostureCatalogStatus, servicePostureSummary } from './agent-harness-service-posture.ts';
|
|
29
|
+
import { describeHarnessSetupItem, setupPostureCatalogStatus, setupPostureSummary } from './agent-harness-setup-posture.ts';
|
|
26
30
|
import { AGENT_HARNESS_MODES, AGENT_HARNESS_PARAMETER_PROPERTIES } from './agent-harness-tool-schema.ts';
|
|
27
31
|
import { describeHarnessUiSurface, listHarnessUiSurfaces, openHarnessUiSurface, totalHarnessUiSurfaces } from './agent-harness-ui-surface-metadata.ts';
|
|
32
|
+
import { AGENT_WORKSPACE_CATEGORIES, allWorkspaceActions, buildWorkspaceEditorContext, createWorkspaceEditor, describeWorkspaceAction, describeWorkspaceCategory, describeWorkspaceEditor, listWorkspaceActions, resolveWorkspaceActionDetail } from './agent-harness-workspace-actions.ts';
|
|
28
33
|
import { describeWorkspaceEditorModelExecution } from './agent-harness-workspace-editor-execution.ts';
|
|
29
|
-
import {
|
|
30
|
-
|
|
31
|
-
describeConnectedHostCapability,
|
|
32
|
-
settingsPolicySummary,
|
|
33
|
-
} from './agent-harness-metadata.ts';
|
|
34
|
-
import {
|
|
35
|
-
formatHarnessError,
|
|
36
|
-
listHarnessSettings,
|
|
37
|
-
resetHarnessSetting,
|
|
38
|
-
resolveHarnessSetting,
|
|
39
|
-
setHarnessSetting,
|
|
40
|
-
} from '../agent/harness-control.ts';
|
|
34
|
+
import { connectedHostSummary, describeConnectedHostCapability, settingsPolicySummary } from './agent-harness-metadata.ts';
|
|
35
|
+
import { formatHarnessError, listHarnessSettings, resetHarnessSetting, resolveHarnessSetting, setHarnessSetting } from '../agent/harness-control.ts';
|
|
41
36
|
|
|
42
37
|
type AgentHarnessMode = typeof AGENT_HARNESS_MODES[number];
|
|
43
38
|
|
|
@@ -48,6 +43,18 @@ interface AgentHarnessToolArgs {
|
|
|
48
43
|
readonly cliCommand?: unknown;
|
|
49
44
|
readonly commandName?: unknown;
|
|
50
45
|
readonly args?: unknown;
|
|
46
|
+
readonly channelId?: unknown;
|
|
47
|
+
readonly notificationTargetId?: unknown;
|
|
48
|
+
readonly providerId?: unknown;
|
|
49
|
+
readonly mcpServerId?: unknown;
|
|
50
|
+
readonly setupItemId?: unknown;
|
|
51
|
+
readonly modelRouteId?: unknown;
|
|
52
|
+
readonly pairingRouteId?: unknown;
|
|
53
|
+
readonly delegationRouteId?: unknown;
|
|
54
|
+
readonly findingId?: unknown;
|
|
55
|
+
readonly bundlePath?: unknown;
|
|
56
|
+
readonly mediaProviderId?: unknown;
|
|
57
|
+
readonly sessionId?: unknown;
|
|
51
58
|
readonly categoryId?: unknown;
|
|
52
59
|
readonly panelId?: unknown;
|
|
53
60
|
readonly actionId?: unknown;
|
|
@@ -59,6 +66,10 @@ interface AgentHarnessToolArgs {
|
|
|
59
66
|
readonly key?: unknown;
|
|
60
67
|
readonly value?: unknown;
|
|
61
68
|
readonly target?: unknown;
|
|
69
|
+
readonly artifactId?: unknown;
|
|
70
|
+
readonly itemId?: unknown;
|
|
71
|
+
readonly methodId?: unknown;
|
|
72
|
+
readonly endpointId?: unknown;
|
|
62
73
|
readonly capabilityId?: unknown;
|
|
63
74
|
readonly toolName?: unknown;
|
|
64
75
|
readonly category?: unknown;
|
|
@@ -77,30 +88,6 @@ interface AgentHarnessToolDeps {
|
|
|
77
88
|
readonly toolRegistry: ToolRegistry;
|
|
78
89
|
}
|
|
79
90
|
|
|
80
|
-
interface WorkspaceEditorContext {
|
|
81
|
-
readonly runtimeStarterTemplates: AgentWorkspaceRuntimeSnapshot['runtimeStarterTemplates'];
|
|
82
|
-
readonly selectedRoutine: AgentWorkspaceLocalLibraryItem | null;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
interface WorkspaceActionLookup {
|
|
86
|
-
readonly source: 'actionId' | 'command' | 'target' | 'query';
|
|
87
|
-
readonly input: string;
|
|
88
|
-
readonly resolvedBy: 'id' | 'case-insensitive-id' | 'label' | 'case-insensitive-label' | 'command' | 'search';
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
type WorkspaceActionResolution =
|
|
92
|
-
| {
|
|
93
|
-
readonly status: 'found';
|
|
94
|
-
readonly category: AgentWorkspaceCategory;
|
|
95
|
-
readonly action: AgentWorkspaceAction;
|
|
96
|
-
readonly lookup: WorkspaceActionLookup;
|
|
97
|
-
}
|
|
98
|
-
| {
|
|
99
|
-
readonly status: 'ambiguous';
|
|
100
|
-
readonly input: string;
|
|
101
|
-
readonly candidates: readonly { readonly actionId: string; readonly categoryId: string; readonly label: string; readonly command?: string }[];
|
|
102
|
-
};
|
|
103
|
-
|
|
104
91
|
function isMode(value: unknown): value is AgentHarnessMode {
|
|
105
92
|
return typeof value === 'string' && AGENT_HARNESS_MODES.includes(value as AgentHarnessMode);
|
|
106
93
|
}
|
|
@@ -140,173 +127,6 @@ function output(value: unknown): { readonly success: true; readonly output: stri
|
|
|
140
127
|
|
|
141
128
|
function error(message: string): { readonly success: false; readonly error: string } { return { success: false, error: message }; }
|
|
142
129
|
|
|
143
|
-
function allWorkspaceActions(): ReadonlyArray<{
|
|
144
|
-
readonly category: AgentWorkspaceCategory;
|
|
145
|
-
readonly action: AgentWorkspaceAction;
|
|
146
|
-
}> {
|
|
147
|
-
return AGENT_WORKSPACE_CATEGORIES.flatMap((category) => category.actions.map((action) => ({ category, action })));
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
function describeWorkspaceCategory(category: AgentWorkspaceCategory): Record<string, unknown> {
|
|
151
|
-
return {
|
|
152
|
-
id: category.id,
|
|
153
|
-
group: category.group,
|
|
154
|
-
label: category.label,
|
|
155
|
-
summary: category.summary,
|
|
156
|
-
detail: category.detail,
|
|
157
|
-
actions: category.actions.length,
|
|
158
|
-
};
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
function describeWorkspaceEditor(editor: AgentWorkspaceLocalEditor): Record<string, unknown> {
|
|
162
|
-
return {
|
|
163
|
-
kind: editor.kind,
|
|
164
|
-
mode: editor.mode,
|
|
165
|
-
title: editor.title,
|
|
166
|
-
message: editor.message,
|
|
167
|
-
fields: editor.fields.map((field) => ({
|
|
168
|
-
id: field.id,
|
|
169
|
-
label: field.label,
|
|
170
|
-
required: field.required,
|
|
171
|
-
multiline: field.multiline,
|
|
172
|
-
hint: field.hint,
|
|
173
|
-
redact: field.redact === true,
|
|
174
|
-
default: field.redact ? '<redacted>' : field.value,
|
|
175
|
-
})),
|
|
176
|
-
};
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
function selectedRoutineFromArgs(
|
|
180
|
-
snapshot: AgentWorkspaceRuntimeSnapshot,
|
|
181
|
-
args: AgentHarnessToolArgs,
|
|
182
|
-
): AgentWorkspaceLocalLibraryItem | null {
|
|
183
|
-
const fields = readFieldMap(args.fields);
|
|
184
|
-
const routineId = readString(args.recordId) || readString(fields.routineId) || readString(fields.id);
|
|
185
|
-
if (!routineId) return null;
|
|
186
|
-
return snapshot.localRoutines.find((routine) => routine.id === routineId || routine.name.toLowerCase() === routineId.toLowerCase()) ?? null;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
function buildWorkspaceEditorContext(context: CommandContext, args: AgentHarnessToolArgs): WorkspaceEditorContext {
|
|
190
|
-
try {
|
|
191
|
-
const snapshot = buildAgentWorkspaceRuntimeSnapshot(context);
|
|
192
|
-
return {
|
|
193
|
-
runtimeStarterTemplates: snapshot.runtimeStarterTemplates,
|
|
194
|
-
selectedRoutine: selectedRoutineFromArgs(snapshot, args),
|
|
195
|
-
};
|
|
196
|
-
} catch {
|
|
197
|
-
return {
|
|
198
|
-
runtimeStarterTemplates: [],
|
|
199
|
-
selectedRoutine: null,
|
|
200
|
-
};
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
function createWorkspaceEditor(
|
|
205
|
-
editorKind: AgentWorkspaceEditorKind,
|
|
206
|
-
editorContext: WorkspaceEditorContext | null,
|
|
207
|
-
): AgentWorkspaceLocalEditor | null {
|
|
208
|
-
return createAgentWorkspaceEditor(editorKind, {
|
|
209
|
-
runtimeStarterTemplates: editorContext?.runtimeStarterTemplates ?? [],
|
|
210
|
-
selectedRoutine: editorKind === 'routine-schedule' ? editorContext?.selectedRoutine ?? null : null,
|
|
211
|
-
});
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
function describeWorkspaceAction(
|
|
215
|
-
category: AgentWorkspaceCategory,
|
|
216
|
-
action: AgentWorkspaceAction,
|
|
217
|
-
options: { readonly includeEditor?: boolean; readonly editorContext?: WorkspaceEditorContext | null; readonly lookup?: WorkspaceActionLookup } = {},
|
|
218
|
-
): Record<string, unknown> {
|
|
219
|
-
const editor = options.includeEditor && action.editorKind ? createWorkspaceEditor(action.editorKind, options.editorContext ?? null) : null;
|
|
220
|
-
return {
|
|
221
|
-
id: action.id,
|
|
222
|
-
categoryId: category.id,
|
|
223
|
-
category: category.label,
|
|
224
|
-
group: category.group,
|
|
225
|
-
label: action.label,
|
|
226
|
-
detail: action.detail,
|
|
227
|
-
kind: action.kind,
|
|
228
|
-
safety: action.safety,
|
|
229
|
-
...(action.command ? { command: action.command } : {}),
|
|
230
|
-
...(action.targetCategoryId ? { targetCategoryId: action.targetCategoryId } : {}),
|
|
231
|
-
...(action.editorKind ? { editorKind: action.editorKind } : {}),
|
|
232
|
-
...(action.localKind ? { localKind: action.localKind } : {}),
|
|
233
|
-
...(action.localOperation ? { localOperation: action.localOperation } : {}),
|
|
234
|
-
...(options.lookup ? { lookup: options.lookup } : {}),
|
|
235
|
-
...(editor ? { editor: describeWorkspaceEditor(editor) } : {}),
|
|
236
|
-
...(action.kind === 'local-selection' || action.kind === 'local-operation' ? {
|
|
237
|
-
modelExecution: describeLocalWorkspaceModelExecution(action),
|
|
238
|
-
} : {}),
|
|
239
|
-
...(action.kind === 'editor' && action.editorKind ? {
|
|
240
|
-
modelExecution: describeWorkspaceEditorModelExecution(action.editorKind),
|
|
241
|
-
} : {}),
|
|
242
|
-
};
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
function listWorkspaceActions(deps: AgentHarnessToolDeps, args: AgentHarnessToolArgs): readonly Record<string, unknown>[] {
|
|
246
|
-
const query = readString(args.query);
|
|
247
|
-
const categoryId = readString(args.categoryId || args.category);
|
|
248
|
-
const limit = readLimit(args.limit, 200);
|
|
249
|
-
const includeEditor = args.includeParameters === true;
|
|
250
|
-
const editorContext = includeEditor ? buildWorkspaceEditorContext(deps.commandContext, args) : null;
|
|
251
|
-
const source = query
|
|
252
|
-
? searchAgentWorkspaceActions(AGENT_WORKSPACE_CATEGORIES, query).map((result) => ({ category: result.category, action: result.action }))
|
|
253
|
-
: allWorkspaceActions();
|
|
254
|
-
return source
|
|
255
|
-
.filter((entry) => !categoryId || entry.category.id === categoryId)
|
|
256
|
-
.slice(0, limit)
|
|
257
|
-
.map((entry) => describeWorkspaceAction(entry.category, entry.action, { includeEditor, editorContext }));
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
function workspaceActionLookupFromArgs(args: AgentHarnessToolArgs): { readonly source: WorkspaceActionLookup['source']; readonly input: string } | null {
|
|
261
|
-
const actionId = readString(args.actionId);
|
|
262
|
-
if (actionId) return { source: 'actionId', input: actionId };
|
|
263
|
-
const command = readString(args.command);
|
|
264
|
-
if (command) return { source: 'command', input: command };
|
|
265
|
-
const target = readString(args.target);
|
|
266
|
-
if (target) return { source: 'target', input: target };
|
|
267
|
-
const query = readString(args.query);
|
|
268
|
-
return query ? { source: 'query', input: query } : null;
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
function describeWorkspaceActionCandidates(
|
|
272
|
-
entries: readonly { readonly category: AgentWorkspaceCategory; readonly action: AgentWorkspaceAction }[],
|
|
273
|
-
): readonly { readonly actionId: string; readonly categoryId: string; readonly label: string; readonly command?: string }[] {
|
|
274
|
-
return entries.slice(0, 8).map((entry) => ({
|
|
275
|
-
actionId: entry.action.id,
|
|
276
|
-
categoryId: entry.category.id,
|
|
277
|
-
label: entry.action.label,
|
|
278
|
-
...(entry.action.command ? { command: entry.action.command } : {}),
|
|
279
|
-
}));
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
function resolveWorkspaceActionDetail(args: AgentHarnessToolArgs): WorkspaceActionResolution | null {
|
|
283
|
-
const lookup = workspaceActionLookupFromArgs(args);
|
|
284
|
-
const categoryId = readString(args.categoryId || args.category);
|
|
285
|
-
if (!lookup) return null;
|
|
286
|
-
const entries = allWorkspaceActions().filter((entry) => !categoryId || entry.category.id === categoryId);
|
|
287
|
-
const normalized = lookup.input.toLowerCase();
|
|
288
|
-
const commandInput = lookup.source === 'command' ? lookup.input.trim() : '';
|
|
289
|
-
|
|
290
|
-
const exactId = entries.find((entry) => entry.action.id === lookup.input);
|
|
291
|
-
if (exactId) return { status: 'found', ...exactId, lookup: { ...lookup, resolvedBy: 'id' } };
|
|
292
|
-
const exactLabel = entries.find((entry) => entry.action.label === lookup.input);
|
|
293
|
-
if (exactLabel) return { status: 'found', ...exactLabel, lookup: { ...lookup, resolvedBy: 'label' } };
|
|
294
|
-
const exactCommand = commandInput ? entries.find((entry) => entry.action.command === commandInput) : null;
|
|
295
|
-
if (exactCommand) return { status: 'found', ...exactCommand, lookup: { ...lookup, resolvedBy: 'command' } };
|
|
296
|
-
|
|
297
|
-
const insensitiveId = entries.find((entry) => entry.action.id.toLowerCase() === normalized);
|
|
298
|
-
if (insensitiveId) return { status: 'found', ...insensitiveId, lookup: { ...lookup, resolvedBy: 'case-insensitive-id' } };
|
|
299
|
-
const insensitiveLabel = entries.find((entry) => entry.action.label.toLowerCase() === normalized);
|
|
300
|
-
if (insensitiveLabel) return { status: 'found', ...insensitiveLabel, lookup: { ...lookup, resolvedBy: 'case-insensitive-label' } };
|
|
301
|
-
|
|
302
|
-
const searched = searchAgentWorkspaceActions(AGENT_WORKSPACE_CATEGORIES, lookup.input)
|
|
303
|
-
.map((result) => ({ category: result.category, action: result.action }))
|
|
304
|
-
.filter((entry) => !categoryId || entry.category.id === categoryId);
|
|
305
|
-
if (searched.length === 1) return { status: 'found', ...searched[0]!, lookup: { ...lookup, resolvedBy: 'search' } };
|
|
306
|
-
if (searched.length > 1) return { status: 'ambiguous', input: lookup.input, candidates: describeWorkspaceActionCandidates(searched) };
|
|
307
|
-
return null;
|
|
308
|
-
}
|
|
309
|
-
|
|
310
130
|
function requireConfirmedAction(args: AgentHarnessToolArgs, action: string): string | null {
|
|
311
131
|
const explicitUserRequest = readString(args.explicitUserRequest);
|
|
312
132
|
if (!explicitUserRequest) return `${action} requires explicitUserRequest with the user's exact request or a short faithful summary.`;
|
|
@@ -529,10 +349,9 @@ export function createAgentHarnessTool(deps: AgentHarnessToolDeps): Tool {
|
|
|
529
349
|
definition: {
|
|
530
350
|
name: 'agent_harness',
|
|
531
351
|
description: [
|
|
532
|
-
'
|
|
533
|
-
'Use
|
|
534
|
-
'
|
|
535
|
-
'This tool preserves Agent product boundaries: connected-host lifecycle and listener posture stay externally owned, connected-host mode reports allowed and blocked route families, and secret-backed settings store raw values through the secret manager while config receives only a secret reference.',
|
|
352
|
+
'Inspect or operate the GoodVibes Agent harness.',
|
|
353
|
+
'Use summary for mode help.',
|
|
354
|
+
'Effects require confirm:true plus explicitUserRequest; no host lifecycle or raw secrets.',
|
|
536
355
|
].join(' '),
|
|
537
356
|
parameters: {
|
|
538
357
|
type: 'object',
|
|
@@ -556,21 +375,65 @@ export function createAgentHarnessTool(deps: AgentHarnessToolDeps): Tool {
|
|
|
556
375
|
shortcuts: totalHarnessShortcuts(deps.commandContext),
|
|
557
376
|
keybindings: totalHarnessKeybindings(deps.commandContext),
|
|
558
377
|
commands: deps.commandRegistry.list().length,
|
|
378
|
+
channelReadiness: channelReadinessCatalogStatus(deps.commandContext),
|
|
379
|
+
notificationTargets: notificationTargetCatalogStatus(deps.commandContext),
|
|
380
|
+
providerAccounts: await providerAccountCatalogStatus(deps.commandContext).catch((err) => ({
|
|
381
|
+
modes: ['provider_accounts', 'provider_account'],
|
|
382
|
+
status: 'unavailable',
|
|
383
|
+
error: formatHarnessError(err),
|
|
384
|
+
})),
|
|
385
|
+
mcpServers: mcpServerCatalogStatus(deps.commandContext),
|
|
386
|
+
setupPosture: await setupPostureCatalogStatus(deps.commandContext).catch((err) => ({
|
|
387
|
+
modes: ['setup_posture', 'setup_item'],
|
|
388
|
+
status: 'unavailable',
|
|
389
|
+
error: formatHarnessError(err),
|
|
390
|
+
})),
|
|
391
|
+
modelRouting: await modelRoutingCatalogStatus(deps.commandContext).catch((err) => ({
|
|
392
|
+
modes: ['model_routing', 'model_route'],
|
|
393
|
+
status: 'unavailable',
|
|
394
|
+
error: formatHarnessError(err),
|
|
395
|
+
})),
|
|
396
|
+
pairingPosture: pairingPostureCatalogStatus(deps.commandContext),
|
|
397
|
+
delegationPosture: delegationPostureCatalogStatus(deps.commandContext),
|
|
398
|
+
securityPosture: securityPostureCatalogStatus(deps.commandContext),
|
|
399
|
+
supportBundles: supportBundleCatalogStatus(),
|
|
400
|
+
mediaPosture: mediaPostureCatalogStatus(deps.commandContext),
|
|
401
|
+
sessions: sessionCatalogStatus(deps.commandContext),
|
|
559
402
|
settings: deps.commandContext.platform.configManager.getSchema().length,
|
|
560
403
|
workspaceCategories: AGENT_WORKSPACE_CATEGORIES.length,
|
|
561
404
|
workspaceActions: allWorkspaceActions().length,
|
|
562
405
|
tools: deps.toolRegistry.getToolDefinitions().length,
|
|
406
|
+
releaseEvidence: releaseEvidenceBundleStatus(),
|
|
407
|
+
releaseReadiness: releaseReadinessInventoryStatus(),
|
|
408
|
+
operatorMethods: operatorMethodCatalogStatus(),
|
|
409
|
+
servicePosture: servicePostureCatalogStatus(),
|
|
563
410
|
modelAccess: {
|
|
564
|
-
cliCommands: '
|
|
565
|
-
panels: '
|
|
566
|
-
uiSurfaces: '
|
|
567
|
-
shortcuts: '
|
|
568
|
-
slashCommands: '
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
411
|
+
cliCommands: 'List mode:"cli_commands"; inspect mode:"cli_command" with cliCommand|commandName|query. Discovery only.',
|
|
412
|
+
panels: 'List mode:"panels"; inspect mode:"panel"; navigate mode:"open_panel" with confirm:true and explicitUserRequest.',
|
|
413
|
+
uiSurfaces: 'List mode:"ui_surfaces"; inspect mode:"ui_surface"; navigate mode:"open_ui_surface" with confirmation.',
|
|
414
|
+
shortcuts: 'List mode:"shortcuts"; inspect mode:"keybinding"; run mode:"run_keybinding"; edit with set_keybinding/reset_keybinding and confirmation.',
|
|
415
|
+
slashCommands: 'List mode:"commands"; inspect mode:"command"; execute mode:"run_command" with confirmation.',
|
|
416
|
+
channels: 'List mode:"channels"; inspect mode:"channel"; deliver with agent_channel_send and confirmation.',
|
|
417
|
+
notifications: 'List mode:"notifications"; inspect mode:"notification_target"; deliver with agent_notify and confirmation.',
|
|
418
|
+
providerAccounts: 'List mode:"provider_accounts"; inspect mode:"provider_account"; auth changes stay confirmed workspace/command flows.',
|
|
419
|
+
mcpServers: 'List mode:"mcp_servers"; inspect mode:"mcp_server"; trust/server changes stay confirmed workspace/command flows.',
|
|
420
|
+
setupPosture: 'List mode:"setup_posture"; inspect mode:"setup_item"; setup mutations stay confirmed visible flows.',
|
|
421
|
+
modelRouting: 'List mode:"model_routing"; inspect mode:"model_route"; selection and provider edits stay confirmed visible flows.',
|
|
422
|
+
pairingPosture: 'List mode:"pairing_posture"; inspect mode:"pairing_route"; raw token/QR and pairing effects stay visible user flows.',
|
|
423
|
+
delegationPosture: 'List mode:"delegation_posture"; inspect mode:"delegation_route"; delegated submission stays confirmed visible flow.',
|
|
424
|
+
securityPosture: 'List mode:"security_posture"; inspect mode:"security_finding"; mutate only through confirmed security routes.',
|
|
425
|
+
supportBundles: 'List mode:"support_bundles"; inspect mode:"support_bundle"; export/import stays confirmation-gated.',
|
|
426
|
+
mediaPosture: 'List mode:"media_posture"; inspect mode:"media_provider"; generate with agent_media_generate and confirmation.',
|
|
427
|
+
sessions: 'List mode:"sessions"; inspect mode:"session"; save/resume/export/delete stays visible confirmed flow.',
|
|
428
|
+
workspace: 'List mode:"workspace" or mode:"workspace_categories"; actions via workspace_actions/workspace_action/run_workspace_action; includeParameters:true inlines editor schemas.',
|
|
429
|
+
settings: 'List mode:"settings" with category|prefix|query|includeHidden:true; get_setting/set_setting/reset_setting use key|target|query and confirmation for writes.',
|
|
430
|
+
tools: 'List mode:"tools" with query|limit|includeParameters:true; inspect mode:"tool" with toolName|target|query.',
|
|
431
|
+
releaseEvidence: 'List mode:"release_evidence"; inspect mode:"release_evidence_artifact"; includeParameters:true inlines artifact detail.',
|
|
432
|
+
releaseReadiness: 'List mode:"release_readiness"; inspect mode:"release_readiness_item"; includeParameters:true inlines item detail.',
|
|
433
|
+
operatorMethods: 'List mode:"operator_methods"; inspect mode:"operator_method"; execute only through the returned first-class tool.',
|
|
434
|
+
servicePosture: 'List mode:"service_posture"; inspect mode:"service_endpoint"; includeParameters:true adds probes and redacted log tail.',
|
|
435
|
+
connectedHost: 'Map mode:"connected_host"; inspect mode:"connected_host_capability"; no lifecycle control.',
|
|
436
|
+
connectedHostStatus: 'Live read-only mode:"connected_host_status" for host reachability, SDK compatibility, token posture, and Knowledge readiness.',
|
|
574
437
|
},
|
|
575
438
|
settingsPolicy: settingsPolicySummary(),
|
|
576
439
|
connectedHost: connectedHostSummary(deps.commandContext, deps.toolRegistry),
|
|
@@ -650,6 +513,89 @@ export function createAgentHarnessTool(deps: AgentHarnessToolDeps): Tool {
|
|
|
650
513
|
: error(`Unknown slash command ${query || '<missing>'}. Use mode:"commands" to inspect available commands.`);
|
|
651
514
|
}
|
|
652
515
|
if (args.mode === 'run_command') return runCommand(deps, args);
|
|
516
|
+
if (args.mode === 'channels') return output(listHarnessChannels(deps.commandContext, args));
|
|
517
|
+
if (args.mode === 'channel') {
|
|
518
|
+
const resolved = describeHarnessChannel(deps.commandContext, args);
|
|
519
|
+
if (resolved.status === 'found') return output(resolved.channel);
|
|
520
|
+
if (resolved.status === 'ambiguous') return error(`Ambiguous channel ${resolved.input}. Candidates: ${JSON.stringify(resolved.candidates)}`);
|
|
521
|
+
return error(resolved.usage);
|
|
522
|
+
}
|
|
523
|
+
if (args.mode === 'notifications') return output(listHarnessNotificationTargets(deps.commandContext, args));
|
|
524
|
+
if (args.mode === 'notification_target') {
|
|
525
|
+
const resolved = describeHarnessNotificationTarget(deps.commandContext, args);
|
|
526
|
+
if (resolved.status === 'found') return output(resolved.target);
|
|
527
|
+
if (resolved.status === 'ambiguous') return error(`Ambiguous notification target ${resolved.input}. Candidates: ${JSON.stringify(resolved.candidates)}`);
|
|
528
|
+
return error(resolved.usage);
|
|
529
|
+
}
|
|
530
|
+
if (args.mode === 'provider_accounts') return output(await providerAccountSummary(deps.commandContext, args));
|
|
531
|
+
if (args.mode === 'provider_account') {
|
|
532
|
+
const resolved = await describeHarnessProviderAccount(deps.commandContext, args);
|
|
533
|
+
if (resolved.status === 'found') return output(resolved.account);
|
|
534
|
+
if (resolved.status === 'ambiguous') return error(`Ambiguous provider account ${resolved.input}. Candidates: ${JSON.stringify(resolved.candidates)}`);
|
|
535
|
+
return error(resolved.usage);
|
|
536
|
+
}
|
|
537
|
+
if (args.mode === 'mcp_servers') return output(await mcpServerSummary(deps.commandContext, args));
|
|
538
|
+
if (args.mode === 'mcp_server') {
|
|
539
|
+
const resolved = await describeHarnessMcpServer(deps.commandContext, args);
|
|
540
|
+
if (resolved.status === 'found') return output(resolved.server);
|
|
541
|
+
if (resolved.status === 'ambiguous') return error(`Ambiguous MCP server ${resolved.input}. Candidates: ${JSON.stringify(resolved.candidates)}`);
|
|
542
|
+
return error(resolved.usage);
|
|
543
|
+
}
|
|
544
|
+
if (args.mode === 'setup_posture') return output(await setupPostureSummary(deps.commandContext, args));
|
|
545
|
+
if (args.mode === 'setup_item') {
|
|
546
|
+
const resolved = await describeHarnessSetupItem(deps.commandContext, args);
|
|
547
|
+
if (resolved.status === 'found') return output(resolved.item);
|
|
548
|
+
if (resolved.status === 'ambiguous') return error(`Ambiguous setup item ${resolved.input}. Candidates: ${JSON.stringify(resolved.candidates)}`);
|
|
549
|
+
return error(resolved.usage);
|
|
550
|
+
}
|
|
551
|
+
if (args.mode === 'model_routing') return output(await modelRoutingSummary(deps.commandContext, args));
|
|
552
|
+
if (args.mode === 'model_route') {
|
|
553
|
+
const resolved = await describeHarnessModelRoute(deps.commandContext, args);
|
|
554
|
+
if (resolved.status === 'found') return output(resolved.route);
|
|
555
|
+
if (resolved.status === 'ambiguous') return error(`Ambiguous model route ${resolved.input}. Candidates: ${JSON.stringify(resolved.candidates)}`);
|
|
556
|
+
return error(resolved.usage);
|
|
557
|
+
}
|
|
558
|
+
if (args.mode === 'pairing_posture') return output(pairingPostureSummary(deps.commandContext, args));
|
|
559
|
+
if (args.mode === 'pairing_route') {
|
|
560
|
+
const resolved = describeHarnessPairingRoute(deps.commandContext, args);
|
|
561
|
+
if (resolved.status === 'found') return output(resolved.route);
|
|
562
|
+
if (resolved.status === 'ambiguous') return error(`Ambiguous pairing route ${resolved.input}. Candidates: ${JSON.stringify(resolved.candidates)}`);
|
|
563
|
+
return error(resolved.usage);
|
|
564
|
+
}
|
|
565
|
+
if (args.mode === 'delegation_posture') return output(delegationPostureSummary(deps.commandContext, args));
|
|
566
|
+
if (args.mode === 'delegation_route') {
|
|
567
|
+
const resolved = describeHarnessDelegationRoute(deps.commandContext, args);
|
|
568
|
+
if (resolved.status === 'found') return output(resolved.route);
|
|
569
|
+
if (resolved.status === 'ambiguous') return error(`Ambiguous delegation route ${resolved.input}. Candidates: ${JSON.stringify(resolved.candidates)}`);
|
|
570
|
+
return error(resolved.usage);
|
|
571
|
+
}
|
|
572
|
+
if (args.mode === 'security_posture') return output(await securityPostureSummary(deps.commandContext, args));
|
|
573
|
+
if (args.mode === 'security_finding') {
|
|
574
|
+
const resolved = describeHarnessSecurityFinding(deps.commandContext, args);
|
|
575
|
+
if (resolved.status === 'found') return output(resolved.finding);
|
|
576
|
+
if (resolved.status === 'ambiguous') return error(`Ambiguous security finding ${resolved.input}. Candidates: ${JSON.stringify(resolved.candidates)}`);
|
|
577
|
+
return error(resolved.usage);
|
|
578
|
+
}
|
|
579
|
+
if (args.mode === 'support_bundles') return output(supportBundleSummary(args));
|
|
580
|
+
if (args.mode === 'support_bundle') {
|
|
581
|
+
const resolved = describeHarnessSupportBundle(deps.commandContext, args);
|
|
582
|
+
if (resolved.status === 'found') return output(resolved.bundle);
|
|
583
|
+
return error(resolved.usage);
|
|
584
|
+
}
|
|
585
|
+
if (args.mode === 'media_posture') return output(await mediaPostureSummary(deps.commandContext, args));
|
|
586
|
+
if (args.mode === 'media_provider') {
|
|
587
|
+
const resolved = await describeHarnessMediaProvider(deps.commandContext, args);
|
|
588
|
+
if (resolved.status === 'found') return output(resolved.provider);
|
|
589
|
+
if (resolved.status === 'ambiguous') return error(`Ambiguous media provider ${resolved.input}. Candidates: ${JSON.stringify(resolved.candidates)}`);
|
|
590
|
+
return error(resolved.usage);
|
|
591
|
+
}
|
|
592
|
+
if (args.mode === 'sessions') return output(sessionSummary(deps.commandContext, args));
|
|
593
|
+
if (args.mode === 'session') {
|
|
594
|
+
const resolved = describeHarnessSession(deps.commandContext, args);
|
|
595
|
+
if (resolved.status === 'found') return output(resolved.session);
|
|
596
|
+
if (resolved.status === 'ambiguous') return error(`Ambiguous session ${resolved.input}. Candidates: ${JSON.stringify(resolved.candidates)}`);
|
|
597
|
+
return error(resolved.usage);
|
|
598
|
+
}
|
|
653
599
|
if (args.mode === 'settings') {
|
|
654
600
|
const settings = listHarnessSettings(deps.commandContext.platform.configManager, {
|
|
655
601
|
category: readString(args.category) || undefined,
|
|
@@ -711,7 +657,7 @@ export function createAgentHarnessTool(deps: AgentHarnessToolDeps): Tool {
|
|
|
711
657
|
});
|
|
712
658
|
}
|
|
713
659
|
if (args.mode === 'workspace_actions') {
|
|
714
|
-
const actions = listWorkspaceActions(deps, args);
|
|
660
|
+
const actions = listWorkspaceActions(deps.commandContext, args);
|
|
715
661
|
return output({ actions, returned: actions.length, total: allWorkspaceActions().length });
|
|
716
662
|
}
|
|
717
663
|
if (args.mode === 'workspace_action') {
|
|
@@ -737,6 +683,37 @@ export function createAgentHarnessTool(deps: AgentHarnessToolDeps): Tool {
|
|
|
737
683
|
if (resolved?.status === 'ambiguous') return error(`Ambiguous model tool ${resolved.input}. Candidates: ${JSON.stringify(resolved.candidates)}`);
|
|
738
684
|
return error(`Unknown model tool ${query || '<missing>'}. Use mode:"tools" to inspect available model tools.`);
|
|
739
685
|
}
|
|
686
|
+
if (args.mode === 'release_evidence') return output(releaseEvidenceSummary(args));
|
|
687
|
+
if (args.mode === 'release_evidence_artifact') {
|
|
688
|
+
const resolved = describeHarnessReleaseEvidenceArtifact(args);
|
|
689
|
+
if (resolved.status === 'found') return output(resolved);
|
|
690
|
+
if (resolved.status === 'ambiguous') return error(`Ambiguous release evidence artifact ${resolved.input}. Candidates: ${JSON.stringify(resolved.candidates)}`);
|
|
691
|
+
if (resolved.status === 'missing_lookup') return error(resolved.usage ?? 'release_evidence_artifact requires artifactId, target, or query.');
|
|
692
|
+
return error(`Unknown release evidence artifact ${readString(args.artifactId || args.target || args.query) || '<missing>'}. Use mode:"release_evidence" to inspect available artifacts.`);
|
|
693
|
+
}
|
|
694
|
+
if (args.mode === 'release_readiness') return output(releaseReadinessSummary(args));
|
|
695
|
+
if (args.mode === 'release_readiness_item') {
|
|
696
|
+
const resolved = describeHarnessReleaseReadinessItem(args);
|
|
697
|
+
if (resolved.status === 'found') return output(resolved);
|
|
698
|
+
if (resolved.status === 'ambiguous') return error(`Ambiguous release readiness item ${resolved.input}. Candidates: ${JSON.stringify(resolved.candidates)}`);
|
|
699
|
+
if (resolved.status === 'unavailable') return output(resolved);
|
|
700
|
+
if (resolved.status === 'missing_lookup') return error(resolved.usage ?? 'release_readiness_item requires itemId, target, or query.');
|
|
701
|
+
return error(`Unknown release readiness item ${readString(args.itemId || args.target || args.query) || '<missing>'}. Use mode:"release_readiness" to inspect available items.`);
|
|
702
|
+
}
|
|
703
|
+
if (args.mode === 'operator_methods') return output(operatorMethodSummary(args));
|
|
704
|
+
if (args.mode === 'operator_method') {
|
|
705
|
+
const resolved = describeHarnessOperatorMethod(args);
|
|
706
|
+
if (resolved.status === 'found') return output(resolved.method);
|
|
707
|
+
if (resolved.status === 'ambiguous') return error(`Ambiguous operator method ${resolved.input}. Candidates: ${JSON.stringify(resolved.candidates)}`);
|
|
708
|
+
return error(resolved.usage);
|
|
709
|
+
}
|
|
710
|
+
if (args.mode === 'service_posture') return output(await servicePostureSummary(deps.commandContext, args));
|
|
711
|
+
if (args.mode === 'service_endpoint') {
|
|
712
|
+
const resolved = await describeHarnessServiceEndpoint(deps.commandContext, args);
|
|
713
|
+
if (resolved.status === 'found') return output(resolved.endpoint);
|
|
714
|
+
if (resolved.status === 'ambiguous') return error(`Ambiguous service endpoint ${resolved.input}. Candidates: ${JSON.stringify(resolved.candidates)}`);
|
|
715
|
+
return error(resolved.usage);
|
|
716
|
+
}
|
|
740
717
|
if (args.mode === 'connected_host') return output(connectedHostSummary(deps.commandContext, deps.toolRegistry));
|
|
741
718
|
if (args.mode === 'connected_host_capability') {
|
|
742
719
|
const query = readString(args.capabilityId || args.target || args.query);
|
|
@@ -759,9 +736,5 @@ export function registerAgentHarnessTool(
|
|
|
759
736
|
commandRegistry: CommandRegistry,
|
|
760
737
|
commandContext: CommandContext,
|
|
761
738
|
): void {
|
|
762
|
-
registry.register(createAgentHarnessTool({
|
|
763
|
-
commandRegistry,
|
|
764
|
-
commandContext,
|
|
765
|
-
toolRegistry: registry,
|
|
766
|
-
}));
|
|
739
|
+
registry.register(createAgentHarnessTool({ commandRegistry, commandContext, toolRegistry: registry }));
|
|
767
740
|
}
|
|
@@ -216,7 +216,7 @@ const UI_SURFACES: readonly UiSurfaceDefinition[] = [
|
|
|
216
216
|
id: 'knowledge-panel',
|
|
217
217
|
label: 'Knowledge Panel',
|
|
218
218
|
kind: 'workspace',
|
|
219
|
-
summary: 'Agent Knowledge operator surface for isolated status, source libraries,
|
|
219
|
+
summary: 'Agent Knowledge operator surface for isolated status, source/node/issue libraries, item lookup, map review, connectors, ask/search, and ingest forms.',
|
|
220
220
|
command: '/knowledge',
|
|
221
221
|
preferredModelRoute: 'Use agent_knowledge, agent_knowledge_ingest, workspace_actions, or run_command /knowledge for concrete model operation.',
|
|
222
222
|
parameters: ['pane'],
|