@tdsoft-tech/aikit 0.1.16 → 0.1.18
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/.githooks/pre-commit +70 -0
- package/CHANGELOG.md +9 -0
- package/dist/cli.js +2850 -347
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +21 -0
- package/dist/index.js +1502 -107
- package/dist/index.js.map +1 -1
- package/dist/mcp-server.js +1502 -107
- package/dist/mcp-server.js.map +1 -1
- package/package.json +7 -2
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
#
|
|
3
|
+
# bd (beads) pre-commit hook
|
|
4
|
+
#
|
|
5
|
+
# This hook ensures that any pending bd issue changes are flushed to
|
|
6
|
+
# .beads/issues.jsonl before the commit is created, preventing a
|
|
7
|
+
# race condition where daemon auto-flush fires after the commit.
|
|
8
|
+
#
|
|
9
|
+
|
|
10
|
+
# Check if bd is available
|
|
11
|
+
if ! command -v bd >/dev/null 2>&1; then
|
|
12
|
+
echo "Warning: bd command not found, skipping pre-commit flush" >&2
|
|
13
|
+
exit 0
|
|
14
|
+
fi
|
|
15
|
+
|
|
16
|
+
# Check if we're in a bd workspace
|
|
17
|
+
# For worktrees, .beads is in the main repository root, not the worktree
|
|
18
|
+
BEADS_DIR=""
|
|
19
|
+
if git rev-parse --git-dir >/dev/null 2>&1; then
|
|
20
|
+
# Check if we're in a worktree
|
|
21
|
+
if [ "$(git rev-parse --git-dir)" != "$(git rev-parse --git-common-dir)" ]; then
|
|
22
|
+
# Worktree: .beads is in main repo root
|
|
23
|
+
MAIN_REPO_ROOT="$(git rev-parse --git-common-dir)"
|
|
24
|
+
MAIN_REPO_ROOT="$(dirname "$MAIN_REPO_ROOT")"
|
|
25
|
+
if [ -d "$MAIN_REPO_ROOT/.beads" ]; then
|
|
26
|
+
BEADS_DIR="$MAIN_REPO_ROOT/.beads"
|
|
27
|
+
fi
|
|
28
|
+
else
|
|
29
|
+
# Regular repo: check current directory
|
|
30
|
+
if [ -d .beads ]; then
|
|
31
|
+
BEADS_DIR=".beads"
|
|
32
|
+
fi
|
|
33
|
+
fi
|
|
34
|
+
fi
|
|
35
|
+
|
|
36
|
+
if [ -z "$BEADS_DIR" ]; then
|
|
37
|
+
# Not a bd workspace, nothing to do
|
|
38
|
+
exit 0
|
|
39
|
+
fi
|
|
40
|
+
|
|
41
|
+
# Check if bd is actually initialized (has beads.db or config.yaml)
|
|
42
|
+
# This prevents errors if .beads/ exists but bd was never initialized
|
|
43
|
+
if [ ! -f "$BEADS_DIR/beads.db" ] && [ ! -f "$BEADS_DIR/config.yaml" ]; then
|
|
44
|
+
# .beads/ exists but bd is not initialized, skip bd operations
|
|
45
|
+
exit 0
|
|
46
|
+
fi
|
|
47
|
+
|
|
48
|
+
# Flush pending changes to JSONL
|
|
49
|
+
# Use --flush-only to skip git operations (we're already in a git hook)
|
|
50
|
+
# Suppress output unless there's an error
|
|
51
|
+
if ! bd sync --flush-only >/dev/null 2>&1; then
|
|
52
|
+
echo "Error: Failed to flush bd changes to JSONL" >&2
|
|
53
|
+
echo "Run 'bd sync --flush-only' manually to diagnose" >&2
|
|
54
|
+
exit 1
|
|
55
|
+
fi
|
|
56
|
+
|
|
57
|
+
# If the JSONL file was modified, stage it
|
|
58
|
+
# For worktrees, JSONL is in the main repo's working tree, not the worktree,
|
|
59
|
+
# so we can't use git add. Skip this step for worktrees.
|
|
60
|
+
if [ -f "$BEADS_DIR/issues.jsonl" ]; then
|
|
61
|
+
if [ "$(git rev-parse --git-dir)" = "$(git rev-parse --git-common-dir)" ]; then
|
|
62
|
+
# Regular repo: file is in the working tree, safe to add
|
|
63
|
+
git add "$BEADS_DIR/issues.jsonl" 2>/dev/null || true
|
|
64
|
+
fi
|
|
65
|
+
# For worktrees: .beads is in the main repo's working tree, not this worktree
|
|
66
|
+
# Git rejects adding files outside the worktree, so we skip it.
|
|
67
|
+
# The main repo will see the changes on the next pull/sync.
|
|
68
|
+
fi
|
|
69
|
+
|
|
70
|
+
exit 0
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.1.18] - 2026-01-02
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
- 🔧 **OpenCode Agent Tab Switching** - Fixed `<tab>` key switching between agent modes
|
|
7
|
+
- Renamed `build` and `planner` agents to `aikitbuild` and `aikitplanner`
|
|
8
|
+
- Prevents conflicts with OpenCode's built-in Plan/Build modes
|
|
9
|
+
- All agents now properly have `mode: subagent` for tab switching
|
|
10
|
+
- Users can now switch between: aikitplanner, aikitbuild, rush, review, scout, explore, vision, one-shot
|
|
11
|
+
|
|
3
12
|
## [0.1.15] - 2026-01-01
|
|
4
13
|
|
|
5
14
|
### Breaking Changes ⚠️
|