@tonycasey/lisa 1.2.0 → 2.0.0
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/README.md +22 -15
- package/dist/hooks/session-start.js +43114 -0
- package/dist/hooks/session-stop.js +42699 -0
- package/dist/hooks/user-prompt-submit.js +42757 -0
- package/dist/lib/application/handlers/PromptSubmitHandler.d.ts +27 -0
- package/dist/lib/application/handlers/PromptSubmitHandler.d.ts.map +1 -0
- package/dist/lib/application/handlers/PromptSubmitHandler.js +53 -0
- package/dist/lib/application/handlers/PromptSubmitHandler.js.map +1 -0
- package/dist/lib/application/handlers/SessionStartHandler.d.ts +50 -0
- package/dist/lib/application/handlers/SessionStartHandler.d.ts.map +1 -0
- package/dist/lib/application/handlers/SessionStartHandler.js +448 -0
- package/dist/lib/application/handlers/SessionStartHandler.js.map +1 -0
- package/dist/lib/application/handlers/SessionStopHandler.d.ts +15 -0
- package/dist/lib/application/handlers/SessionStopHandler.d.ts.map +1 -0
- package/dist/lib/application/handlers/SessionStopHandler.js +35 -0
- package/dist/lib/application/handlers/SessionStopHandler.js.map +1 -0
- package/dist/lib/application/handlers/index.d.ts +8 -0
- package/dist/lib/application/handlers/index.d.ts.map +1 -0
- package/dist/lib/application/handlers/index.js +14 -0
- package/dist/lib/application/handlers/index.js.map +1 -0
- package/dist/lib/application/index.d.ts +13 -0
- package/dist/lib/application/index.d.ts.map +1 -0
- package/dist/lib/application/index.js +31 -0
- package/dist/lib/application/index.js.map +1 -0
- package/dist/lib/application/interfaces/ISessionStartResult.d.ts +22 -0
- package/dist/lib/application/interfaces/ISessionStartResult.d.ts.map +1 -0
- package/dist/lib/application/interfaces/ISessionStartResult.js +3 -0
- package/dist/lib/application/interfaces/ISessionStartResult.js.map +1 -0
- package/dist/lib/application/interfaces/index.d.ts +5 -0
- package/dist/lib/application/interfaces/index.d.ts.map +1 -0
- package/dist/lib/application/interfaces/index.js +6 -0
- package/dist/lib/application/interfaces/index.js.map +1 -0
- package/dist/lib/cli.d.ts +34 -0
- package/dist/lib/cli.d.ts.map +1 -0
- package/dist/lib/cli.js +664 -0
- package/dist/lib/cli.js.map +1 -0
- package/dist/lib/domain/errors/LisaError.d.ts +41 -0
- package/dist/lib/domain/errors/LisaError.d.ts.map +1 -0
- package/dist/lib/domain/errors/LisaError.js +69 -0
- package/dist/lib/domain/errors/LisaError.js.map +1 -0
- package/dist/lib/domain/errors/index.d.ts +5 -0
- package/dist/lib/domain/errors/index.d.ts.map +1 -0
- package/dist/lib/domain/errors/index.js +14 -0
- package/dist/lib/domain/errors/index.js.map +1 -0
- package/dist/lib/domain/index.d.ts +14 -0
- package/dist/lib/domain/index.d.ts.map +1 -0
- package/dist/lib/domain/index.js +33 -0
- package/dist/lib/domain/index.js.map +1 -0
- package/dist/lib/domain/interfaces/IEventEmitter.d.ts +32 -0
- package/dist/lib/domain/interfaces/IEventEmitter.d.ts.map +1 -0
- package/dist/lib/domain/interfaces/IEventEmitter.js +3 -0
- package/dist/lib/domain/interfaces/IEventEmitter.js.map +1 -0
- package/dist/lib/domain/interfaces/ILisaContext.d.ts +25 -0
- package/dist/lib/domain/interfaces/ILisaContext.d.ts.map +1 -0
- package/dist/lib/domain/interfaces/ILisaContext.js +3 -0
- package/dist/lib/domain/interfaces/ILisaContext.js.map +1 -0
- package/dist/lib/domain/interfaces/ILisaServices.d.ts +34 -0
- package/dist/lib/domain/interfaces/ILisaServices.d.ts.map +1 -0
- package/dist/lib/domain/interfaces/ILisaServices.js +3 -0
- package/dist/lib/domain/interfaces/ILisaServices.js.map +1 -0
- package/dist/lib/domain/interfaces/ILogger.d.ts +94 -0
- package/dist/lib/domain/interfaces/ILogger.d.ts.map +1 -0
- package/dist/lib/domain/interfaces/ILogger.js +3 -0
- package/dist/lib/domain/interfaces/ILogger.js.map +1 -0
- package/dist/lib/domain/interfaces/IMcpClient.d.ts +31 -0
- package/dist/lib/domain/interfaces/IMcpClient.d.ts.map +1 -0
- package/dist/lib/domain/interfaces/IMcpClient.js +3 -0
- package/dist/lib/domain/interfaces/IMcpClient.js.map +1 -0
- package/dist/lib/domain/interfaces/IMemoryService.d.ts +56 -0
- package/dist/lib/domain/interfaces/IMemoryService.d.ts.map +1 -0
- package/dist/lib/domain/interfaces/IMemoryService.js +3 -0
- package/dist/lib/domain/interfaces/IMemoryService.js.map +1 -0
- package/dist/lib/domain/interfaces/IRecursionService.d.ts +52 -0
- package/dist/lib/domain/interfaces/IRecursionService.d.ts.map +1 -0
- package/dist/lib/domain/interfaces/IRecursionService.js +3 -0
- package/dist/lib/domain/interfaces/IRecursionService.js.map +1 -0
- package/dist/lib/domain/interfaces/ISessionCaptureService.d.ts +16 -0
- package/dist/lib/domain/interfaces/ISessionCaptureService.d.ts.map +1 -0
- package/dist/lib/domain/interfaces/ISessionCaptureService.js +3 -0
- package/dist/lib/domain/interfaces/ISessionCaptureService.js.map +1 -0
- package/dist/lib/domain/interfaces/ITaskService.d.ts +52 -0
- package/dist/lib/domain/interfaces/ITaskService.d.ts.map +1 -0
- package/dist/lib/domain/interfaces/ITaskService.js +3 -0
- package/dist/lib/domain/interfaces/ITaskService.js.map +1 -0
- package/dist/lib/domain/interfaces/dal/IConnectionManager.d.ts +110 -0
- package/dist/lib/domain/interfaces/dal/IConnectionManager.d.ts.map +1 -0
- package/dist/lib/domain/interfaces/dal/IConnectionManager.js +8 -0
- package/dist/lib/domain/interfaces/dal/IConnectionManager.js.map +1 -0
- package/dist/lib/domain/interfaces/dal/IMemoryRepository.d.ts +93 -0
- package/dist/lib/domain/interfaces/dal/IMemoryRepository.d.ts.map +1 -0
- package/dist/lib/domain/interfaces/dal/IMemoryRepository.js +9 -0
- package/dist/lib/domain/interfaces/dal/IMemoryRepository.js.map +1 -0
- package/dist/lib/domain/interfaces/dal/IRepositoryRouter.d.ts +88 -0
- package/dist/lib/domain/interfaces/dal/IRepositoryRouter.d.ts.map +1 -0
- package/dist/lib/domain/interfaces/dal/IRepositoryRouter.js +23 -0
- package/dist/lib/domain/interfaces/dal/IRepositoryRouter.js.map +1 -0
- package/dist/lib/domain/interfaces/dal/ITaskRepository.d.ts +87 -0
- package/dist/lib/domain/interfaces/dal/ITaskRepository.d.ts.map +1 -0
- package/dist/lib/domain/interfaces/dal/ITaskRepository.js +9 -0
- package/dist/lib/domain/interfaces/dal/ITaskRepository.js.map +1 -0
- package/dist/lib/domain/interfaces/dal/index.d.ts +14 -0
- package/dist/lib/domain/interfaces/dal/index.d.ts.map +1 -0
- package/dist/lib/domain/interfaces/dal/index.js +15 -0
- package/dist/lib/domain/interfaces/dal/index.js.map +1 -0
- package/dist/lib/domain/interfaces/dal/types.d.ts +81 -0
- package/dist/lib/domain/interfaces/dal/types.d.ts.map +1 -0
- package/dist/lib/domain/interfaces/dal/types.js +28 -0
- package/dist/lib/domain/interfaces/dal/types.js.map +1 -0
- package/dist/lib/domain/interfaces/events/IMemoryEvent.d.ts +27 -0
- package/dist/lib/domain/interfaces/events/IMemoryEvent.d.ts.map +1 -0
- package/dist/lib/domain/interfaces/events/IMemoryEvent.js +26 -0
- package/dist/lib/domain/interfaces/events/IMemoryEvent.js.map +1 -0
- package/dist/lib/domain/interfaces/events/IPromptSubmitEvent.d.ts +20 -0
- package/dist/lib/domain/interfaces/events/IPromptSubmitEvent.d.ts.map +1 -0
- package/dist/lib/domain/interfaces/events/IPromptSubmitEvent.js +16 -0
- package/dist/lib/domain/interfaces/events/IPromptSubmitEvent.js.map +1 -0
- package/dist/lib/domain/interfaces/events/ISessionStartEvent.d.ts +19 -0
- package/dist/lib/domain/interfaces/events/ISessionStartEvent.d.ts.map +1 -0
- package/dist/lib/domain/interfaces/events/ISessionStartEvent.js +15 -0
- package/dist/lib/domain/interfaces/events/ISessionStartEvent.js.map +1 -0
- package/dist/lib/domain/interfaces/events/ISessionStopEvent.d.ts +22 -0
- package/dist/lib/domain/interfaces/events/ISessionStopEvent.d.ts.map +1 -0
- package/dist/lib/domain/interfaces/events/ISessionStopEvent.js +15 -0
- package/dist/lib/domain/interfaces/events/ISessionStopEvent.js.map +1 -0
- package/dist/lib/domain/interfaces/events/LisaEvent.d.ts +13 -0
- package/dist/lib/domain/interfaces/events/LisaEvent.d.ts.map +1 -0
- package/dist/lib/domain/interfaces/events/LisaEvent.js +3 -0
- package/dist/lib/domain/interfaces/events/LisaEvent.js.map +1 -0
- package/dist/lib/domain/interfaces/events/index.d.ts +9 -0
- package/dist/lib/domain/interfaces/events/index.d.ts.map +1 -0
- package/dist/lib/domain/interfaces/events/index.js +16 -0
- package/dist/lib/domain/interfaces/events/index.js.map +1 -0
- package/dist/lib/domain/interfaces/index.d.ts +16 -0
- package/dist/lib/domain/interfaces/index.d.ts.map +1 -0
- package/dist/lib/domain/interfaces/index.js +25 -0
- package/dist/lib/domain/interfaces/index.js.map +1 -0
- package/dist/lib/domain/interfaces/types/ICapturedWork.d.ts +14 -0
- package/dist/lib/domain/interfaces/types/ICapturedWork.d.ts.map +1 -0
- package/dist/lib/domain/interfaces/types/ICapturedWork.js +14 -0
- package/dist/lib/domain/interfaces/types/ICapturedWork.js.map +1 -0
- package/dist/lib/domain/interfaces/types/IMemoryResult.d.ts +39 -0
- package/dist/lib/domain/interfaces/types/IMemoryResult.d.ts.map +1 -0
- package/dist/lib/domain/interfaces/types/IMemoryResult.js +29 -0
- package/dist/lib/domain/interfaces/types/IMemoryResult.js.map +1 -0
- package/dist/lib/domain/interfaces/types/ITask.d.ts +46 -0
- package/dist/lib/domain/interfaces/types/ITask.d.ts.map +1 -0
- package/dist/lib/domain/interfaces/types/ITask.js +17 -0
- package/dist/lib/domain/interfaces/types/ITask.js.map +1 -0
- package/dist/lib/domain/interfaces/types/index.d.ts +7 -0
- package/dist/lib/domain/interfaces/types/index.d.ts.map +1 -0
- package/dist/lib/domain/interfaces/types/index.js +14 -0
- package/dist/lib/domain/interfaces/types/index.js.map +1 -0
- package/dist/lib/domain/types/ISOTimestamp.d.ts +19 -0
- package/dist/lib/domain/types/ISOTimestamp.d.ts.map +1 -0
- package/dist/lib/domain/types/ISOTimestamp.js +18 -0
- package/dist/lib/domain/types/ISOTimestamp.js.map +1 -0
- package/dist/lib/domain/types/index.d.ts +7 -0
- package/dist/lib/domain/types/index.d.ts.map +1 -0
- package/dist/lib/domain/types/index.js +12 -0
- package/dist/lib/domain/types/index.js.map +1 -0
- package/dist/lib/infrastructure/adapters/claude/index.d.ts +8 -0
- package/dist/lib/infrastructure/adapters/claude/index.d.ts.map +1 -0
- package/dist/lib/infrastructure/adapters/claude/index.js +18 -0
- package/dist/lib/infrastructure/adapters/claude/index.js.map +1 -0
- package/dist/lib/infrastructure/adapters/claude/session-start.d.ts +9 -0
- package/dist/lib/infrastructure/adapters/claude/session-start.d.ts.map +1 -0
- package/dist/lib/infrastructure/adapters/claude/session-start.js +54 -0
- package/dist/lib/infrastructure/adapters/claude/session-start.js.map +1 -0
- package/dist/lib/infrastructure/adapters/claude/session-stop.d.ts +13 -0
- package/dist/lib/infrastructure/adapters/claude/session-stop.d.ts.map +1 -0
- package/dist/lib/infrastructure/adapters/claude/session-stop.js +43 -0
- package/dist/lib/infrastructure/adapters/claude/session-stop.js.map +1 -0
- package/dist/lib/infrastructure/adapters/claude/stdin.d.ts +13 -0
- package/dist/lib/infrastructure/adapters/claude/stdin.d.ts.map +1 -0
- package/dist/lib/infrastructure/adapters/claude/stdin.js +36 -0
- package/dist/lib/infrastructure/adapters/claude/stdin.js.map +1 -0
- package/dist/lib/infrastructure/adapters/claude/user-prompt-submit.d.ts +13 -0
- package/dist/lib/infrastructure/adapters/claude/user-prompt-submit.d.ts.map +1 -0
- package/dist/lib/infrastructure/adapters/claude/user-prompt-submit.js +58 -0
- package/dist/lib/infrastructure/adapters/claude/user-prompt-submit.js.map +1 -0
- package/dist/lib/infrastructure/adapters/opencode/index.d.ts +7 -0
- package/dist/lib/infrastructure/adapters/opencode/index.d.ts.map +1 -0
- package/dist/lib/infrastructure/adapters/opencode/index.js +18 -0
- package/dist/lib/infrastructure/adapters/opencode/index.js.map +1 -0
- package/dist/lib/infrastructure/adapters/opencode/opencode-events.d.ts +73 -0
- package/dist/lib/infrastructure/adapters/opencode/opencode-events.d.ts.map +1 -0
- package/dist/lib/infrastructure/adapters/opencode/opencode-events.js +131 -0
- package/dist/lib/infrastructure/adapters/opencode/opencode-events.js.map +1 -0
- package/dist/lib/infrastructure/adapters/opencode/plugin.d.ts +60 -0
- package/dist/lib/infrastructure/adapters/opencode/plugin.d.ts.map +1 -0
- package/dist/lib/infrastructure/adapters/opencode/plugin.js +147 -0
- package/dist/lib/infrastructure/adapters/opencode/plugin.js.map +1 -0
- package/dist/lib/infrastructure/context/ContextDetector.d.ts +92 -0
- package/dist/lib/infrastructure/context/ContextDetector.d.ts.map +1 -0
- package/dist/lib/infrastructure/context/ContextDetector.js +415 -0
- package/dist/lib/infrastructure/context/ContextDetector.js.map +1 -0
- package/dist/lib/infrastructure/context/index.d.ts +5 -0
- package/dist/lib/infrastructure/context/index.d.ts.map +1 -0
- package/dist/lib/infrastructure/context/index.js +9 -0
- package/dist/lib/infrastructure/context/index.js.map +1 -0
- package/dist/lib/infrastructure/dal/RepositoryFactory.d.ts +71 -0
- package/dist/lib/infrastructure/dal/RepositoryFactory.d.ts.map +1 -0
- package/dist/lib/infrastructure/dal/RepositoryFactory.js +134 -0
- package/dist/lib/infrastructure/dal/RepositoryFactory.js.map +1 -0
- package/dist/lib/infrastructure/dal/connections/McpConnectionManager.d.ts +56 -0
- package/dist/lib/infrastructure/dal/connections/McpConnectionManager.d.ts.map +1 -0
- package/dist/lib/infrastructure/dal/connections/McpConnectionManager.js +98 -0
- package/dist/lib/infrastructure/dal/connections/McpConnectionManager.js.map +1 -0
- package/dist/lib/infrastructure/dal/connections/Neo4jConnectionManager.d.ts +60 -0
- package/dist/lib/infrastructure/dal/connections/Neo4jConnectionManager.d.ts.map +1 -0
- package/dist/lib/infrastructure/dal/connections/Neo4jConnectionManager.js +181 -0
- package/dist/lib/infrastructure/dal/connections/Neo4jConnectionManager.js.map +1 -0
- package/dist/lib/infrastructure/dal/connections/ZepConnectionManager.d.ts +53 -0
- package/dist/lib/infrastructure/dal/connections/ZepConnectionManager.d.ts.map +1 -0
- package/dist/lib/infrastructure/dal/connections/ZepConnectionManager.js +168 -0
- package/dist/lib/infrastructure/dal/connections/ZepConnectionManager.js.map +1 -0
- package/dist/lib/infrastructure/dal/connections/index.d.ts +9 -0
- package/dist/lib/infrastructure/dal/connections/index.d.ts.map +1 -0
- package/dist/lib/infrastructure/dal/connections/index.js +18 -0
- package/dist/lib/infrastructure/dal/connections/index.js.map +1 -0
- package/dist/lib/infrastructure/dal/index.d.ts +27 -0
- package/dist/lib/infrastructure/dal/index.d.ts.map +1 -0
- package/dist/lib/infrastructure/dal/index.js +50 -0
- package/dist/lib/infrastructure/dal/index.js.map +1 -0
- package/dist/lib/infrastructure/dal/repositories/index.d.ts +7 -0
- package/dist/lib/infrastructure/dal/repositories/index.d.ts.map +1 -0
- package/dist/lib/infrastructure/dal/repositories/index.js +19 -0
- package/dist/lib/infrastructure/dal/repositories/index.js.map +1 -0
- package/dist/lib/infrastructure/dal/repositories/mcp/McpMemoryRepository.d.ts +54 -0
- package/dist/lib/infrastructure/dal/repositories/mcp/McpMemoryRepository.d.ts.map +1 -0
- package/dist/lib/infrastructure/dal/repositories/mcp/McpMemoryRepository.js +131 -0
- package/dist/lib/infrastructure/dal/repositories/mcp/McpMemoryRepository.js.map +1 -0
- package/dist/lib/infrastructure/dal/repositories/mcp/McpTaskRepository.d.ts +60 -0
- package/dist/lib/infrastructure/dal/repositories/mcp/McpTaskRepository.d.ts.map +1 -0
- package/dist/lib/infrastructure/dal/repositories/mcp/McpTaskRepository.js +182 -0
- package/dist/lib/infrastructure/dal/repositories/mcp/McpTaskRepository.js.map +1 -0
- package/dist/lib/infrastructure/dal/repositories/mcp/index.d.ts +6 -0
- package/dist/lib/infrastructure/dal/repositories/mcp/index.d.ts.map +1 -0
- package/dist/lib/infrastructure/dal/repositories/mcp/index.js +11 -0
- package/dist/lib/infrastructure/dal/repositories/mcp/index.js.map +1 -0
- package/dist/lib/infrastructure/dal/repositories/neo4j/Neo4jMemoryRepository.d.ts +47 -0
- package/dist/lib/infrastructure/dal/repositories/neo4j/Neo4jMemoryRepository.d.ts.map +1 -0
- package/dist/lib/infrastructure/dal/repositories/neo4j/Neo4jMemoryRepository.js +144 -0
- package/dist/lib/infrastructure/dal/repositories/neo4j/Neo4jMemoryRepository.js.map +1 -0
- package/dist/lib/infrastructure/dal/repositories/neo4j/Neo4jTaskRepository.d.ts +46 -0
- package/dist/lib/infrastructure/dal/repositories/neo4j/Neo4jTaskRepository.d.ts.map +1 -0
- package/dist/lib/infrastructure/dal/repositories/neo4j/Neo4jTaskRepository.js +160 -0
- package/dist/lib/infrastructure/dal/repositories/neo4j/Neo4jTaskRepository.js.map +1 -0
- package/dist/lib/infrastructure/dal/repositories/neo4j/index.d.ts +6 -0
- package/dist/lib/infrastructure/dal/repositories/neo4j/index.d.ts.map +1 -0
- package/dist/lib/infrastructure/dal/repositories/neo4j/index.js +11 -0
- package/dist/lib/infrastructure/dal/repositories/neo4j/index.js.map +1 -0
- package/dist/lib/infrastructure/dal/repositories/zep/ZepMemoryRepository.d.ts +55 -0
- package/dist/lib/infrastructure/dal/repositories/zep/ZepMemoryRepository.d.ts.map +1 -0
- package/dist/lib/infrastructure/dal/repositories/zep/ZepMemoryRepository.js +165 -0
- package/dist/lib/infrastructure/dal/repositories/zep/ZepMemoryRepository.js.map +1 -0
- package/dist/lib/infrastructure/dal/repositories/zep/ZepTaskRepository.d.ts +58 -0
- package/dist/lib/infrastructure/dal/repositories/zep/ZepTaskRepository.d.ts.map +1 -0
- package/dist/lib/infrastructure/dal/repositories/zep/ZepTaskRepository.js +206 -0
- package/dist/lib/infrastructure/dal/repositories/zep/ZepTaskRepository.js.map +1 -0
- package/dist/lib/infrastructure/dal/repositories/zep/index.d.ts +6 -0
- package/dist/lib/infrastructure/dal/repositories/zep/index.d.ts.map +1 -0
- package/dist/lib/infrastructure/dal/repositories/zep/index.js +11 -0
- package/dist/lib/infrastructure/dal/repositories/zep/index.js.map +1 -0
- package/dist/lib/infrastructure/dal/routing/RepositoryRouter.d.ts +73 -0
- package/dist/lib/infrastructure/dal/routing/RepositoryRouter.d.ts.map +1 -0
- package/dist/lib/infrastructure/dal/routing/RepositoryRouter.js +170 -0
- package/dist/lib/infrastructure/dal/routing/RepositoryRouter.js.map +1 -0
- package/dist/lib/infrastructure/dal/routing/index.d.ts +5 -0
- package/dist/lib/infrastructure/dal/routing/index.d.ts.map +1 -0
- package/dist/lib/infrastructure/dal/routing/index.js +10 -0
- package/dist/lib/infrastructure/dal/routing/index.js.map +1 -0
- package/dist/lib/infrastructure/di/ServiceFactory.d.ts +44 -0
- package/dist/lib/infrastructure/di/ServiceFactory.d.ts.map +1 -0
- package/dist/lib/infrastructure/di/ServiceFactory.js +141 -0
- package/dist/lib/infrastructure/di/ServiceFactory.js.map +1 -0
- package/dist/lib/infrastructure/di/index.d.ts +5 -0
- package/dist/lib/infrastructure/di/index.d.ts.map +1 -0
- package/dist/lib/infrastructure/di/index.js +10 -0
- package/dist/lib/infrastructure/di/index.js.map +1 -0
- package/dist/lib/infrastructure/index.d.ts +17 -0
- package/dist/lib/infrastructure/index.d.ts.map +1 -0
- package/dist/lib/infrastructure/index.js +41 -0
- package/dist/lib/infrastructure/index.js.map +1 -0
- package/dist/lib/infrastructure/logging/Logger.d.ts +50 -0
- package/dist/lib/infrastructure/logging/Logger.d.ts.map +1 -0
- package/dist/lib/infrastructure/logging/Logger.js +167 -0
- package/dist/lib/infrastructure/logging/Logger.js.map +1 -0
- package/dist/lib/infrastructure/logging/context.d.ts +51 -0
- package/dist/lib/infrastructure/logging/context.d.ts.map +1 -0
- package/dist/lib/infrastructure/logging/context.js +77 -0
- package/dist/lib/infrastructure/logging/context.js.map +1 -0
- package/dist/lib/infrastructure/logging/factory.d.ts +36 -0
- package/dist/lib/infrastructure/logging/factory.d.ts.map +1 -0
- package/dist/lib/infrastructure/logging/factory.js +122 -0
- package/dist/lib/infrastructure/logging/factory.js.map +1 -0
- package/dist/lib/infrastructure/logging/index.d.ts +26 -0
- package/dist/lib/infrastructure/logging/index.d.ts.map +1 -0
- package/dist/lib/infrastructure/logging/index.js +45 -0
- package/dist/lib/infrastructure/logging/index.js.map +1 -0
- package/dist/lib/infrastructure/mcp/McpClient.d.ts +36 -0
- package/dist/lib/infrastructure/mcp/McpClient.d.ts.map +1 -0
- package/dist/lib/infrastructure/mcp/McpClient.js +155 -0
- package/dist/lib/infrastructure/mcp/McpClient.js.map +1 -0
- package/dist/lib/infrastructure/mcp/index.d.ts +5 -0
- package/dist/lib/infrastructure/mcp/index.d.ts.map +1 -0
- package/dist/lib/infrastructure/mcp/index.js +9 -0
- package/dist/lib/infrastructure/mcp/index.js.map +1 -0
- package/dist/lib/infrastructure/services/EventEmitter.d.ts +24 -0
- package/dist/lib/infrastructure/services/EventEmitter.d.ts.map +1 -0
- package/dist/lib/infrastructure/services/EventEmitter.js +41 -0
- package/dist/lib/infrastructure/services/EventEmitter.js.map +1 -0
- package/dist/lib/infrastructure/services/MemoryService.d.ts +48 -0
- package/dist/lib/infrastructure/services/MemoryService.d.ts.map +1 -0
- package/dist/lib/infrastructure/services/MemoryService.js +298 -0
- package/dist/lib/infrastructure/services/MemoryService.js.map +1 -0
- package/dist/lib/infrastructure/services/RecursionService.d.ts +50 -0
- package/dist/lib/infrastructure/services/RecursionService.d.ts.map +1 -0
- package/dist/lib/infrastructure/services/RecursionService.js +233 -0
- package/dist/lib/infrastructure/services/RecursionService.js.map +1 -0
- package/dist/lib/infrastructure/services/SessionCaptureService.d.ts +31 -0
- package/dist/lib/infrastructure/services/SessionCaptureService.d.ts.map +1 -0
- package/dist/lib/infrastructure/services/SessionCaptureService.js +38 -0
- package/dist/lib/infrastructure/services/SessionCaptureService.js.map +1 -0
- package/dist/lib/infrastructure/services/TaskService.d.ts +38 -0
- package/dist/lib/infrastructure/services/TaskService.d.ts.map +1 -0
- package/dist/lib/infrastructure/services/TaskService.js +227 -0
- package/dist/lib/infrastructure/services/TaskService.js.map +1 -0
- package/dist/lib/infrastructure/services/index.d.ts +9 -0
- package/dist/lib/infrastructure/services/index.d.ts.map +1 -0
- package/dist/lib/infrastructure/services/index.js +17 -0
- package/dist/lib/infrastructure/services/index.js.map +1 -0
- package/dist/lib/interfaces/IDockerClient.d.ts +6 -0
- package/dist/lib/interfaces/IDockerClient.d.ts.map +1 -0
- package/dist/lib/interfaces/IDockerClient.js +1 -0
- package/dist/lib/interfaces/IDockerClient.js.map +1 -0
- package/dist/lib/interfaces/IMcpClient.d.ts +7 -0
- package/dist/lib/interfaces/IMcpClient.d.ts.map +1 -0
- package/dist/lib/interfaces/IMcpClient.js +1 -0
- package/dist/lib/interfaces/IMcpClient.js.map +1 -0
- package/dist/lib/interfaces/IServices.d.ts +9 -0
- package/dist/lib/interfaces/IServices.d.ts.map +1 -0
- package/dist/lib/interfaces/IServices.js +1 -0
- package/dist/lib/interfaces/IServices.js.map +1 -0
- package/dist/lib/interfaces/ITemplateCopier.d.ts +6 -0
- package/dist/lib/interfaces/ITemplateCopier.d.ts.map +1 -0
- package/dist/lib/interfaces/ITemplateCopier.js +1 -0
- package/dist/lib/interfaces/ITemplateCopier.js.map +1 -0
- package/dist/lib/mcp.d.ts +5 -0
- package/dist/lib/mcp.d.ts.map +1 -0
- package/dist/lib/mcp.js +12 -1
- package/dist/lib/mcp.js.map +1 -0
- package/dist/lib/scanner/analyzer.d.ts +51 -0
- package/dist/lib/scanner/analyzer.d.ts.map +1 -0
- package/dist/lib/scanner/analyzer.js +6 -1
- package/dist/lib/scanner/analyzer.js.map +1 -0
- package/dist/lib/scanner/discovery.d.ts +25 -0
- package/dist/lib/scanner/discovery.d.ts.map +1 -0
- package/dist/lib/scanner/discovery.js +4 -3
- package/dist/lib/scanner/discovery.js.map +1 -0
- package/dist/lib/scanner/facts.d.ts +33 -0
- package/dist/lib/scanner/facts.d.ts.map +1 -0
- package/dist/lib/scanner/facts.js +23 -5
- package/dist/lib/scanner/facts.js.map +1 -0
- package/dist/lib/scanner/index.d.ts +31 -0
- package/dist/lib/scanner/index.d.ts.map +1 -0
- package/dist/lib/scanner/index.js +1 -6
- package/dist/lib/scanner/index.js.map +1 -0
- package/dist/lib/scanner/reviewer.d.ts +62 -0
- package/dist/lib/scanner/reviewer.d.ts.map +1 -0
- package/dist/lib/scanner/reviewer.js +26 -8
- package/dist/lib/scanner/reviewer.js.map +1 -0
- package/dist/lib/services.d.ts +7 -0
- package/dist/lib/services.d.ts.map +1 -0
- package/dist/lib/services.js +1 -0
- package/dist/lib/services.js.map +1 -0
- package/dist/opencode/lisa.js +43344 -0
- package/dist/package.json +15 -3
- package/dist/project/.lisa/.env.template +18 -0
- package/dist/{templates → project/.lisa}/rules/shared/git-rules.md +6 -6
- package/dist/project/.lisa/skills/common/group-id.d.ts.map +1 -0
- package/dist/{templates/agents → project/.lisa}/skills/common/group-id.js +1 -0
- package/dist/project/.lisa/skills/common/group-id.js.map +1 -0
- package/dist/project/.lisa/skills/common/type-mappings.d.ts.map +1 -0
- package/dist/project/.lisa/skills/common/type-mappings.js +93 -0
- package/dist/project/.lisa/skills/common/type-mappings.js.map +1 -0
- package/dist/{templates/agents → project/.lisa}/skills/git/SKILL.md +7 -7
- package/dist/project/.lisa/skills/git/scripts/bump-version.d.ts.map +1 -0
- package/dist/project/.lisa/skills/git/scripts/bump-version.js +58 -0
- package/dist/project/.lisa/skills/git/scripts/bump-version.js.map +1 -0
- package/dist/{templates/agents → project/.lisa}/skills/init-review/SKILL.md +2 -2
- package/dist/project/.lisa/skills/init-review/scripts/ai-enrich.d.ts.map +1 -0
- package/dist/project/.lisa/skills/init-review/scripts/ai-enrich.js +177 -0
- package/dist/project/.lisa/skills/init-review/scripts/ai-enrich.js.map +1 -0
- package/dist/project/.lisa/skills/init-review/scripts/init-review.d.ts.map +1 -0
- package/dist/project/.lisa/skills/init-review/scripts/init-review.js +143 -0
- package/dist/project/.lisa/skills/init-review/scripts/init-review.js.map +1 -0
- package/dist/project/.lisa/skills/jira/scripts/jira.d.ts.map +1 -0
- package/dist/project/.lisa/skills/jira/scripts/jira.js +159 -0
- package/dist/project/.lisa/skills/jira/scripts/jira.js.map +1 -0
- package/dist/{templates/agents → project/.lisa}/skills/lisa/SKILL.md +17 -15
- package/dist/project/.lisa/skills/lisa/scripts/compile-skills.d.ts.map +1 -0
- package/dist/project/.lisa/skills/lisa/scripts/compile-skills.js +75 -0
- package/dist/project/.lisa/skills/lisa/scripts/compile-skills.js.map +1 -0
- package/dist/project/.lisa/skills/lisa/scripts/storage.d.ts.map +1 -0
- package/dist/project/.lisa/skills/lisa/scripts/storage.js +114 -0
- package/dist/project/.lisa/skills/lisa/scripts/storage.js.map +1 -0
- package/dist/{templates/agents → project/.lisa}/skills/memory/SKILL.md +3 -3
- package/dist/project/.lisa/skills/memory/scripts/memory.d.ts.map +1 -0
- package/dist/project/.lisa/skills/memory/scripts/memory.js +95 -0
- package/dist/project/.lisa/skills/memory/scripts/memory.js.map +1 -0
- package/dist/{templates/agents → project/.lisa}/skills/prompt/SKILL.md +1 -1
- package/dist/project/.lisa/skills/prompt/scripts/prompt.d.ts.map +1 -0
- package/dist/project/.lisa/skills/prompt/scripts/prompt.js +80 -0
- package/dist/project/.lisa/skills/prompt/scripts/prompt.js.map +1 -0
- package/dist/project/.lisa/skills/shared/clients/McpClient.d.ts.map +1 -0
- package/dist/project/.lisa/skills/shared/clients/McpClient.js +117 -0
- package/dist/project/.lisa/skills/shared/clients/McpClient.js.map +1 -0
- package/dist/project/.lisa/skills/shared/clients/Neo4jClient.d.ts.map +1 -0
- package/dist/project/.lisa/skills/shared/clients/Neo4jClient.js +81 -0
- package/dist/project/.lisa/skills/shared/clients/Neo4jClient.js.map +1 -0
- package/dist/project/.lisa/skills/shared/clients/ZepClient.d.ts.map +1 -0
- package/dist/project/.lisa/skills/shared/clients/ZepClient.js +238 -0
- package/dist/project/.lisa/skills/shared/clients/ZepClient.js.map +1 -0
- package/dist/project/.lisa/skills/shared/clients/index.d.ts.map +1 -0
- package/dist/project/.lisa/skills/shared/clients/index.js +33 -0
- package/dist/project/.lisa/skills/shared/clients/index.js.map +1 -0
- package/dist/project/.lisa/skills/shared/clients/interfaces/IMcpClient.d.ts.map +1 -0
- package/dist/project/.lisa/skills/shared/clients/interfaces/IMcpClient.js +3 -0
- package/dist/project/.lisa/skills/shared/clients/interfaces/IMcpClient.js.map +1 -0
- package/dist/project/.lisa/skills/shared/clients/interfaces/INeo4jClient.d.ts.map +1 -0
- package/dist/project/.lisa/skills/shared/clients/interfaces/INeo4jClient.js +3 -0
- package/dist/project/.lisa/skills/shared/clients/interfaces/INeo4jClient.js.map +1 -0
- package/dist/project/.lisa/skills/shared/clients/interfaces/IZepClient.d.ts.map +1 -0
- package/dist/project/.lisa/skills/shared/clients/interfaces/IZepClient.js +3 -0
- package/dist/project/.lisa/skills/shared/clients/interfaces/IZepClient.js.map +1 -0
- package/dist/project/.lisa/skills/shared/clients/interfaces/index.d.ts.map +1 -0
- package/dist/project/.lisa/skills/shared/clients/interfaces/index.js +23 -0
- package/dist/project/.lisa/skills/shared/clients/interfaces/index.js.map +1 -0
- package/dist/project/.lisa/skills/shared/group-id.d.ts.map +1 -0
- package/dist/project/.lisa/skills/shared/group-id.js +18 -0
- package/dist/project/.lisa/skills/shared/group-id.js.map +1 -0
- package/dist/project/.lisa/skills/shared/index.d.ts.map +1 -0
- package/dist/project/.lisa/skills/shared/index.js +31 -0
- package/dist/project/.lisa/skills/shared/index.js.map +1 -0
- package/dist/project/.lisa/skills/shared/logger.d.ts.map +1 -0
- package/dist/project/.lisa/skills/shared/logger.js +18 -0
- package/dist/project/.lisa/skills/shared/logger.js.map +1 -0
- package/dist/project/.lisa/skills/shared/services/InitReviewService.d.ts.map +1 -0
- package/dist/project/.lisa/skills/shared/services/InitReviewService.js +287 -0
- package/dist/project/.lisa/skills/shared/services/InitReviewService.js.map +1 -0
- package/dist/project/.lisa/skills/shared/services/JiraService.d.ts.map +1 -0
- package/dist/project/.lisa/skills/shared/services/JiraService.js +257 -0
- package/dist/project/.lisa/skills/shared/services/JiraService.js.map +1 -0
- package/dist/project/.lisa/skills/shared/services/MemoryCliService.d.ts.map +1 -0
- package/dist/project/.lisa/skills/shared/services/MemoryCliService.js +36 -0
- package/dist/project/.lisa/skills/shared/services/MemoryCliService.js.map +1 -0
- package/dist/project/.lisa/skills/shared/services/MemoryService.d.ts.map +1 -0
- package/dist/project/.lisa/skills/shared/services/MemoryService.js +146 -0
- package/dist/project/.lisa/skills/shared/services/MemoryService.js.map +1 -0
- package/dist/project/.lisa/skills/shared/services/PromptService.d.ts.map +1 -0
- package/dist/project/.lisa/skills/shared/services/PromptService.js +53 -0
- package/dist/project/.lisa/skills/shared/services/PromptService.js.map +1 -0
- package/dist/project/.lisa/skills/shared/services/SkillCompilerService.d.ts.map +1 -0
- package/dist/project/.lisa/skills/shared/services/SkillCompilerService.js +115 -0
- package/dist/project/.lisa/skills/shared/services/SkillCompilerService.js.map +1 -0
- package/dist/project/.lisa/skills/shared/services/StorageService.d.ts.map +1 -0
- package/dist/project/.lisa/skills/shared/services/StorageService.js +257 -0
- package/dist/project/.lisa/skills/shared/services/StorageService.js.map +1 -0
- package/dist/project/.lisa/skills/shared/services/TaskCliService.d.ts.map +1 -0
- package/dist/project/.lisa/skills/shared/services/TaskCliService.js +40 -0
- package/dist/project/.lisa/skills/shared/services/TaskCliService.js.map +1 -0
- package/dist/project/.lisa/skills/shared/services/TaskService.d.ts.map +1 -0
- package/dist/project/.lisa/skills/shared/services/TaskService.js +158 -0
- package/dist/project/.lisa/skills/shared/services/TaskService.js.map +1 -0
- package/dist/project/.lisa/skills/shared/services/VersionService.d.ts.map +1 -0
- package/dist/project/.lisa/skills/shared/services/VersionService.js +88 -0
- package/dist/project/.lisa/skills/shared/services/VersionService.js.map +1 -0
- package/dist/project/.lisa/skills/shared/services/index.d.ts.map +1 -0
- package/dist/project/.lisa/skills/shared/services/index.js +47 -0
- package/dist/project/.lisa/skills/shared/services/index.js.map +1 -0
- package/dist/project/.lisa/skills/shared/services/interfaces/IMemoryService.d.ts.map +1 -0
- package/dist/project/.lisa/skills/shared/services/interfaces/IMemoryService.js +7 -0
- package/dist/project/.lisa/skills/shared/services/interfaces/IMemoryService.js.map +1 -0
- package/dist/project/.lisa/skills/shared/services/interfaces/ITaskService.d.ts.map +1 -0
- package/dist/project/.lisa/skills/shared/services/interfaces/ITaskService.js +7 -0
- package/dist/project/.lisa/skills/shared/services/interfaces/ITaskService.js.map +1 -0
- package/dist/project/.lisa/skills/shared/services/interfaces/index.d.ts.map +1 -0
- package/dist/project/.lisa/skills/shared/services/interfaces/index.js +22 -0
- package/dist/project/.lisa/skills/shared/services/interfaces/index.js.map +1 -0
- package/dist/project/.lisa/skills/shared/utils/FileCache.d.ts.map +1 -0
- package/dist/project/.lisa/skills/shared/utils/FileCache.js +119 -0
- package/dist/project/.lisa/skills/shared/utils/FileCache.js.map +1 -0
- package/dist/project/.lisa/skills/shared/utils/Logger.d.ts.map +1 -0
- package/dist/project/.lisa/skills/shared/utils/Logger.js +197 -0
- package/dist/project/.lisa/skills/shared/utils/Logger.js.map +1 -0
- package/dist/project/.lisa/skills/shared/utils/cache.d.ts.map +1 -0
- package/dist/project/.lisa/skills/shared/utils/cache.js +76 -0
- package/dist/project/.lisa/skills/shared/utils/cache.js.map +1 -0
- package/dist/project/.lisa/skills/shared/utils/cli.d.ts.map +1 -0
- package/dist/project/.lisa/skills/shared/utils/cli.js +87 -0
- package/dist/project/.lisa/skills/shared/utils/cli.js.map +1 -0
- package/dist/project/.lisa/skills/shared/utils/env.d.ts.map +1 -0
- package/dist/project/.lisa/skills/shared/utils/env.js +103 -0
- package/dist/project/.lisa/skills/shared/utils/env.js.map +1 -0
- package/dist/project/.lisa/skills/shared/utils/group-id.d.ts.map +1 -0
- package/dist/project/.lisa/skills/shared/utils/group-id.js +91 -0
- package/dist/project/.lisa/skills/shared/utils/group-id.js.map +1 -0
- package/dist/project/.lisa/skills/shared/utils/index.d.ts.map +1 -0
- package/dist/project/.lisa/skills/shared/utils/index.js +55 -0
- package/dist/project/.lisa/skills/shared/utils/index.js.map +1 -0
- package/dist/project/.lisa/skills/shared/utils/interfaces/ICache.d.ts.map +1 -0
- package/dist/project/.lisa/skills/shared/utils/interfaces/ICache.js +3 -0
- package/dist/project/.lisa/skills/shared/utils/interfaces/ICache.js.map +1 -0
- package/dist/project/.lisa/skills/shared/utils/interfaces/ILogger.d.ts.map +1 -0
- package/dist/project/.lisa/skills/shared/utils/interfaces/ILogger.js +3 -0
- package/dist/project/.lisa/skills/shared/utils/interfaces/ILogger.js.map +1 -0
- package/dist/project/.lisa/skills/shared/utils/interfaces/index.d.ts.map +1 -0
- package/dist/project/.lisa/skills/shared/utils/interfaces/index.js +22 -0
- package/dist/project/.lisa/skills/shared/utils/interfaces/index.js.map +1 -0
- package/dist/{templates/agents → project/.lisa}/skills/tasks/SKILL.md +2 -2
- package/dist/project/.lisa/skills/tasks/scripts/tasks.d.ts.map +1 -0
- package/dist/project/.lisa/skills/tasks/scripts/tasks.js +98 -0
- package/dist/project/.lisa/skills/tasks/scripts/tasks.js.map +1 -0
- package/package.json +31 -10
- package/scripts/postinstall.js +93 -60
- package/dist/cli.js +0 -414
- package/dist/templates/agents/.sample.env +0 -12
- package/dist/templates/agents/docs/EXTENDING-SKILLS.md +0 -291
- package/dist/templates/agents/docs/EXTENDING-rules.md +0 -57
- package/dist/templates/agents/docs/STORAGE_SETUP.md +0 -161
- package/dist/templates/agents/skills/git/scripts/bump-version.js +0 -112
- package/dist/templates/agents/skills/init-review/scripts/ai-enrich.js +0 -258
- package/dist/templates/agents/skills/init-review/scripts/init-review.js +0 -769
- package/dist/templates/agents/skills/jira/scripts/jira.js +0 -406
- package/dist/templates/agents/skills/lisa/scripts/compile-skills.js +0 -177
- package/dist/templates/agents/skills/lisa/scripts/storage.js +0 -374
- package/dist/templates/agents/skills/memory/scripts/memory.js +0 -533
- package/dist/templates/agents/skills/prompt/scripts/prompt.js +0 -184
- package/dist/templates/agents/skills/tasks/scripts/tasks.js +0 -489
- package/dist/templates/claude/config.js +0 -40
- package/dist/templates/claude/hooks/README.md +0 -158
- package/dist/templates/claude/hooks/common/complexity-rater.js +0 -290
- package/dist/templates/claude/hooks/common/context.js +0 -263
- package/dist/templates/claude/hooks/common/group-id.js +0 -188
- package/dist/templates/claude/hooks/common/mcp-client.js +0 -131
- package/dist/templates/claude/hooks/common/transcript-parser.js +0 -256
- package/dist/templates/claude/hooks/common/zep-client.js +0 -175
- package/dist/templates/claude/hooks/session-start.js +0 -511
- package/dist/templates/claude/hooks/session-stop-worker.js +0 -484
- package/dist/templates/claude/hooks/session-stop.js +0 -122
- package/dist/templates/claude/hooks/user-prompt-submit.js +0 -479
- package/dist/templates/claude/settings.json +0 -46
- package/dist/templates/docker/.env.lisa.example +0 -17
- /package/dist/{templates → project/.lisa}/docker/docker-compose.graphiti.yml +0 -0
- /package/dist/{templates → project/.lisa}/rules/shared/clean-architecture.md +0 -0
- /package/dist/{templates → project/.lisa}/rules/shared/code-quality-rules.md +0 -0
- /package/dist/{templates → project/.lisa}/rules/shared/git-rules.local.md +0 -0
- /package/dist/{templates → project/.lisa}/rules/shared/testing-principles.md +0 -0
- /package/dist/{templates → project/.lisa}/rules/typescript/coding-standards.md +0 -0
- /package/dist/{templates → project/.lisa}/rules/typescript/testing.md +0 -0
- /package/dist/{templates → project/.lisa}/rules/typescript/typescript-config-guide.md +0 -0
- /package/dist/{templates/agents → project/.lisa}/skills/git/scripts/poll-ci.sh +0 -0
- /package/dist/{templates/agents → project/.lisa}/skills/jira/SKILL.md +0 -0
- /package/dist/{templates/agents → project/.lisa}/skills/lisa/cache/.gitkeep +0 -0
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const path = require('path');
|
|
4
|
-
const fs = require('fs');
|
|
5
|
-
// Load .env from .agents/.env if present
|
|
6
|
-
const envPath = path.join(process.cwd(), '.agents', '.env');
|
|
7
|
-
const env = {};
|
|
8
|
-
try {
|
|
9
|
-
const raw = fs.readFileSync(envPath, 'utf8');
|
|
10
|
-
raw.split(/\r?\n/).forEach((line) => {
|
|
11
|
-
if (!line || line.startsWith('#'))
|
|
12
|
-
return;
|
|
13
|
-
const idx = line.indexOf('=');
|
|
14
|
-
if (idx === -1)
|
|
15
|
-
return;
|
|
16
|
-
env[line.slice(0, idx).trim()] = line.slice(idx + 1).trim();
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
catch (_) {
|
|
20
|
-
/* optional */
|
|
21
|
-
}
|
|
22
|
-
const PROJECT_ROOT = process.cwd();
|
|
23
|
-
const PROMPT_SKILL_PATH = path.join(PROJECT_ROOT, '.agents/skills/prompt/scripts/prompt.js');
|
|
24
|
-
const DEV_DIR = path.join(PROJECT_ROOT, '.dev');
|
|
25
|
-
const MCP_ENDPOINT = env.GRAPHITI_ENDPOINT || process.env.GRAPHITI_ENDPOINT || 'http://localhost:8010/mcp/';
|
|
26
|
-
const DEFAULT_GROUP_ID = env.GRAPHITI_GROUP_ID || process.env.GRAPHITI_GROUP_ID || 'lisa';
|
|
27
|
-
const ZEP_API_KEY = env.ZEP_API_KEY || process.env.ZEP_API_KEY || '';
|
|
28
|
-
const STORAGE_MODE = env.STORAGE_MODE || process.env.STORAGE_MODE || 'local';
|
|
29
|
-
// Helper to check if using Zep Cloud native API (not MCP)
|
|
30
|
-
const isZepCloudMode = () => STORAGE_MODE === 'zep-cloud';
|
|
31
|
-
module.exports = {
|
|
32
|
-
PROJECT_ROOT,
|
|
33
|
-
PROMPT_SKILL_PATH,
|
|
34
|
-
DEV_DIR,
|
|
35
|
-
MCP_ENDPOINT,
|
|
36
|
-
DEFAULT_GROUP_ID,
|
|
37
|
-
ZEP_API_KEY,
|
|
38
|
-
STORAGE_MODE,
|
|
39
|
-
isZepCloudMode,
|
|
40
|
-
};
|
|
@@ -1,158 +0,0 @@
|
|
|
1
|
-
p# Claude Code Hooks
|
|
2
|
-
|
|
3
|
-
This directory contains hook scripts that run automatically during Claude Code sessions.
|
|
4
|
-
|
|
5
|
-
## Available Hooks
|
|
6
|
-
|
|
7
|
-
### user-prompt-submit.js
|
|
8
|
-
**Triggers:** Before user prompt is submitted (optional)
|
|
9
|
-
**Purpose:** Validate, enhance, or log user prompts
|
|
10
|
-
**Configuration:** `.claude/settings.json` → `hooks.userPromptSubmit`
|
|
11
|
-
|
|
12
|
-
**What it does:**
|
|
13
|
-
- Validates prompts for destructive operations
|
|
14
|
-
- Suggests relevant project files to reference
|
|
15
|
-
- Logs prompts for analytics
|
|
16
|
-
- Can cancel prompt submission by exiting with non-zero status
|
|
17
|
-
|
|
18
|
-
**Note:** This hook is optional and must be explicitly configured.
|
|
19
|
-
|
|
20
|
-
## Configuration
|
|
21
|
-
|
|
22
|
-
Hooks are configured in `.claude/settings.json`:
|
|
23
|
-
|
|
24
|
-
```json
|
|
25
|
-
{
|
|
26
|
-
"sessionHooks": {
|
|
27
|
-
"start": ".claude/hooks/session-start.js",
|
|
28
|
-
"end": ".claude/hooks/session-end.js"
|
|
29
|
-
},
|
|
30
|
-
"hooks": {
|
|
31
|
-
"userPromptSubmit": ".claude/hooks/user-prompt-submit.js"
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
## Customization
|
|
37
|
-
|
|
38
|
-
### Disabling Hooks
|
|
39
|
-
|
|
40
|
-
To disable a hook, remove its entry from `settings.json` or comment it out:
|
|
41
|
-
|
|
42
|
-
```json
|
|
43
|
-
{
|
|
44
|
-
"sessionHooks": {
|
|
45
|
-
"start": ".claude/hooks/session-start.js"
|
|
46
|
-
// "end": ".claude/hooks/session-end.js" // Disabled
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
### Modifying Hooks
|
|
52
|
-
|
|
53
|
-
You can modify these hook files to customize behavior for your project:
|
|
54
|
-
|
|
55
|
-
1. **Edit the hook file** in `.claude/hooks/`
|
|
56
|
-
2. **Test the hook** by running it directly: `node .claude/hooks/session-start.js`
|
|
57
|
-
3. **Restart Claude Code** to apply changes
|
|
58
|
-
|
|
59
|
-
### Creating Custom Hooks
|
|
60
|
-
|
|
61
|
-
You can create additional hooks for Claude Code:
|
|
62
|
-
|
|
63
|
-
1. **Create a new `.js` file** in `.claude/hooks/`
|
|
64
|
-
2. **Make it executable** (Unix): `chmod +x .claude/hooks/your-hook.js`
|
|
65
|
-
3. **Add configuration** to `.claude/settings.json`
|
|
66
|
-
4. **Test thoroughly** to ensure it doesn't block Claude Code operation
|
|
67
|
-
|
|
68
|
-
## Hook Exit Codes
|
|
69
|
-
|
|
70
|
-
- **Exit 0:** Hook succeeded, continue normal operation
|
|
71
|
-
- **Exit 1:** Hook failed, may cancel operation (depends on hook type)
|
|
72
|
-
|
|
73
|
-
## Debugging Hooks
|
|
74
|
-
|
|
75
|
-
If a hook isn't working:
|
|
76
|
-
|
|
77
|
-
1. **Run it manually:** `node .claude/hooks/session-start.js`
|
|
78
|
-
2. **Check console output** for errors
|
|
79
|
-
3. **Verify paths** in the hook script are correct
|
|
80
|
-
4. **Check permissions** (Unix/Mac: hooks should be executable)
|
|
81
|
-
5. **Review Claude Code logs** for hook execution errors
|
|
82
|
-
|
|
83
|
-
## Session State Files
|
|
84
|
-
|
|
85
|
-
Hooks create temporary state files in `.dev/`:
|
|
86
|
-
|
|
87
|
-
- `.session-state.json` - Current session state (deleted at session end)
|
|
88
|
-
- `.session-stats.json` - Cumulative session statistics
|
|
89
|
-
- `.prompt-log.jsonl` - Prompt log (if user-prompt-submit hook is enabled)
|
|
90
|
-
|
|
91
|
-
These files are typically ignored by git (see `.gitignore`).
|
|
92
|
-
|
|
93
|
-
## Best Practices
|
|
94
|
-
|
|
95
|
-
1. **Keep hooks fast** - They run on every session start/end
|
|
96
|
-
2. **Handle errors gracefully** - Don't block Claude Code if something fails
|
|
97
|
-
3. **Log important events** - Help users understand what hooks are doing
|
|
98
|
-
4. **Test thoroughly** - Broken hooks can disrupt your workflow
|
|
99
|
-
5. **Version control** - Commit hooks if they're project-specific
|
|
100
|
-
|
|
101
|
-
## Example Use Cases
|
|
102
|
-
|
|
103
|
-
### Custom Session Start
|
|
104
|
-
Load environment-specific configuration:
|
|
105
|
-
```javascript
|
|
106
|
-
// In session-start.js
|
|
107
|
-
const env = process.env.NODE_ENV || 'development';
|
|
108
|
-
console.log(`🌍 Environment: ${env}`);
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
### Custom Session End
|
|
112
|
-
Run code quality checks:
|
|
113
|
-
```javascript
|
|
114
|
-
// In session-end.js
|
|
115
|
-
const { execSync } = require('child_process');
|
|
116
|
-
try {
|
|
117
|
-
execSync('npm run lint', { stdio: 'ignore' });
|
|
118
|
-
console.log('✅ Linting passed');
|
|
119
|
-
} catch (error) {
|
|
120
|
-
console.log('⚠️ Linting failed - consider fixing before next session');
|
|
121
|
-
}
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
### Custom Prompt Enhancement
|
|
125
|
-
Auto-reference coding standards:
|
|
126
|
-
```javascript
|
|
127
|
-
// In user-prompt-submit.js
|
|
128
|
-
if (prompt.includes('create') || prompt.includes('implement')) {
|
|
129
|
-
console.log('💡 Remember to follow coding standards in .dev/rules/');
|
|
130
|
-
}
|
|
131
|
-
```
|
|
132
|
-
|
|
133
|
-
## Troubleshooting
|
|
134
|
-
|
|
135
|
-
### Hook doesn't run
|
|
136
|
-
- Check `.claude/settings.json` configuration
|
|
137
|
-
- Verify hook file path is correct (relative to project root)
|
|
138
|
-
- Ensure hook file exists and is readable
|
|
139
|
-
|
|
140
|
-
### Hook runs but fails
|
|
141
|
-
- Run manually to see error messages
|
|
142
|
-
- Check if required dependencies are installed
|
|
143
|
-
- Verify file paths used in the hook
|
|
144
|
-
|
|
145
|
-
### Hook blocks Claude Code
|
|
146
|
-
- Check if hook exits with non-zero status
|
|
147
|
-
- Look for infinite loops or long-running operations
|
|
148
|
-
- Add timeout handling in your custom hooks
|
|
149
|
-
|
|
150
|
-
## Resources
|
|
151
|
-
|
|
152
|
-
- [Claude Code Documentation](https://docs.anthropic.com/claude-code)
|
|
153
|
-
- [AI Dotfiles Manager](https://github.com/TonyCasey/ai-dotfiles-manager)
|
|
154
|
-
- [Session Hooks Guide](../.dev/hooks/)
|
|
155
|
-
|
|
156
|
-
---
|
|
157
|
-
|
|
158
|
-
*These hooks are installed by ai-dotfiles-manager and can be customized for your project.*
|
|
@@ -1,290 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
// Scoring constants
|
|
4
|
-
const POINTS = {
|
|
5
|
-
FILE_CREATED: 3,
|
|
6
|
-
FILE_EDITED: 2,
|
|
7
|
-
COMMAND_RUN: 1.5,
|
|
8
|
-
DOC_CREATED: 2,
|
|
9
|
-
TEST_MODIFIED: 1.5,
|
|
10
|
-
CONFIG_FILE: 1,
|
|
11
|
-
VERSION_BUMP: 2,
|
|
12
|
-
STRUCTURAL_CHANGE: 2,
|
|
13
|
-
MULTI_DIRECTORY: 3,
|
|
14
|
-
CI_CD_SETUP: 3,
|
|
15
|
-
};
|
|
16
|
-
const MULTIPLIERS = {
|
|
17
|
-
TOOL_DIVERSITY_5: 1.2,
|
|
18
|
-
TOOL_DIVERSITY_8: 1.3,
|
|
19
|
-
};
|
|
20
|
-
// Score thresholds for rating normalization
|
|
21
|
-
const THRESHOLDS = {
|
|
22
|
-
RATING_2: 2,
|
|
23
|
-
RATING_3: 5,
|
|
24
|
-
RATING_4: 10,
|
|
25
|
-
RATING_5: 20,
|
|
26
|
-
};
|
|
27
|
-
// Version files to detect version bumps
|
|
28
|
-
const VERSION_FILES = ['package.json', 'pyproject.toml', 'Cargo.toml', 'setup.py', 'version.py', 'VERSION'];
|
|
29
|
-
// Config files that indicate setup/configuration work
|
|
30
|
-
const CONFIG_PATTERNS = [
|
|
31
|
-
'tsconfig.json',
|
|
32
|
-
'tsconfig',
|
|
33
|
-
'jest.config',
|
|
34
|
-
'.eslintrc',
|
|
35
|
-
'.prettierrc',
|
|
36
|
-
'webpack.config',
|
|
37
|
-
'vite.config',
|
|
38
|
-
'rollup.config',
|
|
39
|
-
'.gitignore',
|
|
40
|
-
'.dockerignore',
|
|
41
|
-
'Dockerfile',
|
|
42
|
-
'docker-compose',
|
|
43
|
-
'.github/workflows',
|
|
44
|
-
'.gitlab-ci',
|
|
45
|
-
'Makefile',
|
|
46
|
-
'CMakeLists',
|
|
47
|
-
];
|
|
48
|
-
// CI/CD indicators
|
|
49
|
-
const CI_CD_PATTERNS = ['.github/workflows', '.gitlab-ci', 'Jenkinsfile', '.circleci', '.travis'];
|
|
50
|
-
/**
|
|
51
|
-
* Rate the complexity of work based on signals
|
|
52
|
-
*/
|
|
53
|
-
function rateComplexity(work) {
|
|
54
|
-
const signals = extractSignals(work);
|
|
55
|
-
const rawScore = calculateRawScore(signals, work);
|
|
56
|
-
const rating = normalizeToRating(rawScore);
|
|
57
|
-
const signalDescriptions = describeSignals(signals, work);
|
|
58
|
-
const summary = generateSummary(rating, signals, work);
|
|
59
|
-
return {
|
|
60
|
-
rating,
|
|
61
|
-
rawScore: Math.round(rawScore * 10) / 10,
|
|
62
|
-
signals: signalDescriptions,
|
|
63
|
-
summary,
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* Extract complexity signals from work summary
|
|
68
|
-
*/
|
|
69
|
-
function extractSignals(work) {
|
|
70
|
-
const filesModified = work.filesModified.size;
|
|
71
|
-
const filesCreated = work.filesCreated.size;
|
|
72
|
-
const allFiles = [...work.filesModified, ...work.filesCreated];
|
|
73
|
-
return {
|
|
74
|
-
filesModified,
|
|
75
|
-
filesCreated,
|
|
76
|
-
versionBump: hasVersionBump(allFiles),
|
|
77
|
-
docsCreated: countDocs(work.filesCreated),
|
|
78
|
-
testsModified: countTests(allFiles),
|
|
79
|
-
configFiles: countConfigFiles(allFiles),
|
|
80
|
-
structuralChanges: countStructuralChanges(work.commandsRun),
|
|
81
|
-
toolDiversity: work.toolsUsed.size,
|
|
82
|
-
commandCount: work.commandsRun.length,
|
|
83
|
-
};
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* Calculate raw score from signals
|
|
87
|
-
*/
|
|
88
|
-
function calculateRawScore(signals, work) {
|
|
89
|
-
let score = 0;
|
|
90
|
-
// Base points for file operations
|
|
91
|
-
score += signals.filesCreated * POINTS.FILE_CREATED;
|
|
92
|
-
score += signals.filesModified * POINTS.FILE_EDITED;
|
|
93
|
-
// Points for commands (weighted)
|
|
94
|
-
score += signals.commandCount * POINTS.COMMAND_RUN;
|
|
95
|
-
// Bonus points for specific types
|
|
96
|
-
score += signals.docsCreated * POINTS.DOC_CREATED;
|
|
97
|
-
score += signals.testsModified * POINTS.TEST_MODIFIED;
|
|
98
|
-
score += signals.configFiles * POINTS.CONFIG_FILE;
|
|
99
|
-
// Bonus for version bump
|
|
100
|
-
if (signals.versionBump) {
|
|
101
|
-
score += POINTS.VERSION_BUMP;
|
|
102
|
-
}
|
|
103
|
-
// Bonus for structural changes
|
|
104
|
-
score += signals.structuralChanges * POINTS.STRUCTURAL_CHANGE;
|
|
105
|
-
// Bonus for multi-directory work
|
|
106
|
-
if (hasMultiDirectoryWork(work)) {
|
|
107
|
-
score += POINTS.MULTI_DIRECTORY;
|
|
108
|
-
}
|
|
109
|
-
// Bonus for CI/CD setup
|
|
110
|
-
if (hasCICDSetup(work)) {
|
|
111
|
-
score += POINTS.CI_CD_SETUP;
|
|
112
|
-
}
|
|
113
|
-
// Apply multipliers for tool diversity
|
|
114
|
-
if (signals.toolDiversity >= 8) {
|
|
115
|
-
score *= MULTIPLIERS.TOOL_DIVERSITY_8;
|
|
116
|
-
}
|
|
117
|
-
else if (signals.toolDiversity >= 5) {
|
|
118
|
-
score *= MULTIPLIERS.TOOL_DIVERSITY_5;
|
|
119
|
-
}
|
|
120
|
-
return score;
|
|
121
|
-
}
|
|
122
|
-
/**
|
|
123
|
-
* Normalize raw score to 1-5 rating
|
|
124
|
-
*/
|
|
125
|
-
function normalizeToRating(rawScore) {
|
|
126
|
-
if (rawScore >= THRESHOLDS.RATING_5)
|
|
127
|
-
return 5;
|
|
128
|
-
if (rawScore >= THRESHOLDS.RATING_4)
|
|
129
|
-
return 4;
|
|
130
|
-
if (rawScore >= THRESHOLDS.RATING_3)
|
|
131
|
-
return 3;
|
|
132
|
-
if (rawScore >= THRESHOLDS.RATING_2)
|
|
133
|
-
return 2;
|
|
134
|
-
return 1;
|
|
135
|
-
}
|
|
136
|
-
/**
|
|
137
|
-
* Check if any version files were modified
|
|
138
|
-
*/
|
|
139
|
-
function hasVersionBump(files) {
|
|
140
|
-
return files.some((filePath) => VERSION_FILES.some((vf) => filePath.endsWith(vf) || filePath.includes(vf)));
|
|
141
|
-
}
|
|
142
|
-
/**
|
|
143
|
-
* Count documentation files created
|
|
144
|
-
*/
|
|
145
|
-
function countDocs(filesCreated) {
|
|
146
|
-
return Array.from(filesCreated).filter((filePath) => filePath.endsWith('.md') || filePath.includes('/docs/') || filePath.toUpperCase().includes('README')).length;
|
|
147
|
-
}
|
|
148
|
-
/**
|
|
149
|
-
* Count test files modified or created
|
|
150
|
-
*/
|
|
151
|
-
function countTests(files) {
|
|
152
|
-
return files.filter((filePath) => /\.(test|spec)\.(ts|js|tsx|jsx|py|rs)$/.test(filePath) ||
|
|
153
|
-
filePath.includes('/tests/') ||
|
|
154
|
-
filePath.includes('/__tests__/') ||
|
|
155
|
-
filePath.includes('/test/')).length;
|
|
156
|
-
}
|
|
157
|
-
/**
|
|
158
|
-
* Count config files modified
|
|
159
|
-
*/
|
|
160
|
-
function countConfigFiles(files) {
|
|
161
|
-
return files.filter((filePath) => CONFIG_PATTERNS.some((pattern) => filePath.includes(pattern))).length;
|
|
162
|
-
}
|
|
163
|
-
/**
|
|
164
|
-
* Count structural changes (mkdir commands)
|
|
165
|
-
*/
|
|
166
|
-
function countStructuralChanges(commands) {
|
|
167
|
-
return commands.filter((cmd) => cmd.startsWith('mkdir') || cmd.includes('mkdir ')).length;
|
|
168
|
-
}
|
|
169
|
-
/**
|
|
170
|
-
* Check if work spans multiple directories
|
|
171
|
-
*/
|
|
172
|
-
function hasMultiDirectoryWork(work) {
|
|
173
|
-
const allFiles = [...work.filesModified, ...work.filesCreated];
|
|
174
|
-
const directories = new Set();
|
|
175
|
-
for (const filePath of allFiles) {
|
|
176
|
-
const parts = filePath.split('/');
|
|
177
|
-
if (parts.length > 1) {
|
|
178
|
-
directories.add(parts[0]);
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
return directories.size >= 3;
|
|
182
|
-
}
|
|
183
|
-
/**
|
|
184
|
-
* Check if CI/CD files were created/modified
|
|
185
|
-
*/
|
|
186
|
-
function hasCICDSetup(work) {
|
|
187
|
-
const allFiles = [...work.filesModified, ...work.filesCreated];
|
|
188
|
-
return allFiles.some((filePath) => CI_CD_PATTERNS.some((pattern) => filePath.includes(pattern)));
|
|
189
|
-
}
|
|
190
|
-
/**
|
|
191
|
-
* Generate human-readable signal descriptions
|
|
192
|
-
*/
|
|
193
|
-
function describeSignals(signals, work) {
|
|
194
|
-
const descriptions = [];
|
|
195
|
-
if (signals.filesCreated > 0) {
|
|
196
|
-
descriptions.push(`${signals.filesCreated} file${signals.filesCreated > 1 ? 's' : ''} created`);
|
|
197
|
-
}
|
|
198
|
-
if (signals.filesModified > 0) {
|
|
199
|
-
descriptions.push(`${signals.filesModified} file${signals.filesModified > 1 ? 's' : ''} modified`);
|
|
200
|
-
}
|
|
201
|
-
if (signals.testsModified > 0) {
|
|
202
|
-
descriptions.push(`${signals.testsModified} test file${signals.testsModified > 1 ? 's' : ''}`);
|
|
203
|
-
}
|
|
204
|
-
if (signals.docsCreated > 0) {
|
|
205
|
-
descriptions.push(`${signals.docsCreated} documentation file${signals.docsCreated > 1 ? 's' : ''}`);
|
|
206
|
-
}
|
|
207
|
-
if (signals.versionBump) {
|
|
208
|
-
descriptions.push('Version bump detected');
|
|
209
|
-
}
|
|
210
|
-
if (signals.configFiles > 0) {
|
|
211
|
-
descriptions.push(`${signals.configFiles} config file${signals.configFiles > 1 ? 's' : ''}`);
|
|
212
|
-
}
|
|
213
|
-
if (signals.structuralChanges > 0) {
|
|
214
|
-
descriptions.push(`${signals.structuralChanges} structural change${signals.structuralChanges > 1 ? 's' : ''}`);
|
|
215
|
-
}
|
|
216
|
-
if (hasMultiDirectoryWork(work)) {
|
|
217
|
-
descriptions.push('Multi-directory changes');
|
|
218
|
-
}
|
|
219
|
-
if (hasCICDSetup(work)) {
|
|
220
|
-
descriptions.push('CI/CD setup');
|
|
221
|
-
}
|
|
222
|
-
if (signals.toolDiversity >= 5) {
|
|
223
|
-
descriptions.push(`${signals.toolDiversity} different tools used`);
|
|
224
|
-
}
|
|
225
|
-
return descriptions;
|
|
226
|
-
}
|
|
227
|
-
/**
|
|
228
|
-
* Generate a summary description of the work
|
|
229
|
-
*/
|
|
230
|
-
function generateSummary(rating, signals, work) {
|
|
231
|
-
const ratingLabels = {
|
|
232
|
-
1: 'Trivial',
|
|
233
|
-
2: 'Simple',
|
|
234
|
-
3: 'Moderate',
|
|
235
|
-
4: 'Complex',
|
|
236
|
-
5: 'Very Complex',
|
|
237
|
-
};
|
|
238
|
-
const label = ratingLabels[rating] || 'Unknown';
|
|
239
|
-
const totalFiles = signals.filesCreated + signals.filesModified;
|
|
240
|
-
// Generate contextual summary
|
|
241
|
-
if (rating === 1) {
|
|
242
|
-
if (totalFiles === 0) {
|
|
243
|
-
return `${label}: Read-only session or minimal interaction`;
|
|
244
|
-
}
|
|
245
|
-
return `${label}: Minor change to ${totalFiles} file${totalFiles > 1 ? 's' : ''}`;
|
|
246
|
-
}
|
|
247
|
-
if (rating === 2) {
|
|
248
|
-
return `${label}: ${totalFiles} file${totalFiles > 1 ? 's' : ''} affected`;
|
|
249
|
-
}
|
|
250
|
-
if (rating === 3) {
|
|
251
|
-
const extras = [];
|
|
252
|
-
if (signals.testsModified > 0)
|
|
253
|
-
extras.push('tests');
|
|
254
|
-
if (signals.docsCreated > 0)
|
|
255
|
-
extras.push('docs');
|
|
256
|
-
const extra = extras.length > 0 ? ` with ${extras.join(' and ')}` : '';
|
|
257
|
-
return `${label}: Feature implementation${extra}`;
|
|
258
|
-
}
|
|
259
|
-
if (rating === 4) {
|
|
260
|
-
return `${label}: Multi-file refactor or significant feature`;
|
|
261
|
-
}
|
|
262
|
-
// Rating 5
|
|
263
|
-
const highlights = [];
|
|
264
|
-
if (signals.versionBump)
|
|
265
|
-
highlights.push('version bump');
|
|
266
|
-
if (hasCICDSetup(work))
|
|
267
|
-
highlights.push('CI/CD');
|
|
268
|
-
if (signals.docsCreated >= 2)
|
|
269
|
-
highlights.push('documentation');
|
|
270
|
-
const highlight = highlights.length > 0 ? `: ${highlights.join(', ')}` : '';
|
|
271
|
-
return `${label}: Major milestone${highlight}`;
|
|
272
|
-
}
|
|
273
|
-
/**
|
|
274
|
-
* Get rating label
|
|
275
|
-
*/
|
|
276
|
-
function getRatingLabel(rating) {
|
|
277
|
-
const labels = {
|
|
278
|
-
1: 'Trivial',
|
|
279
|
-
2: 'Simple',
|
|
280
|
-
3: 'Moderate',
|
|
281
|
-
4: 'Complex',
|
|
282
|
-
5: 'Very Complex',
|
|
283
|
-
};
|
|
284
|
-
return labels[rating] || 'Unknown';
|
|
285
|
-
}
|
|
286
|
-
module.exports = {
|
|
287
|
-
rateComplexity,
|
|
288
|
-
getRatingLabel,
|
|
289
|
-
THRESHOLDS,
|
|
290
|
-
};
|