-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathskill.form.ts
More file actions
53 lines (51 loc) · 1.9 KB
/
Copy pathskill.form.ts
File metadata and controls
53 lines (51 loc) · 1.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.
import { defineForm } from '../ui/view.zod';
/**
* Skill Metadata Form
*
* Form layout for creating/editing AI skill metadata definitions.
*/
export const skillForm = defineForm({
schemaId: 'skill',
type: 'simple',
sections: [
{
label: 'Basics',
description: 'Skill identity and human-readable description.',
columns: 2,
fields: [
{ field: 'name', required: true, colSpan: 1, helpText: 'Unique identifier (snake_case)' },
{ field: 'label', required: true, colSpan: 1, helpText: 'Display name (e.g., "Case Management")' },
{ field: 'description', widget: 'textarea', colSpan: 2, helpText: 'What this skill does' },
{ field: 'active', colSpan: 1, helpText: 'Enable/disable this skill' },
],
},
{
label: 'AI Instructions',
description: 'How the agent should reason with this skill.',
fields: [
{ field: 'instructions', widget: 'textarea', helpText: 'Instructions for AI — tell it how to use these tools together' },
{ field: 'tools', widget: 'string-tags', required: true, helpText: 'Tool names (supports wildcard: action_*)' },
],
},
{
label: 'Triggers',
description: 'When this skill should activate.',
collapsible: true,
collapsed: true,
fields: [
{ field: 'triggerPhrases', widget: 'string-tags', helpText: 'Natural language phrases that activate this skill' },
{ field: 'triggerConditions', type: 'repeater', helpText: 'Programmatic conditions (e.g., objectName == "case")' },
],
},
{
label: 'Access',
description: 'Required permissions to use this skill.',
collapsible: true,
collapsed: true,
fields: [
{ field: 'permissions', widget: 'string-tags', helpText: 'Required permissions to use this skill' },
],
},
],
});