@imdeadpool/guardex 7.0.3 → 7.0.5

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/README.md CHANGED
@@ -373,6 +373,16 @@ npm pack --dry-run
373
373
 
374
374
  ## Release notes
375
375
 
376
+ ### v7.0.5
377
+
378
+ - **Added: `oh-my-claude` to `gx status` global-toolchain check.** The Claude-side mirror of `oh-my-codex` is now reported alongside the existing services (`oh-my-codex`, `@fission-ai/openspec`, `@imdeadpool/codex-account-switcher`, `gh`). Users who have not yet installed it will see a clear "inactive" line instead of silent omission, matching the existing codex detection contract.
379
+ - **Added: `.omc/` to the managed `.gitignore` block.** `gx setup` / `gx doctor` write a `.omc/` entry next to `.omx/` so Claude-specific runtime state (notepad, worktrees landing there in a follow-up) stays out of commits by default, parity with the existing `.omx/` treatment.
380
+
381
+ ### v7.0.4
382
+
383
+ - **Fixed: publish collision on npm.** Advanced the package metadata from `7.0.3` to `7.0.4` so `npm publish` no longer targets an already published version.
384
+ - **Changed: release-note sync for versioning rule.** Added this versioned entry in README in the same change as the package bump to keep publish metadata and release notes aligned.
385
+
376
386
  ### v7.0.3
377
387
 
378
388
  - **Branch/worktree naming refactor.** `agent-branch-start.sh` now produces `agent/<role>/<task>-<YYYY-MM-DD>-<HH-MM>` instead of `agent/<role+account-email>/<snapshot-slug>-<task>-<cksum6>`. Codex account names (e.g. `Zeus Edix Hu`) and 6-hex checksums no longer leak into branch or worktree paths.
@@ -13,6 +13,7 @@ const LEGACY_NAMES = ['guardex', 'multiagent-safety'];
13
13
  const OPENSPEC_PACKAGE = '@fission-ai/openspec';
14
14
  const GLOBAL_TOOLCHAIN_PACKAGES = [
15
15
  'oh-my-codex',
16
+ 'oh-my-claude',
16
17
  OPENSPEC_PACKAGE,
17
18
  '@imdeadpool/codex-account-switcher',
18
19
  ];
@@ -122,6 +123,7 @@ const GITIGNORE_MARKER_START = '# multiagent-safety:START';
122
123
  const GITIGNORE_MARKER_END = '# multiagent-safety:END';
123
124
  const MANAGED_GITIGNORE_PATHS = [
124
125
  '.omx/',
126
+ '.omc/',
125
127
  'scripts/agent-branch-start.sh',
126
128
  'scripts/agent-branch-finish.sh',
127
129
  'scripts/codex-agent.sh',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@imdeadpool/guardex",
3
- "version": "7.0.3",
3
+ "version": "7.0.5",
4
4
  "description": "GuardeX: the Guardian T-Rex for your repo, with hardened multi-agent git guardrails.",
5
5
  "license": "MIT",
6
6
  "preferGlobal": true,
@@ -23,6 +23,14 @@ if [[ -n "${CODEX_THREAD_ID:-}" || -n "${OMX_SESSION_ID:-}" || "${CODEX_CI:-0}"
23
23
  is_codex_session=1
24
24
  fi
25
25
 
26
+ # Superset of is_codex_session that also covers Claude Code sessions so the
27
+ # protected-branch gate below only triggers for automated agents — humans stay
28
+ # free to commit directly on main/dev/master.
29
+ is_agent_session=$is_codex_session
30
+ if [[ -n "${CLAUDECODE:-}" || -n "${CLAUDE_CODE_SESSION_ID:-}" ]]; then
31
+ is_agent_session=1
32
+ fi
33
+
26
34
  is_vscode_git_context=0
27
35
  if [[ -n "${VSCODE_GIT_IPC_HANDLE:-}" || -n "${VSCODE_GIT_ASKPASS_NODE:-}" || -n "${VSCODE_IPC_HOOK_CLI:-}" ]]; then
28
36
  is_vscode_git_context=1
@@ -124,10 +132,10 @@ MSG
124
132
  fi
125
133
 
126
134
  if [[ "$is_protected_branch" == "1" ]]; then
127
- if [[ "$is_codex_session" != "1" && "$is_vscode_git_context" == "1" ]]; then
128
- if [[ "$allow_vscode_protected_branch_writes" == "1" ]]; then
129
- exit 0
130
- fi
135
+ # Humans may commit directly on protected branches; only agent sessions
136
+ # (Codex / Claude Code / OMX) are blocked.
137
+ if [[ "$is_agent_session" != "1" ]]; then
138
+ exit 0
131
139
  fi
132
140
 
133
141
  if [[ "$is_unborn_branch" == "1" && "$is_codex_session" != "1" ]]; then
@@ -146,16 +154,13 @@ Use an agent branch first:
146
154
  After finishing work:
147
155
  bash scripts/agent-branch-finish.sh
148
156
 
149
- Optional repo opt-in for VS Code protected-branch commits:
150
- git config multiagent.allowVscodeProtectedBranchWrites true
151
-
152
157
  Temporary bypass (not recommended):
153
158
  ALLOW_COMMIT_ON_PROTECTED_BRANCH=1 git commit ...
154
159
  MSG
155
160
  exit 1
156
161
  fi
157
162
 
158
- if [[ "$is_agent_context" == "1" && "$branch" != agent/* ]]; then
163
+ if [[ "$is_agent_session" == "1" && "$branch" != agent/* ]]; then
159
164
  cat >&2 <<'MSG'
160
165
  [agent-branch-guard] Agent commits must run on dedicated agent/* branches.
161
166
  Start an agent branch first:
@@ -28,6 +28,13 @@ if [[ -n "${CODEX_THREAD_ID:-}" || -n "${OMX_SESSION_ID:-}" || "${CODEX_CI:-0}"
28
28
  is_codex_session=1
29
29
  fi
30
30
 
31
+ # Superset covering Claude Code so only agents are blocked from pushing to
32
+ # protected refs; humans push directly from their primary checkout.
33
+ is_agent_session=$is_codex_session
34
+ if [[ -n "${CLAUDECODE:-}" || -n "${CLAUDE_CODE_SESSION_ID:-}" ]]; then
35
+ is_agent_session=1
36
+ fi
37
+
31
38
  protected_branches_raw="${GUARDEX_PROTECTED_BRANCHES:-$(git config --get multiagent.protectedBranches || true)}"
32
39
  if [[ -z "$protected_branches_raw" ]]; then
33
40
  protected_branches_raw="dev main master"
@@ -69,6 +76,11 @@ if [[ "${#blocked_refs[@]}" -gt 0 ]]; then
69
76
  exit 1
70
77
  fi
71
78
 
79
+ # Humans may push directly to protected branches; only agent sessions are blocked.
80
+ if [[ "$is_agent_session" != "1" ]]; then
81
+ exit 0
82
+ fi
83
+
72
84
  if [[ "$is_vscode_git_context" == "1" && "$allow_vscode_protected_branch_writes" == "1" ]]; then
73
85
  exit 0
74
86
  fi