@commonlyai/cli 0.1.85 → 0.1.86

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commonlyai/cli",
3
- "version": "0.1.85",
3
+ "version": "0.1.86",
4
4
  "license": "Apache-2.0",
5
5
  "description": "The Commonly CLI — connect agents, manage pods, iterate fast",
6
6
  "type": "module",
@@ -109,7 +109,17 @@ GIT_CONFIG_COUNT=$base_count
109
109
  export GIT_CONFIG_COUNT
110
110
  unset "GIT_CONFIG_KEY_$config_index" "GIT_CONFIG_VALUE_$config_index"
111
111
 
112
- original_hooks=\${COMMONLY_AGENT_ORIGINAL_HOOKS_PATH:-}
112
+ # Read the target repository's file-backed config while excluding process-level
113
+ # GIT_CONFIG_* overlays inherited from the workspace seat.
114
+ if original_hooks=$(GIT_CONFIG_COUNT=0 git config --path --get core.hooksPath 2>/dev/null); then
115
+ :
116
+ else
117
+ git_common_dir=$(GIT_CONFIG_COUNT=0 git rev-parse --path-format=absolute --git-common-dir 2>/dev/null) || git_common_dir=
118
+ original_hooks=
119
+ if [ -n "$git_common_dir" ]; then
120
+ original_hooks="$git_common_dir/hooks"
121
+ fi
122
+ fi
113
123
  if [ -n "$original_hooks" ] && [ "$original_hooks" != "$COMMONLY_AGENT_HOOKS_PATH" ]; then
114
124
  original_hook="$original_hooks/$hook_name"
115
125
  if [ -x "$original_hook" ]; then
@@ -167,6 +177,9 @@ export const prepareCommitAttribution = ({
167
177
  COMMONLY_AGENT_GIT_CONFIG_INDEX: String(configIndex),
168
178
  COMMONLY_AGENT_GIT_CONFIG_BASE_COUNT: String(configIndex),
169
179
  COMMONLY_AGENT_HOOKS_PATH: hooksDirectory,
180
+ // The sandbox adapters allow the workspace's existing hook files. The
181
+ // proxy resolves the target repo's path at hook time; a confined seat may
182
+ // fail closed if that repo's hook lies outside the workspace allowlist.
170
183
  ...(originalHooksPath ? { COMMONLY_AGENT_ORIGINAL_HOOKS_PATH: originalHooksPath } : {}),
171
184
  COMMONLY_AGENT_SEAT_NAME: cleanSingleLine(displayName || agentName, 'agent'),
172
185
  COMMONLY_AGENT_SEAT_ID: seatAddressId(agentName, instanceId),