@automagik/genie 3.260317.18 → 3.260317.19
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/.github/workflows/ci.yml +16 -2
- package/.husky/commit-msg +4 -0
- package/.husky/pre-commit +4 -0
- package/.husky/pre-push +7 -0
- package/dist/genie.js +109 -108
- package/git-cliff/CHANGELOG.md +36 -0
- package/knip.json +0 -1
- package/package.json +7 -3
- package/scripts/tmux/genie-projects.sh +70 -0
- package/scripts/tmux/genie-tasks.sh +138 -0
- package/scripts/tmux/genie.tmux.conf +27 -10
- package/src/genie-commands/__tests__/session.test.ts +46 -1
- package/src/genie-commands/session.ts +59 -14
- package/src/genie-commands/shortcuts.test.ts +9 -0
- package/src/genie.test.ts +136 -0
- package/src/genie.ts +118 -28
- package/src/lib/agent-registry.test.ts +49 -1
- package/src/lib/agent-registry.ts +96 -0
- package/src/lib/claude-logs.test.ts +58 -0
- package/src/lib/claude-native-teams.ts +59 -0
- package/src/lib/claude-settings.test.ts +42 -0
- package/src/lib/codex-config.test.ts +23 -0
- package/src/lib/genie-config.test.ts +89 -0
- package/src/lib/genie-dir.test.ts +14 -0
- package/src/lib/inbox-watcher.test.ts +387 -0
- package/src/lib/inbox-watcher.ts +210 -0
- package/src/lib/mosaic-layout.test.ts +34 -0
- package/src/lib/orchestrator/patterns.test.ts +147 -0
- package/src/lib/orchestrator/state-detector.test.ts +100 -0
- package/src/lib/protocol-router-session.test.ts +631 -0
- package/src/lib/protocol-router-spawn.ts +14 -1
- package/src/lib/protocol-router.ts +199 -42
- package/src/lib/system-detect.test.ts +21 -0
- package/src/lib/team-auto-spawn.test.ts +244 -12
- package/src/lib/team-auto-spawn.ts +143 -32
- package/src/lib/tmux-wrapper.test.ts +34 -0
- package/src/lib/tmux.test.ts +23 -0
- package/src/term-commands/agents.ts +16 -8
- package/src/term-commands/msg-routing.test.ts +82 -0
- package/src/term-commands/msg.ts +65 -3
- package/src/term-commands/ship.test.ts +1 -1
- package/src/term-commands/shortcuts.test.ts +30 -0
- package/src/term-commands/state.test.ts +31 -0
- package/src/types/genie-config.test.ts +75 -0
package/.github/workflows/ci.yml
CHANGED
|
@@ -65,8 +65,22 @@ jobs:
|
|
|
65
65
|
- name: Dead code check (knip)
|
|
66
66
|
run: bunx knip
|
|
67
67
|
|
|
68
|
-
- name: Test
|
|
69
|
-
run:
|
|
68
|
+
- name: Test with coverage
|
|
69
|
+
run: |
|
|
70
|
+
COVERAGE_OUTPUT=$(bun test --coverage 2>&1) || true
|
|
71
|
+
echo "$COVERAGE_OUTPUT"
|
|
72
|
+
LINE_COV=$(echo "$COVERAGE_OUTPUT" | grep "All files" | awk -F'|' '{print $2}' | tr -d ' ')
|
|
73
|
+
echo "Line coverage: ${LINE_COV}%"
|
|
74
|
+
if [ -z "$LINE_COV" ]; then
|
|
75
|
+
echo "WARNING: Could not parse coverage — skipping threshold check"
|
|
76
|
+
exit 0
|
|
77
|
+
fi
|
|
78
|
+
THRESHOLD=68
|
|
79
|
+
if [ "$(echo "$LINE_COV < $THRESHOLD" | bc -l)" = "1" ]; then
|
|
80
|
+
echo "FAILED: Coverage ${LINE_COV}% is below ${THRESHOLD}% minimum"
|
|
81
|
+
exit 1
|
|
82
|
+
fi
|
|
83
|
+
echo "PASSED: Coverage ${LINE_COV}% meets ${THRESHOLD}% minimum"
|
|
70
84
|
|
|
71
85
|
publish-next:
|
|
72
86
|
name: Publish @next
|
package/.husky/commit-msg
CHANGED
package/.husky/pre-commit
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
# Prevent GIT_DIR/GIT_WORK_TREE from leaking into child processes (see pre-push)
|
|
2
|
+
unset GIT_DIR
|
|
3
|
+
unset GIT_WORK_TREE
|
|
4
|
+
|
|
1
5
|
# Check if CI is red on current branch — block commits on broken branches
|
|
2
6
|
branch=$(git rev-parse --abbrev-ref HEAD 2>/dev/null)
|
|
3
7
|
if [ -n "$branch" ] && [ "${SKIP_CI_CHECK:-}" != "1" ] && command -v gh >/dev/null 2>&1; then
|
package/.husky/pre-push
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
set -e
|
|
2
2
|
|
|
3
|
+
# Prevent GIT_DIR/GIT_WORK_TREE from leaking into child processes.
|
|
4
|
+
# Git sets these in hook environments, but bun test spawns git commands
|
|
5
|
+
# that must discover their own repos. Without this, test setupTestRepo()
|
|
6
|
+
# commits land on the REAL repo branch, causing catastrophic data loss.
|
|
7
|
+
unset GIT_DIR
|
|
8
|
+
unset GIT_WORK_TREE
|
|
9
|
+
|
|
3
10
|
remote="$1"
|
|
4
11
|
while read local_ref local_oid remote_ref remote_oid; do
|
|
5
12
|
if echo "$remote_ref" | grep -qE 'refs/heads/(main|master)$'; then
|