replicas-engine 0.1.572 → 0.1.573

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/src/index.js CHANGED
@@ -3438,6 +3438,13 @@ function findPrMergeSignals(request) {
3438
3438
  ];
3439
3439
  return checks.flatMap(([name, pattern]) => pattern.test(combined) ? [name] : []);
3440
3440
  }
3441
+ function findGitCommitCommands(command) {
3442
+ return [...command.matchAll(/\bgit(?:\s+-[^\s;&|]+(?:\s+(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|[^\s;&|]+))?)*\s+commit\b(?:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\\\r?\n|[^;&|\r\n])*)/g)].map((match) => match[0]);
3443
+ }
3444
+ function findGitCommitSignals(request) {
3445
+ const command = extractCommandProtectionCommandText(request, { stringifyFallback: true }) ?? "";
3446
+ return findGitCommitCommands(command).length > 0 ? ["git-commit"] : [];
3447
+ }
3441
3448
 
3442
3449
  // ../shared/src/routes/client-state.ts
3443
3450
  var MAX_CLIENT_STATE_REQUEST_BYTES = 5 * 1024 * 1024;
@@ -9012,7 +9019,7 @@ function failClosed(reason, matchedSignals) {
9012
9019
  };
9013
9020
  }
9014
9021
  async function evaluateCommandProtection(request, signal) {
9015
- const matchedSignals = findPrMergeSignals(request);
9022
+ const matchedSignals = [...findGitCommitSignals(request), ...findPrMergeSignals(request)];
9016
9023
  if (matchedSignals.length === 0) {
9017
9024
  return { allowed: true, enabled: true };
9018
9025
  }
@@ -10780,7 +10787,7 @@ var DEFAULT_CODEX_ARGS = ["app-server", "--listen", "stdio://"];
10780
10787
  var MIN_CODEX_CLI_VERSION = "0.144.6";
10781
10788
  var CODEX_UPGRADE_TIMEOUT_MS = 12e4;
10782
10789
  var codexCliVersionEnsured = null;
10783
- var ENGINE_PACKAGE_VERSION = "0.1.572";
10790
+ var ENGINE_PACKAGE_VERSION = "0.1.573";
10784
10791
  var INITIALIZE_METHOD = "initialize";
10785
10792
  var INITIALIZED_NOTIFICATION = "initialized";
10786
10793
  var ACCOUNT_LOGIN_START_METHOD = "account/login/start";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "replicas-engine",
3
- "version": "0.1.572",
3
+ "version": "0.1.573",
4
4
  "description": "Lightweight API server for Replicas workspaces",
5
5
  "type": "module",
6
6
  "main": "dist/src/index.js",