@brainervirus/workit-pi 8.9.1 → 8.11.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 +74 -1
- package/dist/workit.js +4673 -4331
- package/package.json +1 -1
- package/skills/workit-fanout/references/brief.md +1 -1
- package/skills/workit-fanout/references/orchestration.md +16 -6
- package/skills/workit-implement/SKILL.md +3 -2
- package/skills/workit-review/SKILL.md +4 -2
package/dist/worker.js
CHANGED
|
@@ -8305,6 +8305,15 @@ var ENVELOPE = new Set([
|
|
|
8305
8305
|
"expectedWorkspaceRevision",
|
|
8306
8306
|
"judgment"
|
|
8307
8307
|
]);
|
|
8308
|
+
// packages/workit-core/src/host-session.ts
|
|
8309
|
+
var OWN_CHILD_SHELL = new Set(["opencode", "pi"]);
|
|
8310
|
+
var SESSION_UNSAFE = /[^A-Za-z0-9_.:@/+-]/g;
|
|
8311
|
+
function childSessionId(lead, child) {
|
|
8312
|
+
const leaf = child.replace(SESSION_UNSAFE, "-").slice(-120);
|
|
8313
|
+
const prefix = lead.replace(SESSION_UNSAFE, "-").slice(0, 127 - leaf.length);
|
|
8314
|
+
return prefix ? `${prefix}:${leaf}` : leaf;
|
|
8315
|
+
}
|
|
8316
|
+
|
|
8308
8317
|
// packages/workit-core/src/core/package-root.ts
|
|
8309
8318
|
import { existsSync } from "node:fs";
|
|
8310
8319
|
import path from "node:path";
|
|
@@ -8570,6 +8579,70 @@ var OBSERVED_ONLY = new Set([
|
|
|
8570
8579
|
"policy.judged",
|
|
8571
8580
|
...PR_ROW_TYPES
|
|
8572
8581
|
]);
|
|
8582
|
+
// packages/workit-core/src/hooks/raw-git.ts
|
|
8583
|
+
var SHELLS = new Set(["sh", "bash", "zsh", "dash", "ksh"]);
|
|
8584
|
+
var PREFIXES = new Set(["sudo", "command", "env", "nohup", "time", "exec", "nice", "&"]);
|
|
8585
|
+
var CD = new Set(["cd", "chdir", "set-location", "sl"]);
|
|
8586
|
+
var PUSHD = new Set(["pushd", "push-location"]);
|
|
8587
|
+
var POPD = new Set(["popd", "pop-location"]);
|
|
8588
|
+
var GIT_VALUE_OPTIONS = new Set([
|
|
8589
|
+
"-c",
|
|
8590
|
+
"--git-dir",
|
|
8591
|
+
"--work-tree",
|
|
8592
|
+
"--namespace",
|
|
8593
|
+
"--exec-path",
|
|
8594
|
+
"--config-env",
|
|
8595
|
+
"--super-prefix"
|
|
8596
|
+
]);
|
|
8597
|
+
var LAUNCHERS = new Set([
|
|
8598
|
+
"npx",
|
|
8599
|
+
"bunx",
|
|
8600
|
+
"pnpx",
|
|
8601
|
+
"-y",
|
|
8602
|
+
"--yes",
|
|
8603
|
+
"pnpm",
|
|
8604
|
+
"dlx",
|
|
8605
|
+
"exec",
|
|
8606
|
+
"env",
|
|
8607
|
+
"sudo",
|
|
8608
|
+
"command"
|
|
8609
|
+
]);
|
|
8610
|
+
var PUSH_VALUE_OPTIONS = new Set(["-o", "--push-option", "--receive-pack", "--exec", "--repo"]);
|
|
8611
|
+
var VALUE_OPTIONS = {
|
|
8612
|
+
git: new Set([
|
|
8613
|
+
"-m",
|
|
8614
|
+
"--message",
|
|
8615
|
+
"-F",
|
|
8616
|
+
"--file",
|
|
8617
|
+
"-C",
|
|
8618
|
+
"-c",
|
|
8619
|
+
"--reuse-message",
|
|
8620
|
+
"--reedit-message",
|
|
8621
|
+
"--author",
|
|
8622
|
+
"--date",
|
|
8623
|
+
"--trailer",
|
|
8624
|
+
"-t",
|
|
8625
|
+
"--template",
|
|
8626
|
+
"--cleanup",
|
|
8627
|
+
"--fixup",
|
|
8628
|
+
"--squash",
|
|
8629
|
+
"-o",
|
|
8630
|
+
"--push-option",
|
|
8631
|
+
"--repo",
|
|
8632
|
+
"--receive-pack",
|
|
8633
|
+
"--exec"
|
|
8634
|
+
]),
|
|
8635
|
+
gh: new Set(["-b", "--body", "-F", "--body-file", "-t", "--title", "--subject", "-A", "--author-email"].concat(["-B", "--base", "-H", "--head", "-l", "--label", "-a", "--assignee"]).concat(["-r", "--reviewer", "-m", "--milestone", "-p", "--project", "-T", "--template"]).concat(["--match-head-commit", "-R", "--repo"])),
|
|
8636
|
+
glab: new Set(["-m", "--message", "--squash-message", "--sha", "-t", "--title", "-d", "--description"].concat(["-b", "--target-branch", "-s", "--source-branch", "-l", "--label"]).concat(["-a", "--assignee", "--reviewer", "-R", "--repo"]))
|
|
8637
|
+
};
|
|
8638
|
+
|
|
8639
|
+
// packages/workit-core/src/core/route-intent.ts
|
|
8640
|
+
var SWITCH_CREATE = new Set(["-c", "--create", "-C", "--force-create", "--orphan"]);
|
|
8641
|
+
var CHECKOUT_CREATE = new Set(["-b", "-B", "--orphan"]);
|
|
8642
|
+
var WORKTREE_CREATE = new Set(["-b", "-B"]);
|
|
8643
|
+
var BRANCH_NO_CREATE = new Set(["-d", "-D", "--delete", "-l", "--list", "-a", "--all", "-r", "--remotes", "--show-current"].concat(["-v", "-vv", "--verbose", "--contains", "--no-contains", "--merged", "--no-merged"]).concat(["--points-at", "--sort", "--format", "--column", "--no-column", "-u"]).concat(["--set-upstream-to", "--unset-upstream", "--edit-description", "-i", "--ignore-case"]));
|
|
8644
|
+
var BRANCH_RENAME = new Set(["-m", "-M", "--move", "-c", "-C", "--copy"]);
|
|
8645
|
+
var WORKTREE_VALUES = new Set(["--reason"]);
|
|
8573
8646
|
// packages/workit-core/src/core/policy/judgment.ts
|
|
8574
8647
|
var LEGACY_KEYS = new Set(["assessment", "facts", "signals", "consequences", "verification"]);
|
|
8575
8648
|
var YES = new Set(["true", "yes", "y", "1", "on"]);
|
|
@@ -8804,7 +8877,7 @@ function launchWorker(assignment, options) {
|
|
|
8804
8877
|
WORKIT_PI_WORKER_ID: workerId ?? "",
|
|
8805
8878
|
WORKIT_PI_WORKER_SESSION: sessionId,
|
|
8806
8879
|
WORKIT_HOST: "pi",
|
|
8807
|
-
WORKIT_SESSION_ID: sessionId,
|
|
8880
|
+
WORKIT_SESSION_ID: options.leadSession ? childSessionId(options.leadSession, sessionId) : sessionId,
|
|
8808
8881
|
WORKIT_PI_WORKER_ROLE: assignment.role,
|
|
8809
8882
|
WORKIT_PI_WORKER_SCOPE: JSON.stringify(assignment.scope)
|
|
8810
8883
|
};
|