Skip to content

Commit 096f491

Browse files
Merge branch 'main' into 514-marketplace-versioning
2 parents 0517b3e + 84d0401 commit 096f491

File tree

7 files changed

+412
-337
lines changed

7 files changed

+412
-337
lines changed

CHANGELOG.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2424

2525
- Pin codex setup to `rust-v0.118.0` for security and reproducibility; update config to `wire_api = "responses"` (#663)
2626
- Propagate headers and environment variables through OpenCode MCP adapter with defensive copies to prevent mutation (#622)
27+
- Fix `apm install` hanging indefinitely when corporate firewalls silently drop SSH packets by setting `GIT_SSH_COMMAND` with `ConnectTimeout=30` (#652)
2728
- Fix `apm compile --target claude` silently skipping dependency instructions stored in `.github/instructions/` (#631)
29+
2830
### Changed
2931

3032
- `apm marketplace browse/search/add/update` now route through the registry proxy when `PROXY_REGISTRY_URL` is set; `PROXY_REGISTRY_ONLY=1` blocks direct GitHub API calls (#506)
@@ -461,7 +463,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
461463

462464
### Fixed
463465

464-
- **Install Script and `apm update`**: Repaired corrupted header in install.sh. Use awk instead of sed for shell subprocess compatibility. Directed shell output to terminal for password input during update process.
466+
- **Install Script and `apm update`**: Repaired corrupted header in install.sh. Use awk instead of sed for shell subprocess compatibility. Directed shell output to terminal for password input during update process.
465467

466468
## [0.7.1] - 2025-01-22
467469

@@ -503,7 +505,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
503505

504506
- **SKILL.md as first-class primitive**: meta-description of what an APM Package does for agents to read
505507
- **Claude Skills Installation**: Install Claude Skills directly as APM Packages
506-
- **Bidirectional Format Support**:
508+
- **Bidirectional Format Support**:
507509
- APM packages → SKILL.md (for Claude target)
508510
- Claude Skills → .agent.md (for VSCode target)
509511
- **Skills Documentation**: New `docs/skills.md` guide
@@ -520,7 +522,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
520522

521523
- **Target Auto-Detection**: Smart compilation based on project structure
522524
- `.github/` only → generates `AGENTS.md` + VSCode integration
523-
- `.claude/` only → generates `CLAUDE.md` + Claude integration
525+
- `.claude/` only → generates `CLAUDE.md` + Claude integration
524526
- Both folders → generates all formats
525527
- Neither folder → generates `AGENTS.md` only (universal format)
526528

docs/src/content/docs/getting-started/authentication.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,3 +281,9 @@ git config credential.helper # check current helper
281281
git config --global credential.helper osxkeychain # macOS
282282
gh auth login # GitHub CLI
283283
```
284+
285+
### SSH connection hangs on corporate/VPN networks
286+
287+
When no token is available, APM tries SSH before falling back to plain HTTPS. Firewalls that silently drop SSH packets (port 22) can make `apm install` appear to hang. APM sets `GIT_SSH_COMMAND="ssh -o ConnectTimeout=30"` so SSH attempts fail within 30 seconds and the fallback proceeds to HTTPS with git credential helpers.
288+
289+
If you already set `GIT_SSH_COMMAND` (e.g., for a custom key), APM appends `-o ConnectTimeout=30` unless `ConnectTimeout` is already present in your value.

packages/apm-guide/.apm/skills/apm-usage/authentication.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,3 +96,15 @@ apm install --verbose your-org/package
9696
# Increase git credential timeout (default 30s, max 180s)
9797
export APM_GIT_CREDENTIAL_TIMEOUT=120
9898
```
99+
100+
### SSH connection hangs on corporate/VPN networks
101+
102+
APM tries SSH as a fallback when HTTPS auth is not available. On networks
103+
that silently drop SSH traffic (port 22), this can appear to hang. APM sets
104+
`GIT_SSH_COMMAND="ssh -o ConnectTimeout=30"` so SSH attempts fail within
105+
30 seconds and the fallback chain continues to plain HTTPS with git
106+
credential helpers.
107+
108+
To override the SSH command (e.g., custom key path), set `GIT_SSH_COMMAND`
109+
in your environment. APM appends `-o ConnectTimeout=30` unless it finds
110+
`ConnectTimeout` already present in your value.

src/apm_cli/core/script_runner.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ def _auto_compile_prompts(
256256
compiled_prompt_files.append(prompt_file)
257257

258258
# Read the compiled content
259-
with open(compiled_path, "r") as f:
259+
with open(compiled_path, "r", encoding="utf-8") as f:
260260
compiled_content = f.read().strip()
261261

262262
# Check if this is a runtime command (copilot, codex, llm) before transformation
@@ -916,7 +916,7 @@ def compile(self, prompt_file: str, params: Dict[str, str]) -> str:
916916
# Now ensure compiled directory exists
917917
self.compiled_dir.mkdir(parents=True, exist_ok=True)
918918

919-
with open(prompt_path, "r") as f:
919+
with open(prompt_path, "r", encoding="utf-8") as f:
920920
content = f.read()
921921

922922
# Parse frontmatter and content
@@ -939,7 +939,7 @@ def compile(self, prompt_file: str, params: Dict[str, str]) -> str:
939939
output_path = self.compiled_dir / output_name
940940

941941
# Write compiled content
942-
with open(output_path, "w") as f:
942+
with open(output_path, "w", encoding="utf-8") as f:
943943
f.write(compiled_content)
944944

945945
return str(output_path)

0 commit comments

Comments
 (0)