@pellux/goodvibes-agent 1.0.0 → 1.0.2
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 +14 -0
- package/README.md +8 -4
- package/dist/package/main.js +14046 -12557
- package/docs/README.md +4 -2
- package/docs/channels-remote-and-api.md +4 -0
- package/docs/connected-host.md +2 -0
- package/docs/getting-started.md +6 -2
- package/docs/knowledge-artifacts-and-multimodal.md +5 -3
- package/docs/project-planning.md +3 -1
- package/docs/providers-and-routing.md +3 -0
- package/docs/release-and-publishing.md +7 -6
- package/docs/tools-and-commands.md +97 -2
- package/docs/voice-and-live-tts.md +2 -0
- package/package.json +1 -1
- package/src/agent/harness-control.ts +266 -0
- package/src/cli/local-library-command.ts +25 -5
- package/src/cli/routines-command.ts +15 -3
- package/src/config/agent-settings-policy.ts +44 -0
- package/src/input/agent-workspace-activation.ts +14 -6
- package/src/input/agent-workspace-knowledge-url-editor.ts +4 -11
- package/src/input/commands/agent-local-library-args.ts +52 -0
- package/src/input/commands/agent-skills-runtime.ts +4 -29
- package/src/input/commands/mcp-runtime.ts +62 -15
- package/src/input/commands/operator-runtime.ts +139 -3
- package/src/input/commands/personas-runtime.ts +4 -29
- package/src/input/commands/routines-runtime.ts +4 -29
- package/src/input/session-picker-modal.ts +3 -2
- package/src/input/settings-modal-agent-policy.ts +5 -44
- package/src/runtime/bootstrap.ts +3 -0
- package/src/tools/agent-harness-local-operations.ts +233 -0
- package/src/tools/agent-harness-metadata.ts +300 -0
- package/src/tools/agent-harness-tool.ts +774 -0
- package/src/tools/agent-local-registry-requirements.ts +18 -0
- package/src/tools/agent-local-registry-tool.ts +88 -34
- package/src/version.ts +1 -1
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
import type { ToolRegistry } from '@pellux/goodvibes-sdk/platform/tools';
|
|
2
|
+
|
|
3
|
+
export interface CommandExecutionPolicy {
|
|
4
|
+
readonly effect: 'read-only' | 'local-state' | 'connected-host-state' | 'external-network' | 'ui-navigation' | 'session-lifecycle' | 'delegated-work' | 'mixed' | 'unknown';
|
|
5
|
+
readonly confirmation: string;
|
|
6
|
+
readonly preferredModelTool?: string;
|
|
7
|
+
readonly boundary: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export function describeCommandPolicy(commandName: string): CommandExecutionPolicy {
|
|
11
|
+
const root = commandName.replace(/^\//, '').trim().toLowerCase();
|
|
12
|
+
const confirmation = 'agent_harness mode:"run_command" requires confirm:true and explicitUserRequest for every slash command invocation.';
|
|
13
|
+
if (
|
|
14
|
+
root === 'memory'
|
|
15
|
+
|| root === 'memories'
|
|
16
|
+
|| root === 'note'
|
|
17
|
+
|| root === 'notes'
|
|
18
|
+
|| root === 'persona'
|
|
19
|
+
|| root === 'personas'
|
|
20
|
+
|| root === 'skill'
|
|
21
|
+
|| root === 'skills'
|
|
22
|
+
|| root === 'routine'
|
|
23
|
+
|| root === 'routines'
|
|
24
|
+
) {
|
|
25
|
+
return {
|
|
26
|
+
effect: 'local-state',
|
|
27
|
+
confirmation,
|
|
28
|
+
preferredModelTool: 'agent_local_registry',
|
|
29
|
+
boundary: 'Agent-local library records only unless the invoked command explicitly promotes to a connected schedule or Agent Knowledge source.',
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
if (root === 'knowledge') {
|
|
33
|
+
return {
|
|
34
|
+
effect: 'mixed',
|
|
35
|
+
confirmation,
|
|
36
|
+
preferredModelTool: 'agent_knowledge or agent_knowledge_ingest',
|
|
37
|
+
boundary: 'Agent Knowledge only. Do not use default knowledge or non-Agent knowledge spaces.',
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
if (root === 'settings') {
|
|
41
|
+
return {
|
|
42
|
+
effect: 'mixed',
|
|
43
|
+
confirmation,
|
|
44
|
+
preferredModelTool: 'agent_harness settings/get_setting/set_setting/reset_setting',
|
|
45
|
+
boundary: 'Model-writable settings can be changed through agent_harness. Connected-host lifecycle/listener settings remain read-only.',
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
if (root === 'approval' || root === 'approvals' || root === 'automation') {
|
|
49
|
+
return {
|
|
50
|
+
effect: 'connected-host-state',
|
|
51
|
+
confirmation,
|
|
52
|
+
preferredModelTool: 'agent_operator_action',
|
|
53
|
+
boundary: 'Only explicit allowlisted approval and automation operator actions should be performed from the model.',
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
if (root === 'schedule' || root === 'remind' || root === 'reminder') {
|
|
57
|
+
return {
|
|
58
|
+
effect: 'connected-host-state',
|
|
59
|
+
confirmation,
|
|
60
|
+
preferredModelTool: 'agent_reminder_schedule or agent_operator_action',
|
|
61
|
+
boundary: 'Connected schedules require an explicit user request and do not create hidden Agent jobs or local schedulers.',
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
if (root === 'channels' || root === 'channel' || root === 'notify') {
|
|
65
|
+
return {
|
|
66
|
+
effect: 'external-network',
|
|
67
|
+
confirmation,
|
|
68
|
+
preferredModelTool: root === 'notify' ? 'agent_notify' : 'agent_channel_send',
|
|
69
|
+
boundary: 'External delivery requires an explicit target and direct user authorization.',
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
if (root === 'media' || root === 'image') {
|
|
73
|
+
return {
|
|
74
|
+
effect: 'external-network',
|
|
75
|
+
confirmation,
|
|
76
|
+
preferredModelTool: 'agent_media_generate',
|
|
77
|
+
boundary: 'Media generation uses configured Agent media providers and writes normal artifacts only.',
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
if (root === 'workplan' || root === 'plan' || root === 'task' || root === 'tasks') {
|
|
81
|
+
return {
|
|
82
|
+
effect: 'local-state',
|
|
83
|
+
confirmation,
|
|
84
|
+
preferredModelTool: 'agent_work_plan',
|
|
85
|
+
boundary: 'Work planning stays in the current Agent/project planning surfaces unless the command explicitly calls connected-host operator routes.',
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
if (root === 'delegate') {
|
|
89
|
+
return {
|
|
90
|
+
effect: 'delegated-work',
|
|
91
|
+
confirmation,
|
|
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 === 'session' || root === 'conversation' || root === 'clear' || root === 'quit' || root === 'exit') {
|
|
96
|
+
return {
|
|
97
|
+
effect: 'session-lifecycle',
|
|
98
|
+
confirmation,
|
|
99
|
+
boundary: 'Session and conversation commands operate on the visible harness session lifecycle.',
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
if (root === 'agent-workspace' || root === 'workspace' || root === 'help' || root === 'shortcuts') {
|
|
103
|
+
return {
|
|
104
|
+
effect: 'ui-navigation',
|
|
105
|
+
confirmation,
|
|
106
|
+
preferredModelTool: 'agent_harness workspace/workspace_actions/workspace_action',
|
|
107
|
+
boundary: 'Navigation and discovery commands should be inspected through agent_harness when possible.',
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
if (
|
|
111
|
+
root === 'profile'
|
|
112
|
+
|| root === 'agent-profile'
|
|
113
|
+
|| root === 'provider'
|
|
114
|
+
|| root === 'providers'
|
|
115
|
+
|| root === 'auth'
|
|
116
|
+
|| root === 'secret'
|
|
117
|
+
|| root === 'secrets'
|
|
118
|
+
|| root === 'mcp'
|
|
119
|
+
|| root === 'voice'
|
|
120
|
+
|| root === 'subscription'
|
|
121
|
+
) {
|
|
122
|
+
return {
|
|
123
|
+
effect: 'mixed',
|
|
124
|
+
confirmation,
|
|
125
|
+
boundary: 'Harness-owned configuration, auth, provider, MCP, and profile commands are available through the command bridge with explicit confirmation.',
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
return {
|
|
129
|
+
effect: 'unknown',
|
|
130
|
+
confirmation,
|
|
131
|
+
boundary: 'Inspect the command description, usage, and workspace action metadata before invoking through run_command.',
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
function toolIsAvailable(toolRegistry: ToolRegistry, toolName: string): boolean {
|
|
136
|
+
return toolRegistry.getToolDefinitions().some((tool) => tool.name === toolName);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export function connectedHostCapabilityMap(toolRegistry: ToolRegistry): readonly Record<string, unknown>[] {
|
|
140
|
+
const withAvailability = (capability: Record<string, unknown> & { readonly modelTools: readonly string[] }): Record<string, unknown> => ({
|
|
141
|
+
...capability,
|
|
142
|
+
available: capability.modelTools.every((toolName) => toolIsAvailable(toolRegistry, toolName)),
|
|
143
|
+
});
|
|
144
|
+
return [
|
|
145
|
+
withAvailability({
|
|
146
|
+
id: 'operator-briefing',
|
|
147
|
+
effect: 'read-only-network',
|
|
148
|
+
modelTools: ['agent_operator_briefing'],
|
|
149
|
+
workspaceCategories: ['home', 'work', 'host', 'automation'],
|
|
150
|
+
slashCommandFamilies: ['approval', 'automation', 'schedule'],
|
|
151
|
+
purpose: 'Read pending work, approvals, automation, schedules, and scheduler capacity from public operator routes.',
|
|
152
|
+
}),
|
|
153
|
+
withAvailability({
|
|
154
|
+
id: 'operator-actions',
|
|
155
|
+
effect: 'confirmed-connected-host-state',
|
|
156
|
+
modelTools: ['agent_operator_action'],
|
|
157
|
+
workspaceCategories: ['automation', 'host'],
|
|
158
|
+
allowedActions: [
|
|
159
|
+
'approvals.approve',
|
|
160
|
+
'approvals.deny',
|
|
161
|
+
'approvals.cancel',
|
|
162
|
+
'automation.jobs.run',
|
|
163
|
+
'automation.jobs.pause',
|
|
164
|
+
'automation.jobs.resume',
|
|
165
|
+
'automation.runs.cancel',
|
|
166
|
+
'automation.runs.retry',
|
|
167
|
+
'schedules.run',
|
|
168
|
+
],
|
|
169
|
+
purpose: 'Perform one explicit allowlisted approval, automation, run, or schedule action.',
|
|
170
|
+
}),
|
|
171
|
+
withAvailability({
|
|
172
|
+
id: 'agent-knowledge-read',
|
|
173
|
+
effect: 'read-only-network',
|
|
174
|
+
modelTools: ['agent_knowledge'],
|
|
175
|
+
workspaceCategories: ['knowledge', 'research'],
|
|
176
|
+
slashCommandFamilies: ['knowledge'],
|
|
177
|
+
allowedActions: ['status', 'ask', 'search'],
|
|
178
|
+
purpose: 'Read only isolated Agent Knowledge through the Agent route family.',
|
|
179
|
+
}),
|
|
180
|
+
withAvailability({
|
|
181
|
+
id: 'agent-knowledge-ingest',
|
|
182
|
+
effect: 'confirmed-agent-knowledge-write',
|
|
183
|
+
modelTools: ['agent_knowledge_ingest'],
|
|
184
|
+
workspaceCategories: ['knowledge', 'research'],
|
|
185
|
+
slashCommandFamilies: ['knowledge'],
|
|
186
|
+
sourceKinds: ['url', 'file', 'urls_file', 'bookmarks_file', 'browser_history', 'connector'],
|
|
187
|
+
purpose: 'Ingest explicit user-approved sources into isolated Agent Knowledge.',
|
|
188
|
+
}),
|
|
189
|
+
withAvailability({
|
|
190
|
+
id: 'channels',
|
|
191
|
+
effect: 'confirmed-external-delivery',
|
|
192
|
+
modelTools: ['agent_channel_send'],
|
|
193
|
+
workspaceCategories: ['channels'],
|
|
194
|
+
slashCommandFamilies: ['channels', 'channel'],
|
|
195
|
+
targetKinds: ['channel', 'route', 'webhook', 'link'],
|
|
196
|
+
purpose: 'Send one explicit message through a configured Agent delivery target.',
|
|
197
|
+
}),
|
|
198
|
+
withAvailability({
|
|
199
|
+
id: 'notifications',
|
|
200
|
+
effect: 'confirmed-external-delivery',
|
|
201
|
+
modelTools: ['agent_notify'],
|
|
202
|
+
workspaceCategories: ['channels'],
|
|
203
|
+
slashCommandFamilies: ['notify'],
|
|
204
|
+
purpose: 'Send one explicit notification using configured notification routes.',
|
|
205
|
+
}),
|
|
206
|
+
withAvailability({
|
|
207
|
+
id: 'reminders-and-schedules',
|
|
208
|
+
effect: 'confirmed-connected-host-state',
|
|
209
|
+
modelTools: ['agent_reminder_schedule'],
|
|
210
|
+
workspaceCategories: ['automation', 'routines'],
|
|
211
|
+
slashCommandFamilies: ['schedule', 'reminder'],
|
|
212
|
+
scheduleKinds: ['at', 'every', 'cron'],
|
|
213
|
+
purpose: 'Create one connected reminder schedule from a direct user request.',
|
|
214
|
+
}),
|
|
215
|
+
withAvailability({
|
|
216
|
+
id: 'voice-media',
|
|
217
|
+
effect: 'provider-network-and-artifacts',
|
|
218
|
+
modelTools: ['agent_media_generate'],
|
|
219
|
+
workspaceCategories: ['voice-media', 'artifacts'],
|
|
220
|
+
slashCommandFamilies: ['media', 'image'],
|
|
221
|
+
purpose: 'Generate media through configured Agent media providers and normal artifact storage.',
|
|
222
|
+
}),
|
|
223
|
+
];
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
export function connectedHostRouteFamilies(): readonly Record<string, unknown>[] {
|
|
227
|
+
return [
|
|
228
|
+
{
|
|
229
|
+
id: 'agent-knowledge',
|
|
230
|
+
prefixes: ['/api/goodvibes-agent/knowledge/*'],
|
|
231
|
+
modelTools: ['agent_knowledge', 'agent_knowledge_ingest'],
|
|
232
|
+
boundary: 'Agent-owned knowledge segment only; no fallback to default or non-Agent knowledge.',
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
id: 'operator-read',
|
|
236
|
+
routes: [
|
|
237
|
+
'/api/projects/planning/work-plan',
|
|
238
|
+
'/api/approvals',
|
|
239
|
+
'/api/automation',
|
|
240
|
+
'/api/automation/schedules',
|
|
241
|
+
'/api/runtime/scheduler',
|
|
242
|
+
],
|
|
243
|
+
modelTools: ['agent_operator_briefing'],
|
|
244
|
+
boundary: 'Read-only public operator briefing routes.',
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
id: 'operator-actions',
|
|
248
|
+
routes: ['public operator action methods for approvals, automation jobs, automation runs, and schedules'],
|
|
249
|
+
modelTools: ['agent_operator_action'],
|
|
250
|
+
boundary: 'Allowlisted confirmed mutations only; no arbitrary route invocation.',
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
id: 'delivery',
|
|
254
|
+
routes: ['configured channel, notification, and delivery targets'],
|
|
255
|
+
modelTools: ['agent_channel_send', 'agent_notify'],
|
|
256
|
+
boundary: 'Explicit user-approved delivery only; no route/account creation.',
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
id: 'connected-schedules',
|
|
260
|
+
routes: ['public schedule creation/run routes'],
|
|
261
|
+
modelTools: ['agent_reminder_schedule', 'agent_operator_action'],
|
|
262
|
+
boundary: 'Connected schedules only; no hidden local scheduler or separate Agent job.',
|
|
263
|
+
},
|
|
264
|
+
];
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
export function blockedConnectedHostCapabilities(): readonly Record<string, unknown>[] {
|
|
268
|
+
return [
|
|
269
|
+
{
|
|
270
|
+
id: 'connected-host-lifecycle',
|
|
271
|
+
blocked: ['start', 'stop', 'restart', 'install', 'upgrade', 'expose-listener', 'mutate-listener'],
|
|
272
|
+
reason: 'The connected host and listener are externally owned by GoodVibes; Agent can use public operator routes but not manage hosting.',
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
id: 'non-agent-knowledge',
|
|
276
|
+
blocked: ['default-knowledge', 'non-agent-knowledge-segments', 'fallback-knowledge'],
|
|
277
|
+
reason: 'Agent model tools must stay inside the isolated Agent Knowledge route family.',
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
id: 'hidden-background-work',
|
|
281
|
+
blocked: ['separate-agent-jobs', 'implicit-delegated-review', 'local-schedulers'],
|
|
282
|
+
reason: 'All model work is serial and visible unless the user explicitly requests delegation through an exposed surface.',
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
id: 'arbitrary-connected-host-mutations',
|
|
286
|
+
blocked: ['route-discovery-mutation', 'account-creation', 'automation-definition-creation'],
|
|
287
|
+
reason: 'Only the documented allowlisted model tools and slash-command bridges are exposed.',
|
|
288
|
+
},
|
|
289
|
+
];
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
export function settingsPolicySummary(): Record<string, unknown> {
|
|
293
|
+
return {
|
|
294
|
+
discovery: 'Use mode:"settings" for the setting catalog and mode:"get_setting" for one key. Hidden/scriptable settings require includeHidden:true.',
|
|
295
|
+
mutation: 'Use mode:"set_setting" or mode:"reset_setting" with confirm:true and explicitUserRequest.',
|
|
296
|
+
secretHandling: 'Raw secret values are persisted through the secret manager; config receives only a secret reference and tool output is redacted.',
|
|
297
|
+
writablePolicy: 'Each setting descriptor includes writable, visibleInWorkspace, and lockReason when applicable.',
|
|
298
|
+
readOnlyHostOwnedPrefixes: ['service.*', 'controlPlane.*', 'httpListener.*', 'web.*', 'danger.daemon.*', 'danger.httpListener.*'],
|
|
299
|
+
};
|
|
300
|
+
}
|