vibe-forge 0.8.1 → 0.8.2

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.
Files changed (51) hide show
  1. package/.claude/commands/configure-vcs.md +102 -102
  2. package/.claude/commands/forge.md +218 -218
  3. package/.claude/hooks/worker-loop.js +220 -217
  4. package/.claude/settings.json +89 -89
  5. package/README.md +149 -191
  6. package/agents/aegis/personality.md +303 -303
  7. package/agents/anvil/personality.md +278 -278
  8. package/agents/architect/personality.md +260 -260
  9. package/agents/crucible/personality.md +362 -362
  10. package/agents/crucible-x/personality.md +210 -210
  11. package/agents/ember/personality.md +293 -293
  12. package/agents/flux/personality.md +248 -248
  13. package/agents/furnace/personality.md +342 -342
  14. package/agents/herald/personality.md +249 -249
  15. package/agents/oracle/personality.md +284 -284
  16. package/agents/pixel/personality.md +140 -140
  17. package/agents/planning-hub/personality.md +473 -473
  18. package/agents/scribe/personality.md +253 -253
  19. package/agents/slag/personality.md +268 -268
  20. package/agents/temper/personality.md +270 -270
  21. package/bin/cli.js +372 -372
  22. package/bin/forge-daemon.sh +477 -477
  23. package/bin/forge-setup.sh +662 -661
  24. package/bin/forge-spawn.sh +164 -164
  25. package/bin/forge.sh +566 -566
  26. package/docs/commands.md +8 -8
  27. package/package.json +77 -77
  28. package/{bin → src}/lib/agents.sh +177 -177
  29. package/{bin → src}/lib/check-aliases.js +50 -50
  30. package/{bin → src}/lib/colors.sh +45 -44
  31. package/{bin → src}/lib/config.sh +347 -347
  32. package/{bin → src}/lib/constants.sh +241 -241
  33. package/{bin → src}/lib/daemon/budgets.sh +107 -107
  34. package/{bin → src}/lib/daemon/dependencies.sh +146 -146
  35. package/{bin → src}/lib/daemon/display.sh +128 -128
  36. package/{bin → src}/lib/daemon/notifications.sh +273 -273
  37. package/{bin → src}/lib/daemon/routing.sh +93 -93
  38. package/{bin → src}/lib/daemon/state.sh +163 -163
  39. package/{bin → src}/lib/daemon/sync.sh +103 -103
  40. package/{bin → src}/lib/database.sh +357 -357
  41. package/{bin → src}/lib/frontmatter.js +106 -106
  42. package/{bin → src}/lib/heimdall-setup.js +113 -113
  43. package/{bin → src}/lib/heimdall.js +265 -265
  44. package/src/lib/index.sh +25 -0
  45. package/{bin → src}/lib/json.sh +264 -264
  46. package/{bin → src}/lib/terminal.js +452 -452
  47. package/{bin → src}/lib/util.sh +126 -126
  48. package/{bin → src}/lib/vcs.js +349 -349
  49. package/{context → templates}/project-context-template.md +122 -122
  50. package/config/task-template.md +0 -159
  51. package/config/templates/handoff-template.md +0 -40
@@ -1,126 +1,126 @@
1
- #!/usr/bin/env bash
2
- #
3
- # Vibe Forge - Cross-Platform Utilities
4
- # Source this file in other scripts: source "$SCRIPT_DIR/lib/util.sh"
5
- #
6
- # Contains cross-platform helper functions that abstract away differences
7
- # between macOS/BSD, Linux, and Windows (Git Bash).
8
- #
9
-
10
- # =============================================================================
11
- # Cross-Platform sed In-Place Editing
12
- # =============================================================================
13
- # macOS/BSD sed requires `sed -i ''` (empty string for backup extension)
14
- # Linux/GNU sed requires `sed -i` (no argument after -i)
15
- # Windows Git Bash uses GNU sed, so same as Linux
16
- #
17
- # Usage:
18
- # sed_inplace 's/foo/bar/' file.txt
19
- # sed_inplace 's/foo/bar/g' file.txt
20
- #
21
- # Arguments:
22
- # $1 - sed expression (the pattern to apply)
23
- # $2 - file to edit
24
- #
25
- # Returns:
26
- # 0 on success, non-zero on failure
27
- #
28
- # Example:
29
- # sed_inplace 's/"validated": false/"validated": true/' "$config_file"
30
-
31
- sed_inplace() {
32
- local pattern="$1"
33
- local file="$2"
34
-
35
- # Validate arguments
36
- if [[ -z "$pattern" ]]; then
37
- echo "sed_inplace: error: pattern argument required" >&2
38
- return 1
39
- fi
40
-
41
- if [[ -z "$file" ]]; then
42
- echo "sed_inplace: error: file argument required" >&2
43
- return 1
44
- fi
45
-
46
- if [[ ! -f "$file" ]]; then
47
- echo "sed_inplace: error: file does not exist: $file" >&2
48
- return 1
49
- fi
50
-
51
- # SECURITY: Refuse to edit symlinks to prevent symlink attacks
52
- if [[ -L "$file" ]]; then
53
- echo "sed_inplace: error: refusing to edit symlink: $file" >&2
54
- return 1
55
- fi
56
-
57
- # Platform-specific sed invocation
58
- if [[ "$(uname)" == "Darwin" ]]; then
59
- # macOS/BSD sed requires empty string after -i
60
- sed -i '' "$pattern" "$file"
61
- else
62
- # Linux and Windows (Git Bash) use GNU sed
63
- sed -i "$pattern" "$file"
64
- fi
65
- }
66
-
67
- # =============================================================================
68
- # Detect Platform
69
- # =============================================================================
70
- # Returns a normalized platform name
71
- #
72
- # Usage:
73
- # platform=$(get_platform)
74
- # if [[ "$platform" == "macos" ]]; then ...
75
- #
76
- # Returns:
77
- # "windows" - Windows (detected via MINGW/MSYS/Cygwin environment)
78
- # "macos" - macOS (Darwin)
79
- # "linux" - Linux
80
- # "unknown" - Unrecognized platform
81
-
82
- get_platform() {
83
- case "$(uname -s)" in
84
- MINGW*|MSYS*|CYGWIN*)
85
- echo "windows"
86
- ;;
87
- Darwin)
88
- echo "macos"
89
- ;;
90
- Linux)
91
- echo "linux"
92
- ;;
93
- *)
94
- echo "unknown"
95
- ;;
96
- esac
97
- }
98
-
99
- # =============================================================================
100
- # Check if running in Git Bash on Windows
101
- # =============================================================================
102
- # Useful for Windows-specific behavior that differs from Linux
103
-
104
- is_git_bash() {
105
- [[ "$(uname -s)" == MINGW* ]] || [[ "$(uname -s)" == MSYS* ]]
106
- }
107
-
108
- # =============================================================================
109
- # Cross-Platform stat for File Size
110
- # =============================================================================
111
- # macOS uses `stat -f%z` while Linux uses `stat --format=%s`
112
- #
113
- # Usage:
114
- # size=$(get_file_size file.txt)
115
-
116
- get_file_size() {
117
- local file="$1"
118
-
119
- if [[ ! -f "$file" ]]; then
120
- echo 0
121
- return 1
122
- fi
123
-
124
- # Try macOS/BSD syntax first, fall back to GNU syntax
125
- stat -f%z "$file" 2>/dev/null || stat --format=%s "$file" 2>/dev/null || echo 0
126
- }
1
+ #!/usr/bin/env bash
2
+ #
3
+ # Vibe Forge - Cross-Platform Utilities
4
+ # Source this file in other scripts: source "$SCRIPT_DIR/lib/util.sh"
5
+ #
6
+ # Contains cross-platform helper functions that abstract away differences
7
+ # between macOS/BSD, Linux, and Windows (Git Bash).
8
+ #
9
+
10
+ # =============================================================================
11
+ # Cross-Platform sed In-Place Editing
12
+ # =============================================================================
13
+ # macOS/BSD sed requires `sed -i ''` (empty string for backup extension)
14
+ # Linux/GNU sed requires `sed -i` (no argument after -i)
15
+ # Windows Git Bash uses GNU sed, so same as Linux
16
+ #
17
+ # Usage:
18
+ # sed_inplace 's/foo/bar/' file.txt
19
+ # sed_inplace 's/foo/bar/g' file.txt
20
+ #
21
+ # Arguments:
22
+ # $1 - sed expression (the pattern to apply)
23
+ # $2 - file to edit
24
+ #
25
+ # Returns:
26
+ # 0 on success, non-zero on failure
27
+ #
28
+ # Example:
29
+ # sed_inplace 's/"validated": false/"validated": true/' "$config_file"
30
+
31
+ sed_inplace() {
32
+ local pattern="$1"
33
+ local file="$2"
34
+
35
+ # Validate arguments
36
+ if [[ -z "$pattern" ]]; then
37
+ echo "sed_inplace: error: pattern argument required" >&2
38
+ return 1
39
+ fi
40
+
41
+ if [[ -z "$file" ]]; then
42
+ echo "sed_inplace: error: file argument required" >&2
43
+ return 1
44
+ fi
45
+
46
+ if [[ ! -f "$file" ]]; then
47
+ echo "sed_inplace: error: file does not exist: $file" >&2
48
+ return 1
49
+ fi
50
+
51
+ # SECURITY: Refuse to edit symlinks to prevent symlink attacks
52
+ if [[ -L "$file" ]]; then
53
+ echo "sed_inplace: error: refusing to edit symlink: $file" >&2
54
+ return 1
55
+ fi
56
+
57
+ # Platform-specific sed invocation
58
+ if [[ "$(uname)" == "Darwin" ]]; then
59
+ # macOS/BSD sed requires empty string after -i
60
+ sed -i '' "$pattern" "$file"
61
+ else
62
+ # Linux and Windows (Git Bash) use GNU sed
63
+ sed -i "$pattern" "$file"
64
+ fi
65
+ }
66
+
67
+ # =============================================================================
68
+ # Detect Platform
69
+ # =============================================================================
70
+ # Returns a normalized platform name
71
+ #
72
+ # Usage:
73
+ # platform=$(get_platform)
74
+ # if [[ "$platform" == "macos" ]]; then ...
75
+ #
76
+ # Returns:
77
+ # "windows" - Windows (detected via MINGW/MSYS/Cygwin environment)
78
+ # "macos" - macOS (Darwin)
79
+ # "linux" - Linux
80
+ # "unknown" - Unrecognized platform
81
+
82
+ get_platform() {
83
+ case "$(uname -s)" in
84
+ MINGW*|MSYS*|CYGWIN*)
85
+ echo "windows"
86
+ ;;
87
+ Darwin)
88
+ echo "macos"
89
+ ;;
90
+ Linux)
91
+ echo "linux"
92
+ ;;
93
+ *)
94
+ echo "unknown"
95
+ ;;
96
+ esac
97
+ }
98
+
99
+ # =============================================================================
100
+ # Check if running in Git Bash on Windows
101
+ # =============================================================================
102
+ # Useful for Windows-specific behavior that differs from Linux
103
+
104
+ is_git_bash() {
105
+ [[ "$(uname -s)" == MINGW* ]] || [[ "$(uname -s)" == MSYS* ]]
106
+ }
107
+
108
+ # =============================================================================
109
+ # Cross-Platform stat for File Size
110
+ # =============================================================================
111
+ # macOS uses `stat -f%z` while Linux uses `stat --format=%s`
112
+ #
113
+ # Usage:
114
+ # size=$(get_file_size file.txt)
115
+
116
+ get_file_size() {
117
+ local file="$1"
118
+
119
+ if [[ ! -f "$file" ]]; then
120
+ echo 0
121
+ return 1
122
+ fi
123
+
124
+ # Try macOS/BSD syntax first, fall back to GNU syntax
125
+ stat -f%z "$file" 2>/dev/null || stat --format=%s "$file" 2>/dev/null || echo 0
126
+ }