@brainervirus/workit-core 2.1.4 → 2.2.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.
Files changed (47) hide show
  1. package/package.json +3 -2
  2. package/scripts/analyze-release-scope.ts +3 -3
  3. package/scripts/doctor-check.ts +1 -2
  4. package/scripts/sync-release-manifests.ts +4 -4
  5. package/src/core/authority.ts +8 -8
  6. package/src/core/auto-approval.ts +6 -6
  7. package/src/core/branch.ts +4 -4
  8. package/src/core/config-conversion.ts +1 -1
  9. package/src/core/config.ts +3 -3
  10. package/src/core/cutover.ts +6 -6
  11. package/src/core/doctor.ts +49 -3
  12. package/src/core/external-action-effects.ts +15 -15
  13. package/src/core/external-action.ts +16 -19
  14. package/src/core/logger.ts +2 -2
  15. package/src/core/methods.ts +5 -0
  16. package/src/core/policy-resolver.ts +9 -6
  17. package/src/core/registration.ts +3 -5
  18. package/src/core/repo-context.ts +1 -1
  19. package/src/core/setup.ts +2 -2
  20. package/src/core/skill-manifests.ts +1 -1
  21. package/src/core/store-lock.ts +301 -0
  22. package/src/core/support-matrix.ts +1 -1
  23. package/src/core/task-context.ts +3 -3
  24. package/src/core/task-contract.ts +129 -9
  25. package/src/core/task-engine.ts +159 -159
  26. package/src/core/task-evaluation.ts +3 -3
  27. package/src/core/task-store.ts +407 -89
  28. package/src/core/tracker-issues.ts +1 -1
  29. package/src/core/uninstall.ts +3 -3
  30. package/src/core/workers.ts +3 -3
  31. package/src/core/workspaces.ts +4 -6
  32. package/src/core/youtrack-tools.ts +1 -1
  33. package/src/core.ts +1 -1
  34. package/src/git/rev.ts +736 -0
  35. package/src/{core/session-context.ts → hooks/context.ts} +97 -10
  36. package/src/hooks/descriptor.ts +113 -0
  37. package/src/hooks/handle.ts +111 -0
  38. package/src/hooks/hosts/claude-code.ts +281 -0
  39. package/src/hooks/hosts/codex.ts +298 -0
  40. package/src/hooks/hosts/cursor.ts +321 -0
  41. package/src/hooks/hosts/fields.ts +55 -0
  42. package/src/hooks/hosts/opencode.ts +79 -0
  43. package/src/hooks/hosts/pi.ts +80 -0
  44. package/src/hooks/index.ts +43 -0
  45. package/src/hooks/policy.ts +14 -0
  46. package/src/hooks/protocol.ts +89 -0
  47. package/src/hooks/run.ts +52 -0
@@ -94,7 +94,7 @@ const gitPaths = (root: string): Inventory => {
94
94
  return {
95
95
  paths: [],
96
96
  uncertain: !/not a git repository/i.test(stderr),
97
- git: /not a git repository/i.test(stderr) ? false : true,
97
+ git: !/not a git repository/i.test(stderr),
98
98
  };
99
99
  }
100
100
  const paths = result.stdout
@@ -219,7 +219,7 @@ export function captureCandidate(
219
219
 
220
220
  const files: Candidate["files"] = [];
221
221
  let completeness: Candidate["completeness"] = uncertain ? "uncertain" : "known";
222
- for (const item of [...names].sort()) {
222
+ for (const item of [...names].toSorted()) {
223
223
  if (!scopeMatches(item, normalizedScope)) continue;
224
224
  const target = path.join(checkout, item);
225
225
  try {
@@ -264,7 +264,7 @@ export function captureCandidate(
264
264
  )
265
265
  return failure("invalid_input", "candidate environment names must be unique and non-empty");
266
266
  const values = supplied
267
- .sort((left, right) => compareCodeUnits(left.name, right.name))
267
+ .toSorted((left, right) => compareCodeUnits(left.name, right.name))
268
268
  .map(({ name, value }) => ({ name, value, refs: [] }));
269
269
  if (values.some(({ value }) => value === null)) completeness = "uncertain";
270
270
  const headResult = spawnSync("git", ["rev-parse", "HEAD"], { cwd: checkout, encoding: "utf8" });