@ever-works/everworks-playbooks-plugin 1.0.8 → 1.0.10
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/dist/index.cjs +35 -9
- package/dist/index.js +35 -9
- package/package.json +6 -6
package/dist/index.cjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
// ../../../node_modules/.pnpm/@ever-co+connect-contracts@1.0.0-rc.
|
|
5
|
+
// ../../../node_modules/.pnpm/@ever-co+connect-contracts@1.0.0-rc.8/node_modules/@ever-co/connect-contracts/dist/index.js
|
|
6
6
|
var PROBLEM_CODES = [
|
|
7
7
|
"validation_failed",
|
|
8
8
|
"not_found",
|
|
@@ -16,6 +16,10 @@ var PROBLEM_CODES = [
|
|
|
16
16
|
"not_connection_owner",
|
|
17
17
|
"integration_disabled",
|
|
18
18
|
"integration_revoked",
|
|
19
|
+
"subject_unknown",
|
|
20
|
+
"link_not_found",
|
|
21
|
+
"oidc_client_exists",
|
|
22
|
+
"redirect_uri_invalid",
|
|
19
23
|
"denied_by_policy",
|
|
20
24
|
"integration_not_available",
|
|
21
25
|
"entitlement_required",
|
|
@@ -44,6 +48,8 @@ var PROBLEM_CODES = [
|
|
|
44
48
|
"illegal_transition",
|
|
45
49
|
"already_exists",
|
|
46
50
|
"already_completed",
|
|
51
|
+
"legal_basis_required",
|
|
52
|
+
"receipt_final",
|
|
47
53
|
"billing_active",
|
|
48
54
|
"sso_required",
|
|
49
55
|
"reauth_required",
|
|
@@ -990,7 +996,7 @@ var FLEET_TOOL_CATALOGUE = Object.freeze([
|
|
|
990
996
|
route: GET("/api/fleet/nodes/{id}/desktop/screenshot"),
|
|
991
997
|
cli: "fleet desktop screenshot"
|
|
992
998
|
}),
|
|
993
|
-
read("fleet_desktop_displays", "desktop", "FL-07", "FLEET_DESKTOP_ENABLED", "
|
|
999
|
+
read("fleet_desktop_displays", "desktop", "FL-07", "FLEET_DESKTOP_ENABLED", "live", {
|
|
994
1000
|
route: GET("/api/fleet/nodes/{id}/desktop/displays"),
|
|
995
1001
|
cli: "fleet desktop displays"
|
|
996
1002
|
}),
|
|
@@ -1264,6 +1270,9 @@ var FLEET_TOOL_CATALOGUE = Object.freeze([
|
|
|
1264
1270
|
route: GET("/api/fleet/checkouts/{id}/changes"),
|
|
1265
1271
|
cli: "fleet checkouts changes"
|
|
1266
1272
|
}),
|
|
1273
|
+
read("fleet_checkouts_pull_request_get", "checkouts", "FL-06", "FLEET_CHECKOUTS_ENABLED", "planned", {
|
|
1274
|
+
route: GET("/api/fleet/checkouts/{id}/pull-request")
|
|
1275
|
+
}),
|
|
1267
1276
|
act("fleet_checkouts_create", "checkouts", "FL-14", "FLEET_CHECKOUTS_ENABLED", "live", plain("machine.run"), {
|
|
1268
1277
|
route: POST("/api/fleet/checkouts"),
|
|
1269
1278
|
cli: "fleet checkouts create",
|
|
@@ -1392,13 +1401,13 @@ var FLEET_TOOL_CATALOGUE = Object.freeze([
|
|
|
1392
1401
|
}),
|
|
1393
1402
|
// ── runners (FL-18) ── P1 shipped: list, install, start / stop / restart, remove. An install, a
|
|
1394
1403
|
// stop, a restart and a remove asked by an Agent are held for the owner's approval
|
|
1395
|
-
// (`agent-fleet-runners-tools.ts`).
|
|
1404
|
+
// (`agent-fleet-runners-tools.ts`). P2: the Actions jobs read and Cancel workflow run (always held for an Agent).
|
|
1396
1405
|
read("fleet_runners_list", "view", "FL-18", "FLEET_ACTIONS_RUNNERS_ENABLED", "live", {
|
|
1397
1406
|
phase: "P3",
|
|
1398
1407
|
route: GET("/api/fleet/nodes/{id}/runners"),
|
|
1399
1408
|
cli: "fleet runners list"
|
|
1400
1409
|
}),
|
|
1401
|
-
read("fleet_runners_jobs", "view", "FL-18", "FLEET_ACTIONS_RUNNERS_ENABLED", "
|
|
1410
|
+
read("fleet_runners_jobs", "view", "FL-18", "FLEET_ACTIONS_RUNNERS_ENABLED", "live", {
|
|
1402
1411
|
phase: "P3",
|
|
1403
1412
|
route: GET("/api/fleet/runners/jobs"),
|
|
1404
1413
|
cli: "fleet runners jobs"
|
|
@@ -1453,9 +1462,14 @@ var FLEET_TOOL_CATALOGUE = Object.freeze([
|
|
|
1453
1462
|
"machines",
|
|
1454
1463
|
"FL-18",
|
|
1455
1464
|
"FLEET_ACTIONS_RUNNERS_ENABLED",
|
|
1456
|
-
"
|
|
1465
|
+
"live",
|
|
1457
1466
|
confirm("machine.admin"),
|
|
1458
|
-
{
|
|
1467
|
+
{
|
|
1468
|
+
phase: "P3",
|
|
1469
|
+
route: POST("/api/fleet/runners/jobs/cancel"),
|
|
1470
|
+
cli: "fleet runners cancel-run",
|
|
1471
|
+
alwaysHeld: true
|
|
1472
|
+
}
|
|
1459
1473
|
),
|
|
1460
1474
|
// ── usage (FL-20) ── P1 shipped: the Usage object (totals, by model, by computer, busiest
|
|
1461
1475
|
// checkouts, sessions) every surface renders, read-only, with the payer sentence in `note`.
|
|
@@ -1578,7 +1592,9 @@ var FLEET_VIRTUAL_SYSTEMS = [
|
|
|
1578
1592
|
approxDownloadGiB: 0.7
|
|
1579
1593
|
}
|
|
1580
1594
|
];
|
|
1581
|
-
FLEET_VIRTUAL_SYSTEMS.map(
|
|
1595
|
+
FLEET_VIRTUAL_SYSTEMS.map(
|
|
1596
|
+
(system) => system.id
|
|
1597
|
+
);
|
|
1582
1598
|
var WORKFLOW_EDGE_KINDS = [
|
|
1583
1599
|
"sequential",
|
|
1584
1600
|
"on_failure",
|
|
@@ -1861,9 +1877,16 @@ function playbookSearchFields(entry) {
|
|
|
1861
1877
|
extra: entry.stepTitles
|
|
1862
1878
|
};
|
|
1863
1879
|
}
|
|
1864
|
-
var HTML_TAG_PATTERN = /<[
|
|
1880
|
+
var HTML_TAG_PATTERN = /<[^<>]*>/g;
|
|
1865
1881
|
function sanitizePlaybookText(value, max) {
|
|
1866
|
-
|
|
1882
|
+
let current = value;
|
|
1883
|
+
let previous;
|
|
1884
|
+
let passes = 0;
|
|
1885
|
+
do {
|
|
1886
|
+
previous = current;
|
|
1887
|
+
current = current.replace(HTML_TAG_PATTERN, "");
|
|
1888
|
+
} while (current !== previous && ++passes < 32);
|
|
1889
|
+
return current.replace(/(?<!<)<+(?=[a-z/!?])/gi, "").trim().slice(0, max);
|
|
1867
1890
|
}
|
|
1868
1891
|
function acceptPlaybookEntry(value) {
|
|
1869
1892
|
if (!isRecord7(value)) return { entry: null, violation: "entry must be an object" };
|
|
@@ -2150,6 +2173,9 @@ var DOMAIN_EVENT_CATALOG = [
|
|
|
2150
2173
|
{ type: "inbox.item.answered", domain: "inbox", aggregateType: "inbox_item", phase: "P3" },
|
|
2151
2174
|
{ type: "inbox.item.state_changed", domain: "inbox", aggregateType: "inbox_item", phase: "P3" },
|
|
2152
2175
|
{ type: "inbox.item.deleted", domain: "inbox", aggregateType: "inbox_item", phase: "P3" },
|
|
2176
|
+
// Integration inbox push: an integration's PATCH of its own item, and the member's
|
|
2177
|
+
// answer to an integration item (stored on the item; no run is started).
|
|
2178
|
+
{ type: "inbox.item.updated", domain: "inbox", aggregateType: "inbox_item", phase: "P3" },
|
|
2153
2179
|
{ type: "kb.document.created", domain: "kb", aggregateType: "kb_document", phase: "P3" },
|
|
2154
2180
|
{ type: "kb.document.updated", domain: "kb", aggregateType: "kb_document", phase: "P3" },
|
|
2155
2181
|
{ type: "kb.document.moved", domain: "kb", aggregateType: "kb_document", phase: "P3" },
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// ../../../node_modules/.pnpm/@ever-co+connect-contracts@1.0.0-rc.
|
|
1
|
+
// ../../../node_modules/.pnpm/@ever-co+connect-contracts@1.0.0-rc.8/node_modules/@ever-co/connect-contracts/dist/index.js
|
|
2
2
|
var PROBLEM_CODES = [
|
|
3
3
|
"validation_failed",
|
|
4
4
|
"not_found",
|
|
@@ -12,6 +12,10 @@ var PROBLEM_CODES = [
|
|
|
12
12
|
"not_connection_owner",
|
|
13
13
|
"integration_disabled",
|
|
14
14
|
"integration_revoked",
|
|
15
|
+
"subject_unknown",
|
|
16
|
+
"link_not_found",
|
|
17
|
+
"oidc_client_exists",
|
|
18
|
+
"redirect_uri_invalid",
|
|
15
19
|
"denied_by_policy",
|
|
16
20
|
"integration_not_available",
|
|
17
21
|
"entitlement_required",
|
|
@@ -40,6 +44,8 @@ var PROBLEM_CODES = [
|
|
|
40
44
|
"illegal_transition",
|
|
41
45
|
"already_exists",
|
|
42
46
|
"already_completed",
|
|
47
|
+
"legal_basis_required",
|
|
48
|
+
"receipt_final",
|
|
43
49
|
"billing_active",
|
|
44
50
|
"sso_required",
|
|
45
51
|
"reauth_required",
|
|
@@ -986,7 +992,7 @@ var FLEET_TOOL_CATALOGUE = Object.freeze([
|
|
|
986
992
|
route: GET("/api/fleet/nodes/{id}/desktop/screenshot"),
|
|
987
993
|
cli: "fleet desktop screenshot"
|
|
988
994
|
}),
|
|
989
|
-
read("fleet_desktop_displays", "desktop", "FL-07", "FLEET_DESKTOP_ENABLED", "
|
|
995
|
+
read("fleet_desktop_displays", "desktop", "FL-07", "FLEET_DESKTOP_ENABLED", "live", {
|
|
990
996
|
route: GET("/api/fleet/nodes/{id}/desktop/displays"),
|
|
991
997
|
cli: "fleet desktop displays"
|
|
992
998
|
}),
|
|
@@ -1260,6 +1266,9 @@ var FLEET_TOOL_CATALOGUE = Object.freeze([
|
|
|
1260
1266
|
route: GET("/api/fleet/checkouts/{id}/changes"),
|
|
1261
1267
|
cli: "fleet checkouts changes"
|
|
1262
1268
|
}),
|
|
1269
|
+
read("fleet_checkouts_pull_request_get", "checkouts", "FL-06", "FLEET_CHECKOUTS_ENABLED", "planned", {
|
|
1270
|
+
route: GET("/api/fleet/checkouts/{id}/pull-request")
|
|
1271
|
+
}),
|
|
1263
1272
|
act("fleet_checkouts_create", "checkouts", "FL-14", "FLEET_CHECKOUTS_ENABLED", "live", plain("machine.run"), {
|
|
1264
1273
|
route: POST("/api/fleet/checkouts"),
|
|
1265
1274
|
cli: "fleet checkouts create",
|
|
@@ -1388,13 +1397,13 @@ var FLEET_TOOL_CATALOGUE = Object.freeze([
|
|
|
1388
1397
|
}),
|
|
1389
1398
|
// ── runners (FL-18) ── P1 shipped: list, install, start / stop / restart, remove. An install, a
|
|
1390
1399
|
// stop, a restart and a remove asked by an Agent are held for the owner's approval
|
|
1391
|
-
// (`agent-fleet-runners-tools.ts`).
|
|
1400
|
+
// (`agent-fleet-runners-tools.ts`). P2: the Actions jobs read and Cancel workflow run (always held for an Agent).
|
|
1392
1401
|
read("fleet_runners_list", "view", "FL-18", "FLEET_ACTIONS_RUNNERS_ENABLED", "live", {
|
|
1393
1402
|
phase: "P3",
|
|
1394
1403
|
route: GET("/api/fleet/nodes/{id}/runners"),
|
|
1395
1404
|
cli: "fleet runners list"
|
|
1396
1405
|
}),
|
|
1397
|
-
read("fleet_runners_jobs", "view", "FL-18", "FLEET_ACTIONS_RUNNERS_ENABLED", "
|
|
1406
|
+
read("fleet_runners_jobs", "view", "FL-18", "FLEET_ACTIONS_RUNNERS_ENABLED", "live", {
|
|
1398
1407
|
phase: "P3",
|
|
1399
1408
|
route: GET("/api/fleet/runners/jobs"),
|
|
1400
1409
|
cli: "fleet runners jobs"
|
|
@@ -1449,9 +1458,14 @@ var FLEET_TOOL_CATALOGUE = Object.freeze([
|
|
|
1449
1458
|
"machines",
|
|
1450
1459
|
"FL-18",
|
|
1451
1460
|
"FLEET_ACTIONS_RUNNERS_ENABLED",
|
|
1452
|
-
"
|
|
1461
|
+
"live",
|
|
1453
1462
|
confirm("machine.admin"),
|
|
1454
|
-
{
|
|
1463
|
+
{
|
|
1464
|
+
phase: "P3",
|
|
1465
|
+
route: POST("/api/fleet/runners/jobs/cancel"),
|
|
1466
|
+
cli: "fleet runners cancel-run",
|
|
1467
|
+
alwaysHeld: true
|
|
1468
|
+
}
|
|
1455
1469
|
),
|
|
1456
1470
|
// ── usage (FL-20) ── P1 shipped: the Usage object (totals, by model, by computer, busiest
|
|
1457
1471
|
// checkouts, sessions) every surface renders, read-only, with the payer sentence in `note`.
|
|
@@ -1574,7 +1588,9 @@ var FLEET_VIRTUAL_SYSTEMS = [
|
|
|
1574
1588
|
approxDownloadGiB: 0.7
|
|
1575
1589
|
}
|
|
1576
1590
|
];
|
|
1577
|
-
FLEET_VIRTUAL_SYSTEMS.map(
|
|
1591
|
+
FLEET_VIRTUAL_SYSTEMS.map(
|
|
1592
|
+
(system) => system.id
|
|
1593
|
+
);
|
|
1578
1594
|
var WORKFLOW_EDGE_KINDS = [
|
|
1579
1595
|
"sequential",
|
|
1580
1596
|
"on_failure",
|
|
@@ -1857,9 +1873,16 @@ function playbookSearchFields(entry) {
|
|
|
1857
1873
|
extra: entry.stepTitles
|
|
1858
1874
|
};
|
|
1859
1875
|
}
|
|
1860
|
-
var HTML_TAG_PATTERN = /<[
|
|
1876
|
+
var HTML_TAG_PATTERN = /<[^<>]*>/g;
|
|
1861
1877
|
function sanitizePlaybookText(value, max) {
|
|
1862
|
-
|
|
1878
|
+
let current = value;
|
|
1879
|
+
let previous;
|
|
1880
|
+
let passes = 0;
|
|
1881
|
+
do {
|
|
1882
|
+
previous = current;
|
|
1883
|
+
current = current.replace(HTML_TAG_PATTERN, "");
|
|
1884
|
+
} while (current !== previous && ++passes < 32);
|
|
1885
|
+
return current.replace(/(?<!<)<+(?=[a-z/!?])/gi, "").trim().slice(0, max);
|
|
1863
1886
|
}
|
|
1864
1887
|
function acceptPlaybookEntry(value) {
|
|
1865
1888
|
if (!isRecord7(value)) return { entry: null, violation: "entry must be an object" };
|
|
@@ -2146,6 +2169,9 @@ var DOMAIN_EVENT_CATALOG = [
|
|
|
2146
2169
|
{ type: "inbox.item.answered", domain: "inbox", aggregateType: "inbox_item", phase: "P3" },
|
|
2147
2170
|
{ type: "inbox.item.state_changed", domain: "inbox", aggregateType: "inbox_item", phase: "P3" },
|
|
2148
2171
|
{ type: "inbox.item.deleted", domain: "inbox", aggregateType: "inbox_item", phase: "P3" },
|
|
2172
|
+
// Integration inbox push: an integration's PATCH of its own item, and the member's
|
|
2173
|
+
// answer to an integration item (stored on the item; no run is started).
|
|
2174
|
+
{ type: "inbox.item.updated", domain: "inbox", aggregateType: "inbox_item", phase: "P3" },
|
|
2149
2175
|
{ type: "kb.document.created", domain: "kb", aggregateType: "kb_document", phase: "P3" },
|
|
2150
2176
|
{ type: "kb.document.updated", domain: "kb", aggregateType: "kb_document", phase: "P3" },
|
|
2151
2177
|
{ type: "kb.document.moved", domain: "kb", aggregateType: "kb_document", phase: "P3" },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ever-works/everworks-playbooks-plugin",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.10",
|
|
4
4
|
"description": "Ever Works Playbooks — first-party playbook-provider plugin supplying the built-in Playbook catalogue: packaged outcomes with their trigger, steps, required capabilities, artefacts and escalation points.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Ever Co. LTD",
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
"test:coverage": "vitest run --coverage"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@ever-works/contracts": "^1.0.
|
|
37
|
-
"@ever-works/plugin": "^1.2.
|
|
36
|
+
"@ever-works/contracts": "^1.0.19",
|
|
37
|
+
"@ever-works/plugin": "^1.2.16"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"tsup": "^8.3.0",
|
|
@@ -67,8 +67,8 @@
|
|
|
67
67
|
"url": "https://github.com/ever-works/ever-works/issues"
|
|
68
68
|
},
|
|
69
69
|
"everworksRelease": {
|
|
70
|
-
"contentHash": "sha256:
|
|
71
|
-
"commit": "
|
|
72
|
-
"source": "https://github.com/ever-works/ever-works/tree/
|
|
70
|
+
"contentHash": "sha256:308cc1aa03214abe51a4b15b5d0c7ccca5b9303ccdcc64f24b0f5d9134f6b228",
|
|
71
|
+
"commit": "89cee44a662034ea957b07ec5e1230ecf340b107",
|
|
72
|
+
"source": "https://github.com/ever-works/ever-works/tree/89cee44a662034ea957b07ec5e1230ecf340b107/packages/plugins/everworks-playbooks"
|
|
73
73
|
}
|
|
74
74
|
}
|