vgxness 1.17.2 → 1.19.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/dist/agents/agent-lookup-contexts.js +28 -0
- package/dist/agents/agent-registry-service.js +29 -2
- package/dist/agents/agent-resolver.js +24 -5
- package/dist/agents/agent-selector-resolver.js +12 -7
- package/dist/agents/canonical-agent-manifest.js +14 -11
- package/dist/agents/canonical-agent-projection.js +24 -2
- package/dist/cli/cli-help.js +1 -1
- package/dist/cli/home-tui-app.js +1 -1
- package/dist/mcp/client-install-opencode-contract.js +2 -2
- package/dist/mcp/client-install-opencode.js +2 -2
- package/dist/mcp/control-plane-snapshot-service.js +11 -0
- package/dist/mcp/control-plane.js +55 -0
- package/dist/mcp/schema.js +253 -0
- package/dist/mcp/stdio-server.js +6 -0
- package/dist/mcp/validation.js +662 -0
- package/dist/memory/active-work-preview.js +75 -0
- package/dist/memory/active-work-topics.js +50 -0
- package/dist/memory/sqlite/migrations/018_skill_system_v2.sql +112 -0
- package/dist/setup/providers/opencode-setup-adapter.js +4 -4
- package/dist/setup/setup-plan.js +1 -1
- package/dist/skills/repositories/skill-evaluation-requests.js +190 -0
- package/dist/skills/repositories/skill-improvement-proposals.js +55 -4
- package/dist/skills/repositories/skills.js +630 -3
- package/dist/skills/skill-payload.js +9 -2
- package/dist/skills/skill-registry-service.js +554 -4
- package/dist/skills/skill-resolver.js +53 -3
- package/dist/skills/skill-status-service.js +4 -1
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { resolveAgentSelector } from '../agents/agent-selector-resolver.js';
|
|
2
|
+
import { canonicalDefaultAgentName } from '../agents/canonical-agent-manifest.js';
|
|
2
3
|
import { normalizeSddPhaseInput } from '../sdd/schema.js';
|
|
3
4
|
import { skillLookupContexts } from './personal-skills.js';
|
|
4
5
|
export class SkillResolver {
|
|
@@ -109,14 +110,37 @@ export class SkillResolver {
|
|
|
109
110
|
return byId.ok ? ok({ agent: byId.value }) : byId;
|
|
110
111
|
}
|
|
111
112
|
const selected = resolveAgentSelector({ selector: input.agentId, project: input.project, scope: input.scope ?? 'project' }, { getById: (id) => this.agents.getById(id), getByName: (project, scope, name) => this.agents.getByName(project, scope, name) });
|
|
112
|
-
|
|
113
|
+
if (selected.ok)
|
|
114
|
+
return ok({ agent: selected.value.agent, ...(selected.value.warning !== undefined ? { warning: selected.value.warning } : {}) });
|
|
115
|
+
if (selected.error.code !== 'not_found')
|
|
116
|
+
return selected;
|
|
117
|
+
const fallback = this.resolveAgentNameFallback(input);
|
|
118
|
+
if (fallback.ok && fallback.value.agent !== undefined) {
|
|
119
|
+
const warning = `AGENT_SELECTOR_PROVIDER_ALIAS_FALLBACK: selector "${input.agentId}" did not match a VGXNESS registry agent; resolved display/provider name to canonical agent "${fallback.value.agent.name}" (${fallback.value.agent.id}).`;
|
|
120
|
+
return ok({ agent: fallback.value.agent, warning });
|
|
121
|
+
}
|
|
122
|
+
return selected;
|
|
113
123
|
}
|
|
114
124
|
if (input.agentName === undefined)
|
|
115
125
|
return ok({});
|
|
116
126
|
if (input.project === undefined)
|
|
117
127
|
return validationFailure('--project is required when resolving by agent name');
|
|
118
|
-
|
|
119
|
-
|
|
128
|
+
return this.resolveAgentNameFallback(input);
|
|
129
|
+
}
|
|
130
|
+
resolveAgentNameFallback(input) {
|
|
131
|
+
if (input.project === undefined)
|
|
132
|
+
return validationFailure('--project is required when resolving by agent name');
|
|
133
|
+
for (const name of providerAgentNameCandidates(input.agentName, input.agentId)) {
|
|
134
|
+
const selected = resolveAgentSelector({ selector: name, project: input.project, scope: input.scope ?? 'project' }, { getById: (id) => this.agents.getById(id), getByName: (project, scope, agentName) => this.agents.getByName(project, scope, agentName) });
|
|
135
|
+
if (selected.ok)
|
|
136
|
+
return ok({ agent: selected.value.agent });
|
|
137
|
+
if (selected.error.code !== 'not_found')
|
|
138
|
+
return selected;
|
|
139
|
+
}
|
|
140
|
+
if (input.agentName === undefined)
|
|
141
|
+
return ok({});
|
|
142
|
+
const exact = this.agents.getByName(input.project, input.scope ?? 'project', input.agentName);
|
|
143
|
+
return exact.ok ? ok({ agent: exact.value }) : exact;
|
|
120
144
|
}
|
|
121
145
|
targetCandidates(input, agent) {
|
|
122
146
|
const targets = [];
|
|
@@ -254,6 +278,32 @@ function isSddWorkflow(workflow) {
|
|
|
254
278
|
function normalizedIntentSignals(signals) {
|
|
255
279
|
return [...new Set((signals ?? []).map((signal) => signal.trim().toLowerCase()).filter(Boolean))];
|
|
256
280
|
}
|
|
281
|
+
function providerAgentNameCandidates(agentName, agentId) {
|
|
282
|
+
const candidates = [];
|
|
283
|
+
const add = (value) => {
|
|
284
|
+
const normalized = value?.trim();
|
|
285
|
+
if (normalized === undefined || normalized.length === 0 || candidates.includes(normalized))
|
|
286
|
+
return;
|
|
287
|
+
candidates.push(normalized);
|
|
288
|
+
};
|
|
289
|
+
add(agentName);
|
|
290
|
+
add(slugAgentDisplayName(agentName));
|
|
291
|
+
if (isProviderManagerAlias(agentId) || isProviderManagerAlias(agentName))
|
|
292
|
+
add(canonicalDefaultAgentName);
|
|
293
|
+
return candidates;
|
|
294
|
+
}
|
|
295
|
+
function slugAgentDisplayName(value) {
|
|
296
|
+
const normalized = value
|
|
297
|
+
?.trim()
|
|
298
|
+
.toLowerCase()
|
|
299
|
+
.replace(/[^a-z0-9]+/g, '-')
|
|
300
|
+
.replace(/^-+|-+$/g, '');
|
|
301
|
+
return normalized === undefined || normalized.length === 0 ? undefined : normalized;
|
|
302
|
+
}
|
|
303
|
+
function isProviderManagerAlias(value) {
|
|
304
|
+
const normalized = slugAgentDisplayName(value);
|
|
305
|
+
return normalized === 'main-manager' || normalized === 'vgxness-manager' || normalized === 'vgxness-main-manager';
|
|
306
|
+
}
|
|
257
307
|
function stringMetadata(value) {
|
|
258
308
|
return typeof value === 'string' && value.trim() ? value : undefined;
|
|
259
309
|
}
|
|
@@ -39,6 +39,9 @@ export class SkillStatusService {
|
|
|
39
39
|
const declared = agentItems.reduce((sum, item) => sum + item.declaredSkills.length, 0);
|
|
40
40
|
const resolved = agentItems.reduce((sum, item) => sum + item.resolvedSkills.length, 0);
|
|
41
41
|
const missing = agentItems.reduce((sum, item) => sum + item.missingSkills.length, 0);
|
|
42
|
+
const v2Counts = this.skills.skills.getV2Counts(input.project, scope);
|
|
43
|
+
if (!v2Counts.ok)
|
|
44
|
+
return v2Counts;
|
|
42
45
|
return ok({
|
|
43
46
|
kind: 'skills-status',
|
|
44
47
|
version: 1,
|
|
@@ -65,7 +68,7 @@ export class SkillStatusService {
|
|
|
65
68
|
current: skill.currentVersionId !== null && skill.currentVersion !== null,
|
|
66
69
|
providerAvailable: false,
|
|
67
70
|
})),
|
|
68
|
-
registry: { skills: registry.value },
|
|
71
|
+
registry: { skills: registry.value, v2: v2Counts.value },
|
|
69
72
|
agents: { modes, declared, resolved, missing, items: agentItems },
|
|
70
73
|
diagnostics,
|
|
71
74
|
safety: {
|