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.
@@ -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
- return selected.ok ? ok({ agent: selected.value.agent, ...(selected.value.warning !== undefined ? { warning: selected.value.warning } : {}) }) : selected;
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
- const byName = this.agents.getByName(input.project, input.scope ?? 'project', input.agentName);
119
- return byName.ok ? ok({ agent: byName.value }) : byName;
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: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vgxness",
3
- "version": "1.17.2",
3
+ "version": "1.19.0",
4
4
  "description": "CLI and MCP control plane for guided AI-agent workflows, SDD, memory, and OpenCode setup.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "repository": {