@digipair/skill-worker 0.76.0 → 0.77.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.
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 nextMatch = nextMatch1, i = i1, tokens = tokens1, {
23924
+ return tokens = tokens1, i = i1, 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 nextMatch = nextMatch1, i = i1, tokens = tokens1, "continue";
23931
+ return tokens = tokens1, i = i1, nextMatch = nextMatch1, "continue";
23932
23932
  }
23933
23933
  tokens1 = _to_consumable_array$1(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 nextMatch = nextMatch1, i = i1, tokens = tokens1, "continue";
23950
+ return tokens = tokens1, i = i1, 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 nextMatch = nextMatch1, i = i1, tokens = tokens1, "continue";
23969
+ return tokens = tokens1, i = i1, nextMatch = nextMatch1, "continue";
23970
23970
  }
23971
- return nextMatch = nextMatch1, i = i1, tokens = tokens1, {
23971
+ return tokens = tokens1, i = i1, nextMatch = nextMatch1, {
23972
23972
  v: nextMatch1
23973
23973
  };
23974
23974
  };
@@ -28011,6 +28011,13 @@ let WorkerService = class WorkerService {
28011
28011
  const { execute } = params;
28012
28012
  return await executePinsList(execute, context, `${context.__PATH__}.execute`);
28013
28013
  }
28014
+ async stop(params, _pinsSettingsList, context) {
28015
+ const { value = {} } = params;
28016
+ throw {
28017
+ type: 'DIGIPAIR_STOP',
28018
+ value
28019
+ };
28020
+ }
28014
28021
  };
28015
28022
  const task = (params, pinsSettingsList, context)=>new WorkerService().task(params, pinsSettingsList, context);
28016
28023
  const action = (params, pinsSettingsList, context)=>new WorkerService().action(params, pinsSettingsList, context);
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, i = i1, nextMatch = nextMatch1, {
23902
+ return i = i1, tokens = tokens1, nextMatch = nextMatch1, {
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, i = i1, nextMatch = nextMatch1, "continue";
23909
+ return i = i1, tokens = tokens1, nextMatch = nextMatch1, "continue";
23910
23910
  }
23911
23911
  tokens1 = _to_consumable_array$1(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, i = i1, nextMatch = nextMatch1, "continue";
23928
+ return i = i1, tokens = tokens1, nextMatch = nextMatch1, "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, i = i1, nextMatch = nextMatch1, "continue";
23947
+ return i = i1, tokens = tokens1, nextMatch = nextMatch1, "continue";
23948
23948
  }
23949
- return tokens = tokens1, i = i1, nextMatch = nextMatch1, {
23949
+ return i = i1, tokens = tokens1, nextMatch = nextMatch1, {
23950
23950
  v: nextMatch1
23951
23951
  };
23952
23952
  };
@@ -27989,6 +27989,13 @@ let WorkerService = class WorkerService {
27989
27989
  const { execute } = params;
27990
27990
  return await executePinsList(execute, context, `${context.__PATH__}.execute`);
27991
27991
  }
27992
+ async stop(params, _pinsSettingsList, context) {
27993
+ const { value = {} } = params;
27994
+ throw {
27995
+ type: 'DIGIPAIR_STOP',
27996
+ value
27997
+ };
27998
+ }
27992
27999
  };
27993
28000
  const task = (params, pinsSettingsList, context)=>new WorkerService().task(params, pinsSettingsList, context);
27994
28001
  const action = (params, pinsSettingsList, context)=>new WorkerService().action(params, pinsSettingsList, context);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digipair/skill-worker",
3
- "version": "0.76.0",
3
+ "version": "0.77.0",
4
4
  "keywords": [
5
5
  "digipair",
6
6
  "service"
package/schema.fr.json CHANGED
@@ -1,82 +1,24 @@
1
1
  {
2
2
  "openapi": "3.0.0",
3
3
  "info": {
4
- "title": "@digipair/skill-factory",
5
- "summary": "Actions dans la factory Digipair",
6
- "description": "Actions dans la factory Digipair.",
4
+ "title": "@digipair/skill-worker",
5
+ "summary": "Agent métier",
6
+ "description": "Actions des agents métiers.",
7
7
  "version": "0.1.0",
8
8
  "x-icon": "🛠"
9
9
  },
10
10
  "paths": {
11
- "/start": {
11
+ "/stop": {
12
12
  "post": {
13
13
  "tags": ["service"],
14
- "summary": "Démarrage d'un raisonnement",
15
- "description": "Démarrage d'un raisonnement depuis la factory Digipair",
14
+ "summary": "Stop",
15
+ "description": "Stop le raisonnement",
16
16
  "parameters": [
17
17
  {
18
- "name": "digipair",
19
- "summary": "Digipair",
18
+ "name": "value",
20
19
  "required": false,
21
- "description": "Propriétaire du raisonnement",
22
- "schema": {
23
- "type": "string"
24
- }
25
- },
26
- {
27
- "name": "reasoning",
28
- "summary": "Raisonnement",
29
- "required": true,
30
- "description": "Nom du raisonnement",
31
- "schema": {
32
- "type": "string"
33
- }
34
- },
35
- {
36
- "name": "body",
37
- "summary": "Données",
38
- "required": false,
39
- "description": "Données à envoyer",
40
- "schema": {
41
- "type": "object"
42
- }
43
- },
44
- {
45
- "name": "factory",
46
- "summary": "Factory",
47
- "required": false,
48
- "description": "Nom de la factory",
49
- "schema": {
50
- "type": "string"
51
- }
52
- }
53
- ],
54
- "x-events": []
55
- }
56
- },
57
- "/execute": {
58
- "post": {
59
- "tags": ["service"],
60
- "summary": "Execute avec un contexte",
61
- "description": "Execute des Pin's avec un contexte donné",
62
- "parameters": [
63
- {
64
- "name": "execute",
65
- "required": true,
66
- "summary": "Actions à exécuter",
67
- "description": "Actions à exécuter",
68
- "schema": {
69
- "type": "array",
70
- "items": {
71
- "$ref": "https://schemas.digipair.ai/pinsSettings"
72
- }
73
- }
74
- },
75
- {
76
- "name": "context",
77
- "required": false,
78
- "summary": "Contexte",
79
- "description": "Contexte d'exécution",
20
+ "summary": "Valeur",
21
+ "description": "Valeur à retourner",
80
22
  "schema": {
81
23
  "type": "object"
82
24
  }
@@ -84,15 +26,6 @@
84
26
  ],
85
27
  "x-events": []
86
28
  }
87
- },
88
- "/keepAlive": {
89
- "post": {
90
- "tags": ["service"],
91
- "summary": "Keep-alive",
92
- "description": "Garder en vie le raisonnement",
93
- "parameters": [],
94
- "x-events": []
95
- }
96
29
  }
97
30
  },
98
31
  "x-scene-blocks": {
@@ -121,18 +54,6 @@
121
54
  "description": "Action exécutable.",
122
55
  "tags": ["service"],
123
56
  "metadata": [
124
- {
125
- "name": "tags",
126
- "summary": "Tags",
127
- "required": true,
128
- "description": "Tags de l'action",
129
- "schema": {
130
- "type": "array",
131
- "items": {
132
- "type": "string"
133
- }
134
- }
135
- },
136
57
  {
137
58
  "name": "parameters",
138
59
  "summary": "Paramètres",
package/schema.json CHANGED
@@ -2,12 +2,32 @@
2
2
  "openapi": "3.0.0",
3
3
  "info": {
4
4
  "title": "@digipair/skill-worker",
5
- "summary": "Digiworker skill",
6
- "description": "Digiworkers triggers and actions.",
5
+ "summary": "Worker",
6
+ "description": "Digiworkers actions.",
7
7
  "version": "0.1.0",
8
8
  "x-icon": "🛠"
9
9
  },
10
- "paths": {},
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
+ },
11
31
  "components": {
12
32
  "schemas": {
13
33
  "Parameter": {
@@ -66,18 +86,6 @@
66
86
  "description": "Executable action.",
67
87
  "tags": ["service"],
68
88
  "metadata": [
69
- {
70
- "name": "tags",
71
- "summary": "Tags",
72
- "required": true,
73
- "description": "Action tags",
74
- "schema": {
75
- "type": "array",
76
- "items": {
77
- "type": "string"
78
- }
79
- }
80
- },
81
89
  {
82
90
  "name": "parameters",
83
91
  "summary": "Parameters",