@digipair/skill-worker 0.109.1 → 0.110.1

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.
package/index.cjs.js CHANGED
@@ -23921,14 +23921,14 @@ function indent(str, spaces) {
23921
23921
  var match = parseIdentifier(input, i1, namePart) || namePart && parseAdditionalSymbol(input, i1) || maybeSpace && parseSpaces(input, i1);
23922
23922
  // match is required
23923
23923
  if (!match) {
23924
- return i = i1, nextMatch = nextMatch1, tokens = tokens1, {
23924
+ return i = i1, tokens = tokens1, nextMatch = nextMatch1, {
23925
23925
  v: nextMatch1
23926
23926
  };
23927
23927
  }
23928
23928
  var token = match.token, offset = match.offset;
23929
23929
  i1 += offset;
23930
23930
  if (token === " ") {
23931
- return i = i1, nextMatch = nextMatch1, tokens = tokens1, "continue";
23931
+ return i = i1, tokens = tokens1, nextMatch = nextMatch1, "continue";
23932
23932
  }
23933
23933
  tokens1 = _to_consumable_array$4(tokens1).concat([
23934
23934
  token
@@ -23947,7 +23947,7 @@ function indent(str, spaces) {
23947
23947
  if (contextKeys.some(function(el) {
23948
23948
  return el.startsWith(name);
23949
23949
  })) {
23950
- return i = i1, nextMatch = nextMatch1, tokens = tokens1, "continue";
23950
+ return i = i1, tokens = tokens1, nextMatch = nextMatch1, "continue";
23951
23951
  }
23952
23952
  if (dateTimeIdentifiers.some(function(el) {
23953
23953
  return el === name;
@@ -23966,9 +23966,9 @@ function indent(str, spaces) {
23966
23966
  if (dateTimeIdentifiers.some(function(el) {
23967
23967
  return el.startsWith(name);
23968
23968
  })) {
23969
- return i = i1, nextMatch = nextMatch1, tokens = tokens1, "continue";
23969
+ return i = i1, tokens = tokens1, nextMatch = nextMatch1, "continue";
23970
23970
  }
23971
- return i = i1, nextMatch = nextMatch1, tokens = tokens1, {
23971
+ return i = i1, tokens = tokens1, nextMatch = nextMatch1, {
23972
23972
  v: nextMatch1
23973
23973
  };
23974
23974
  };
@@ -45885,13 +45885,24 @@ let WorkerService = class WorkerService {
45885
45885
  value
45886
45886
  };
45887
45887
  }
45888
+ async answer(params, _pinsSettingsList, context) {
45889
+ const { content, assistant, sources, agent_history } = params;
45890
+ return {
45891
+ content,
45892
+ assistant,
45893
+ sources,
45894
+ agent_history
45895
+ };
45896
+ }
45888
45897
  };
45889
45898
  const task = (params, pinsSettingsList, context)=>new WorkerService().task(params, pinsSettingsList, context);
45890
45899
  const action = (params, pinsSettingsList, context)=>new WorkerService().action(params, pinsSettingsList, context);
45891
45900
  const activity = (params, pinsSettingsList, context)=>new WorkerService().activity(params, pinsSettingsList, context);
45892
45901
  const stop = (params, pinsSettingsList, context)=>new WorkerService().stop(params, pinsSettingsList, context);
45902
+ const answer = (params, pinsSettingsList, context)=>new WorkerService().answer(params, pinsSettingsList, context);
45893
45903
 
45894
45904
  exports.action = action;
45895
45905
  exports.activity = activity;
45906
+ exports.answer = answer;
45896
45907
  exports.stop = stop;
45897
45908
  exports.task = task;
package/index.esm.js CHANGED
@@ -23899,14 +23899,14 @@ function indent(str, spaces) {
23899
23899
  var match = parseIdentifier(input, i1, namePart) || namePart && parseAdditionalSymbol(input, i1) || maybeSpace && parseSpaces(input, i1);
23900
23900
  // match is required
23901
23901
  if (!match) {
23902
- return tokens = tokens1, nextMatch = nextMatch1, i = i1, {
23902
+ return nextMatch = nextMatch1, tokens = tokens1, i = i1, {
23903
23903
  v: nextMatch1
23904
23904
  };
23905
23905
  }
23906
23906
  var token = match.token, offset = match.offset;
23907
23907
  i1 += offset;
23908
23908
  if (token === " ") {
23909
- return tokens = tokens1, nextMatch = nextMatch1, i = i1, "continue";
23909
+ return nextMatch = nextMatch1, tokens = tokens1, i = i1, "continue";
23910
23910
  }
23911
23911
  tokens1 = _to_consumable_array$4(tokens1).concat([
23912
23912
  token
@@ -23925,7 +23925,7 @@ function indent(str, spaces) {
23925
23925
  if (contextKeys.some(function(el) {
23926
23926
  return el.startsWith(name);
23927
23927
  })) {
23928
- return tokens = tokens1, nextMatch = nextMatch1, i = i1, "continue";
23928
+ return nextMatch = nextMatch1, tokens = tokens1, i = i1, "continue";
23929
23929
  }
23930
23930
  if (dateTimeIdentifiers.some(function(el) {
23931
23931
  return el === name;
@@ -23944,9 +23944,9 @@ function indent(str, spaces) {
23944
23944
  if (dateTimeIdentifiers.some(function(el) {
23945
23945
  return el.startsWith(name);
23946
23946
  })) {
23947
- return tokens = tokens1, nextMatch = nextMatch1, i = i1, "continue";
23947
+ return nextMatch = nextMatch1, tokens = tokens1, i = i1, "continue";
23948
23948
  }
23949
- return tokens = tokens1, nextMatch = nextMatch1, i = i1, {
23949
+ return nextMatch = nextMatch1, tokens = tokens1, i = i1, {
23950
23950
  v: nextMatch1
23951
23951
  };
23952
23952
  };
@@ -45863,10 +45863,20 @@ let WorkerService = class WorkerService {
45863
45863
  value
45864
45864
  };
45865
45865
  }
45866
+ async answer(params, _pinsSettingsList, context) {
45867
+ const { content, assistant, sources, agent_history } = params;
45868
+ return {
45869
+ content,
45870
+ assistant,
45871
+ sources,
45872
+ agent_history
45873
+ };
45874
+ }
45866
45875
  };
45867
45876
  const task = (params, pinsSettingsList, context)=>new WorkerService().task(params, pinsSettingsList, context);
45868
45877
  const action = (params, pinsSettingsList, context)=>new WorkerService().action(params, pinsSettingsList, context);
45869
45878
  const activity = (params, pinsSettingsList, context)=>new WorkerService().activity(params, pinsSettingsList, context);
45870
45879
  const stop = (params, pinsSettingsList, context)=>new WorkerService().stop(params, pinsSettingsList, context);
45880
+ const answer = (params, pinsSettingsList, context)=>new WorkerService().answer(params, pinsSettingsList, context);
45871
45881
 
45872
- export { action, activity, stop, task };
45882
+ export { action, activity, answer, stop, task };
@@ -3,3 +3,4 @@ export declare const task: (params: any, pinsSettingsList: PinsSettings[], conte
3
3
  export declare const action: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
4
4
  export declare const activity: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
5
5
  export declare const stop: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
6
+ export declare const answer: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digipair/skill-worker",
3
- "version": "0.109.1",
3
+ "version": "0.110.1",
4
4
  "keywords": [
5
5
  "digipair",
6
6
  "service"
package/schema.fr.json CHANGED
@@ -10,9 +10,7 @@
10
10
  "paths": {
11
11
  "/activity": {
12
12
  "post": {
13
- "tags": [
14
- "service"
15
- ],
13
+ "tags": ["service"],
16
14
  "summary": "Activité",
17
15
  "description": "Exécute une activité.",
18
16
  "parameters": [
@@ -56,9 +54,7 @@
56
54
  },
57
55
  "/stop": {
58
56
  "post": {
59
- "tags": [
60
- "service"
61
- ],
57
+ "tags": ["service"],
62
58
  "summary": "Stop",
63
59
  "description": "Stop le raisonnement",
64
60
  "parameters": [
@@ -86,15 +82,107 @@
86
82
  },
87
83
  "x-events": []
88
84
  }
85
+ },
86
+ "/answer": {
87
+ "post": {
88
+ "tags": ["service"],
89
+ "summary": "Répondre",
90
+ "description": "Fournit une réponse de l'agent.",
91
+ "parameters": [
92
+ {
93
+ "name": "content",
94
+ "summary": "Contenu",
95
+ "required": true,
96
+ "description": "Contenu de la réponse",
97
+ "schema": {
98
+ "type": "string"
99
+ }
100
+ },
101
+ {
102
+ "name": "assistant",
103
+ "summary": "Assistant",
104
+ "required": false,
105
+ "description": "Détails supplémentaires de l'assistant",
106
+ "schema": {
107
+ "type": "string"
108
+ }
109
+ },
110
+ {
111
+ "name": "sources",
112
+ "summary": "Sources",
113
+ "required": false,
114
+ "description": "Sources d'information utilisées pour générer la réponse",
115
+ "schema": {
116
+ "type": "array",
117
+ "items": {
118
+ "type": "object",
119
+ "additionalProperties": true
120
+ }
121
+ }
122
+ },
123
+ {
124
+ "name": "agent_history",
125
+ "summary": "Historique de l'agent",
126
+ "required": false,
127
+ "description": "Historique des interactions de l'agent",
128
+ "schema": {
129
+ "type": "array",
130
+ "items": {
131
+ "type": "object",
132
+ "additionalProperties": true
133
+ }
134
+ }
135
+ }
136
+ ],
137
+ "responses": {
138
+ "200": {
139
+ "description": "Réponse fournie par l'agent avec contenu, détails de l'assistant, sources et historique de l'agent",
140
+ "content": {
141
+ "application/json": {
142
+ "schema": {
143
+ "type": "object",
144
+ "properties": {
145
+ "content": {
146
+ "type": "string",
147
+ "description": "Contenu de la réponse"
148
+ },
149
+ "assistant": {
150
+ "type": "object",
151
+ "description": "Détails supplémentaires de l'assistant",
152
+ "additionalProperties": true
153
+ },
154
+ "sources": {
155
+ "type": "array",
156
+ "description": "Sources d'information utilisées pour générer la réponse",
157
+ "items": {
158
+ "type": "object",
159
+ "additionalProperties": true
160
+ }
161
+ },
162
+ "agent_history": {
163
+ "type": "array",
164
+ "description": "Historique des interactions de l'agent",
165
+ "items": {
166
+ "type": "object",
167
+ "additionalProperties": true
168
+ }
169
+ }
170
+ },
171
+ "required": ["content"]
172
+ }
173
+ }
174
+ }
175
+ }
176
+ },
177
+ "x-events": []
178
+ }
89
179
  }
90
180
  },
91
181
  "x-scene-blocks": {
92
182
  "/task": {
93
183
  "summary": "Tache",
94
184
  "description": "Exécution d'une tache.",
95
- "tags": [
96
- "service"
97
- ],
185
+ "tags": ["service"],
98
186
  "metadata": [],
99
187
  "parameters": [
100
188
  {
@@ -114,9 +202,7 @@
114
202
  "/action": {
115
203
  "summary": "Action",
116
204
  "description": "Action exécutable.",
117
- "tags": [
118
- "service"
119
- ],
205
+ "tags": ["service"],
120
206
  "metadata": [
121
207
  {
122
208
  "name": "parameters",
@@ -169,9 +255,7 @@
169
255
  "schemas": {
170
256
  "Parameter": {
171
257
  "type": "object",
172
- "tags": [
173
- "service"
174
- ],
258
+ "tags": ["service"],
175
259
  "summary": "Parameter",
176
260
  "properties": {
177
261
  "name": {
@@ -199,13 +283,8 @@
199
283
  "type": "string"
200
284
  }
201
285
  },
202
- "required": [
203
- "name",
204
- "summary",
205
- "required",
206
- "schema"
207
- ]
286
+ "required": ["name", "summary", "required", "schema"]
208
287
  }
209
288
  }
210
289
  }
211
- }
290
+ }
package/schema.json CHANGED
@@ -129,6 +129,104 @@
129
129
  "schema"
130
130
  ]
131
131
  }
132
+ },
133
+ "/answer": {
134
+ "post": {
135
+ "tags": [
136
+ "service"
137
+ ],
138
+ "summary": "Answer",
139
+ "description": "Provide an answer from the agent with content, assistant details, sources, and agent history.",
140
+ "parameters": [
141
+ {
142
+ "name": "content",
143
+ "summary": "Content",
144
+ "required": true,
145
+ "description": "Content of the response",
146
+ "schema": {
147
+ "type": "string"
148
+ }
149
+ },
150
+ {
151
+ "name": "assistant",
152
+ "summary": "Assistant",
153
+ "required": false,
154
+ "description": "Additional assistant details",
155
+ "schema": {
156
+ "type": "string"
157
+ }
158
+ },
159
+ {
160
+ "name": "sources",
161
+ "summary": "Sources",
162
+ "required": false,
163
+ "description": "Sources of information used to generate the response",
164
+ "schema": {
165
+ "type": "array",
166
+ "items": {
167
+ "type": "object",
168
+ "additionalProperties": true
169
+ }
170
+ }
171
+ },
172
+ {
173
+ "name": "agent_history",
174
+ "summary": "Agent History",
175
+ "required": false,
176
+ "description": "History of agent interactions",
177
+ "schema": {
178
+ "type": "array",
179
+ "items": {
180
+ "type": "object",
181
+ "additionalProperties": true
182
+ }
183
+ }
184
+ }
185
+ ],
186
+ "responses": {
187
+ "200": {
188
+ "description": "RResponse provided by the agent with content, assistant details, sources, and agent history",
189
+ "content": {
190
+ "application/json": {
191
+ "schema": {
192
+ "type": "object",
193
+ "properties": {
194
+ "content": {
195
+ "type": "string",
196
+ "description": "Content of the response"
197
+ },
198
+ "assistant": {
199
+ "type": "object",
200
+ "description": "Additional assistant details",
201
+ "additionalProperties": true
202
+ },
203
+ "sources": {
204
+ "type": "array",
205
+ "description": "Sources of information used to generate the response",
206
+ "items": {
207
+ "type": "object",
208
+ "additionalProperties": true
209
+ }
210
+ },
211
+ "agent_history": {
212
+ "type": "array",
213
+ "description": "History of agent interactions",
214
+ "items": {
215
+ "type": "object",
216
+ "additionalProperties": true
217
+ }
218
+ }
219
+ },
220
+ "required": [
221
+ "content"
222
+ ]
223
+ }
224
+ }
225
+ }
226
+ }
227
+ },
228
+ "x-events": []
229
+ }
132
230
  }
133
231
  },
134
232
  "x-scene-blocks": {