@digipair/skill-tool 0.79.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.
@@ -0,0 +1,2 @@
1
+ export * from './lib/engine';
2
+ export * from './lib/pins-settings.interface';
@@ -0,0 +1,9 @@
1
+ export interface Alias {
2
+ name: string;
3
+ library: string;
4
+ element: string;
5
+ properties: {
6
+ library: string;
7
+ element: string;
8
+ };
9
+ }
@@ -0,0 +1,13 @@
1
+ import { PinsSettings } from './pins-settings.interface';
2
+ type CONFIG_KEY = 'BASE_URL' | 'LIBRARIES' | 'ALIAS' | 'LOGGER';
3
+ export declare const config: {
4
+ set: (key: CONFIG_KEY, value: any) => void;
5
+ log: (level: string, path: string, message: string, context: any, data?: any) => any;
6
+ };
7
+ export declare const applyTemplate: (value: any, context: any) => any;
8
+ export declare const executePinsList: (pinsSettingsList: PinsSettings[], context: any, path?: string) => Promise<any>;
9
+ export declare const generateElementFromPins: (pinsSettings: PinsSettings, parent: Element, context: any, document?: Document, options?: {
10
+ import: boolean;
11
+ }) => Promise<Element | void>;
12
+ export declare const preparePinsSettings: (settings: PinsSettings, context: any) => PinsSettings;
13
+ export {};
@@ -0,0 +1,15 @@
1
+ export interface PinsSettings {
2
+ library: string;
3
+ element: string;
4
+ properties?: {
5
+ [key: string]: any;
6
+ };
7
+ conditions?: {
8
+ if?: boolean;
9
+ each?: any[];
10
+ };
11
+ pins?: PinsSettings[];
12
+ events?: {
13
+ [key: string]: PinsSettings[];
14
+ };
15
+ }
@@ -0,0 +1 @@
1
+ export * from './lib/skill-tool';
@@ -0,0 +1,6 @@
1
+ import { PinsSettings } from '@digipair/engine';
2
+ export declare const task: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
3
+ export declare const action: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
4
+ export declare const trigger: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
5
+ export declare const stop: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
6
+ export declare const keepAlive: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<void>;
package/package.json ADDED
@@ -0,0 +1,11 @@
1
+ {
2
+ "name": "@digipair/skill-tool",
3
+ "version": "0.79.0",
4
+ "keywords": [
5
+ "digipair",
6
+ "service"
7
+ ],
8
+ "dependencies": {},
9
+ "main": "./index.cjs.js",
10
+ "module": "./index.esm.js"
11
+ }
package/schema.fr.json ADDED
@@ -0,0 +1,163 @@
1
+ {
2
+ "openapi": "3.0.0",
3
+ "info": {
4
+ "title": "@digipair/skill-tool",
5
+ "summary": "Agent outil",
6
+ "description": "Actions et triggers des agents outils.",
7
+ "version": "0.1.0",
8
+ "x-icon": "🛠"
9
+ },
10
+ "paths": {
11
+ "/stop": {
12
+ "post": {
13
+ "tags": ["service"],
14
+ "summary": "Stop",
15
+ "description": "ArrĂȘte le raisonnement",
16
+ "parameters": [
17
+ {
18
+ "name": "value",
19
+ "required": false,
20
+ "summary": "Valeur",
21
+ "description": "Valeur Ă  retourner",
22
+ "schema": {
23
+ "type": "object"
24
+ }
25
+ }
26
+ ],
27
+ "x-events": []
28
+ }
29
+ }
30
+ },
31
+ "x-scene-blocks": {
32
+ "/task": {
33
+ "summary": "Tache",
34
+ "description": "Exécution d'une tache.",
35
+ "tags": ["service"],
36
+ "metadata": [],
37
+ "parameters": [
38
+ {
39
+ "name": "execute",
40
+ "summary": "Exécute",
41
+ "required": true,
42
+ "description": "Commandes à exécuter",
43
+ "schema": {
44
+ "type": "array",
45
+ "items": {
46
+ "$ref": "https://schemas.digipair.ai/pinsSettings"
47
+ }
48
+ }
49
+ }
50
+ ]
51
+ },
52
+ "/action": {
53
+ "summary": "Action",
54
+ "description": "Action exécutable.",
55
+ "tags": ["service"],
56
+ "metadata": [
57
+ {
58
+ "name": "parameters",
59
+ "summary": "ParamĂštres",
60
+ "required": true,
61
+ "description": "ParamĂštres de l'action",
62
+ "schema": {
63
+ "type": "array",
64
+ "items": {
65
+ "$ref": "#/components/schemas/Parameter"
66
+ }
67
+ }
68
+ }
69
+ ],
70
+ "parameters": [
71
+ {
72
+ "name": "execute",
73
+ "summary": "Execute",
74
+ "required": true,
75
+ "description": "Commandes à exécuter.",
76
+ "schema": {
77
+ "type": "array",
78
+ "items": {
79
+ "$ref": "https://schemas.digipair.ai/pinsSettings"
80
+ }
81
+ }
82
+ }
83
+ ]
84
+ },
85
+ "/trigger": {
86
+ "summary": "Déclencheur",
87
+ "description": "Déclenchement d'une exécution d'actions.",
88
+ "tags": ["service"],
89
+ "metadata": [
90
+ {
91
+ "name": "tags",
92
+ "summary": "Tags",
93
+ "required": true,
94
+ "description": "Tags du déclencheur",
95
+ "schema": {
96
+ "type": "array",
97
+ "items": {
98
+ "type": "string"
99
+ }
100
+ }
101
+ },
102
+ {
103
+ "name": "parameters",
104
+ "summary": "ParamĂštres",
105
+ "required": true,
106
+ "description": "ParamÚtres du déclencheur",
107
+ "schema": {
108
+ "type": "array",
109
+ "items": {
110
+ "$ref": "#/components/schemas/Parameter"
111
+ }
112
+ }
113
+ }
114
+ ],
115
+ "parameters": [
116
+ {
117
+ "name": "execute",
118
+ "summary": "Execute",
119
+ "required": true,
120
+ "description": "Commandes à exécuter.",
121
+ "schema": {
122
+ "type": "array",
123
+ "items": {
124
+ "$ref": "https://schemas.digipair.ai/pinsSettings"
125
+ }
126
+ }
127
+ }
128
+ ]
129
+ }
130
+ },
131
+ "components": {
132
+ "schemas": {
133
+ "Parameter": {
134
+ "type": "object",
135
+ "tags": ["service"],
136
+ "summary": "Parameter",
137
+ "properties": {
138
+ "name": {
139
+ "summary": "Nom",
140
+ "type": "string"
141
+ },
142
+ "summary": {
143
+ "summary": "Affichage",
144
+ "type": "string"
145
+ },
146
+ "required": {
147
+ "summary": "Requis",
148
+ "type": "boolean"
149
+ },
150
+ "schema": {
151
+ "summary": "Schema",
152
+ "type": "object"
153
+ },
154
+ "description": {
155
+ "summary": "Description",
156
+ "type": "string"
157
+ }
158
+ },
159
+ "required": ["name", "summary", "required", "schema"]
160
+ }
161
+ }
162
+ }
163
+ }
package/schema.json ADDED
@@ -0,0 +1,172 @@
1
+ {
2
+ "openapi": "3.0.0",
3
+ "info": {
4
+ "title": "@digipair/skill-tool",
5
+ "summary": "Tool",
6
+ "description": "Digitool actions and triggers.",
7
+ "version": "0.1.0",
8
+ "x-icon": "🛠"
9
+ },
10
+ "paths": {
11
+ "/stop": {
12
+ "post": {
13
+ "tags": ["service"],
14
+ "summary": "Stop",
15
+ "description": "Stop the reasoning",
16
+ "parameters": [
17
+ {
18
+ "name": "value",
19
+ "required": false,
20
+ "summary": "Value",
21
+ "description": "Value to return",
22
+ "schema": {
23
+ "type": "object"
24
+ }
25
+ }
26
+ ],
27
+ "x-events": []
28
+ }
29
+ },
30
+ "/keepAlive": {
31
+ "post": {
32
+ "tags": ["service"],
33
+ "summary": "Keep alive",
34
+ "description": "Keep alive the reasoning",
35
+ "parameters": [],
36
+ "x-events": []
37
+ }
38
+ }
39
+ },
40
+ "components": {
41
+ "schemas": {
42
+ "Parameter": {
43
+ "type": "object",
44
+ "tags": ["service"],
45
+ "summary": "Parameter",
46
+ "properties": {
47
+ "name": {
48
+ "summary": "Name",
49
+ "type": "string"
50
+ },
51
+ "summary": {
52
+ "summary": "Summary",
53
+ "type": "string"
54
+ },
55
+ "required": {
56
+ "summary": "Required",
57
+ "type": "boolean"
58
+ },
59
+ "schema": {
60
+ "summary": "Schema",
61
+ "type": "object"
62
+ },
63
+ "description": {
64
+ "summary": "Summary",
65
+ "type": "string"
66
+ }
67
+ },
68
+ "required": ["name", "summary", "required", "schema"]
69
+ }
70
+ }
71
+ },
72
+ "x-scene-blocks": {
73
+ "/task": {
74
+ "summary": "Task",
75
+ "description": "Execution of a task.",
76
+ "tags": ["service"],
77
+ "metadata": [],
78
+ "parameters": [
79
+ {
80
+ "name": "execute",
81
+ "summary": "Execute",
82
+ "required": true,
83
+ "description": "Commands to execute",
84
+ "schema": {
85
+ "type": "array",
86
+ "items": {
87
+ "$ref": "https://schemas.digipair.ai/pinsSettings"
88
+ }
89
+ }
90
+ }
91
+ ]
92
+ },
93
+ "/action": {
94
+ "summary": "Action",
95
+ "description": "Executable action.",
96
+ "tags": ["service"],
97
+ "metadata": [
98
+ {
99
+ "name": "parameters",
100
+ "summary": "Parameters",
101
+ "required": true,
102
+ "description": "Input parameters",
103
+ "schema": {
104
+ "type": "array",
105
+ "items": {
106
+ "$ref": "#/components/schemas/Parameter"
107
+ }
108
+ }
109
+ }
110
+ ],
111
+ "parameters": [
112
+ {
113
+ "name": "execute",
114
+ "summary": "Execute",
115
+ "required": true,
116
+ "description": "Commands to execute",
117
+ "schema": {
118
+ "type": "array",
119
+ "items": {
120
+ "$ref": "https://schemas.digipair.ai/pinsSettings"
121
+ }
122
+ }
123
+ }
124
+ ]
125
+ },
126
+ "/trigger": {
127
+ "summary": "Trigger",
128
+ "description": "Executable trigger.",
129
+ "tags": ["service"],
130
+ "metadata": [
131
+ {
132
+ "name": "tags",
133
+ "summary": "Tags",
134
+ "required": true,
135
+ "description": "Trigger tags",
136
+ "schema": {
137
+ "type": "array",
138
+ "items": {
139
+ "type": "string"
140
+ }
141
+ }
142
+ },
143
+ {
144
+ "name": "parameters",
145
+ "summary": "Parameters",
146
+ "required": true,
147
+ "description": "Input parameters",
148
+ "schema": {
149
+ "type": "array",
150
+ "items": {
151
+ "$ref": "#/components/schemas/Parameter"
152
+ }
153
+ }
154
+ }
155
+ ],
156
+ "parameters": [
157
+ {
158
+ "name": "execute",
159
+ "summary": "Execute",
160
+ "required": true,
161
+ "description": "Commands to execute",
162
+ "schema": {
163
+ "type": "array",
164
+ "items": {
165
+ "$ref": "https://schemas.digipair.ai/pinsSettings"
166
+ }
167
+ }
168
+ }
169
+ ]
170
+ }
171
+ }
172
+ }