@pellux/goodvibes-agent 0.1.114 → 0.1.116
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 +13 -0
- package/README.md +4 -0
- package/dist/package/main.js +1166 -517
- package/docs/getting-started.md +4 -0
- package/package.json +1 -1
- package/src/agent/behavior-discovery-summary.ts +167 -0
- package/src/agent/runtime-profile-starters.ts +331 -0
- package/src/agent/runtime-profile.ts +150 -330
- package/src/cli/help.ts +2 -2
- package/src/cli/profiles-command.ts +128 -0
- package/src/input/agent-workspace-basic-command-editor-submission.ts +534 -0
- package/src/input/agent-workspace-basic-command-editors.ts +45 -453
- package/src/input/agent-workspace-categories.ts +3 -0
- package/src/input/agent-workspace-command-editor.ts +2 -0
- package/src/input/agent-workspace-setup.ts +33 -13
- package/src/input/agent-workspace-snapshot.ts +6 -0
- package/src/input/agent-workspace-types.ts +4 -0
- package/src/input/commands/agent-runtime-profile-runtime.ts +73 -4
- package/src/input/onboarding/onboarding-wizard-operator-steps.ts +46 -9
- package/src/input/onboarding/onboarding-wizard-steps.ts +1 -1
- package/src/renderer/agent-workspace.ts +26 -0
- package/src/runtime/onboarding/derivation.ts +20 -1
- package/src/runtime/onboarding/snapshot.ts +2 -0
- package/src/runtime/onboarding/types.ts +2 -0
- package/src/version.ts +1 -1
|
@@ -4,6 +4,7 @@ import type { CommandContext } from './command-registry.ts';
|
|
|
4
4
|
import { AgentPersonaRegistry, type AgentPersonaRecord } from '../agent/persona-registry.ts';
|
|
5
5
|
import { AgentRoutineRegistry, type AgentRoutineRecord } from '../agent/routine-registry.ts';
|
|
6
6
|
import { AgentSkillRegistry, type AgentSkillBundleRecord, type AgentSkillRecord } from '../agent/skill-registry.ts';
|
|
7
|
+
import { summarizeAgentBehaviorDiscovery } from '../agent/behavior-discovery-summary.ts';
|
|
7
8
|
import { isPromptActiveMemory } from '../agent/memory-prompt.ts';
|
|
8
9
|
import { getAgentRuntimeProfilesRoot, listAgentRuntimeProfiles, listAgentRuntimeProfileTemplates } from '../agent/runtime-profile.ts';
|
|
9
10
|
import { buildAgentWorkspaceChannels } from './agent-workspace-channels.ts';
|
|
@@ -233,6 +234,7 @@ export function buildAgentWorkspaceRuntimeSnapshot(context: CommandContext): Age
|
|
|
233
234
|
return { count: 0, enabled: 0, items: [] };
|
|
234
235
|
}
|
|
235
236
|
})();
|
|
237
|
+
const discoveredBehavior = summarizeAgentBehaviorDiscovery(context.workspace?.shellPaths);
|
|
236
238
|
const runtimeProfiles = (() => {
|
|
237
239
|
try {
|
|
238
240
|
return listAgentRuntimeProfiles(context.workspace?.shellPaths?.homeDirectory ?? '');
|
|
@@ -317,6 +319,9 @@ export function buildAgentWorkspaceRuntimeSnapshot(context: CommandContext): Age
|
|
|
317
319
|
skillBundleCount: skillSnapshot.bundleCount,
|
|
318
320
|
enabledSkillBundleCount: skillSnapshot.enabledBundleCount,
|
|
319
321
|
activePersonaName: personaSnapshot.activeName,
|
|
322
|
+
discoveredPersonas: discoveredBehavior.personas,
|
|
323
|
+
discoveredSkills: discoveredBehavior.skills,
|
|
324
|
+
discoveredRoutines: discoveredBehavior.routines,
|
|
320
325
|
readyChannelCount: channels.filter((channel) => channel.ready).length,
|
|
321
326
|
voiceProviderCount: voiceProviders.length,
|
|
322
327
|
mediaProviderCount: mediaProviders.length,
|
|
@@ -351,6 +356,7 @@ export function buildAgentWorkspaceRuntimeSnapshot(context: CommandContext): Age
|
|
|
351
356
|
localPersonaCount: personaSnapshot.count,
|
|
352
357
|
activePersonaName: personaSnapshot.activeName,
|
|
353
358
|
localPersonas: personaSnapshot.items,
|
|
359
|
+
discoveredBehavior,
|
|
354
360
|
knowledgeRoute: '/api/goodvibes-agent/knowledge',
|
|
355
361
|
knowledgeIsolation: 'agent-only',
|
|
356
362
|
executionPolicy: 'serial-proactive',
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { AgentWorkspaceChannelStatus } from './agent-workspace-channels.ts';
|
|
2
2
|
import type { AgentWorkspaceSetupChecklistItem } from './agent-workspace-setup.ts';
|
|
3
3
|
import type { AgentWorkspaceVoiceMediaReadiness } from './agent-workspace-voice-media.ts';
|
|
4
|
+
import type { AgentBehaviorDiscoverySnapshot } from '../agent/behavior-discovery-summary.ts';
|
|
4
5
|
|
|
5
6
|
export const AGENT_WORKSPACE_MODAL_NAME = 'agentWorkspace';
|
|
6
7
|
|
|
@@ -31,6 +32,8 @@ export type AgentWorkspaceEditorKind =
|
|
|
31
32
|
| 'skill-discovery-import'
|
|
32
33
|
| 'profile-template-export'
|
|
33
34
|
| 'profile-template-import'
|
|
35
|
+
| 'profile-template-from-discovered'
|
|
36
|
+
| 'profile-from-discovered'
|
|
34
37
|
| 'routine-schedule'
|
|
35
38
|
| 'reminder-schedule';
|
|
36
39
|
|
|
@@ -171,6 +174,7 @@ export interface AgentWorkspaceRuntimeSnapshot {
|
|
|
171
174
|
readonly localPersonaCount: number;
|
|
172
175
|
readonly activePersonaName: string;
|
|
173
176
|
readonly localPersonas: readonly AgentWorkspaceLocalLibraryItem[];
|
|
177
|
+
readonly discoveredBehavior: AgentBehaviorDiscoverySnapshot;
|
|
174
178
|
readonly knowledgeRoute: '/api/goodvibes-agent/knowledge';
|
|
175
179
|
readonly knowledgeIsolation: 'agent-only';
|
|
176
180
|
readonly executionPolicy: 'serial-proactive';
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { mkdirSync } from 'node:fs';
|
|
2
2
|
import { dirname } from 'node:path';
|
|
3
3
|
import {
|
|
4
|
+
createAgentRuntimeProfileFromDiscovered,
|
|
5
|
+
createAgentRuntimeProfileTemplateFromDiscovered,
|
|
4
6
|
createAgentRuntimeProfile,
|
|
5
7
|
deleteAgentRuntimeProfile,
|
|
6
8
|
exportAgentRuntimeProfileTemplate,
|
|
@@ -22,6 +24,12 @@ function parseFlag(args: readonly string[], name: string): string | undefined {
|
|
|
22
24
|
return value && !value.startsWith('--') ? value : undefined;
|
|
23
25
|
}
|
|
24
26
|
|
|
27
|
+
function parseCsvFlag(args: readonly string[], name: string): readonly string[] | undefined {
|
|
28
|
+
const raw = parseFlag(args, name);
|
|
29
|
+
if (!raw) return undefined;
|
|
30
|
+
return raw.split(',').map((entry) => entry.trim()).filter(Boolean);
|
|
31
|
+
}
|
|
32
|
+
|
|
25
33
|
function profileLine(profile: AgentRuntimeProfileInfo): string {
|
|
26
34
|
const created = profile.createdAt ? ` created=${profile.createdAt}` : '';
|
|
27
35
|
const starter = profile.starterTemplateId ? ` starter=${profile.starterTemplateId}` : '';
|
|
@@ -62,6 +70,7 @@ function renderTemplates(homeDirectory: string): string {
|
|
|
62
70
|
' edit the JSON file',
|
|
63
71
|
' /agent-profile template import ./agent-starter.json --yes',
|
|
64
72
|
' /agent-profile create <name> --template <imported-id> --yes',
|
|
73
|
+
' /agent-profile create-from-discovered <name> --yes',
|
|
65
74
|
].join('\n');
|
|
66
75
|
}
|
|
67
76
|
|
|
@@ -108,8 +117,8 @@ export function registerAgentRuntimeProfileRuntimeCommands(registry: CommandRegi
|
|
|
108
117
|
name: 'agent-profile',
|
|
109
118
|
aliases: ['runtime-profile', 'agent-profiles'],
|
|
110
119
|
description: 'Manage isolated Agent profiles and starter templates',
|
|
111
|
-
usage: '[list|templates|guide|template show|template export|template import|create|delete]',
|
|
112
|
-
handler(args, ctx) {
|
|
120
|
+
usage: '[list|templates|guide|template show|template export|template import|template from-discovered|create|create-from-discovered|delete]',
|
|
121
|
+
async handler(args, ctx) {
|
|
113
122
|
const shellPaths = requireShellPaths(ctx);
|
|
114
123
|
const homeDirectory = shellPaths.homeDirectory;
|
|
115
124
|
const parsed = stripYesFlag(args);
|
|
@@ -175,7 +184,35 @@ export function registerAgentRuntimeProfileRuntimeCommands(registry: CommandRegi
|
|
|
175
184
|
ctx.print(`Agent starter template imported: ${template.id}\n source: ${template.source}\n use: /agent-profile create <name> --template ${template.id} --yes`);
|
|
176
185
|
return;
|
|
177
186
|
}
|
|
178
|
-
|
|
187
|
+
if (mode === 'from-discovered' || mode === 'import-discovered') {
|
|
188
|
+
const templateId = commandArgs[2];
|
|
189
|
+
if (!templateId) {
|
|
190
|
+
ctx.print('Usage: /agent-profile template from-discovered <id> [--name <name>] [--description <summary>] [--persona <name>] [--skills all|name,name] [--routines all|name,name] [--replace] --yes');
|
|
191
|
+
return;
|
|
192
|
+
}
|
|
193
|
+
if (!parsed.yes) {
|
|
194
|
+
requireYesFlag(ctx, `create Agent starter template ${templateId} from discovered behavior`, '/agent-profile template from-discovered <id> --yes');
|
|
195
|
+
return;
|
|
196
|
+
}
|
|
197
|
+
const template = await createAgentRuntimeProfileTemplateFromDiscovered(shellPaths, {
|
|
198
|
+
id: templateId,
|
|
199
|
+
name: parseFlag(commandArgs, '--name'),
|
|
200
|
+
description: parseFlag(commandArgs, '--description'),
|
|
201
|
+
persona: parseFlag(commandArgs, '--persona'),
|
|
202
|
+
skills: parseCsvFlag(commandArgs, '--skills'),
|
|
203
|
+
routines: parseCsvFlag(commandArgs, '--routines'),
|
|
204
|
+
replace: commandArgs.includes('--replace'),
|
|
205
|
+
});
|
|
206
|
+
ctx.print([
|
|
207
|
+
`Agent starter template created from discovered behavior: ${template.id}`,
|
|
208
|
+
` persona: ${template.personaName}`,
|
|
209
|
+
` skills: ${template.skillNames.join(', ')}`,
|
|
210
|
+
` routines: ${template.routineNames.join(', ')}`,
|
|
211
|
+
` use: /agent-profile create <name> --template ${template.id} --yes`,
|
|
212
|
+
].join('\n'));
|
|
213
|
+
return;
|
|
214
|
+
}
|
|
215
|
+
ctx.print('Usage: /agent-profile template [show <id>|export <id> <path> --yes|import <path> --yes|from-discovered <id> --yes]');
|
|
179
216
|
return;
|
|
180
217
|
}
|
|
181
218
|
|
|
@@ -200,6 +237,38 @@ export function registerAgentRuntimeProfileRuntimeCommands(registry: CommandRegi
|
|
|
200
237
|
return;
|
|
201
238
|
}
|
|
202
239
|
|
|
240
|
+
if (sub === 'create-from-discovered' || sub === 'create-discovered') {
|
|
241
|
+
const profileName = commandArgs[1];
|
|
242
|
+
if (!profileName) {
|
|
243
|
+
ctx.print('Usage: /agent-profile create-from-discovered <name> [--template-id <id>] [--profile-name <display>] [--description <summary>] [--persona <name>] [--skills all|name,name] [--routines all|name,name] [--replace] --yes');
|
|
244
|
+
return;
|
|
245
|
+
}
|
|
246
|
+
if (!parsed.yes) {
|
|
247
|
+
requireYesFlag(ctx, `create Agent profile ${profileName} from discovered behavior`, '/agent-profile create-from-discovered <name> --yes');
|
|
248
|
+
return;
|
|
249
|
+
}
|
|
250
|
+
const created = await createAgentRuntimeProfileFromDiscovered(shellPaths, {
|
|
251
|
+
profileName,
|
|
252
|
+
templateId: parseFlag(commandArgs, '--template-id') ?? parseFlag(commandArgs, '--starter-id'),
|
|
253
|
+
name: parseFlag(commandArgs, '--profile-name') ?? parseFlag(commandArgs, '--name'),
|
|
254
|
+
description: parseFlag(commandArgs, '--description'),
|
|
255
|
+
persona: parseFlag(commandArgs, '--persona'),
|
|
256
|
+
skills: parseCsvFlag(commandArgs, '--skills'),
|
|
257
|
+
routines: parseCsvFlag(commandArgs, '--routines'),
|
|
258
|
+
replace: commandArgs.includes('--replace'),
|
|
259
|
+
});
|
|
260
|
+
ctx.print([
|
|
261
|
+
`Agent profile created from discovered behavior: ${created.profile.id}`,
|
|
262
|
+
` home: ${created.profile.homeDirectory}`,
|
|
263
|
+
` starter: ${created.template.id}`,
|
|
264
|
+
` persona: ${created.template.personaName}`,
|
|
265
|
+
` skills: ${created.template.skillNames.join(', ')}`,
|
|
266
|
+
` routines: ${created.template.routineNames.join(', ')}`,
|
|
267
|
+
` launch: goodvibes-agent --agent-profile ${created.profile.id}`,
|
|
268
|
+
].join('\n'));
|
|
269
|
+
return;
|
|
270
|
+
}
|
|
271
|
+
|
|
203
272
|
if (sub === 'delete') {
|
|
204
273
|
const name = commandArgs[1];
|
|
205
274
|
if (!name) {
|
|
@@ -214,7 +283,7 @@ export function registerAgentRuntimeProfileRuntimeCommands(registry: CommandRegi
|
|
|
214
283
|
return;
|
|
215
284
|
}
|
|
216
285
|
|
|
217
|
-
ctx.print('Usage: /agent-profile [list|templates|guide|template show <id>|template export <id> <path> --yes|template import <path> --yes|create <name> [--template <id>] --yes|delete <name> --yes]');
|
|
286
|
+
ctx.print('Usage: /agent-profile [list|templates|guide|template show <id>|template export <id> <path> --yes|template import <path> --yes|create <name> [--template <id>] --yes|create-from-discovered <name> --yes|delete <name> --yes]');
|
|
218
287
|
} catch (error) {
|
|
219
288
|
ctx.print(`Error: ${error instanceof Error ? error.message : String(error)}`);
|
|
220
289
|
}
|
|
@@ -1,4 +1,31 @@
|
|
|
1
1
|
import type { OnboardingWizardStepDefinition } from './onboarding-wizard-types.ts';
|
|
2
|
+
import type { AgentBehaviorDiscoverySnapshot } from '../../agent/behavior-discovery-summary.ts';
|
|
3
|
+
|
|
4
|
+
function discoveryCount(discovery: AgentBehaviorDiscoverySnapshot | undefined): number {
|
|
5
|
+
if (!discovery) return 0;
|
|
6
|
+
return discovery.personas.count + discovery.skills.count + discovery.routines.count;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
function discoverySummary(discovery: AgentBehaviorDiscoverySnapshot | undefined): string {
|
|
10
|
+
if (!discovery || discoveryCount(discovery) === 0) return 'No importable local behavior files found yet';
|
|
11
|
+
return [
|
|
12
|
+
`${discovery.personas.count} persona file(s)`,
|
|
13
|
+
`${discovery.skills.count} skill file(s)`,
|
|
14
|
+
`${discovery.routines.count} routine file(s)`,
|
|
15
|
+
].join('; ');
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function discoverySample(discovery: AgentBehaviorDiscoverySnapshot | undefined): string {
|
|
19
|
+
if (!discovery) return '';
|
|
20
|
+
const names = [
|
|
21
|
+
...discovery.personas.names,
|
|
22
|
+
...discovery.skills.names,
|
|
23
|
+
...discovery.routines.names,
|
|
24
|
+
].slice(0, 4);
|
|
25
|
+
if (names.length === 0) return 'Use /personas discover, /agent-skills discover, and /routines discover after setup to rescan.';
|
|
26
|
+
const remaining = discoveryCount(discovery) > names.length ? `, +${discoveryCount(discovery) - names.length} more` : '';
|
|
27
|
+
return `Import candidates: ${names.join(', ')}${remaining}.`;
|
|
28
|
+
}
|
|
2
29
|
|
|
3
30
|
export function buildCommunicationStep(): OnboardingWizardStepDefinition {
|
|
4
31
|
return {
|
|
@@ -128,15 +155,19 @@ export function buildAgentKnowledgeStep(): OnboardingWizardStepDefinition {
|
|
|
128
155
|
};
|
|
129
156
|
}
|
|
130
157
|
|
|
131
|
-
export function buildLocalStateStep(): OnboardingWizardStepDefinition {
|
|
158
|
+
export function buildLocalStateStep(discovery?: AgentBehaviorDiscoverySnapshot): OnboardingWizardStepDefinition {
|
|
159
|
+
const discoveredCount = discoveryCount(discovery);
|
|
132
160
|
return {
|
|
133
161
|
id: 'agent-local-state',
|
|
134
162
|
title: 'Local memory and behavior',
|
|
135
|
-
shortLabel: '
|
|
136
|
-
description:
|
|
163
|
+
shortLabel: 'Behavior',
|
|
164
|
+
description: discoveredCount > 0
|
|
165
|
+
? 'Review importable Agent-local behavior files, then create an isolated profile from them or import individual records.'
|
|
166
|
+
: 'Review the Agent-local behavior model. Memory, personas, skills, routines, and Agent profiles stay local until a stable shared registry exists.',
|
|
137
167
|
summaryTitle: 'Local Agent state',
|
|
138
168
|
summaryLines: [
|
|
139
169
|
'Memory/personas/skills/routines: local Agent registries',
|
|
170
|
+
`Discovered behavior files: ${discoverySummary(discovery)}`,
|
|
140
171
|
'Secrets: rejected or stored by secret reference',
|
|
141
172
|
'Profiles: isolated Agent homes',
|
|
142
173
|
],
|
|
@@ -152,22 +183,28 @@ export function buildLocalStateStep(): OnboardingWizardStepDefinition {
|
|
|
152
183
|
kind: 'status',
|
|
153
184
|
id: 'agent-local-state.personas',
|
|
154
185
|
label: 'Personas',
|
|
155
|
-
hint:
|
|
156
|
-
|
|
186
|
+
hint: discovery?.personas.count && discovery.personas.count > 0
|
|
187
|
+
? `${discovery.personas.count} persona file(s) are available. Use the Profiles workspace to create a profile from discovered behavior, or preview individual files with /personas discover.`
|
|
188
|
+
: 'Use /personas to create and activate serial operating modes for the main conversation.',
|
|
189
|
+
defaultValue: discovery?.personas.count && discovery.personas.count > 0 ? `${discovery.personas.count} discovered` : 'Local registry',
|
|
157
190
|
},
|
|
158
191
|
{
|
|
159
192
|
kind: 'status',
|
|
160
193
|
id: 'agent-local-state.skills',
|
|
161
194
|
label: 'Skills',
|
|
162
|
-
hint:
|
|
163
|
-
|
|
195
|
+
hint: discovery?.skills.count && discovery.skills.count > 0
|
|
196
|
+
? `${discovery.skills.count} skill file(s) are available. Use the Profiles workspace to create a profile from discovered behavior, or preview individual files with /agent-skills discover.`
|
|
197
|
+
: 'Use /agent-skills and /skills local to manage reusable Agent procedures.',
|
|
198
|
+
defaultValue: discovery?.skills.count && discovery.skills.count > 0 ? `${discovery.skills.count} discovered` : 'Local registry',
|
|
164
199
|
},
|
|
165
200
|
{
|
|
166
201
|
kind: 'status',
|
|
167
202
|
id: 'agent-local-state.routines',
|
|
168
203
|
label: 'Routines',
|
|
169
|
-
hint:
|
|
170
|
-
|
|
204
|
+
hint: discovery?.routines.count && discovery.routines.count > 0
|
|
205
|
+
? `${discovery.routines.count} routine file(s) are available. Use the Profiles workspace to create a profile from discovered behavior, or preview individual files with /routines discover. ${discoverySample(discovery)}`
|
|
206
|
+
: 'Use /routines for reusable local procedures. Starting a routine prints steps in the main conversation and does not spawn hidden work.',
|
|
207
|
+
defaultValue: discovery?.routines.count && discovery.routines.count > 0 ? `${discovery.routines.count} discovered` : 'Local registry',
|
|
171
208
|
},
|
|
172
209
|
],
|
|
173
210
|
};
|
|
@@ -31,7 +31,7 @@ export function buildOnboardingWizardSteps(controller: OnboardingWizardControlle
|
|
|
31
31
|
buildCommunicationStep(),
|
|
32
32
|
buildToolsStep(),
|
|
33
33
|
buildAgentKnowledgeStep(),
|
|
34
|
-
buildLocalStateStep(),
|
|
34
|
+
buildLocalStateStep(controller.runtimeSnapshot?.localBehaviorDiscovery),
|
|
35
35
|
buildAutomationStep(),
|
|
36
36
|
buildVoiceMediaStep(),
|
|
37
37
|
buildDelegationPolicyStep(),
|
|
@@ -104,6 +104,31 @@ function setupChecklistLines(snapshot: AgentWorkspaceRuntimeSnapshot): ContextLi
|
|
|
104
104
|
return lines;
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
+
function discoverySummaryLine(label: string, summary: AgentWorkspaceRuntimeSnapshot['discoveredBehavior']['personas'], command: string): ContextLine[] {
|
|
108
|
+
if (summary.count === 0) return [];
|
|
109
|
+
const names = summary.names.length > 0
|
|
110
|
+
? ` ${summary.names.join(', ')}${summary.count > summary.names.length ? `, +${summary.count - summary.names.length} more` : ''}.`
|
|
111
|
+
: '';
|
|
112
|
+
return [
|
|
113
|
+
{ text: `${label}: ${summary.count} discovered; project ${summary.projectLocalCount}; global ${summary.globalCount}.`, fg: PALETTE.info, bold: true },
|
|
114
|
+
{ text: ` ${command} to preview, then use the import form after review.${names}`, fg: PALETTE.muted },
|
|
115
|
+
];
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
function behaviorDiscoveryLines(snapshot: AgentWorkspaceRuntimeSnapshot): ContextLine[] {
|
|
119
|
+
const lines: ContextLine[] = [
|
|
120
|
+
...discoverySummaryLine('Discovered personas', snapshot.discoveredBehavior.personas, '/personas discover'),
|
|
121
|
+
...discoverySummaryLine('Discovered skills', snapshot.discoveredBehavior.skills, '/agent-skills discover'),
|
|
122
|
+
...discoverySummaryLine('Discovered routines', snapshot.discoveredBehavior.routines, '/routines discover'),
|
|
123
|
+
];
|
|
124
|
+
if (lines.length === 0) return [];
|
|
125
|
+
return [
|
|
126
|
+
{ text: '' },
|
|
127
|
+
{ text: 'Discovered Behavior Files', fg: PALETTE.title, bold: true },
|
|
128
|
+
...lines,
|
|
129
|
+
];
|
|
130
|
+
}
|
|
131
|
+
|
|
107
132
|
function localLibraryLines(
|
|
108
133
|
title: string,
|
|
109
134
|
items: readonly AgentWorkspaceRuntimeSnapshot['localPersonas'][number][],
|
|
@@ -199,6 +224,7 @@ function snapshotLines(workspace: AgentWorkspace, category: AgentWorkspaceCatego
|
|
|
199
224
|
{ text: `Connection: ${snapshot.runtimeBaseUrl}`, fg: PALETTE.info },
|
|
200
225
|
{ text: 'Agent role: interactive operator TUI; setup changes here are Agent-local.', fg: PALETTE.good },
|
|
201
226
|
...setupChecklistLines(snapshot),
|
|
227
|
+
...behaviorDiscoveryLines(snapshot),
|
|
202
228
|
{ text: '' },
|
|
203
229
|
{ text: `Workspace: ${snapshot.workingDirectory}`, fg: PALETTE.muted },
|
|
204
230
|
{ text: `Home: ${snapshot.homeDirectory}`, fg: PALETTE.muted },
|
|
@@ -211,7 +211,8 @@ function hasExternalIntegrations(snapshot: OnboardingSnapshotState): boolean {
|
|
|
211
211
|
function hasLocalBehaviorCustomization(snapshot: OnboardingSnapshotState): boolean {
|
|
212
212
|
return hasCustomizedWorkspaceDefaults(snapshot)
|
|
213
213
|
|| countPermissionToolOverrides(snapshot) > 0
|
|
214
|
-
|| snapshot.runtimeDefaults.secretStoragePolicy !== DEFAULT_CONFIG.storage.secretPolicy
|
|
214
|
+
|| snapshot.runtimeDefaults.secretStoragePolicy !== DEFAULT_CONFIG.storage.secretPolicy
|
|
215
|
+
|| countDiscoveredLocalBehavior(snapshot) > 0;
|
|
215
216
|
}
|
|
216
217
|
|
|
217
218
|
function hasCommunicationChannelSignals(snapshot: OnboardingSnapshotState): boolean {
|
|
@@ -240,6 +241,18 @@ function describeAgentKnowledge(): string {
|
|
|
240
241
|
}
|
|
241
242
|
|
|
242
243
|
function describeLocalBehavior(snapshot: OnboardingSnapshotState): string {
|
|
244
|
+
const discoveredCount = countDiscoveredLocalBehavior(snapshot);
|
|
245
|
+
if (discoveredCount > 0) {
|
|
246
|
+
const discovery = snapshot.localBehaviorDiscovery;
|
|
247
|
+
const samples = [
|
|
248
|
+
...discovery.personas.names,
|
|
249
|
+
...discovery.skills.names,
|
|
250
|
+
...discovery.routines.names,
|
|
251
|
+
].slice(0, 4);
|
|
252
|
+
const sampleText = samples.length > 0 ? ` Found: ${samples.join(', ')}.` : '';
|
|
253
|
+
return `Import ${discoveredCount} discovered Agent persona/skill/routine file(s) from local Agent folders before creating blank behavior.${sampleText}`;
|
|
254
|
+
}
|
|
255
|
+
|
|
243
256
|
if (!hasLocalBehaviorCustomization(snapshot)) {
|
|
244
257
|
return 'Configure local memory, routines, skills, personas, permissions, and secret handling before the Agent starts doing useful work.';
|
|
245
258
|
}
|
|
@@ -247,6 +260,12 @@ function describeLocalBehavior(snapshot: OnboardingSnapshotState): string {
|
|
|
247
260
|
return 'Review existing local behavior, permission, display, or secret-handling choices before applying Agent setup.';
|
|
248
261
|
}
|
|
249
262
|
|
|
263
|
+
function countDiscoveredLocalBehavior(snapshot: OnboardingSnapshotState): number {
|
|
264
|
+
return snapshot.localBehaviorDiscovery.personas.count
|
|
265
|
+
+ snapshot.localBehaviorDiscovery.skills.count
|
|
266
|
+
+ snapshot.localBehaviorDiscovery.routines.count;
|
|
267
|
+
}
|
|
268
|
+
|
|
250
269
|
function describeCommunicationChannels(snapshot: OnboardingSnapshotState): string {
|
|
251
270
|
const integrationCount = new Set<string>([
|
|
252
271
|
...getExternalIntegrationServiceIds(snapshot),
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { SecretStorageReview } from '../../config/secrets.ts';
|
|
2
2
|
import { getProviderIdFromModel } from '../../config/provider-model.ts';
|
|
3
3
|
import type { LocalAuthSnapshot } from '@pellux/goodvibes-sdk/platform/security';
|
|
4
|
+
import { summarizeAgentBehaviorDiscovery } from '../../agent/behavior-discovery-summary.ts';
|
|
4
5
|
import { readOnboardingRuntimeState } from './state.ts';
|
|
5
6
|
import type {
|
|
6
7
|
OnboardingAcknowledgementSnapshot,
|
|
@@ -400,6 +401,7 @@ export async function collectOnboardingSnapshot(
|
|
|
400
401
|
records: sortSurfaceRecords(surfaceResult.value),
|
|
401
402
|
},
|
|
402
403
|
providerAccounts: providerAccountsResult.value,
|
|
404
|
+
localBehaviorDiscovery: summarizeAgentBehaviorDiscovery(deps.shellPaths),
|
|
403
405
|
collectionIssues,
|
|
404
406
|
};
|
|
405
407
|
}
|
|
@@ -8,6 +8,7 @@ import type {
|
|
|
8
8
|
ServiceInspectionQuery,
|
|
9
9
|
SubscriptionAccessQuery,
|
|
10
10
|
} from '../ui-service-queries.ts';
|
|
11
|
+
import type { AgentBehaviorDiscoverySnapshot } from '../../agent/behavior-discovery-summary.ts';
|
|
11
12
|
|
|
12
13
|
export type OnboardingMode = 'new' | 'edit' | 'reopen';
|
|
13
14
|
|
|
@@ -189,6 +190,7 @@ export interface OnboardingSnapshotState {
|
|
|
189
190
|
readonly bindSettings: OnboardingBindSettingsSnapshot;
|
|
190
191
|
readonly surfaces: OnboardingSurfacesSnapshot;
|
|
191
192
|
readonly providerAccounts: OnboardingProviderAccountsSnapshot | null;
|
|
193
|
+
readonly localBehaviorDiscovery: AgentBehaviorDiscoverySnapshot;
|
|
192
194
|
readonly collectionIssues: readonly OnboardingSnapshotCollectionIssue[];
|
|
193
195
|
}
|
|
194
196
|
|
package/src/version.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { join } from 'node:path';
|
|
|
6
6
|
// The prebuild script updates the fallback value before compilation.
|
|
7
7
|
// Uses import.meta.dir (Bun) to locate package.json relative to this file,
|
|
8
8
|
// which is correct regardless of the process working directory.
|
|
9
|
-
let _version = '0.1.
|
|
9
|
+
let _version = '0.1.116';
|
|
10
10
|
let _sdkVersion = '0.33.35';
|
|
11
11
|
try {
|
|
12
12
|
const pkg = JSON.parse(readFileSync(join(import.meta.dir, '..', 'package.json'), 'utf-8')) as {
|