aico-cli 2.0.29 → 2.0.30

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 (206) hide show
  1. package/bin/cli/cli.js +2859 -2503
  2. package/bin/cli/package.json +1 -1
  3. package/bin/cli/sdk-tools.d.ts +6 -2
  4. package/dist/chunks/simple-config.mjs +527 -31
  5. package/dist/cli.mjs +125 -480
  6. package/dist/index.mjs +1 -0
  7. package/package.json +11 -3
  8. package/templates/agents/agent-capability-map.json +598 -0
  9. package/templates/agents/agent-selector.ts +991 -0
  10. package/templates/agents/auto-task-executor.ts +222 -0
  11. package/templates/agents/bonus/studio-coach.md +133 -0
  12. package/templates/agents/core/code-archaeologist.md +89 -0
  13. package/templates/agents/core/code-reviewer.md +88 -0
  14. package/templates/agents/core/documentation-specialist.md +100 -0
  15. package/templates/agents/core/performance-optimizer.md +67 -0
  16. package/templates/agents/databases/customer-support.md +34 -0
  17. package/templates/agents/databases/data-engineer.md +31 -0
  18. package/templates/agents/databases/data-scientist.md +28 -0
  19. package/templates/agents/databases/database-admin.md +31 -0
  20. package/templates/agents/databases/database-optimizer.md +31 -0
  21. package/templates/agents/deployment/debugger.md +29 -0
  22. package/templates/agents/deployment/deployment-engineer.md +31 -0
  23. package/templates/agents/deployment/devops-troubleshooter.md +31 -0
  24. package/templates/agents/deployment/dx-optimizer.md +62 -0
  25. package/templates/agents/deployment/error-detective.md +31 -0
  26. package/templates/agents/deployment/legacy-modernizer.md +31 -0
  27. package/templates/agents/deployment/network-engineer.md +31 -0
  28. package/templates/agents/deployment/payment-integration.md +31 -0
  29. package/templates/agents/deployment/performance-engineer.md +31 -0
  30. package/templates/agents/deployment/prompt-engineer.md +58 -0
  31. package/templates/agents/deployment/quant-analyst.md +31 -0
  32. package/templates/agents/deployment/refactor-agent.md +77 -0
  33. package/templates/agents/deployment/risk-manager.md +40 -0
  34. package/templates/agents/deployment/sales-automator.md +34 -0
  35. package/templates/agents/deployment/search-specialist.md +96 -0
  36. package/templates/agents/deployment/security-auditor.md +31 -0
  37. package/templates/agents/design/brand-guardian.md +278 -0
  38. package/templates/agents/design/frontend-analyst.md +42 -0
  39. package/templates/agents/design/ui-designer.md +157 -0
  40. package/templates/agents/design/ui-ux-master.md +568 -0
  41. package/templates/agents/design/ux-researcher.md +210 -0
  42. package/templates/agents/design/visual-storyteller.md +271 -0
  43. package/templates/agents/design/whimsy-injector.md +148 -0
  44. package/templates/agents/engineering/backend/ai-engineer.md +118 -0
  45. package/templates/agents/engineering/backend/backend-architect.md +95 -0
  46. package/templates/agents/engineering/backend/senior-backend-architect.md +554 -0
  47. package/templates/agents/engineering/frontend/frontend-developer.md +105 -0
  48. package/templates/agents/engineering/frontend/mobile-app-builder.md +108 -0
  49. package/templates/agents/engineering/frontend/rapid-prototyper.md +114 -0
  50. package/templates/agents/engineering/frontend/senior-frontend-architect.md +573 -0
  51. package/templates/agents/engineering/middlend/api-documenter.md +31 -0
  52. package/templates/agents/engineering/middlend/architect-review.md +41 -0
  53. package/templates/agents/engineering/middlend/cloud-architect.md +31 -0
  54. package/templates/agents/engineering/middlend/code-reviewer.md +28 -0
  55. package/templates/agents/engineering/middlend/devops-automator.md +118 -0
  56. package/templates/agents/marketing/app-store-optimizer.md +180 -0
  57. package/templates/agents/marketing/business-analyst.md +34 -0
  58. package/templates/agents/marketing/content-creator.md +209 -0
  59. package/templates/agents/marketing/growth-hacker.md +218 -0
  60. package/templates/agents/marketing/instagram-curator.md +154 -0
  61. package/templates/agents/marketing/reddit-community-builder.md +197 -0
  62. package/templates/agents/marketing/tiktok-strategist.md +151 -0
  63. package/templates/agents/marketing/twitter-engager.md +175 -0
  64. package/templates/agents/orchestrators/context-manager.md +63 -0
  65. package/templates/agents/orchestrators/project-analyst.md +66 -0
  66. package/templates/agents/orchestrators/team-configurator.md +52 -0
  67. package/templates/agents/orchestrators/tech-lead-orchestrator.md +103 -0
  68. package/templates/agents/product/feedback-synthesizer.md +174 -0
  69. package/templates/agents/product/sprint-prioritizer.md +128 -0
  70. package/templates/agents/product/trend-researcher.md +133 -0
  71. package/templates/agents/project-management/experiment-tracker.md +165 -0
  72. package/templates/agents/project-management/project-shipper.md +190 -0
  73. package/templates/agents/project-management/studio-producer.md +203 -0
  74. package/templates/agents/specialist/spec-analyst.md +228 -0
  75. package/templates/agents/specialist/spec-architect.md +375 -0
  76. package/templates/agents/specialist/spec-developer.md +544 -0
  77. package/templates/agents/specialist/spec-orchestrator.md +465 -0
  78. package/templates/agents/specialist/spec-planner.md +497 -0
  79. package/templates/agents/specialist/spec-reviewer.md +487 -0
  80. package/templates/agents/specialist/spec-task-reviewer.md +50 -0
  81. package/templates/agents/specialist/spec-tester.md +652 -0
  82. package/templates/agents/specialist/spec-validator.md +441 -0
  83. package/templates/agents/specialized/C++/cpp-pro.md +37 -0
  84. package/templates/agents/specialized/Golang/golang-pro.md +31 -0
  85. package/templates/agents/specialized/JavaScript/javascript-pro.md +34 -0
  86. package/templates/agents/specialized/Python/python-pro.md +31 -0
  87. package/templates/agents/specialized/databases/sql-pro.md +34 -0
  88. package/templates/agents/specialized/django/django-api-developer.md +804 -0
  89. package/templates/agents/specialized/django/django-backend-expert.md +875 -0
  90. package/templates/agents/specialized/django/django-orm-expert.md +828 -0
  91. package/templates/agents/specialized/laravel/laravel-backend-expert.md +174 -0
  92. package/templates/agents/specialized/laravel/laravel-eloquent-expert.md +75 -0
  93. package/templates/agents/specialized/rails/rails-activerecord-expert.md +690 -0
  94. package/templates/agents/specialized/rails/rails-api-developer.md +943 -0
  95. package/templates/agents/specialized/rails/rails-backend-expert.md +876 -0
  96. package/templates/agents/specialized/react/react-component-architect.md +41 -0
  97. package/templates/agents/specialized/react/react-nextjs-expert.md +141 -0
  98. package/templates/agents/specialized/vue/vue-component-architect.md +98 -0
  99. package/templates/agents/specialized/vue/vue-nuxt-expert.md +720 -0
  100. package/templates/agents/specialized/vue/vue-state-manager.md +33 -0
  101. package/templates/agents/studio-operations/analytics-reporter.md +204 -0
  102. package/templates/agents/studio-operations/finance-tracker.md +293 -0
  103. package/templates/agents/studio-operations/infrastructure-maintainer.md +219 -0
  104. package/templates/agents/studio-operations/legal-compliance-checker.md +259 -0
  105. package/templates/agents/studio-operations/support-responder.md +166 -0
  106. package/templates/agents/task-execution-agent.ts +160 -0
  107. package/templates/agents/testing/api-tester.md +214 -0
  108. package/templates/agents/testing/integration-test-fixer.md +52 -0
  109. package/templates/agents/testing/performance-benchmarker.md +277 -0
  110. package/templates/agents/testing/test-automator.md +31 -0
  111. package/templates/agents/testing/test-results-analyzer.md +273 -0
  112. package/templates/agents/testing/test-writer-fixer.md +129 -0
  113. package/templates/agents/testing/tool-evaluator.md +184 -0
  114. package/templates/agents/testing/workflow-optimizer.md +239 -0
  115. package/templates/agents/universal/api-architect.md +84 -0
  116. package/templates/agents/universal/backend-developer.md +95 -0
  117. package/templates/agents/universal/frontend-developer.md +66 -0
  118. package/templates/agents/universal/tailwind-css-expert.md +84 -0
  119. package/templates/cursor.md +20 -14
  120. package/templates/hooks/claude-code-hooks.json +22 -7
  121. package/templates/hooks/hook-wrapper.ts +173 -0
  122. package/templates/hooks/install-hooks.ts +201 -0
  123. package/templates/hooks/scripts/Notification/desktop-notifier.ts +268 -0
  124. package/templates/hooks/scripts/Notification/notification.ts +28 -0
  125. package/templates/hooks/scripts/PostToolUse/code-formatter.ts +182 -0
  126. package/templates/hooks/scripts/PostToolUse/post-tool-use.ts +27 -0
  127. package/templates/hooks/scripts/PreToolUse/command-logger.ts +107 -0
  128. package/templates/hooks/scripts/PreToolUse/file-protection.ts +109 -0
  129. package/templates/hooks/scripts/PreToolUse/pre-tool-use.ts +42 -0
  130. package/templates/hooks/scripts/Stop/session-summary.ts +150 -0
  131. package/templates/hooks/scripts/Stop/stop.ts +17 -0
  132. package/templates/hooks/scripts/UserPromptSubmit/input-notifier.ts +139 -0
  133. package/templates/hooks/scripts/UserPromptSubmit/user-prompt-submit.ts +16 -0
  134. package/templates/hooks/test-hook.ts +171 -0
  135. package/templates/hooks/tsconfig.json +27 -0
  136. package/templates/hooks/utils/execution-utils.ts +176 -0
  137. package/templates/hooks/utils/file-utils.ts +256 -0
  138. package/templates/hooks/utils/hook-utils.ts +86 -0
  139. package/templates/hooks/utils/index.ts +42 -0
  140. package/templates/personality.md +19 -14
  141. package/templates/settings.json +37 -2
  142. package/dist/chunks/run-command.mjs +0 -48
  143. package/templates/agents/base/frontend-designer.md +0 -193
  144. package/templates/hooks/scripts/Notification/bash/desktop-notifier.sh +0 -63
  145. package/templates/hooks/scripts/Notification/powershell/desktop-notifier.ps1 +0 -67
  146. package/templates/hooks/scripts/PostToolUse/bash/code-formatter.sh +0 -73
  147. package/templates/hooks/scripts/PostToolUse/powershell/code-formatter.ps1 +0 -90
  148. package/templates/hooks/scripts/PreToolUse/bash/command-logger.sh +0 -38
  149. package/templates/hooks/scripts/PreToolUse/bash/file-protection.sh +0 -55
  150. package/templates/hooks/scripts/PreToolUse/powershell/command-logger.ps1 +0 -34
  151. package/templates/hooks/scripts/PreToolUse/powershell/file-protection.ps1 +0 -46
  152. package/templates/hooks/scripts/Stop/bash/session-summary.sh +0 -83
  153. package/templates/hooks/scripts/Stop/powershell/session-summary.ps1 +0 -125
  154. package/templates/skills/slack-gif-creator/LICENSE.txt +0 -202
  155. package/templates/skills/slack-gif-creator/SKILL.md +0 -646
  156. package/templates/skills/slack-gif-creator/core/color_palettes.py +0 -302
  157. package/templates/skills/slack-gif-creator/core/easing.py +0 -230
  158. package/templates/skills/slack-gif-creator/core/frame_composer.py +0 -469
  159. package/templates/skills/slack-gif-creator/core/gif_builder.py +0 -246
  160. package/templates/skills/slack-gif-creator/core/typography.py +0 -357
  161. package/templates/skills/slack-gif-creator/core/validators.py +0 -264
  162. package/templates/skills/slack-gif-creator/core/visual_effects.py +0 -494
  163. package/templates/skills/slack-gif-creator/requirements.txt +0 -4
  164. package/templates/skills/slack-gif-creator/templates/bounce.py +0 -106
  165. package/templates/skills/slack-gif-creator/templates/explode.py +0 -331
  166. package/templates/skills/slack-gif-creator/templates/fade.py +0 -329
  167. package/templates/skills/slack-gif-creator/templates/flip.py +0 -291
  168. package/templates/skills/slack-gif-creator/templates/kaleidoscope.py +0 -211
  169. package/templates/skills/slack-gif-creator/templates/morph.py +0 -329
  170. package/templates/skills/slack-gif-creator/templates/move.py +0 -293
  171. package/templates/skills/slack-gif-creator/templates/pulse.py +0 -268
  172. package/templates/skills/slack-gif-creator/templates/shake.py +0 -127
  173. package/templates/skills/slack-gif-creator/templates/slide.py +0 -291
  174. package/templates/skills/slack-gif-creator/templates/spin.py +0 -269
  175. package/templates/skills/slack-gif-creator/templates/wiggle.py +0 -300
  176. package/templates/skills/slack-gif-creator/templates/zoom.py +0 -312
  177. package/templates/skills/swimlane-diagram/README.md +0 -373
  178. package/templates/skills/swimlane-diagram/SKILL.md +0 -242
  179. package/templates/skills/swimlane-diagram/examples.md +0 -405
  180. package/templates/skills/swimlane-diagram/generators.mjs +0 -258
  181. package/templates/skills/swimlane-diagram/package.json +0 -126
  182. package/templates/skills/swimlane-diagram/reference.md +0 -368
  183. package/templates/skills/swimlane-diagram/swimlane-diagram.mjs +0 -215
  184. package/templates/skills/swimlane-diagram/swimlane-diagram.test.mjs +0 -358
  185. package/templates/skills/swimlane-diagram/validators.mjs +0 -291
  186. package/templates/skills/theme-factory/LICENSE.txt +0 -202
  187. package/templates/skills/theme-factory/SKILL.md +0 -59
  188. package/templates/skills/theme-factory/theme-showcase.pdf +0 -0
  189. package/templates/skills/theme-factory/themes/arctic-frost.md +0 -19
  190. package/templates/skills/theme-factory/themes/botanical-garden.md +0 -19
  191. package/templates/skills/theme-factory/themes/desert-rose.md +0 -19
  192. package/templates/skills/theme-factory/themes/forest-canopy.md +0 -19
  193. package/templates/skills/theme-factory/themes/golden-hour.md +0 -19
  194. package/templates/skills/theme-factory/themes/midnight-galaxy.md +0 -19
  195. package/templates/skills/theme-factory/themes/modern-minimalist.md +0 -19
  196. package/templates/skills/theme-factory/themes/ocean-depths.md +0 -19
  197. package/templates/skills/theme-factory/themes/sunset-boulevard.md +0 -19
  198. package/templates/skills/theme-factory/themes/tech-innovation.md +0 -19
  199. /package/templates/agents/{code//346/240/271/346/234/254/345/216/237/345/233/240/345/210/206/346/236/220/345/270/210.md" → core/root-cause-analyst.md} +0 -0
  200. /package/templates/agents/{code//346/212/200/346/234/257/346/226/207/346/241/243/345/267/245/347/250/213/345/270/210.md" → core/technical-writer.md} +0 -0
  201. /package/templates/agents/{code//346/200/247/350/203/275/345/210/206/346/236/220/344/270/223/345/256/266.md" → deployment/performance-analyst.md} +0 -0
  202. /package/templates/agents/{code//345/256/211/345/205/250/346/274/217/346/264/236/350/257/206/345/210/253/344/270/223/345/256/266.md" → deployment/security-engineer.md} +0 -0
  203. /package/templates/agents/{code//347/263/273/347/273/237/346/236/266/346/236/204/345/270/210.md" → engineering/middlend/architect.md} +0 -0
  204. /package/templates/agents/{code/python/345/274/200/345/217/221/344/270/223/345/256/266.md" → specialized/Python/python-expert.md} +0 -0
  205. /package/templates/agents/{code//350/264/250/351/207/217/350/257/204/344/274/260/345/267/245/347/250/213/345/270/210.md" → testing/quality-engineer.md} +0 -0
  206. /package/templates/agents/{base → universal}/panel-experts.md +0 -0
@@ -1,46 +0,0 @@
1
- # PreToolUse Hook - 文件保护
2
- # 阻止对敏感文件的修改操作
3
-
4
- # 加载跨平台工具模块
5
- . "$PSScriptRoot\..\..\..\utils\crossplatform-detector.ps1"
6
-
7
- # 读取JSON输入
8
- $inputJson = $input | ConvertFrom-SafeJson
9
-
10
- if ($inputJson -and $inputJson.tool_input.file_path) {
11
- $filePath = $inputJson.tool_input.file_path
12
-
13
- # 敏感文件/目录模式列表
14
- $sensitivePatterns = @(
15
- "\.env$",
16
- "package-lock\.json$",
17
- "yarn\.lock$",
18
- "\.git\\",
19
- "node_modules\\",
20
- "\.ssh\\",
21
- "\.aws\\",
22
- "\.config\\",
23
- "\.local\\"
24
- )
25
-
26
- # 检查文件路径是否敏感
27
- foreach ($pattern in $sensitivePatterns) {
28
- if ($filePath -match $pattern) {
29
- # 记录安全警告
30
- Write-HookLog "WARN" "阻止对敏感文件的修改: $filePath"
31
-
32
- # 输出错误信息给Claude
33
- Write-Error "错误:安全策略阻止对敏感文件的修改: $filePath"
34
- Write-Error "请检查文件路径是否包含敏感信息。"
35
-
36
- # exit 2表示阻止操作
37
- exit 2
38
- }
39
- }
40
-
41
- # 记录安全检查通过
42
- Write-HookLog "INFO" "文件安全检查通过: $filePath"
43
- }
44
-
45
- # 允许执行
46
- exit 0
@@ -1,83 +0,0 @@
1
- #!/bin/bash
2
- # Stop Hook - 会话摘要
3
- # 当Claude Code停止响应时记录会话摘要
4
-
5
- # 加载跨平台工具
6
- source "$(dirname "${BASH_SOURCE[0]}")/../../../utils/crossplatform-detector.sh"
7
-
8
- # 获取当前时间信息
9
- timestamp=$(date '+%Y-%m-%d %H:%M:%S')
10
- end_time=$(date '+%Y-%m-%d %H:%M:%S')
11
- session_file="$(get_hooks_dir)/session-summary.txt"
12
-
13
- # 确保日志目录存在
14
- mkdir -p "$(dirname "$session_file")"
15
-
16
- # 创建会话摘要
17
- create_session_summary() {
18
- echo "=== Claude Code 会话摘要 ===" >> "$session_file"
19
- echo "结束时间: $end_time" >> "$session_file"
20
- echo "工作目录: $(get_project_dir)" >> "$session_file"
21
- echo "操作系统: $(detect_os)" >> "$session_file"
22
- echo "" >> "$session_file"
23
-
24
- # 统计最近的命令执行情况
25
- local command_log="$(get_hooks_dir)/bash-command-log.txt"
26
- if [ -f "$command_log" ]; then
27
- local today_commands=$(grep "$(date '+%Y-%m-%d')" "$command_log" | wc -l)
28
- echo "今日执行命令数: $today_commands" >> "$session_file"
29
-
30
- # 显示最近的几个命令
31
- echo "最近执行的命令:" >> "$session_file"
32
- tail -5 "$command_log" >> "$session_file"
33
- else
34
- echo "今日执行命令数: 0" >> "$session_file"
35
- fi
36
-
37
- echo "" >> "$session_file"
38
- echo "---" >> "$session_file"
39
- echo "" >> "$session_file"
40
-
41
- # 记录到主日志
42
- log_message "INFO" "Claude Code会话结束,已生成摘要"
43
- }
44
-
45
- # 创建会话摘要
46
- create_session_summary
47
-
48
- # 发送完成通知(可选)
49
- send_completion_notification() {
50
- local os_type=$(detect_os)
51
- local message="Claude Code 会话已结束"
52
- local title="Claude Code"
53
-
54
- case "$os_type" in
55
- "macos")
56
- if command_exists osascript; then
57
- osascript -e "display notification \"$message\" with title \"$title\""
58
- fi
59
- if command_exists afplay; then
60
- afplay /System/Library/Sounds/Glass.aiff 2>/dev/null &
61
- fi
62
- ;;
63
- "linux")
64
- if command_exists notify-send; then
65
- notify-send "$title" "$message"
66
- fi
67
- if command_exists paplay; then
68
- paplay /usr/share/sounds/freedesktop/stereo/complete.oga 2>/dev/null &
69
- fi
70
- ;;
71
- "windows")
72
- if command_exists powershell.exe; then
73
- powershell.exe -Command "Add-Type -AssemblyName System.Windows.Forms; [System.Windows.Forms.MessageBox]::Show('$message', '$title', [System.Windows.Forms.MessageBoxButtons]::OK, [System.Windows.Forms.MessageBoxIcon]::Information)" > /dev/null 2>&1 &
74
- fi
75
- ;;
76
- esac
77
- }
78
-
79
- # 发送完成通知
80
- send_completion_notification
81
-
82
- # 继续执行
83
- exit 0
@@ -1,125 +0,0 @@
1
- # Stop Hook - Session Summary
2
- # Record session summary when Claude Code stops
3
-
4
- # Set error handling preference
5
- $ErrorActionPreference = "Continue"
6
-
7
- # Simple OS detection
8
- function Get-OperatingSystem {
9
- if ($env:OS -eq "Windows_NT") {
10
- return "windows"
11
- } elseif ($IsLinux) {
12
- return "linux"
13
- } elseif ($IsMacOS) {
14
- return "macos"
15
- } else {
16
- return "unknown"
17
- }
18
- }
19
-
20
- # Simple log function
21
- function Write-HookLog {
22
- param(
23
- [string]$Level,
24
- [string]$Message
25
- )
26
- $timestamp = Get-Date -Format "yyyy-MM-dd HH:mm:ss"
27
- Write-Host "[$timestamp] [$Level] $Message"
28
- }
29
-
30
- # Send stop notification function
31
- function Send-StopNotification {
32
- $osType = Get-OperatingSystem
33
- $message = "Claude Code session ended"
34
- $title = "Claude Code"
35
-
36
- Write-HookLog "INFO" "Detected OS: $osType"
37
-
38
- try {
39
- # Simplified notification logic
40
- switch ($osType) {
41
- "windows" {
42
- # Windows simplified notification
43
- Write-Host "=== $title ===" -ForegroundColor Green
44
- Write-Host $message -ForegroundColor White
45
-
46
- # Play simple system sound
47
- try {
48
- [System.Media.SystemSounds]::Asterisk.Play()
49
- Write-HookLog "INFO" "Played system sound successfully"
50
- } catch {
51
- Write-HookLog "WARN" "Failed to play system sound: $($_.Exception.Message)"
52
- }
53
- }
54
- default {
55
- Write-HookLog "INFO" "Using console output for notification"
56
- Write-Host "=== $title ===" -ForegroundColor Green
57
- Write-Host $message -ForegroundColor White
58
- }
59
- }
60
- } catch {
61
- Write-HookLog "ERROR" "Error during notification: $($_.Exception.Message)"
62
- Write-Host "[$Title] $message" -ForegroundColor Cyan
63
- }
64
-
65
- Write-HookLog "INFO" "Stop notification sent"
66
- }
67
-
68
- # Simple session summary function
69
- function Write-SimpleSessionSummary {
70
- try {
71
- $timestamp = Get-Date -Format "yyyy-MM-dd HH:mm:ss"
72
- $summary = @"
73
- === Claude Code Session Summary ===
74
- End Time: $timestamp
75
- Working Directory: $(Get-Location)
76
- OS: $(Get-OperatingSystem)
77
-
78
- Session Summary: Claude Code session ended normally
79
-
80
- ---
81
-
82
- "@
83
-
84
- # Write to file
85
- try {
86
- $userProfile = [System.Environment]::GetFolderPath([System.Environment+SpecialFolder]::UserProfile)
87
- $sessionFile = "$userProfile\.claude\hooks\session-summary.txt"
88
- Write-HookLog "INFO" "Session file path: $sessionFile"
89
- } catch {
90
- Write-HookLog "ERROR" "Failed to get user profile path: $($_.Exception.Message)"
91
- # Fallback to a simpler path
92
- $sessionFile = ".\session-summary.txt"
93
- Write-HookLog "WARN" "Using fallback path: $sessionFile"
94
- }
95
-
96
- try {
97
- Add-Content -Path $sessionFile -Value $summary
98
- Write-HookLog "INFO" "Session summary written to file"
99
- } catch {
100
- Write-HookLog "WARN" "Failed to write session summary: $($_.Exception.Message)"
101
- }
102
- } catch {
103
- Write-HookLog "ERROR" "Error creating session summary: $($_.Exception.Message)"
104
- }
105
- }
106
-
107
- # Main execution
108
- try {
109
- Write-HookLog "INFO" "Starting Stop hook"
110
-
111
- # Create session summary
112
- Write-SimpleSessionSummary
113
-
114
- # Send completion notification
115
- Send-StopNotification
116
-
117
- Write-HookLog "INFO" "Stop hook completed successfully"
118
- exit 0
119
- } catch {
120
- Write-HookLog "ERROR" "Stop hook failed: $($_.Exception.Message)"
121
- Write-HookLog "ERROR" "Exception type: $($_.Exception.GetType().FullName)"
122
- Write-HookLog "ERROR" "Stack trace: $($_.Exception.StackTrace)"
123
- # Even if there's an error, exit with success code to avoid disrupting the main process
124
- exit 0
125
- }
@@ -1,202 +0,0 @@
1
-
2
- Apache License
3
- Version 2.0, January 2004
4
- http://www.apache.org/licenses/
5
-
6
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
-
8
- 1. Definitions.
9
-
10
- "License" shall mean the terms and conditions for use, reproduction,
11
- and distribution as defined by Sections 1 through 9 of this document.
12
-
13
- "Licensor" shall mean the copyright owner or entity authorized by
14
- the copyright owner that is granting the License.
15
-
16
- "Legal Entity" shall mean the union of the acting entity and all
17
- other entities that control, are controlled by, or are under common
18
- control with that entity. For the purposes of this definition,
19
- "control" means (i) the power, direct or indirect, to cause the
20
- direction or management of such entity, whether by contract or
21
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
- outstanding shares, or (iii) beneficial ownership of such entity.
23
-
24
- "You" (or "Your") shall mean an individual or Legal Entity
25
- exercising permissions granted by this License.
26
-
27
- "Source" form shall mean the preferred form for making modifications,
28
- including but not limited to software source code, documentation
29
- source, and configuration files.
30
-
31
- "Object" form shall mean any form resulting from mechanical
32
- transformation or translation of a Source form, including but
33
- not limited to compiled object code, generated documentation,
34
- and conversions to other media types.
35
-
36
- "Work" shall mean the work of authorship, whether in Source or
37
- Object form, made available under the License, as indicated by a
38
- copyright notice that is included in or attached to the work
39
- (an example is provided in the Appendix below).
40
-
41
- "Derivative Works" shall mean any work, whether in Source or Object
42
- form, that is based on (or derived from) the Work and for which the
43
- editorial revisions, annotations, elaborations, or other modifications
44
- represent, as a whole, an original work of authorship. For the purposes
45
- of this License, Derivative Works shall not include works that remain
46
- separable from, or merely link (or bind by name) to the interfaces of,
47
- the Work and Derivative Works thereof.
48
-
49
- "Contribution" shall mean any work of authorship, including
50
- the original version of the Work and any modifications or additions
51
- to that Work or Derivative Works thereof, that is intentionally
52
- submitted to Licensor for inclusion in the Work by the copyright owner
53
- or by an individual or Legal Entity authorized to submit on behalf of
54
- the copyright owner. For the purposes of this definition, "submitted"
55
- means any form of electronic, verbal, or written communication sent
56
- to the Licensor or its representatives, including but not limited to
57
- communication on electronic mailing lists, source code control systems,
58
- and issue tracking systems that are managed by, or on behalf of, the
59
- Licensor for the purpose of discussing and improving the Work, but
60
- excluding communication that is conspicuously marked or otherwise
61
- designated in writing by the copyright owner as "Not a Contribution."
62
-
63
- "Contributor" shall mean Licensor and any individual or Legal Entity
64
- on behalf of whom a Contribution has been received by Licensor and
65
- subsequently incorporated within the Work.
66
-
67
- 2. Grant of Copyright License. Subject to the terms and conditions of
68
- this License, each Contributor hereby grants to You a perpetual,
69
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
- copyright license to reproduce, prepare Derivative Works of,
71
- publicly display, publicly perform, sublicense, and distribute the
72
- Work and such Derivative Works in Source or Object form.
73
-
74
- 3. Grant of Patent License. Subject to the terms and conditions of
75
- this License, each Contributor hereby grants to You a perpetual,
76
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
- (except as stated in this section) patent license to make, have made,
78
- use, offer to sell, sell, import, and otherwise transfer the Work,
79
- where such license applies only to those patent claims licensable
80
- by such Contributor that are necessarily infringed by their
81
- Contribution(s) alone or by combination of their Contribution(s)
82
- with the Work to which such Contribution(s) was submitted. If You
83
- institute patent litigation against any entity (including a
84
- cross-claim or counterclaim in a lawsuit) alleging that the Work
85
- or a Contribution incorporated within the Work constitutes direct
86
- or contributory patent infringement, then any patent licenses
87
- granted to You under this License for that Work shall terminate
88
- as of the date such litigation is filed.
89
-
90
- 4. Redistribution. You may reproduce and distribute copies of the
91
- Work or Derivative Works thereof in any medium, with or without
92
- modifications, and in Source or Object form, provided that You
93
- meet the following conditions:
94
-
95
- (a) You must give any other recipients of the Work or
96
- Derivative Works a copy of this License; and
97
-
98
- (b) You must cause any modified files to carry prominent notices
99
- stating that You changed the files; and
100
-
101
- (c) You must retain, in the Source form of any Derivative Works
102
- that You distribute, all copyright, patent, trademark, and
103
- attribution notices from the Source form of the Work,
104
- excluding those notices that do not pertain to any part of
105
- the Derivative Works; and
106
-
107
- (d) If the Work includes a "NOTICE" text file as part of its
108
- distribution, then any Derivative Works that You distribute must
109
- include a readable copy of the attribution notices contained
110
- within such NOTICE file, excluding those notices that do not
111
- pertain to any part of the Derivative Works, in at least one
112
- of the following places: within a NOTICE text file distributed
113
- as part of the Derivative Works; within the Source form or
114
- documentation, if provided along with the Derivative Works; or,
115
- within a display generated by the Derivative Works, if and
116
- wherever such third-party notices normally appear. The contents
117
- of the NOTICE file are for informational purposes only and
118
- do not modify the License. You may add Your own attribution
119
- notices within Derivative Works that You distribute, alongside
120
- or as an addendum to the NOTICE text from the Work, provided
121
- that such additional attribution notices cannot be construed
122
- as modifying the License.
123
-
124
- You may add Your own copyright statement to Your modifications and
125
- may provide additional or different license terms and conditions
126
- for use, reproduction, or distribution of Your modifications, or
127
- for any such Derivative Works as a whole, provided Your use,
128
- reproduction, and distribution of the Work otherwise complies with
129
- the conditions stated in this License.
130
-
131
- 5. Submission of Contributions. Unless You explicitly state otherwise,
132
- any Contribution intentionally submitted for inclusion in the Work
133
- by You to the Licensor shall be under the terms and conditions of
134
- this License, without any additional terms or conditions.
135
- Notwithstanding the above, nothing herein shall supersede or modify
136
- the terms of any separate license agreement you may have executed
137
- with Licensor regarding such Contributions.
138
-
139
- 6. Trademarks. This License does not grant permission to use the trade
140
- names, trademarks, service marks, or product names of the Licensor,
141
- except as required for reasonable and customary use in describing the
142
- origin of the Work and reproducing the content of the NOTICE file.
143
-
144
- 7. Disclaimer of Warranty. Unless required by applicable law or
145
- agreed to in writing, Licensor provides the Work (and each
146
- Contributor provides its Contributions) on an "AS IS" BASIS,
147
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
- implied, including, without limitation, any warranties or conditions
149
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
- PARTICULAR PURPOSE. You are solely responsible for determining the
151
- appropriateness of using or redistributing the Work and assume any
152
- risks associated with Your exercise of permissions under this License.
153
-
154
- 8. Limitation of Liability. In no event and under no legal theory,
155
- whether in tort (including negligence), contract, or otherwise,
156
- unless required by applicable law (such as deliberate and grossly
157
- negligent acts) or agreed to in writing, shall any Contributor be
158
- liable to You for damages, including any direct, indirect, special,
159
- incidental, or consequential damages of any character arising as a
160
- result of this License or out of the use or inability to use the
161
- Work (including but not limited to damages for loss of goodwill,
162
- work stoppage, computer failure or malfunction, or any and all
163
- other commercial damages or losses), even if such Contributor
164
- has been advised of the possibility of such damages.
165
-
166
- 9. Accepting Warranty or Additional Liability. While redistributing
167
- the Work or Derivative Works thereof, You may choose to offer,
168
- and charge a fee for, acceptance of support, warranty, indemnity,
169
- or other liability obligations and/or rights consistent with this
170
- License. However, in accepting such obligations, You may act only
171
- on Your own behalf and on Your sole responsibility, not on behalf
172
- of any other Contributor, and only if You agree to indemnify,
173
- defend, and hold each Contributor harmless for any liability
174
- incurred by, or claims asserted against, such Contributor by reason
175
- of your accepting any such warranty or additional liability.
176
-
177
- END OF TERMS AND CONDITIONS
178
-
179
- APPENDIX: How to apply the Apache License to your work.
180
-
181
- To apply the Apache License to your work, attach the following
182
- boilerplate notice, with the fields enclosed by brackets "[]"
183
- replaced with your own identifying information. (Don't include
184
- the brackets!) The text should be enclosed in the appropriate
185
- comment syntax for the file format. We also recommend that a
186
- file or class name and description of purpose be included on the
187
- same "printed page" as the copyright notice for easier
188
- identification within third-party archives.
189
-
190
- Copyright [yyyy] [name of copyright owner]
191
-
192
- Licensed under the Apache License, Version 2.0 (the "License");
193
- you may not use this file except in compliance with the License.
194
- You may obtain a copy of the License at
195
-
196
- http://www.apache.org/licenses/LICENSE-2.0
197
-
198
- Unless required by applicable law or agreed to in writing, software
199
- distributed under the License is distributed on an "AS IS" BASIS,
200
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
- See the License for the specific language governing permissions and
202
- limitations under the License.