@ever-works/make-plugin 1.0.10 → 1.0.12
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 +179 -14
- package/dist/index.js +179 -14
- package/package.json +6 -6
package/dist/index.cjs
CHANGED
|
@@ -492,6 +492,13 @@ var PLATFORM_DEFAULT_MERGE_POLICY = Object.freeze({
|
|
|
492
492
|
allowedMergeMethods: ["squash"],
|
|
493
493
|
protectedBranches: ["main", "master", "develop", "stage"]
|
|
494
494
|
});
|
|
495
|
+
var MERGE_POLICY_PROTECTED_BRANCH_FLOOR = Object.freeze([
|
|
496
|
+
"main",
|
|
497
|
+
"master",
|
|
498
|
+
"develop",
|
|
499
|
+
"stage"
|
|
500
|
+
]);
|
|
501
|
+
var MERGE_POLICY_ALWAYS_APPROVED_BRANCHES = Object.freeze(["main", "master"]);
|
|
495
502
|
var MERGE_APPROVAL_MAX_AGE_MS = 24 * 60 * 60 * 1e3;
|
|
496
503
|
var TOOL_GRANT_SCOPE_PRECEDENCE = Object.freeze([
|
|
497
504
|
"tenant",
|
|
@@ -1204,6 +1211,111 @@ var FLEET_HEALTH_DISK_CRITICAL_MARGIN_BYTES = 1024 ** 3;
|
|
|
1204
1211
|
var FLEET_HEALTH_MAX_MIB = 2 ** 40;
|
|
1205
1212
|
var FLEET_HEALTH_MAX_UPTIME_SEC = 100 * 365 * 24 * 60 * 60;
|
|
1206
1213
|
var FLEET_HEALTH_BYTES_PER_MIB = 1024 * 1024;
|
|
1214
|
+
var FLEET_RUN_TOKEN_ROUTES = Object.freeze([
|
|
1215
|
+
// Works — reads, plus the settings update (its merge / check / command
|
|
1216
|
+
// fields are refused for run tokens by the Works controller).
|
|
1217
|
+
{ method: "GET", pathPattern: "/api/works" },
|
|
1218
|
+
{ method: "GET", pathPattern: "/api/works/{id}" },
|
|
1219
|
+
{ method: "PUT", pathPattern: "/api/works/{id}" },
|
|
1220
|
+
{ method: "GET", pathPattern: "/api/works/{id}/config" },
|
|
1221
|
+
{ method: "GET", pathPattern: "/api/works/{id}/items" },
|
|
1222
|
+
{ method: "GET", pathPattern: "/api/works/{id}/categories-tags" },
|
|
1223
|
+
{ method: "GET", pathPattern: "/api/works/{id}/history" },
|
|
1224
|
+
{ method: "GET", pathPattern: "/api/works/{id}/generator-form" },
|
|
1225
|
+
{ method: "GET", pathPattern: "/api/works/{id}/schedule" },
|
|
1226
|
+
{ method: "GET", pathPattern: "/api/works/{id}/comparisons" },
|
|
1227
|
+
{ method: "GET", pathPattern: "/api/works/{id}/comparisons/{slug}" },
|
|
1228
|
+
// Knowledge Base (`apps/mcp/src/tools/kb`). A document a run token writes
|
|
1229
|
+
// lands `proposed` (review-gated), see the KB controller. No unlock.
|
|
1230
|
+
{ method: "GET", pathPattern: "/api/works/{id}/kb/documents" },
|
|
1231
|
+
{ method: "POST", pathPattern: "/api/works/{id}/kb/documents" },
|
|
1232
|
+
{ method: "GET", pathPattern: "/api/works/{id}/kb/documents/{docIdOrPath}" },
|
|
1233
|
+
{ method: "PATCH", pathPattern: "/api/works/{id}/kb/documents/{docId}" },
|
|
1234
|
+
{ method: "POST", pathPattern: "/api/works/{id}/kb/documents/{docId}/lock" },
|
|
1235
|
+
// Deploy — reads and the capability check only.
|
|
1236
|
+
{ method: "GET", pathPattern: "/api/deploy/works/{id}/domains" },
|
|
1237
|
+
{ method: "GET", pathPattern: "/api/deploy/providers" },
|
|
1238
|
+
{ method: "POST", pathPattern: "/api/deploy/works/{id}/check" },
|
|
1239
|
+
// Plugins — read only.
|
|
1240
|
+
{ method: "GET", pathPattern: "/api/plugins" },
|
|
1241
|
+
{ method: "GET", pathPattern: "/api/plugins/{pluginId}" },
|
|
1242
|
+
// Missions — reads, plus pause (the safe direction).
|
|
1243
|
+
{ method: "GET", pathPattern: "/api/me/missions" },
|
|
1244
|
+
{ method: "GET", pathPattern: "/api/me/missions/{id}" },
|
|
1245
|
+
{ method: "GET", pathPattern: "/api/me/missions/{id}/budget" },
|
|
1246
|
+
{ method: "GET", pathPattern: "/api/me/missions/{id}/works" },
|
|
1247
|
+
{ method: "POST", pathPattern: "/api/me/missions/{id}/pause" },
|
|
1248
|
+
// Ideas — reads, plus filing a new Idea (a proposal a person builds).
|
|
1249
|
+
{ method: "POST", pathPattern: "/api/me/work-proposals" },
|
|
1250
|
+
{ method: "GET", pathPattern: "/api/me/work-proposals" },
|
|
1251
|
+
{ method: "GET", pathPattern: "/api/me/work-proposals/status" },
|
|
1252
|
+
{ method: "GET", pathPattern: "/api/me/work-proposals/preferences" },
|
|
1253
|
+
{ method: "GET", pathPattern: "/api/me/work-proposals/{id}" },
|
|
1254
|
+
{ method: "GET", pathPattern: "/api/me/work-proposals/{id}/budget" },
|
|
1255
|
+
// Account-wide usage.
|
|
1256
|
+
{ method: "GET", pathPattern: "/api/me/usage/account-wide" },
|
|
1257
|
+
// Tasks — reads and collaboration writes. Create / update / transition /
|
|
1258
|
+
// assign / chat carry body refusals for run tokens in the Tasks
|
|
1259
|
+
// controller (no checks, no schedule, no force, no dispatch, no @agent).
|
|
1260
|
+
{ method: "GET", pathPattern: "/api/tasks" },
|
|
1261
|
+
{ method: "POST", pathPattern: "/api/tasks" },
|
|
1262
|
+
{ method: "GET", pathPattern: "/api/tasks/{id}" },
|
|
1263
|
+
{ method: "PATCH", pathPattern: "/api/tasks/{id}" },
|
|
1264
|
+
{ method: "GET", pathPattern: "/api/tasks/{id}/subtasks" },
|
|
1265
|
+
{ method: "GET", pathPattern: "/api/tasks/{id}/activity" },
|
|
1266
|
+
{ method: "POST", pathPattern: "/api/tasks/{id}/transition" },
|
|
1267
|
+
{ method: "GET", pathPattern: "/api/tasks/{id}/run-candidates" },
|
|
1268
|
+
{ method: "GET", pathPattern: "/api/tasks/{id}/pr-status" },
|
|
1269
|
+
{ method: "GET", pathPattern: "/api/tasks/{id}/diff" },
|
|
1270
|
+
{ method: "POST", pathPattern: "/api/tasks/{id}/assignees" },
|
|
1271
|
+
{ method: "POST", pathPattern: "/api/tasks/{id}/reviewers" },
|
|
1272
|
+
{ method: "POST", pathPattern: "/api/tasks/{id}/approvers" },
|
|
1273
|
+
{ method: "POST", pathPattern: "/api/tasks/{id}/relations" },
|
|
1274
|
+
{ method: "GET", pathPattern: "/api/tasks/{id}/escalations" },
|
|
1275
|
+
{ method: "GET", pathPattern: "/api/tasks/{id}/chat" },
|
|
1276
|
+
{ method: "POST", pathPattern: "/api/tasks/{id}/chat" },
|
|
1277
|
+
{ method: "GET", pathPattern: "/api/tasks/{id}/spend" },
|
|
1278
|
+
// Inbox — read only (no reply, no archive / delete / mark-read).
|
|
1279
|
+
{ method: "GET", pathPattern: "/api/inbox" },
|
|
1280
|
+
{ method: "GET", pathPattern: "/api/inbox/unread-count" },
|
|
1281
|
+
{ method: "GET", pathPattern: "/api/inbox/{id}" },
|
|
1282
|
+
// Goals — reads, a draft create, field-limited update, pause, and the
|
|
1283
|
+
// ASKING side of the definition of done (propose, never approve).
|
|
1284
|
+
{ method: "GET", pathPattern: "/api/me/goals" },
|
|
1285
|
+
{ method: "POST", pathPattern: "/api/me/goals" },
|
|
1286
|
+
{ method: "GET", pathPattern: "/api/me/goals/{id}" },
|
|
1287
|
+
{ method: "PATCH", pathPattern: "/api/me/goals/{id}" },
|
|
1288
|
+
{ method: "GET", pathPattern: "/api/me/goals/{id}/samples" },
|
|
1289
|
+
{ method: "POST", pathPattern: "/api/me/goals/{id}/pause" },
|
|
1290
|
+
{ method: "POST", pathPattern: "/api/me/goals/{id}/dod/propose" },
|
|
1291
|
+
// Fleet — reads only.
|
|
1292
|
+
{ method: "GET", pathPattern: "/api/fleet/nodes" },
|
|
1293
|
+
{ method: "GET", pathPattern: "/api/fleet/nodes/{id}" },
|
|
1294
|
+
{ method: "GET", pathPattern: "/api/fleet/runner-status" },
|
|
1295
|
+
{ method: "GET", pathPattern: "/api/fleet/execution-preferences" },
|
|
1296
|
+
{ method: "GET", pathPattern: "/api/fleet/agents/{agentId}/node-affinity" },
|
|
1297
|
+
// Agents — reads, plus cancel and pause (the safe direction).
|
|
1298
|
+
{ method: "GET", pathPattern: "/api/agents" },
|
|
1299
|
+
{ method: "GET", pathPattern: "/api/agents/{id}" },
|
|
1300
|
+
{ method: "GET", pathPattern: "/api/agents/{id}/runs" },
|
|
1301
|
+
{ method: "GET", pathPattern: "/api/agents/{id}/runs/{runId}" },
|
|
1302
|
+
{ method: "POST", pathPattern: "/api/agents/{id}/runs/{runId}/cancel" },
|
|
1303
|
+
{ method: "POST", pathPattern: "/api/agents/{id}/pause" },
|
|
1304
|
+
{ method: "GET", pathPattern: "/api/agents/{id}/budget" },
|
|
1305
|
+
// Agent Plugins — read only (installing a package installs instructions).
|
|
1306
|
+
{ method: "GET", pathPattern: "/api/agent-plugins" },
|
|
1307
|
+
{ method: "GET", pathPattern: "/api/agent-plugins/findings" },
|
|
1308
|
+
{ method: "GET", pathPattern: "/api/agent-plugins/catalog" },
|
|
1309
|
+
{ method: "GET", pathPattern: "/api/agent-plugins/updates" }
|
|
1310
|
+
]);
|
|
1311
|
+
var MACHINE_PRINCIPAL_WORK_WRITABLE_FIELDS = Object.freeze(["name", "description"]);
|
|
1312
|
+
function splitSegments(normalizedPath) {
|
|
1313
|
+
return normalizedPath.split("/").filter((segment) => segment.length > 0);
|
|
1314
|
+
}
|
|
1315
|
+
var FLEET_RUN_TOKEN_ROUTE_SHAPES = FLEET_RUN_TOKEN_ROUTES.map((route) => ({
|
|
1316
|
+
method: route.method.toUpperCase(),
|
|
1317
|
+
shape: splitSegments(route.pathPattern).map((part) => /^\{[^}]+\}$/.test(part) ? "*" : part.toLowerCase())
|
|
1318
|
+
}));
|
|
1207
1319
|
var EMAIL_INBOX_DEFAULT_DAILY_CAP = 100;
|
|
1208
1320
|
var EMAIL_INBOX_BURST_SENDS = 10;
|
|
1209
1321
|
var EMAIL_INBOX_BURST_RECIPIENTS = 20;
|
|
@@ -1745,9 +1857,15 @@ var INTEGRATION_SCOPES = [
|
|
|
1745
1857
|
"email:write",
|
|
1746
1858
|
"events:read",
|
|
1747
1859
|
"webhooks:manage",
|
|
1748
|
-
"links:write"
|
|
1860
|
+
"links:write",
|
|
1861
|
+
"merges:decide"
|
|
1862
|
+
];
|
|
1863
|
+
var INTEGRATION_MERGE_DECISION_SCOPE = "merges:decide";
|
|
1864
|
+
var INTEGRATION_OPT_IN_SCOPES = [
|
|
1865
|
+
"org:write",
|
|
1866
|
+
"email:write",
|
|
1867
|
+
INTEGRATION_MERGE_DECISION_SCOPE
|
|
1749
1868
|
];
|
|
1750
|
-
var INTEGRATION_OPT_IN_SCOPES = ["org:write", "email:write"];
|
|
1751
1869
|
var EVER_GAUZY_PRESET_SCOPES = INTEGRATION_SCOPES.filter(
|
|
1752
1870
|
(scope) => !INTEGRATION_OPT_IN_SCOPES.includes(scope)
|
|
1753
1871
|
);
|
|
@@ -2254,6 +2372,7 @@ function isSafeWebhookUrl(rawUrl) {
|
|
|
2254
2372
|
if (host.startsWith("[") && host.endsWith("]")) {
|
|
2255
2373
|
host = host.slice(1, -1);
|
|
2256
2374
|
}
|
|
2375
|
+
host = host.replace(/\.+$/, "");
|
|
2257
2376
|
if (CLOUD_METADATA_HOSTNAMES.has(host)) {
|
|
2258
2377
|
return false;
|
|
2259
2378
|
}
|
|
@@ -2283,23 +2402,69 @@ function isPrivateIPv4(ip) {
|
|
|
2283
2402
|
if (a === 172 && b >= 16 && b <= 31) return true;
|
|
2284
2403
|
if (a === 192 && b === 168) return true;
|
|
2285
2404
|
if (a === 192 && b === 0 && parts[2] === 0) return true;
|
|
2405
|
+
if (a === 198 && (b === 18 || b === 19)) return true;
|
|
2406
|
+
if (a === 192 && b === 0 && parts[2] === 2) return true;
|
|
2407
|
+
if (a === 198 && b === 51 && parts[2] === 100) return true;
|
|
2408
|
+
if (a === 203 && b === 0 && parts[2] === 113) return true;
|
|
2286
2409
|
if (a === 100 && b >= 64 && b <= 127) return true;
|
|
2287
2410
|
if (a >= 224) return true;
|
|
2288
2411
|
return false;
|
|
2289
2412
|
}
|
|
2290
|
-
function
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
if (
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2413
|
+
function parseIPv6Groups(ip) {
|
|
2414
|
+
let text = ip.trim().toLowerCase();
|
|
2415
|
+
const zone = text.indexOf("%");
|
|
2416
|
+
if (zone >= 0) text = text.slice(0, zone);
|
|
2417
|
+
if ((0, import_net.isIP)(text) !== 6) return null;
|
|
2418
|
+
const lastColon = text.lastIndexOf(":");
|
|
2419
|
+
const tail = text.slice(lastColon + 1);
|
|
2420
|
+
if (tail.includes(".")) {
|
|
2421
|
+
if ((0, import_net.isIP)(tail) !== 4) return null;
|
|
2422
|
+
const [a, b, c, d] = tail.split(".").map((part) => Number(part));
|
|
2423
|
+
text = `${text.slice(0, lastColon + 1)}${(a << 8 | b).toString(16)}:${(c << 8 | d).toString(16)}`;
|
|
2424
|
+
}
|
|
2425
|
+
const halves = text.split("::");
|
|
2426
|
+
if (halves.length > 2) return null;
|
|
2427
|
+
const head = halves[0] ? halves[0].split(":") : [];
|
|
2428
|
+
const rest = halves.length === 2 && halves[1] ? halves[1].split(":") : [];
|
|
2429
|
+
const fill = halves.length === 2 ? 8 - head.length - rest.length : 0;
|
|
2430
|
+
if (fill < 0) return null;
|
|
2431
|
+
const groups = [...head, ...new Array(fill).fill("0"), ...rest].map((group) => parseInt(group, 16));
|
|
2432
|
+
if (groups.length !== 8 || groups.some((group) => Number.isNaN(group) || group < 0 || group > 65535)) {
|
|
2433
|
+
return null;
|
|
2302
2434
|
}
|
|
2435
|
+
return groups;
|
|
2436
|
+
}
|
|
2437
|
+
function ipv4FromGroups(high, low) {
|
|
2438
|
+
return `${high >> 8}.${high & 255}.${low >> 8}.${low & 255}`;
|
|
2439
|
+
}
|
|
2440
|
+
function embeddedIPv4(ip) {
|
|
2441
|
+
const g = parseIPv6Groups(ip);
|
|
2442
|
+
if (!g) return null;
|
|
2443
|
+
const zeros = (from, to) => g.slice(from, to).every((group) => group === 0);
|
|
2444
|
+
if (zeros(0, 5) && g[5] === 65535) return ipv4FromGroups(g[6], g[7]);
|
|
2445
|
+
if (zeros(0, 4) && g[4] === 65535 && g[5] === 0) return ipv4FromGroups(g[6], g[7]);
|
|
2446
|
+
if (zeros(0, 6) && (g[6] !== 0 || g[7] > 1)) return ipv4FromGroups(g[6], g[7]);
|
|
2447
|
+
if (g[0] === 100 && g[1] === 65435 && zeros(2, 6)) return ipv4FromGroups(g[6], g[7]);
|
|
2448
|
+
if (g[0] === 8194) return ipv4FromGroups(g[1], g[2]);
|
|
2449
|
+
if (g[0] === 8193 && g[1] === 0) return ipv4FromGroups(g[6] ^ 65535, g[7] ^ 65535);
|
|
2450
|
+
return null;
|
|
2451
|
+
}
|
|
2452
|
+
function isPrivateIPv6(ip) {
|
|
2453
|
+
const g = parseIPv6Groups(ip);
|
|
2454
|
+
if (!g) {
|
|
2455
|
+
const lower = ip.toLowerCase();
|
|
2456
|
+
return lower === "::1" || lower === "::" || lower.startsWith("fc") || lower.startsWith("fd");
|
|
2457
|
+
}
|
|
2458
|
+
if (g.every((group) => group === 0)) return true;
|
|
2459
|
+
if (g.slice(0, 7).every((group) => group === 0) && g[7] === 1) return true;
|
|
2460
|
+
if ((g[0] & 65024) === 64512) return true;
|
|
2461
|
+
if ((g[0] & 65472) === 65152) return true;
|
|
2462
|
+
if ((g[0] & 65472) === 65216) return true;
|
|
2463
|
+
if ((g[0] & 65280) === 65280) return true;
|
|
2464
|
+
if (g[0] === 8193 && g[1] === 3512) return true;
|
|
2465
|
+
if (g[0] === 100 && g[1] === 65435 && g[2] === 1) return true;
|
|
2466
|
+
const v4 = embeddedIPv4(ip);
|
|
2467
|
+
if (v4 && isPrivateIPv4(v4)) return true;
|
|
2303
2468
|
return false;
|
|
2304
2469
|
}
|
|
2305
2470
|
|
package/dist/index.js
CHANGED
|
@@ -465,6 +465,13 @@ var PLATFORM_DEFAULT_MERGE_POLICY = Object.freeze({
|
|
|
465
465
|
allowedMergeMethods: ["squash"],
|
|
466
466
|
protectedBranches: ["main", "master", "develop", "stage"]
|
|
467
467
|
});
|
|
468
|
+
var MERGE_POLICY_PROTECTED_BRANCH_FLOOR = Object.freeze([
|
|
469
|
+
"main",
|
|
470
|
+
"master",
|
|
471
|
+
"develop",
|
|
472
|
+
"stage"
|
|
473
|
+
]);
|
|
474
|
+
var MERGE_POLICY_ALWAYS_APPROVED_BRANCHES = Object.freeze(["main", "master"]);
|
|
468
475
|
var MERGE_APPROVAL_MAX_AGE_MS = 24 * 60 * 60 * 1e3;
|
|
469
476
|
var TOOL_GRANT_SCOPE_PRECEDENCE = Object.freeze([
|
|
470
477
|
"tenant",
|
|
@@ -1177,6 +1184,111 @@ var FLEET_HEALTH_DISK_CRITICAL_MARGIN_BYTES = 1024 ** 3;
|
|
|
1177
1184
|
var FLEET_HEALTH_MAX_MIB = 2 ** 40;
|
|
1178
1185
|
var FLEET_HEALTH_MAX_UPTIME_SEC = 100 * 365 * 24 * 60 * 60;
|
|
1179
1186
|
var FLEET_HEALTH_BYTES_PER_MIB = 1024 * 1024;
|
|
1187
|
+
var FLEET_RUN_TOKEN_ROUTES = Object.freeze([
|
|
1188
|
+
// Works — reads, plus the settings update (its merge / check / command
|
|
1189
|
+
// fields are refused for run tokens by the Works controller).
|
|
1190
|
+
{ method: "GET", pathPattern: "/api/works" },
|
|
1191
|
+
{ method: "GET", pathPattern: "/api/works/{id}" },
|
|
1192
|
+
{ method: "PUT", pathPattern: "/api/works/{id}" },
|
|
1193
|
+
{ method: "GET", pathPattern: "/api/works/{id}/config" },
|
|
1194
|
+
{ method: "GET", pathPattern: "/api/works/{id}/items" },
|
|
1195
|
+
{ method: "GET", pathPattern: "/api/works/{id}/categories-tags" },
|
|
1196
|
+
{ method: "GET", pathPattern: "/api/works/{id}/history" },
|
|
1197
|
+
{ method: "GET", pathPattern: "/api/works/{id}/generator-form" },
|
|
1198
|
+
{ method: "GET", pathPattern: "/api/works/{id}/schedule" },
|
|
1199
|
+
{ method: "GET", pathPattern: "/api/works/{id}/comparisons" },
|
|
1200
|
+
{ method: "GET", pathPattern: "/api/works/{id}/comparisons/{slug}" },
|
|
1201
|
+
// Knowledge Base (`apps/mcp/src/tools/kb`). A document a run token writes
|
|
1202
|
+
// lands `proposed` (review-gated), see the KB controller. No unlock.
|
|
1203
|
+
{ method: "GET", pathPattern: "/api/works/{id}/kb/documents" },
|
|
1204
|
+
{ method: "POST", pathPattern: "/api/works/{id}/kb/documents" },
|
|
1205
|
+
{ method: "GET", pathPattern: "/api/works/{id}/kb/documents/{docIdOrPath}" },
|
|
1206
|
+
{ method: "PATCH", pathPattern: "/api/works/{id}/kb/documents/{docId}" },
|
|
1207
|
+
{ method: "POST", pathPattern: "/api/works/{id}/kb/documents/{docId}/lock" },
|
|
1208
|
+
// Deploy — reads and the capability check only.
|
|
1209
|
+
{ method: "GET", pathPattern: "/api/deploy/works/{id}/domains" },
|
|
1210
|
+
{ method: "GET", pathPattern: "/api/deploy/providers" },
|
|
1211
|
+
{ method: "POST", pathPattern: "/api/deploy/works/{id}/check" },
|
|
1212
|
+
// Plugins — read only.
|
|
1213
|
+
{ method: "GET", pathPattern: "/api/plugins" },
|
|
1214
|
+
{ method: "GET", pathPattern: "/api/plugins/{pluginId}" },
|
|
1215
|
+
// Missions — reads, plus pause (the safe direction).
|
|
1216
|
+
{ method: "GET", pathPattern: "/api/me/missions" },
|
|
1217
|
+
{ method: "GET", pathPattern: "/api/me/missions/{id}" },
|
|
1218
|
+
{ method: "GET", pathPattern: "/api/me/missions/{id}/budget" },
|
|
1219
|
+
{ method: "GET", pathPattern: "/api/me/missions/{id}/works" },
|
|
1220
|
+
{ method: "POST", pathPattern: "/api/me/missions/{id}/pause" },
|
|
1221
|
+
// Ideas — reads, plus filing a new Idea (a proposal a person builds).
|
|
1222
|
+
{ method: "POST", pathPattern: "/api/me/work-proposals" },
|
|
1223
|
+
{ method: "GET", pathPattern: "/api/me/work-proposals" },
|
|
1224
|
+
{ method: "GET", pathPattern: "/api/me/work-proposals/status" },
|
|
1225
|
+
{ method: "GET", pathPattern: "/api/me/work-proposals/preferences" },
|
|
1226
|
+
{ method: "GET", pathPattern: "/api/me/work-proposals/{id}" },
|
|
1227
|
+
{ method: "GET", pathPattern: "/api/me/work-proposals/{id}/budget" },
|
|
1228
|
+
// Account-wide usage.
|
|
1229
|
+
{ method: "GET", pathPattern: "/api/me/usage/account-wide" },
|
|
1230
|
+
// Tasks — reads and collaboration writes. Create / update / transition /
|
|
1231
|
+
// assign / chat carry body refusals for run tokens in the Tasks
|
|
1232
|
+
// controller (no checks, no schedule, no force, no dispatch, no @agent).
|
|
1233
|
+
{ method: "GET", pathPattern: "/api/tasks" },
|
|
1234
|
+
{ method: "POST", pathPattern: "/api/tasks" },
|
|
1235
|
+
{ method: "GET", pathPattern: "/api/tasks/{id}" },
|
|
1236
|
+
{ method: "PATCH", pathPattern: "/api/tasks/{id}" },
|
|
1237
|
+
{ method: "GET", pathPattern: "/api/tasks/{id}/subtasks" },
|
|
1238
|
+
{ method: "GET", pathPattern: "/api/tasks/{id}/activity" },
|
|
1239
|
+
{ method: "POST", pathPattern: "/api/tasks/{id}/transition" },
|
|
1240
|
+
{ method: "GET", pathPattern: "/api/tasks/{id}/run-candidates" },
|
|
1241
|
+
{ method: "GET", pathPattern: "/api/tasks/{id}/pr-status" },
|
|
1242
|
+
{ method: "GET", pathPattern: "/api/tasks/{id}/diff" },
|
|
1243
|
+
{ method: "POST", pathPattern: "/api/tasks/{id}/assignees" },
|
|
1244
|
+
{ method: "POST", pathPattern: "/api/tasks/{id}/reviewers" },
|
|
1245
|
+
{ method: "POST", pathPattern: "/api/tasks/{id}/approvers" },
|
|
1246
|
+
{ method: "POST", pathPattern: "/api/tasks/{id}/relations" },
|
|
1247
|
+
{ method: "GET", pathPattern: "/api/tasks/{id}/escalations" },
|
|
1248
|
+
{ method: "GET", pathPattern: "/api/tasks/{id}/chat" },
|
|
1249
|
+
{ method: "POST", pathPattern: "/api/tasks/{id}/chat" },
|
|
1250
|
+
{ method: "GET", pathPattern: "/api/tasks/{id}/spend" },
|
|
1251
|
+
// Inbox — read only (no reply, no archive / delete / mark-read).
|
|
1252
|
+
{ method: "GET", pathPattern: "/api/inbox" },
|
|
1253
|
+
{ method: "GET", pathPattern: "/api/inbox/unread-count" },
|
|
1254
|
+
{ method: "GET", pathPattern: "/api/inbox/{id}" },
|
|
1255
|
+
// Goals — reads, a draft create, field-limited update, pause, and the
|
|
1256
|
+
// ASKING side of the definition of done (propose, never approve).
|
|
1257
|
+
{ method: "GET", pathPattern: "/api/me/goals" },
|
|
1258
|
+
{ method: "POST", pathPattern: "/api/me/goals" },
|
|
1259
|
+
{ method: "GET", pathPattern: "/api/me/goals/{id}" },
|
|
1260
|
+
{ method: "PATCH", pathPattern: "/api/me/goals/{id}" },
|
|
1261
|
+
{ method: "GET", pathPattern: "/api/me/goals/{id}/samples" },
|
|
1262
|
+
{ method: "POST", pathPattern: "/api/me/goals/{id}/pause" },
|
|
1263
|
+
{ method: "POST", pathPattern: "/api/me/goals/{id}/dod/propose" },
|
|
1264
|
+
// Fleet — reads only.
|
|
1265
|
+
{ method: "GET", pathPattern: "/api/fleet/nodes" },
|
|
1266
|
+
{ method: "GET", pathPattern: "/api/fleet/nodes/{id}" },
|
|
1267
|
+
{ method: "GET", pathPattern: "/api/fleet/runner-status" },
|
|
1268
|
+
{ method: "GET", pathPattern: "/api/fleet/execution-preferences" },
|
|
1269
|
+
{ method: "GET", pathPattern: "/api/fleet/agents/{agentId}/node-affinity" },
|
|
1270
|
+
// Agents — reads, plus cancel and pause (the safe direction).
|
|
1271
|
+
{ method: "GET", pathPattern: "/api/agents" },
|
|
1272
|
+
{ method: "GET", pathPattern: "/api/agents/{id}" },
|
|
1273
|
+
{ method: "GET", pathPattern: "/api/agents/{id}/runs" },
|
|
1274
|
+
{ method: "GET", pathPattern: "/api/agents/{id}/runs/{runId}" },
|
|
1275
|
+
{ method: "POST", pathPattern: "/api/agents/{id}/runs/{runId}/cancel" },
|
|
1276
|
+
{ method: "POST", pathPattern: "/api/agents/{id}/pause" },
|
|
1277
|
+
{ method: "GET", pathPattern: "/api/agents/{id}/budget" },
|
|
1278
|
+
// Agent Plugins — read only (installing a package installs instructions).
|
|
1279
|
+
{ method: "GET", pathPattern: "/api/agent-plugins" },
|
|
1280
|
+
{ method: "GET", pathPattern: "/api/agent-plugins/findings" },
|
|
1281
|
+
{ method: "GET", pathPattern: "/api/agent-plugins/catalog" },
|
|
1282
|
+
{ method: "GET", pathPattern: "/api/agent-plugins/updates" }
|
|
1283
|
+
]);
|
|
1284
|
+
var MACHINE_PRINCIPAL_WORK_WRITABLE_FIELDS = Object.freeze(["name", "description"]);
|
|
1285
|
+
function splitSegments(normalizedPath) {
|
|
1286
|
+
return normalizedPath.split("/").filter((segment) => segment.length > 0);
|
|
1287
|
+
}
|
|
1288
|
+
var FLEET_RUN_TOKEN_ROUTE_SHAPES = FLEET_RUN_TOKEN_ROUTES.map((route) => ({
|
|
1289
|
+
method: route.method.toUpperCase(),
|
|
1290
|
+
shape: splitSegments(route.pathPattern).map((part) => /^\{[^}]+\}$/.test(part) ? "*" : part.toLowerCase())
|
|
1291
|
+
}));
|
|
1180
1292
|
var EMAIL_INBOX_DEFAULT_DAILY_CAP = 100;
|
|
1181
1293
|
var EMAIL_INBOX_BURST_SENDS = 10;
|
|
1182
1294
|
var EMAIL_INBOX_BURST_RECIPIENTS = 20;
|
|
@@ -1718,9 +1830,15 @@ var INTEGRATION_SCOPES = [
|
|
|
1718
1830
|
"email:write",
|
|
1719
1831
|
"events:read",
|
|
1720
1832
|
"webhooks:manage",
|
|
1721
|
-
"links:write"
|
|
1833
|
+
"links:write",
|
|
1834
|
+
"merges:decide"
|
|
1835
|
+
];
|
|
1836
|
+
var INTEGRATION_MERGE_DECISION_SCOPE = "merges:decide";
|
|
1837
|
+
var INTEGRATION_OPT_IN_SCOPES = [
|
|
1838
|
+
"org:write",
|
|
1839
|
+
"email:write",
|
|
1840
|
+
INTEGRATION_MERGE_DECISION_SCOPE
|
|
1722
1841
|
];
|
|
1723
|
-
var INTEGRATION_OPT_IN_SCOPES = ["org:write", "email:write"];
|
|
1724
1842
|
var EVER_GAUZY_PRESET_SCOPES = INTEGRATION_SCOPES.filter(
|
|
1725
1843
|
(scope) => !INTEGRATION_OPT_IN_SCOPES.includes(scope)
|
|
1726
1844
|
);
|
|
@@ -2227,6 +2345,7 @@ function isSafeWebhookUrl(rawUrl) {
|
|
|
2227
2345
|
if (host.startsWith("[") && host.endsWith("]")) {
|
|
2228
2346
|
host = host.slice(1, -1);
|
|
2229
2347
|
}
|
|
2348
|
+
host = host.replace(/\.+$/, "");
|
|
2230
2349
|
if (CLOUD_METADATA_HOSTNAMES.has(host)) {
|
|
2231
2350
|
return false;
|
|
2232
2351
|
}
|
|
@@ -2256,23 +2375,69 @@ function isPrivateIPv4(ip) {
|
|
|
2256
2375
|
if (a === 172 && b >= 16 && b <= 31) return true;
|
|
2257
2376
|
if (a === 192 && b === 168) return true;
|
|
2258
2377
|
if (a === 192 && b === 0 && parts[2] === 0) return true;
|
|
2378
|
+
if (a === 198 && (b === 18 || b === 19)) return true;
|
|
2379
|
+
if (a === 192 && b === 0 && parts[2] === 2) return true;
|
|
2380
|
+
if (a === 198 && b === 51 && parts[2] === 100) return true;
|
|
2381
|
+
if (a === 203 && b === 0 && parts[2] === 113) return true;
|
|
2259
2382
|
if (a === 100 && b >= 64 && b <= 127) return true;
|
|
2260
2383
|
if (a >= 224) return true;
|
|
2261
2384
|
return false;
|
|
2262
2385
|
}
|
|
2263
|
-
function
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
if (
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2386
|
+
function parseIPv6Groups(ip) {
|
|
2387
|
+
let text = ip.trim().toLowerCase();
|
|
2388
|
+
const zone = text.indexOf("%");
|
|
2389
|
+
if (zone >= 0) text = text.slice(0, zone);
|
|
2390
|
+
if (isIP(text) !== 6) return null;
|
|
2391
|
+
const lastColon = text.lastIndexOf(":");
|
|
2392
|
+
const tail = text.slice(lastColon + 1);
|
|
2393
|
+
if (tail.includes(".")) {
|
|
2394
|
+
if (isIP(tail) !== 4) return null;
|
|
2395
|
+
const [a, b, c, d] = tail.split(".").map((part) => Number(part));
|
|
2396
|
+
text = `${text.slice(0, lastColon + 1)}${(a << 8 | b).toString(16)}:${(c << 8 | d).toString(16)}`;
|
|
2397
|
+
}
|
|
2398
|
+
const halves = text.split("::");
|
|
2399
|
+
if (halves.length > 2) return null;
|
|
2400
|
+
const head = halves[0] ? halves[0].split(":") : [];
|
|
2401
|
+
const rest = halves.length === 2 && halves[1] ? halves[1].split(":") : [];
|
|
2402
|
+
const fill = halves.length === 2 ? 8 - head.length - rest.length : 0;
|
|
2403
|
+
if (fill < 0) return null;
|
|
2404
|
+
const groups = [...head, ...new Array(fill).fill("0"), ...rest].map((group) => parseInt(group, 16));
|
|
2405
|
+
if (groups.length !== 8 || groups.some((group) => Number.isNaN(group) || group < 0 || group > 65535)) {
|
|
2406
|
+
return null;
|
|
2275
2407
|
}
|
|
2408
|
+
return groups;
|
|
2409
|
+
}
|
|
2410
|
+
function ipv4FromGroups(high, low) {
|
|
2411
|
+
return `${high >> 8}.${high & 255}.${low >> 8}.${low & 255}`;
|
|
2412
|
+
}
|
|
2413
|
+
function embeddedIPv4(ip) {
|
|
2414
|
+
const g = parseIPv6Groups(ip);
|
|
2415
|
+
if (!g) return null;
|
|
2416
|
+
const zeros = (from, to) => g.slice(from, to).every((group) => group === 0);
|
|
2417
|
+
if (zeros(0, 5) && g[5] === 65535) return ipv4FromGroups(g[6], g[7]);
|
|
2418
|
+
if (zeros(0, 4) && g[4] === 65535 && g[5] === 0) return ipv4FromGroups(g[6], g[7]);
|
|
2419
|
+
if (zeros(0, 6) && (g[6] !== 0 || g[7] > 1)) return ipv4FromGroups(g[6], g[7]);
|
|
2420
|
+
if (g[0] === 100 && g[1] === 65435 && zeros(2, 6)) return ipv4FromGroups(g[6], g[7]);
|
|
2421
|
+
if (g[0] === 8194) return ipv4FromGroups(g[1], g[2]);
|
|
2422
|
+
if (g[0] === 8193 && g[1] === 0) return ipv4FromGroups(g[6] ^ 65535, g[7] ^ 65535);
|
|
2423
|
+
return null;
|
|
2424
|
+
}
|
|
2425
|
+
function isPrivateIPv6(ip) {
|
|
2426
|
+
const g = parseIPv6Groups(ip);
|
|
2427
|
+
if (!g) {
|
|
2428
|
+
const lower = ip.toLowerCase();
|
|
2429
|
+
return lower === "::1" || lower === "::" || lower.startsWith("fc") || lower.startsWith("fd");
|
|
2430
|
+
}
|
|
2431
|
+
if (g.every((group) => group === 0)) return true;
|
|
2432
|
+
if (g.slice(0, 7).every((group) => group === 0) && g[7] === 1) return true;
|
|
2433
|
+
if ((g[0] & 65024) === 64512) return true;
|
|
2434
|
+
if ((g[0] & 65472) === 65152) return true;
|
|
2435
|
+
if ((g[0] & 65472) === 65216) return true;
|
|
2436
|
+
if ((g[0] & 65280) === 65280) return true;
|
|
2437
|
+
if (g[0] === 8193 && g[1] === 3512) return true;
|
|
2438
|
+
if (g[0] === 100 && g[1] === 65435 && g[2] === 1) return true;
|
|
2439
|
+
const v4 = embeddedIPv4(ip);
|
|
2440
|
+
if (v4 && isPrivateIPv4(v4)) return true;
|
|
2276
2441
|
return false;
|
|
2277
2442
|
}
|
|
2278
2443
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ever-works/make-plugin",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.12",
|
|
4
4
|
"description": "Make.com Workflow Pipeline Plugin - Delegates Work generation to Make.com scenarios and webhooks",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Ever Co. LTD",
|
|
@@ -33,10 +33,10 @@
|
|
|
33
33
|
"test:coverage": "vitest run --coverage"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
|
-
"@ever-works/plugin": "^1.2.
|
|
36
|
+
"@ever-works/plugin": "^1.2.9"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@ever-works/plugin": "^1.2.
|
|
39
|
+
"@ever-works/plugin": "^1.2.9",
|
|
40
40
|
"@types/node": "^26.6.4",
|
|
41
41
|
"tsup": "^8.0.0",
|
|
42
42
|
"typescript": "^5.9.3",
|
|
@@ -76,8 +76,8 @@
|
|
|
76
76
|
"url": "https://github.com/ever-works/ever-works/issues"
|
|
77
77
|
},
|
|
78
78
|
"everworksRelease": {
|
|
79
|
-
"contentHash": "sha256:
|
|
80
|
-
"commit": "
|
|
81
|
-
"source": "https://github.com/ever-works/ever-works/tree/
|
|
79
|
+
"contentHash": "sha256:c37968b3bde4e2df97aa42d3e5bd1d39b6dd02057e712790fc11337b608fe8f3",
|
|
80
|
+
"commit": "5b5a17e1cdc02e06383d508a6424a863521fc3e0",
|
|
81
|
+
"source": "https://github.com/ever-works/ever-works/tree/5b5a17e1cdc02e06383d508a6424a863521fc3e0/packages/plugins/make"
|
|
82
82
|
}
|
|
83
83
|
}
|