mrvn-cli 0.3.6 → 0.3.7

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.
@@ -18275,6 +18275,16 @@ function resolveSkillsForPersona(personaId, skillsConfig, allSkills) {
18275
18275
  }
18276
18276
  return result;
18277
18277
  }
18278
+ function collectSkillRegistrations(skillIds, allSkills) {
18279
+ const registrations = [];
18280
+ for (const id of skillIds) {
18281
+ const skill = allSkills.get(id);
18282
+ if (skill?.documentTypeRegistrations) {
18283
+ registrations.push(...skill.documentTypeRegistrations);
18284
+ }
18285
+ }
18286
+ return registrations;
18287
+ }
18278
18288
  function getSkillTools(skillIds, allSkills, store) {
18279
18289
  const tools = [];
18280
18290
  for (const id of skillIds) {
@@ -19716,6 +19726,26 @@ function notFound(res, projectName, navGroups, activePath) {
19716
19726
  // src/web/server.ts
19717
19727
  import * as http from "http";
19718
19728
  import { exec } from "child_process";
19729
+ var CORE_TYPES = ["decision", "action", "question"];
19730
+ function buildNavGroups(input) {
19731
+ const commonTypes = new Set(COMMON_REGISTRATIONS.map((r) => r.type));
19732
+ const pluginOnlyTypes = input.pluginRegs.map((r) => r.type).filter((t) => !commonTypes.has(t));
19733
+ const skillTypes = input.skillRegs.map((r) => r.type);
19734
+ const navGroups = [
19735
+ { label: "Governance", types: CORE_TYPES },
19736
+ { label: "Project", types: [...commonTypes] }
19737
+ ];
19738
+ if (pluginOnlyTypes.length > 0) {
19739
+ navGroups.push({
19740
+ label: input.pluginName ?? "Plugin",
19741
+ types: pluginOnlyTypes
19742
+ });
19743
+ }
19744
+ if (skillTypes.length > 0) {
19745
+ navGroups.push({ label: "Skills", types: skillTypes });
19746
+ }
19747
+ return navGroups;
19748
+ }
19719
19749
  function openBrowser(url2) {
19720
19750
  const platform = process.platform;
19721
19751
  const cmd = platform === "darwin" ? `open "${url2}"` : platform === "win32" ? `start "${url2}"` : `xdg-open "${url2}"`;
@@ -20330,6 +20360,12 @@ function collectTools(marvinDir) {
20330
20360
  const skillsWithActions = allSkillIds.map((id) => allSkills.get(id)).filter((s) => s.actions && s.actions.length > 0);
20331
20361
  const projectRoot = path8.dirname(marvinDir);
20332
20362
  const actionTools = createSkillActionTools(skillsWithActions, { store, marvinDir, projectRoot });
20363
+ const allSkillRegs = collectSkillRegistrations(allSkillIds, allSkills);
20364
+ const navGroups = buildNavGroups({
20365
+ pluginRegs: registrations,
20366
+ skillRegs: allSkillRegs,
20367
+ pluginName: plugin?.name
20368
+ });
20333
20369
  return [
20334
20370
  ...createDecisionTools(store),
20335
20371
  ...createActionTools(store),
@@ -20337,6 +20373,7 @@ function collectTools(marvinDir) {
20337
20373
  ...createDocumentTools(store),
20338
20374
  ...manifest ? createSourceTools(manifest) : [],
20339
20375
  ...createSessionTools(sessionStore),
20376
+ ...createWebTools(store, config2.name, navGroups),
20340
20377
  ...pluginTools,
20341
20378
  ...codeSkillTools,
20342
20379
  ...actionTools