Newer
Older
navi-1 / webclient / src / components / settings / skills / constants.js
import { t } from '@/i18n/index.js'

// Catalog areas → their i18n slugs.
export const AREA_SLUGS = {
  home: 'settings.skillsAreaHome',
  infrastructure: 'settings.skillsAreaInfrastructure',
  workflows: 'settings.skillsAreaWorkflows',
  general: 'settings.skillsAreaGeneral',
}

export function areaLabel(area) {
  return t(AREA_SLUGS[area] || AREA_SLUGS.general)
}

// A new document starts as front matter only: the editor shows the source the
// agent will read, so the template is a valid minimal file of that kind.
export const TEMPLATES = {
  skill: `---
kind: skill
name:
description:
area: general
tags: []
triggers: []
---

`,
  protocol: `---
kind: protocol
name:
description:
area: general
tags: []
triggers: []
preconditions: []
steps:
  -
post_checks:
  -
on_deviation:
on_blocked:
on_already_done:
---

`,
}