@brainervirus/workit-pi 8.24.0 → 8.25.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/dist/worker.js +99 -103
- package/dist/workit.js +1897 -1638
- package/package.json +1 -1
- package/skills/workit-fanout/SKILL.md +1 -1
- package/skills/workit-fanout/references/brief.md +4 -4
- package/skills/workit-review/SKILL.md +2 -0
- package/skills/workit-ship/SKILL.md +1 -1
package/dist/worker.js
CHANGED
|
@@ -7167,6 +7167,104 @@ import { createHash as createHash3, randomBytes } from "node:crypto";
|
|
|
7167
7167
|
import fs3 from "node:fs";
|
|
7168
7168
|
import path5 from "node:path";
|
|
7169
7169
|
|
|
7170
|
+
// packages/workit-core/src/core/policy/substance.ts
|
|
7171
|
+
var SLASH_BLOCK = [["/*", "*/"]];
|
|
7172
|
+
var C_LIKE = { line: ["//"], block: SLASH_BLOCK, quotes: `"'` };
|
|
7173
|
+
var SYNTAXES = Object.fromEntries([
|
|
7174
|
+
...["ts", "mts", "cts", "js", "mjs", "cjs"].map((ext) => [ext, { ...C_LIKE, js: true }]),
|
|
7175
|
+
...["java", "kt", "kts", "scala", "swift", "dart", "groovy"].map((ext) => [
|
|
7176
|
+
ext,
|
|
7177
|
+
{ ...C_LIKE, triple: true }
|
|
7178
|
+
]),
|
|
7179
|
+
["go", { ...C_LIKE, rawBacktick: true }],
|
|
7180
|
+
...["css", "scss", "less"].map((ext) => [
|
|
7181
|
+
ext,
|
|
7182
|
+
{ line: [], block: SLASH_BLOCK, quotes: `"'`, cssUrl: true }
|
|
7183
|
+
]),
|
|
7184
|
+
...["py", "pyi"].map((ext) => [
|
|
7185
|
+
ext,
|
|
7186
|
+
{ line: ["#"], block: [], quotes: `"'`, triple: true, indented: true, fstring: true }
|
|
7187
|
+
]),
|
|
7188
|
+
["toml", { line: ["#"], block: [], quotes: `"`, literal: "'", triple: true }],
|
|
7189
|
+
...["html", "htm", "xml", "svg", "xhtml"].map((ext) => [
|
|
7190
|
+
ext,
|
|
7191
|
+
{ line: [], block: [["<!--", "-->"]], quotes: "", indented: true }
|
|
7192
|
+
])
|
|
7193
|
+
]);
|
|
7194
|
+
var REGEX_KEYWORDS = new Set([
|
|
7195
|
+
"return",
|
|
7196
|
+
"typeof",
|
|
7197
|
+
"instanceof",
|
|
7198
|
+
"case",
|
|
7199
|
+
"do",
|
|
7200
|
+
"else",
|
|
7201
|
+
"in",
|
|
7202
|
+
"of",
|
|
7203
|
+
"new",
|
|
7204
|
+
"delete",
|
|
7205
|
+
"void",
|
|
7206
|
+
"throw",
|
|
7207
|
+
"yield",
|
|
7208
|
+
"await"
|
|
7209
|
+
]);
|
|
7210
|
+
var decoder = new TextDecoder("utf-8", { fatal: true });
|
|
7211
|
+
|
|
7212
|
+
// packages/workit-core/src/core/policy/lane.ts
|
|
7213
|
+
var RISK_TOKENS = new Set([
|
|
7214
|
+
"auth",
|
|
7215
|
+
"authn",
|
|
7216
|
+
"authz",
|
|
7217
|
+
"oauth",
|
|
7218
|
+
"security",
|
|
7219
|
+
"permission",
|
|
7220
|
+
"permissions",
|
|
7221
|
+
"secret",
|
|
7222
|
+
"secrets",
|
|
7223
|
+
"crypto",
|
|
7224
|
+
"gate",
|
|
7225
|
+
"gates",
|
|
7226
|
+
"policy",
|
|
7227
|
+
"policies",
|
|
7228
|
+
"hook",
|
|
7229
|
+
"hooks",
|
|
7230
|
+
"husky",
|
|
7231
|
+
"lefthook",
|
|
7232
|
+
"release",
|
|
7233
|
+
"releases",
|
|
7234
|
+
"migration",
|
|
7235
|
+
"migrations",
|
|
7236
|
+
"migrate",
|
|
7237
|
+
"workflows"
|
|
7238
|
+
]);
|
|
7239
|
+
var RISK_FILES = new Set([
|
|
7240
|
+
".gitlab-ci.yml",
|
|
7241
|
+
"Jenkinsfile",
|
|
7242
|
+
"azure-pipelines.yml",
|
|
7243
|
+
".pre-commit-config.yaml",
|
|
7244
|
+
".workit/risk-paths"
|
|
7245
|
+
]);
|
|
7246
|
+
var RISK_NAMES = new Set([".gitattributes"]);
|
|
7247
|
+
var LOCKFILES = new Set([
|
|
7248
|
+
"bun.lock",
|
|
7249
|
+
"bun.lockb",
|
|
7250
|
+
"package-lock.json",
|
|
7251
|
+
"npm-shrinkwrap.json",
|
|
7252
|
+
"yarn.lock",
|
|
7253
|
+
"pnpm-lock.yaml",
|
|
7254
|
+
"Cargo.lock",
|
|
7255
|
+
"go.sum",
|
|
7256
|
+
"poetry.lock",
|
|
7257
|
+
"uv.lock",
|
|
7258
|
+
"Pipfile.lock",
|
|
7259
|
+
"Gemfile.lock",
|
|
7260
|
+
"composer.lock"
|
|
7261
|
+
]);
|
|
7262
|
+
var globCache = new Map;
|
|
7263
|
+
var REGULAR = new Set(["100644", "100755"]);
|
|
7264
|
+
|
|
7265
|
+
// packages/workit-core/src/core/policy/carry.ts
|
|
7266
|
+
var TEST_ONLY_KINDS = new Set(["doc", "cosmetic", "generated", "test"]);
|
|
7267
|
+
|
|
7170
7268
|
// packages/workit-core/src/hooks/standing-signal.ts
|
|
7171
7269
|
import { createHash as createHash2 } from "node:crypto";
|
|
7172
7270
|
import fs2 from "node:fs";
|
|
@@ -7506,6 +7604,7 @@ var SHELL_VOUCHED_HOSTS = new Set([
|
|
|
7506
7604
|
"codex_cli",
|
|
7507
7605
|
"codex_desktop"
|
|
7508
7606
|
]);
|
|
7607
|
+
var restackExact = new WeakMap;
|
|
7509
7608
|
var fromLead = (row, leads) => leads === null || row.actor.session !== null && leads.includes(row.actor.session);
|
|
7510
7609
|
function activeStanding(rows, fanout, leads = null) {
|
|
7511
7610
|
const active = [];
|
|
@@ -7534,109 +7633,6 @@ var OBSERVED_ONLY = new Set([
|
|
|
7534
7633
|
"policy.judged",
|
|
7535
7634
|
...PR_ROW_TYPES
|
|
7536
7635
|
]);
|
|
7537
|
-
// packages/workit-core/src/forge/redact.ts
|
|
7538
|
-
var KEY = String.raw`[A-Za-z0-9_.-]*?(?:token|secret|password|passwd|pwd|api[_-]?key|access[_-]?key|account[_-]?key|private[_-]?key|client[_-]?secret|credentials?|authorization|cookie|signature)[A-Za-z0-9_.-]*`;
|
|
7539
|
-
var ASSIGNMENT = new RegExp(String.raw`(?<![A-Za-z0-9])(["']?${KEY}["']?\s*[:=]\s*["']?)((?:bearer|basic|token|digest)\s+)?([^\s"',;&]+)`, "giu");
|
|
7540
|
-
var QUOTED_ASSIGNMENT = new RegExp(String.raw`(?<![A-Za-z0-9])(["']?${KEY}["']?\s*[:=]\s*)(["'])([^"'\n]*[^\s"'][^"'\n]*)\2`, "giu");
|
|
7541
|
-
var ANSI = new RegExp(String.raw`\u001b\[[0-9;?]*[ -/]*[@-~]|\u001b\][^\u0007]*\u0007`, "gu");
|
|
7542
|
-
|
|
7543
|
-
// packages/workit-core/src/git/ops.ts
|
|
7544
|
-
var COMMIT_TIMEOUT_MS = 10 * 60000;
|
|
7545
|
-
|
|
7546
|
-
// packages/workit-core/src/core/policy/substance.ts
|
|
7547
|
-
var SLASH_BLOCK = [["/*", "*/"]];
|
|
7548
|
-
var C_LIKE = { line: ["//"], block: SLASH_BLOCK, quotes: `"'` };
|
|
7549
|
-
var SYNTAXES = Object.fromEntries([
|
|
7550
|
-
...["ts", "mts", "cts", "js", "mjs", "cjs"].map((ext) => [ext, { ...C_LIKE, js: true }]),
|
|
7551
|
-
...["java", "kt", "kts", "scala", "swift", "dart", "groovy"].map((ext) => [
|
|
7552
|
-
ext,
|
|
7553
|
-
{ ...C_LIKE, triple: true }
|
|
7554
|
-
]),
|
|
7555
|
-
["go", { ...C_LIKE, rawBacktick: true }],
|
|
7556
|
-
...["css", "scss", "less"].map((ext) => [
|
|
7557
|
-
ext,
|
|
7558
|
-
{ line: [], block: SLASH_BLOCK, quotes: `"'`, cssUrl: true }
|
|
7559
|
-
]),
|
|
7560
|
-
...["py", "pyi"].map((ext) => [
|
|
7561
|
-
ext,
|
|
7562
|
-
{ line: ["#"], block: [], quotes: `"'`, triple: true, indented: true, fstring: true }
|
|
7563
|
-
]),
|
|
7564
|
-
["toml", { line: ["#"], block: [], quotes: `"`, literal: "'", triple: true }],
|
|
7565
|
-
...["html", "htm", "xml", "svg", "xhtml"].map((ext) => [
|
|
7566
|
-
ext,
|
|
7567
|
-
{ line: [], block: [["<!--", "-->"]], quotes: "", indented: true }
|
|
7568
|
-
])
|
|
7569
|
-
]);
|
|
7570
|
-
var REGEX_KEYWORDS = new Set([
|
|
7571
|
-
"return",
|
|
7572
|
-
"typeof",
|
|
7573
|
-
"instanceof",
|
|
7574
|
-
"case",
|
|
7575
|
-
"do",
|
|
7576
|
-
"else",
|
|
7577
|
-
"in",
|
|
7578
|
-
"of",
|
|
7579
|
-
"new",
|
|
7580
|
-
"delete",
|
|
7581
|
-
"void",
|
|
7582
|
-
"throw",
|
|
7583
|
-
"yield",
|
|
7584
|
-
"await"
|
|
7585
|
-
]);
|
|
7586
|
-
var decoder = new TextDecoder("utf-8", { fatal: true });
|
|
7587
|
-
|
|
7588
|
-
// packages/workit-core/src/core/policy/lane.ts
|
|
7589
|
-
var RISK_TOKENS = new Set([
|
|
7590
|
-
"auth",
|
|
7591
|
-
"authn",
|
|
7592
|
-
"authz",
|
|
7593
|
-
"oauth",
|
|
7594
|
-
"security",
|
|
7595
|
-
"permission",
|
|
7596
|
-
"permissions",
|
|
7597
|
-
"secret",
|
|
7598
|
-
"secrets",
|
|
7599
|
-
"crypto",
|
|
7600
|
-
"gate",
|
|
7601
|
-
"gates",
|
|
7602
|
-
"policy",
|
|
7603
|
-
"policies",
|
|
7604
|
-
"hook",
|
|
7605
|
-
"hooks",
|
|
7606
|
-
"husky",
|
|
7607
|
-
"lefthook",
|
|
7608
|
-
"release",
|
|
7609
|
-
"releases",
|
|
7610
|
-
"migration",
|
|
7611
|
-
"migrations",
|
|
7612
|
-
"migrate",
|
|
7613
|
-
"workflows"
|
|
7614
|
-
]);
|
|
7615
|
-
var RISK_FILES = new Set([
|
|
7616
|
-
".gitlab-ci.yml",
|
|
7617
|
-
"Jenkinsfile",
|
|
7618
|
-
"azure-pipelines.yml",
|
|
7619
|
-
".pre-commit-config.yaml",
|
|
7620
|
-
".workit/risk-paths"
|
|
7621
|
-
]);
|
|
7622
|
-
var RISK_NAMES = new Set([".gitattributes"]);
|
|
7623
|
-
var LOCKFILES = new Set([
|
|
7624
|
-
"bun.lock",
|
|
7625
|
-
"bun.lockb",
|
|
7626
|
-
"package-lock.json",
|
|
7627
|
-
"npm-shrinkwrap.json",
|
|
7628
|
-
"yarn.lock",
|
|
7629
|
-
"pnpm-lock.yaml",
|
|
7630
|
-
"Cargo.lock",
|
|
7631
|
-
"go.sum",
|
|
7632
|
-
"poetry.lock",
|
|
7633
|
-
"uv.lock",
|
|
7634
|
-
"Pipfile.lock",
|
|
7635
|
-
"Gemfile.lock",
|
|
7636
|
-
"composer.lock"
|
|
7637
|
-
]);
|
|
7638
|
-
var globCache = new Map;
|
|
7639
|
-
var REGULAR = new Set(["100644", "100755"]);
|
|
7640
7636
|
// packages/workit-core/src/hooks/raw-git.ts
|
|
7641
7637
|
var SHELLS = new Set(["sh", "bash", "zsh", "dash", "ksh", "ash", "mksh", "yash", "fish"]);
|
|
7642
7638
|
var POWERSHELLS = new Set(["pwsh", "powershell"]);
|