@machina.ai/cell-cli-core 1.13.0-rc4 → 1.16.0-rc1
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/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/package.json +1 -1
- package/dist/src/agents/codebase-investigator.test.d.ts +6 -0
- package/dist/src/agents/codebase-investigator.test.js +35 -0
- package/dist/src/agents/codebase-investigator.test.js.map +1 -0
- package/dist/src/agents/executor.d.ts +3 -0
- package/dist/src/agents/executor.js +21 -0
- package/dist/src/agents/executor.js.map +1 -1
- package/dist/src/agents/executor.test.js +358 -3
- package/dist/src/agents/executor.test.js.map +1 -1
- package/dist/src/code_assist/codeAssist.test.d.ts +6 -0
- package/dist/src/code_assist/codeAssist.test.js +99 -0
- package/dist/src/code_assist/codeAssist.test.js.map +1 -0
- package/dist/src/code_assist/experiments/client_metadata.js +2 -1
- package/dist/src/code_assist/experiments/client_metadata.js.map +1 -1
- package/dist/src/code_assist/experiments/client_metadata.test.d.ts +6 -0
- package/dist/src/code_assist/experiments/client_metadata.test.js +99 -0
- package/dist/src/code_assist/experiments/client_metadata.test.js.map +1 -0
- package/dist/src/code_assist/experiments/experiments.js +2 -2
- package/dist/src/code_assist/experiments/experiments.js.map +1 -1
- package/dist/src/code_assist/experiments/experiments.test.d.ts +6 -0
- package/dist/src/code_assist/experiments/experiments.test.js +92 -0
- package/dist/src/code_assist/experiments/experiments.test.js.map +1 -0
- package/dist/src/code_assist/experiments/flagNames.d.ts +13 -0
- package/dist/src/code_assist/experiments/flagNames.js +13 -0
- package/dist/src/code_assist/experiments/flagNames.js.map +1 -0
- package/dist/src/code_assist/experiments/types.d.ts +1 -1
- package/dist/src/code_assist/oauth-credential-storage.test.js +49 -0
- package/dist/src/code_assist/oauth-credential-storage.test.js.map +1 -1
- package/dist/src/code_assist/server.js +5 -8
- package/dist/src/code_assist/server.js.map +1 -1
- package/dist/src/code_assist/server.test.js +109 -28
- package/dist/src/code_assist/server.test.js.map +1 -1
- package/dist/src/config/config.d.ts +34 -2
- package/dist/src/config/config.js +147 -26
- package/dist/src/config/config.js.map +1 -1
- package/dist/src/config/config.test.js +436 -19
- package/dist/src/config/config.test.js.map +1 -1
- package/dist/src/config/defaultModelConfigs.d.ts +7 -0
- package/dist/src/config/defaultModelConfigs.js +158 -0
- package/dist/src/config/defaultModelConfigs.js.map +1 -0
- package/dist/src/config/models.d.ts +22 -1
- package/dist/src/config/models.js +49 -6
- package/dist/src/config/models.js.map +1 -1
- package/dist/src/config/models.test.js +71 -10
- package/dist/src/config/models.test.js.map +1 -1
- package/dist/src/confirmation-bus/message-bus.d.ts +1 -1
- package/dist/src/confirmation-bus/message-bus.js +2 -2
- package/dist/src/confirmation-bus/message-bus.js.map +1 -1
- package/dist/src/confirmation-bus/message-bus.test.js +30 -24
- package/dist/src/confirmation-bus/message-bus.test.js.map +1 -1
- package/dist/src/confirmation-bus/types.d.ts +1 -0
- package/dist/src/core/baseLlmClient.d.ts +4 -8
- package/dist/src/core/baseLlmClient.js +3 -8
- package/dist/src/core/baseLlmClient.js.map +1 -1
- package/dist/src/core/baseLlmClient.test.js +22 -27
- package/dist/src/core/baseLlmClient.test.js.map +1 -1
- package/dist/src/core/client.d.ts +6 -5
- package/dist/src/core/client.js +33 -33
- package/dist/src/core/client.js.map +1 -1
- package/dist/src/core/client.test.js +40 -22
- package/dist/src/core/client.test.js.map +1 -1
- package/dist/src/core/coreToolScheduler.js +7 -1
- package/dist/src/core/coreToolScheduler.js.map +1 -1
- package/dist/src/core/coreToolScheduler.test.js +151 -357
- package/dist/src/core/coreToolScheduler.test.js.map +1 -1
- package/dist/src/core/geminiChat.d.ts +6 -4
- package/dist/src/core/geminiChat.js +106 -29
- package/dist/src/core/geminiChat.js.map +1 -1
- package/dist/src/core/geminiChat.test.js +317 -16
- package/dist/src/core/geminiChat.test.js.map +1 -1
- package/dist/src/core/logger.d.ts +7 -2
- package/dist/src/core/logger.js +15 -9
- package/dist/src/core/logger.js.map +1 -1
- package/dist/src/core/logger.test.js +31 -16
- package/dist/src/core/logger.test.js.map +1 -1
- package/dist/src/core/loggingContentGenerator.test.d.ts +6 -0
- package/dist/src/core/loggingContentGenerator.test.js +180 -0
- package/dist/src/core/loggingContentGenerator.test.js.map +1 -0
- package/dist/src/core/nonInteractiveToolExecutor.test.js +1 -0
- package/dist/src/core/nonInteractiveToolExecutor.test.js.map +1 -1
- package/dist/src/core/prompts.js +8 -11
- package/dist/src/core/prompts.js.map +1 -1
- package/dist/src/core/tokenLimits.test.d.ts +6 -0
- package/dist/src/core/tokenLimits.test.js +26 -0
- package/dist/src/core/tokenLimits.test.js.map +1 -0
- package/dist/src/fallback/handler.js +52 -7
- package/dist/src/fallback/handler.js.map +1 -1
- package/dist/src/fallback/handler.test.js +69 -16
- package/dist/src/fallback/handler.test.js.map +1 -1
- package/dist/src/fallback/types.d.ts +1 -1
- package/dist/src/generated/git-commit.d.ts +2 -2
- package/dist/src/generated/git-commit.js +2 -2
- package/dist/src/hooks/hookAggregator.d.ts +68 -0
- package/dist/src/hooks/hookAggregator.js +262 -0
- package/dist/src/hooks/hookAggregator.js.map +1 -0
- package/dist/src/hooks/hookAggregator.test.d.ts +6 -0
- package/dist/src/hooks/hookAggregator.test.js +387 -0
- package/dist/src/hooks/hookAggregator.test.js.map +1 -0
- package/dist/src/hooks/hookRunner.d.ts +42 -0
- package/dist/src/hooks/hookRunner.js +272 -0
- package/dist/src/hooks/hookRunner.js.map +1 -0
- package/dist/src/hooks/hookRunner.test.d.ts +6 -0
- package/dist/src/hooks/hookRunner.test.js +468 -0
- package/dist/src/hooks/hookRunner.test.js.map +1 -0
- package/dist/src/hooks/hookTranslator.d.ts +3 -3
- package/dist/src/hooks/types.js +1 -1
- package/dist/src/hooks/types.js.map +1 -1
- package/dist/src/hooks/types.test.js +280 -2
- package/dist/src/hooks/types.test.js.map +1 -1
- package/dist/src/ide/detect-ide.d.ts +4 -0
- package/dist/src/ide/detect-ide.js +6 -1
- package/dist/src/ide/detect-ide.js.map +1 -1
- package/dist/src/ide/detect-ide.test.js +5 -0
- package/dist/src/ide/detect-ide.test.js.map +1 -1
- package/dist/src/ide/ide-client.d.ts +3 -1
- package/dist/src/ide/ide-client.js +9 -8
- package/dist/src/ide/ide-client.js.map +1 -1
- package/dist/src/ide/ide-client.test.js +159 -0
- package/dist/src/ide/ide-client.test.js.map +1 -1
- package/dist/src/ide/ide-installer.js +65 -20
- package/dist/src/ide/ide-installer.js.map +1 -1
- package/dist/src/ide/ide-installer.test.js +41 -0
- package/dist/src/ide/ide-installer.test.js.map +1 -1
- package/dist/src/ide/types.d.ts +1 -1
- package/dist/src/ide/types.js +1 -1
- package/dist/src/index.d.ts +2 -0
- package/dist/src/index.js +2 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/mcp/google-auth-provider.js +1 -1
- package/dist/src/mcp/google-auth-provider.js.map +1 -1
- package/dist/src/mcp/mcpLauncher.js +6 -2
- package/dist/src/mcp/mcpLauncher.js.map +1 -1
- package/dist/src/mcp/oauth-provider.js +2 -2
- package/dist/src/mcp/oauth-provider.js.map +1 -1
- package/dist/src/mcp/oauth-provider.test.js +177 -0
- package/dist/src/mcp/oauth-provider.test.js.map +1 -1
- package/dist/src/mcp/sa-impersonation-provider.js +1 -1
- package/dist/src/mcp/sa-impersonation-provider.js.map +1 -1
- package/dist/src/policy/config.js +3 -1
- package/dist/src/policy/config.js.map +1 -1
- package/dist/src/policy/config.test.js +135 -1
- package/dist/src/policy/config.test.js.map +1 -1
- package/dist/src/policy/policies/discovered.toml +8 -0
- package/dist/src/policy/policies/write.toml +10 -0
- package/dist/src/policy/policy-engine.d.ts +12 -3
- package/dist/src/policy/policy-engine.js +71 -9
- package/dist/src/policy/policy-engine.js.map +1 -1
- package/dist/src/policy/policy-engine.test.js +460 -76
- package/dist/src/policy/policy-engine.test.js.map +1 -1
- package/dist/src/policy/toml-loader.d.ts +2 -1
- package/dist/src/policy/toml-loader.js +103 -6
- package/dist/src/policy/toml-loader.js.map +1 -1
- package/dist/src/policy/toml-loader.test.js +222 -368
- package/dist/src/policy/toml-loader.test.js.map +1 -1
- package/dist/src/policy/types.d.ts +65 -0
- package/dist/src/policy/types.js +4 -0
- package/dist/src/policy/types.js.map +1 -1
- package/dist/src/prompts/mcp-prompts.test.d.ts +6 -0
- package/dist/src/prompts/mcp-prompts.test.js +40 -0
- package/dist/src/prompts/mcp-prompts.test.js.map +1 -0
- package/dist/src/prompts/prompt-registry.test.d.ts +6 -0
- package/dist/src/prompts/prompt-registry.test.js +111 -0
- package/dist/src/prompts/prompt-registry.test.js.map +1 -0
- package/dist/src/routing/modelRouterService.js +15 -0
- package/dist/src/routing/modelRouterService.js.map +1 -1
- package/dist/src/routing/modelRouterService.test.js +62 -0
- package/dist/src/routing/modelRouterService.test.js.map +1 -1
- package/dist/src/routing/strategies/classifierStrategy.d.ts +1 -1
- package/dist/src/routing/strategies/classifierStrategy.js +6 -14
- package/dist/src/routing/strategies/classifierStrategy.js.map +1 -1
- package/dist/src/routing/strategies/classifierStrategy.test.js +13 -10
- package/dist/src/routing/strategies/classifierStrategy.test.js.map +1 -1
- package/dist/src/routing/strategies/fallbackStrategy.js +1 -1
- package/dist/src/routing/strategies/fallbackStrategy.js.map +1 -1
- package/dist/src/routing/strategies/fallbackStrategy.test.js +4 -0
- package/dist/src/routing/strategies/fallbackStrategy.test.js.map +1 -1
- package/dist/src/routing/strategies/overrideStrategy.js +2 -2
- package/dist/src/routing/strategies/overrideStrategy.js.map +1 -1
- package/dist/src/routing/strategies/overrideStrategy.test.js +3 -0
- package/dist/src/routing/strategies/overrideStrategy.test.js.map +1 -1
- package/dist/src/safety/built-in.d.ts +21 -0
- package/dist/src/safety/built-in.js +106 -0
- package/dist/src/safety/built-in.js.map +1 -0
- package/dist/src/safety/built-in.test.d.ts +6 -0
- package/dist/src/safety/built-in.test.js +199 -0
- package/dist/src/safety/built-in.test.js.map +1 -0
- package/dist/src/safety/checker-runner.d.ts +48 -0
- package/dist/src/safety/checker-runner.js +208 -0
- package/dist/src/safety/checker-runner.js.map +1 -0
- package/dist/src/safety/checker-runner.test.d.ts +6 -0
- package/dist/src/safety/checker-runner.test.js +238 -0
- package/dist/src/safety/checker-runner.test.js.map +1 -0
- package/dist/src/safety/context-builder.d.ts +23 -0
- package/dist/src/safety/context-builder.js +47 -0
- package/dist/src/safety/context-builder.js.map +1 -0
- package/dist/src/safety/context-builder.test.d.ts +6 -0
- package/dist/src/safety/context-builder.test.js +49 -0
- package/dist/src/safety/context-builder.test.js.map +1 -0
- package/dist/src/safety/protocol.d.ts +88 -0
- package/dist/src/safety/protocol.js +15 -0
- package/dist/src/safety/protocol.js.map +1 -0
- package/dist/src/safety/registry.d.ts +26 -0
- package/dist/src/safety/registry.js +65 -0
- package/dist/src/safety/registry.js.map +1 -0
- package/dist/src/safety/registry.test.d.ts +6 -0
- package/dist/src/safety/registry.test.js +31 -0
- package/dist/src/safety/registry.test.js.map +1 -0
- package/dist/src/services/chatCompressionService.test.js +1 -0
- package/dist/src/services/chatCompressionService.test.js.map +1 -1
- package/dist/src/services/gitService.js +1 -1
- package/dist/src/services/gitService.js.map +1 -1
- package/dist/src/services/gitService.test.js +1 -1
- package/dist/src/services/gitService.test.js.map +1 -1
- package/dist/src/services/loopDetectionService.d.ts +3 -0
- package/dist/src/services/loopDetectionService.js +81 -42
- package/dist/src/services/loopDetectionService.js.map +1 -1
- package/dist/src/services/loopDetectionService.test.js +101 -1
- package/dist/src/services/loopDetectionService.test.js.map +1 -1
- package/dist/src/services/modelConfig.golden.test.d.ts +6 -0
- package/dist/src/services/modelConfig.golden.test.js +42 -0
- package/dist/src/services/modelConfig.golden.test.js.map +1 -0
- package/dist/src/services/modelConfig.integration.test.d.ts +6 -0
- package/dist/src/services/modelConfig.integration.test.js +213 -0
- package/dist/src/services/modelConfig.integration.test.js.map +1 -0
- package/dist/src/services/modelConfigService.d.ts +46 -0
- package/dist/src/services/modelConfigService.js +146 -0
- package/dist/src/services/modelConfigService.js.map +1 -0
- package/dist/src/services/modelConfigService.test.d.ts +6 -0
- package/dist/src/services/modelConfigService.test.js +509 -0
- package/dist/src/services/modelConfigService.test.js.map +1 -0
- package/dist/src/services/test-data/resolved-aliases.golden.json +169 -0
- package/dist/src/telemetry/clearcut-logger/clearcut-logger.d.ts +11 -9
- package/dist/src/telemetry/clearcut-logger/clearcut-logger.js +174 -150
- package/dist/src/telemetry/clearcut-logger/clearcut-logger.js.map +1 -1
- package/dist/src/telemetry/clearcut-logger/clearcut-logger.test.d.ts +1 -0
- package/dist/src/telemetry/clearcut-logger/clearcut-logger.test.js +76 -20
- package/dist/src/telemetry/clearcut-logger/clearcut-logger.test.js.map +1 -1
- package/dist/src/telemetry/clearcut-logger/event-metadata-key.d.ts +6 -1
- package/dist/src/telemetry/clearcut-logger/event-metadata-key.js +18 -5
- package/dist/src/telemetry/clearcut-logger/event-metadata-key.js.map +1 -1
- package/dist/src/telemetry/index.d.ts +2 -2
- package/dist/src/telemetry/index.js +2 -2
- package/dist/src/telemetry/index.js.map +1 -1
- package/dist/src/telemetry/loggers.d.ts +7 -7
- package/dist/src/telemetry/loggers.js +23 -23
- package/dist/src/telemetry/loggers.js.map +1 -1
- package/dist/src/telemetry/loggers.test.circular.js +0 -1
- package/dist/src/telemetry/loggers.test.circular.js.map +1 -1
- package/dist/src/telemetry/loggers.test.js +72 -18
- package/dist/src/telemetry/loggers.test.js.map +1 -1
- package/dist/src/telemetry/metrics.d.ts +8 -4
- package/dist/src/telemetry/metrics.js +10 -4
- package/dist/src/telemetry/metrics.js.map +1 -1
- package/dist/src/telemetry/metrics.test.js +42 -0
- package/dist/src/telemetry/metrics.test.js.map +1 -1
- package/dist/src/telemetry/telemetryAttributes.js +1 -0
- package/dist/src/telemetry/telemetryAttributes.js.map +1 -1
- package/dist/src/telemetry/types.d.ts +17 -11
- package/dist/src/telemetry/types.js +53 -28
- package/dist/src/telemetry/types.js.map +1 -1
- package/dist/src/tools/base-tool-invocation.test.d.ts +6 -0
- package/dist/src/tools/base-tool-invocation.test.js +85 -0
- package/dist/src/tools/base-tool-invocation.test.js.map +1 -0
- package/dist/src/tools/edit.d.ts +1 -1
- package/dist/src/tools/edit.js +31 -33
- package/dist/src/tools/edit.js.map +1 -1
- package/dist/src/tools/edit.test.js +31 -20
- package/dist/src/tools/edit.test.js.map +1 -1
- package/dist/src/tools/glob.d.ts +1 -1
- package/dist/src/tools/glob.js +7 -7
- package/dist/src/tools/glob.js.map +1 -1
- package/dist/src/tools/glob.test.js +20 -17
- package/dist/src/tools/glob.test.js.map +1 -1
- package/dist/src/tools/grep.d.ts +1 -1
- package/dist/src/tools/grep.js +9 -9
- package/dist/src/tools/grep.js.map +1 -1
- package/dist/src/tools/grep.test.js +15 -12
- package/dist/src/tools/grep.test.js.map +1 -1
- package/dist/src/tools/ls.d.ts +1 -1
- package/dist/src/tools/ls.js +14 -15
- package/dist/src/tools/ls.js.map +1 -1
- package/dist/src/tools/ls.test.js +32 -33
- package/dist/src/tools/ls.test.js.map +1 -1
- package/dist/src/tools/mcp-client.js +24 -52
- package/dist/src/tools/mcp-client.js.map +1 -1
- package/dist/src/tools/mcp-client.test.js +18 -0
- package/dist/src/tools/mcp-client.test.js.map +1 -1
- package/dist/src/tools/mcp-tool.d.ts +1 -0
- package/dist/src/tools/mcp-tool.js +5 -2
- package/dist/src/tools/mcp-tool.js.map +1 -1
- package/dist/src/tools/memoryTool.js +1 -1
- package/dist/src/tools/memoryTool.js.map +1 -1
- package/dist/src/tools/memoryTool.test.js +1 -1
- package/dist/src/tools/memoryTool.test.js.map +1 -1
- package/dist/src/tools/modifiable-tool.d.ts +5 -1
- package/dist/src/tools/modifiable-tool.js +34 -13
- package/dist/src/tools/modifiable-tool.js.map +1 -1
- package/dist/src/tools/modifiable-tool.test.js +56 -22
- package/dist/src/tools/modifiable-tool.test.js.map +1 -1
- package/dist/src/tools/read-file.d.ts +2 -2
- package/dist/src/tools/read-file.js +20 -24
- package/dist/src/tools/read-file.js.map +1 -1
- package/dist/src/tools/read-file.test.js +63 -51
- package/dist/src/tools/read-file.test.js.map +1 -1
- package/dist/src/tools/read-many-files.d.ts +2 -9
- package/dist/src/tools/read-many-files.js +10 -21
- package/dist/src/tools/read-many-files.js.map +1 -1
- package/dist/src/tools/read-many-files.test.js +37 -35
- package/dist/src/tools/read-many-files.test.js.map +1 -1
- package/dist/src/tools/ripGrep.d.ts +25 -8
- package/dist/src/tools/ripGrep.js +148 -176
- package/dist/src/tools/ripGrep.js.map +1 -1
- package/dist/src/tools/ripGrep.test.js +383 -58
- package/dist/src/tools/ripGrep.test.js.map +1 -1
- package/dist/src/tools/shell.d.ts +1 -1
- package/dist/src/tools/shell.js +17 -15
- package/dist/src/tools/shell.js.map +1 -1
- package/dist/src/tools/shell.test.js +66 -36
- package/dist/src/tools/shell.test.js.map +1 -1
- package/dist/src/tools/smart-edit.d.ts +6 -1
- package/dist/src/tools/smart-edit.js +18 -17
- package/dist/src/tools/smart-edit.js.map +1 -1
- package/dist/src/tools/smart-edit.test.js +49 -24
- package/dist/src/tools/smart-edit.test.js.map +1 -1
- package/dist/src/tools/tool-registry.d.ts +29 -4
- package/dist/src/tools/tool-registry.js +108 -29
- package/dist/src/tools/tool-registry.js.map +1 -1
- package/dist/src/tools/tool-registry.test.js +134 -4
- package/dist/src/tools/tool-registry.test.js.map +1 -1
- package/dist/src/tools/tools.d.ts +2 -1
- package/dist/src/tools/tools.js +5 -2
- package/dist/src/tools/tools.js.map +1 -1
- package/dist/src/tools/web-fetch.js +2 -4
- package/dist/src/tools/web-fetch.js.map +1 -1
- package/dist/src/tools/web-fetch.test.js +11 -4
- package/dist/src/tools/web-fetch.test.js.map +1 -1
- package/dist/src/tools/web-search.js +1 -2
- package/dist/src/tools/web-search.js.map +1 -1
- package/dist/src/tools/web-search.test.js +11 -5
- package/dist/src/tools/web-search.test.js.map +1 -1
- package/dist/src/tools/write-file.js +31 -31
- package/dist/src/tools/write-file.js.map +1 -1
- package/dist/src/tools/write-file.test.js +24 -5
- package/dist/src/tools/write-file.test.js.map +1 -1
- package/dist/src/tools/write-todos.d.ts +29 -0
- package/dist/src/tools/write-todos.js +34 -1
- package/dist/src/tools/write-todos.js.map +1 -1
- package/dist/src/utils/editCorrector.js +4 -15
- package/dist/src/utils/editCorrector.js.map +1 -1
- package/dist/src/utils/editCorrector.test.js +16 -0
- package/dist/src/utils/editCorrector.test.js.map +1 -1
- package/dist/src/utils/editor.d.ts +3 -1
- package/dist/src/utils/editor.js +18 -1
- package/dist/src/utils/editor.js.map +1 -1
- package/dist/src/utils/editor.test.js +11 -0
- package/dist/src/utils/editor.test.js.map +1 -1
- package/dist/src/utils/environmentContext.js +3 -1
- package/dist/src/utils/environmentContext.js.map +1 -1
- package/dist/src/utils/environmentContext.test.js +6 -0
- package/dist/src/utils/environmentContext.test.js.map +1 -1
- package/dist/src/utils/events.d.ts +14 -11
- package/dist/src/utils/events.js +1 -14
- package/dist/src/utils/events.js.map +1 -1
- package/dist/src/utils/extensionLoader.d.ts +8 -0
- package/dist/src/utils/extensionLoader.js +61 -15
- package/dist/src/utils/extensionLoader.js.map +1 -1
- package/dist/src/utils/extensionLoader.test.js +83 -19
- package/dist/src/utils/extensionLoader.test.js.map +1 -1
- package/dist/src/utils/fileUtils.test.js +75 -60
- package/dist/src/utils/fileUtils.test.js.map +1 -1
- package/dist/src/utils/flashFallback.test.js +2 -2
- package/dist/src/utils/flashFallback.test.js.map +1 -1
- package/dist/src/utils/googleQuotaErrors.d.ts +2 -1
- package/dist/src/utils/googleQuotaErrors.js +20 -12
- package/dist/src/utils/googleQuotaErrors.js.map +1 -1
- package/dist/src/utils/httpErrors.d.ts +18 -0
- package/dist/src/utils/httpErrors.js +36 -0
- package/dist/src/utils/httpErrors.js.map +1 -0
- package/dist/src/utils/llm-edit-fixer.js +1 -2
- package/dist/src/utils/llm-edit-fixer.js.map +1 -1
- package/dist/src/utils/llm-edit-fixer.test.js +16 -1
- package/dist/src/utils/llm-edit-fixer.test.js.map +1 -1
- package/dist/src/utils/memoryDiscovery.d.ts +8 -0
- package/dist/src/utils/memoryDiscovery.js +24 -0
- package/dist/src/utils/memoryDiscovery.js.map +1 -1
- package/dist/src/utils/memoryDiscovery.test.js +43 -1
- package/dist/src/utils/memoryDiscovery.test.js.map +1 -1
- package/dist/src/utils/nextSpeakerChecker.js +1 -2
- package/dist/src/utils/nextSpeakerChecker.js.map +1 -1
- package/dist/src/utils/nextSpeakerChecker.test.js +10 -4
- package/dist/src/utils/nextSpeakerChecker.test.js.map +1 -1
- package/dist/src/utils/pathReader.js +4 -4
- package/dist/src/utils/pathReader.js.map +1 -1
- package/dist/src/utils/pathReader.test.js +44 -1
- package/dist/src/utils/pathReader.test.js.map +1 -1
- package/dist/src/utils/paths.d.ts +1 -1
- package/dist/src/utils/paths.js +5 -3
- package/dist/src/utils/paths.js.map +1 -1
- package/dist/src/utils/retry.d.ts +0 -9
- package/dist/src/utils/retry.js +24 -28
- package/dist/src/utils/retry.js.map +1 -1
- package/dist/src/utils/retry.test.js +51 -0
- package/dist/src/utils/retry.test.js.map +1 -1
- package/dist/src/utils/shell-utils.js +5 -3
- package/dist/src/utils/shell-utils.js.map +1 -1
- package/dist/src/utils/shell-utils.test.js +9 -9
- package/dist/src/utils/shell-utils.test.js.map +1 -1
- package/dist/src/utils/summarizer.d.ts +4 -2
- package/dist/src/utils/summarizer.js +6 -8
- package/dist/src/utils/summarizer.js.map +1 -1
- package/dist/src/utils/summarizer.test.js +32 -11
- package/dist/src/utils/summarizer.test.js.map +1 -1
- package/dist/src/utils/workspaceContext.d.ts +4 -3
- package/dist/src/utils/workspaceContext.js +10 -11
- package/dist/src/utils/workspaceContext.js.map +1 -1
- package/dist/src/utils/workspaceContext.test.js +1 -1
- package/dist/src/utils/workspaceContext.test.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -50,10 +50,11 @@ export var EventNames;
|
|
|
50
50
|
EventNames["AGENT_FINISH"] = "agent_finish";
|
|
51
51
|
EventNames["RECOVERY_ATTEMPT"] = "recovery_attempt";
|
|
52
52
|
EventNames["WEB_FETCH_FALLBACK_ATTEMPT"] = "web_fetch_fallback_attempt";
|
|
53
|
+
EventNames["LLM_LOOP_CHECK"] = "llm_loop_check";
|
|
53
54
|
})(EventNames || (EventNames = {}));
|
|
54
55
|
/**
|
|
55
56
|
* Determine the surface that the user is currently using. Surface is effectively the
|
|
56
|
-
* distribution channel in which the user is using
|
|
57
|
+
* distribution channel in which the user is using Cell CLI. Cell CLI comes bundled
|
|
57
58
|
* w/ Firebase Studio and Cloud Shell. Users that manually download themselves will
|
|
58
59
|
* likely be "SURFACE_NOT_SET".
|
|
59
60
|
*
|
|
@@ -153,6 +154,7 @@ export class ClearcutLogger {
|
|
|
153
154
|
{
|
|
154
155
|
event_time_ms: Date.now(),
|
|
155
156
|
source_extension_json: safeJsonStringify(event),
|
|
157
|
+
gws_experiment: this.config?.getExperiments()?.experimentIds ?? [],
|
|
156
158
|
},
|
|
157
159
|
]);
|
|
158
160
|
if (wasAtCapacity && this.config?.getDebugMode()) {
|
|
@@ -175,19 +177,19 @@ export class ClearcutLogger {
|
|
|
175
177
|
[
|
|
176
178
|
...data,
|
|
177
179
|
{
|
|
178
|
-
|
|
180
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_SURFACE,
|
|
179
181
|
value: surface,
|
|
180
182
|
},
|
|
181
183
|
{
|
|
182
|
-
|
|
184
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_VERSION,
|
|
183
185
|
value: CLI_VERSION,
|
|
184
186
|
},
|
|
185
187
|
{
|
|
186
|
-
|
|
188
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_GIT_COMMIT_HASH,
|
|
187
189
|
value: GIT_COMMIT_INFO,
|
|
188
190
|
},
|
|
189
191
|
{
|
|
190
|
-
|
|
192
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_OS,
|
|
191
193
|
value: process.platform,
|
|
192
194
|
},
|
|
193
195
|
],
|
|
@@ -289,78 +291,78 @@ export class ClearcutLogger {
|
|
|
289
291
|
logStartSessionEvent(event) {
|
|
290
292
|
const data = [
|
|
291
293
|
{
|
|
292
|
-
|
|
294
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_START_SESSION_MODEL,
|
|
293
295
|
value: event.model,
|
|
294
296
|
},
|
|
295
297
|
{
|
|
296
|
-
|
|
298
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_START_SESSION_EMBEDDING_MODEL,
|
|
297
299
|
value: event.embedding_model,
|
|
298
300
|
},
|
|
299
301
|
{
|
|
300
|
-
|
|
302
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_START_SESSION_SANDBOX,
|
|
301
303
|
value: event.sandbox_enabled.toString(),
|
|
302
304
|
},
|
|
303
305
|
{
|
|
304
|
-
|
|
306
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_START_SESSION_CORE_TOOLS,
|
|
305
307
|
value: event.core_tools_enabled,
|
|
306
308
|
},
|
|
307
309
|
{
|
|
308
|
-
|
|
310
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_START_SESSION_APPROVAL_MODE,
|
|
309
311
|
value: event.approval_mode,
|
|
310
312
|
},
|
|
311
313
|
{
|
|
312
|
-
|
|
314
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_START_SESSION_API_KEY_ENABLED,
|
|
313
315
|
value: event.api_key_enabled.toString(),
|
|
314
316
|
},
|
|
315
317
|
{
|
|
316
|
-
|
|
318
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_START_SESSION_VERTEX_API_ENABLED,
|
|
317
319
|
value: event.vertex_ai_enabled.toString(),
|
|
318
320
|
},
|
|
319
321
|
{
|
|
320
|
-
|
|
322
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_START_SESSION_DEBUG_MODE_ENABLED,
|
|
321
323
|
value: event.debug_enabled.toString(),
|
|
322
324
|
},
|
|
323
325
|
{
|
|
324
|
-
|
|
326
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_START_SESSION_VERTEX_API_ENABLED,
|
|
325
327
|
value: event.vertex_ai_enabled.toString(),
|
|
326
328
|
},
|
|
327
329
|
{
|
|
328
|
-
|
|
330
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_START_SESSION_MCP_SERVERS,
|
|
329
331
|
value: event.mcp_servers,
|
|
330
332
|
},
|
|
331
333
|
{
|
|
332
|
-
|
|
334
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_START_SESSION_VERTEX_API_ENABLED,
|
|
333
335
|
value: event.vertex_ai_enabled.toString(),
|
|
334
336
|
},
|
|
335
337
|
{
|
|
336
|
-
|
|
338
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_START_SESSION_TELEMETRY_ENABLED,
|
|
337
339
|
value: event.telemetry_enabled.toString(),
|
|
338
340
|
},
|
|
339
341
|
{
|
|
340
|
-
|
|
342
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_START_SESSION_TELEMETRY_LOG_USER_PROMPTS_ENABLED,
|
|
341
343
|
value: event.telemetry_log_user_prompts_enabled.toString(),
|
|
342
344
|
},
|
|
343
345
|
{
|
|
344
|
-
|
|
346
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_START_SESSION_MCP_SERVERS_COUNT,
|
|
345
347
|
value: event.mcp_servers_count
|
|
346
348
|
? event.mcp_servers_count.toString()
|
|
347
349
|
: '',
|
|
348
350
|
},
|
|
349
351
|
{
|
|
350
|
-
|
|
352
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_START_SESSION_MCP_TOOLS_COUNT,
|
|
351
353
|
value: event.mcp_tools_count?.toString() ?? '',
|
|
352
354
|
},
|
|
353
355
|
{
|
|
354
|
-
|
|
356
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_START_SESSION_MCP_TOOLS,
|
|
355
357
|
value: event.mcp_tools ? event.mcp_tools : '',
|
|
356
358
|
},
|
|
357
359
|
{
|
|
358
|
-
|
|
360
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_START_SESSION_EXTENSIONS_COUNT,
|
|
359
361
|
value: event.extensions_count.toString(),
|
|
360
362
|
},
|
|
361
363
|
// We deliberately do not log the names of extensions here, to be safe.
|
|
362
364
|
{
|
|
363
|
-
|
|
365
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_START_SESSION_EXTENSION_IDS,
|
|
364
366
|
value: event.extension_ids.toString(),
|
|
365
367
|
},
|
|
366
368
|
];
|
|
@@ -375,7 +377,7 @@ export class ClearcutLogger {
|
|
|
375
377
|
this.promptId = event.prompt_id;
|
|
376
378
|
const data = [
|
|
377
379
|
{
|
|
378
|
-
|
|
380
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_USER_PROMPT_LENGTH,
|
|
379
381
|
value: JSON.stringify(event.prompt_length),
|
|
380
382
|
},
|
|
381
383
|
];
|
|
@@ -385,35 +387,35 @@ export class ClearcutLogger {
|
|
|
385
387
|
logToolCallEvent(event) {
|
|
386
388
|
const data = [
|
|
387
389
|
{
|
|
388
|
-
|
|
390
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_TOOL_CALL_NAME,
|
|
389
391
|
value: JSON.stringify(event.function_name),
|
|
390
392
|
},
|
|
391
393
|
{
|
|
392
|
-
|
|
394
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_TOOL_CALL_DECISION,
|
|
393
395
|
value: JSON.stringify(event.decision),
|
|
394
396
|
},
|
|
395
397
|
{
|
|
396
|
-
|
|
398
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_TOOL_CALL_SUCCESS,
|
|
397
399
|
value: JSON.stringify(event.success),
|
|
398
400
|
},
|
|
399
401
|
{
|
|
400
|
-
|
|
402
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_TOOL_CALL_DURATION_MS,
|
|
401
403
|
value: JSON.stringify(event.duration_ms),
|
|
402
404
|
},
|
|
403
405
|
{
|
|
404
|
-
|
|
406
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_TOOL_CALL_ERROR_TYPE,
|
|
405
407
|
value: JSON.stringify(event.error_type),
|
|
406
408
|
},
|
|
407
409
|
{
|
|
408
|
-
|
|
410
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_TOOL_TYPE,
|
|
409
411
|
value: JSON.stringify(event.tool_type),
|
|
410
412
|
},
|
|
411
413
|
{
|
|
412
|
-
|
|
414
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_TOOL_CALL_CONTENT_LENGTH,
|
|
413
415
|
value: JSON.stringify(event.content_length),
|
|
414
416
|
},
|
|
415
417
|
{
|
|
416
|
-
|
|
418
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_TOOL_CALL_MCP_SERVER_NAME,
|
|
417
419
|
value: JSON.stringify(event.mcp_server_name),
|
|
418
420
|
},
|
|
419
421
|
];
|
|
@@ -428,10 +430,10 @@ export class ClearcutLogger {
|
|
|
428
430
|
user_added_chars: EventMetadataKey.CELL_CLI_USER_ADDED_CHARS,
|
|
429
431
|
user_removed_chars: EventMetadataKey.CELL_CLI_USER_REMOVED_CHARS,
|
|
430
432
|
};
|
|
431
|
-
for (const [key,
|
|
433
|
+
for (const [key, CELL_CLI_key] of Object.entries(metadataMapping)) {
|
|
432
434
|
if (event.metadata[key] !== undefined) {
|
|
433
435
|
data.push({
|
|
434
|
-
|
|
436
|
+
CELL_CLI_key,
|
|
435
437
|
value: JSON.stringify(event.metadata[key]),
|
|
436
438
|
});
|
|
437
439
|
}
|
|
@@ -439,7 +441,7 @@ export class ClearcutLogger {
|
|
|
439
441
|
}
|
|
440
442
|
if (event.extension_id) {
|
|
441
443
|
data.push({
|
|
442
|
-
|
|
444
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_EXTENSION_ID,
|
|
443
445
|
value: event.extension_id,
|
|
444
446
|
});
|
|
445
447
|
}
|
|
@@ -450,29 +452,29 @@ export class ClearcutLogger {
|
|
|
450
452
|
logFileOperationEvent(event) {
|
|
451
453
|
const data = [
|
|
452
454
|
{
|
|
453
|
-
|
|
455
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_TOOL_CALL_NAME,
|
|
454
456
|
value: JSON.stringify(event.tool_name),
|
|
455
457
|
},
|
|
456
458
|
{
|
|
457
|
-
|
|
459
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_FILE_OPERATION_TYPE,
|
|
458
460
|
value: JSON.stringify(event.operation),
|
|
459
461
|
},
|
|
460
462
|
{
|
|
461
|
-
|
|
463
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_FILE_OPERATION_LINES,
|
|
462
464
|
value: JSON.stringify(event.lines),
|
|
463
465
|
},
|
|
464
466
|
{
|
|
465
|
-
|
|
467
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_FILE_OPERATION_MIMETYPE,
|
|
466
468
|
value: JSON.stringify(event.mimetype),
|
|
467
469
|
},
|
|
468
470
|
{
|
|
469
|
-
|
|
471
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_FILE_OPERATION_EXTENSION,
|
|
470
472
|
value: JSON.stringify(event.extension),
|
|
471
473
|
},
|
|
472
474
|
];
|
|
473
475
|
if (event.programming_language) {
|
|
474
476
|
data.push({
|
|
475
|
-
|
|
477
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_PROGRAMMING_LANGUAGE,
|
|
476
478
|
value: event.programming_language,
|
|
477
479
|
});
|
|
478
480
|
}
|
|
@@ -483,7 +485,7 @@ export class ClearcutLogger {
|
|
|
483
485
|
logApiRequestEvent(event) {
|
|
484
486
|
const data = [
|
|
485
487
|
{
|
|
486
|
-
|
|
488
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_API_REQUEST_MODEL,
|
|
487
489
|
value: JSON.stringify(event.model),
|
|
488
490
|
},
|
|
489
491
|
];
|
|
@@ -493,35 +495,35 @@ export class ClearcutLogger {
|
|
|
493
495
|
logApiResponseEvent(event) {
|
|
494
496
|
const data = [
|
|
495
497
|
{
|
|
496
|
-
|
|
498
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_API_RESPONSE_MODEL,
|
|
497
499
|
value: JSON.stringify(event.model),
|
|
498
500
|
},
|
|
499
501
|
{
|
|
500
|
-
|
|
502
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_API_RESPONSE_STATUS_CODE,
|
|
501
503
|
value: JSON.stringify(event.status_code),
|
|
502
504
|
},
|
|
503
505
|
{
|
|
504
|
-
|
|
506
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_API_RESPONSE_DURATION_MS,
|
|
505
507
|
value: JSON.stringify(event.duration_ms),
|
|
506
508
|
},
|
|
507
509
|
{
|
|
508
|
-
|
|
510
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_API_RESPONSE_INPUT_TOKEN_COUNT,
|
|
509
511
|
value: JSON.stringify(event.usage.input_token_count),
|
|
510
512
|
},
|
|
511
513
|
{
|
|
512
|
-
|
|
514
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_API_RESPONSE_OUTPUT_TOKEN_COUNT,
|
|
513
515
|
value: JSON.stringify(event.usage.output_token_count),
|
|
514
516
|
},
|
|
515
517
|
{
|
|
516
|
-
|
|
518
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_API_RESPONSE_CACHED_TOKEN_COUNT,
|
|
517
519
|
value: JSON.stringify(event.usage.cached_content_token_count),
|
|
518
520
|
},
|
|
519
521
|
{
|
|
520
|
-
|
|
522
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_API_RESPONSE_THINKING_TOKEN_COUNT,
|
|
521
523
|
value: JSON.stringify(event.usage.thoughts_token_count),
|
|
522
524
|
},
|
|
523
525
|
{
|
|
524
|
-
|
|
526
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_API_RESPONSE_TOOL_TOKEN_COUNT,
|
|
525
527
|
value: JSON.stringify(event.usage.tool_token_count),
|
|
526
528
|
},
|
|
527
529
|
];
|
|
@@ -531,19 +533,19 @@ export class ClearcutLogger {
|
|
|
531
533
|
logApiErrorEvent(event) {
|
|
532
534
|
const data = [
|
|
533
535
|
{
|
|
534
|
-
|
|
536
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_API_ERROR_MODEL,
|
|
535
537
|
value: JSON.stringify(event.model),
|
|
536
538
|
},
|
|
537
539
|
{
|
|
538
|
-
|
|
540
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_API_ERROR_TYPE,
|
|
539
541
|
value: JSON.stringify(event.error_type),
|
|
540
542
|
},
|
|
541
543
|
{
|
|
542
|
-
|
|
544
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_API_ERROR_STATUS_CODE,
|
|
543
545
|
value: JSON.stringify(event.status_code),
|
|
544
546
|
},
|
|
545
547
|
{
|
|
546
|
-
|
|
548
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_API_ERROR_DURATION_MS,
|
|
547
549
|
value: JSON.stringify(event.duration_ms),
|
|
548
550
|
},
|
|
549
551
|
];
|
|
@@ -553,11 +555,11 @@ export class ClearcutLogger {
|
|
|
553
555
|
logChatCompressionEvent(event) {
|
|
554
556
|
const data = [
|
|
555
557
|
{
|
|
556
|
-
|
|
558
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_COMPRESSION_TOKENS_BEFORE,
|
|
557
559
|
value: `${event.tokens_before}`,
|
|
558
560
|
},
|
|
559
561
|
{
|
|
560
|
-
|
|
562
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_COMPRESSION_TOKENS_AFTER,
|
|
561
563
|
value: `${event.tokens_after}`,
|
|
562
564
|
},
|
|
563
565
|
];
|
|
@@ -578,10 +580,16 @@ export class ClearcutLogger {
|
|
|
578
580
|
logLoopDetectedEvent(event) {
|
|
579
581
|
const data = [
|
|
580
582
|
{
|
|
581
|
-
|
|
583
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_LOOP_DETECTED_TYPE,
|
|
582
584
|
value: JSON.stringify(event.loop_type),
|
|
583
585
|
},
|
|
584
586
|
];
|
|
587
|
+
if (event.confirmed_by_model) {
|
|
588
|
+
data.push({
|
|
589
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_LOOP_DETECTED_CONFIRMED_BY_MODEL,
|
|
590
|
+
value: event.confirmed_by_model,
|
|
591
|
+
});
|
|
592
|
+
}
|
|
585
593
|
this.enqueueLogEvent(this.createLogEvent(EventNames.LOOP_DETECTED, data));
|
|
586
594
|
this.flushIfNeeded();
|
|
587
595
|
}
|
|
@@ -593,11 +601,11 @@ export class ClearcutLogger {
|
|
|
593
601
|
logNextSpeakerCheck(event) {
|
|
594
602
|
const data = [
|
|
595
603
|
{
|
|
596
|
-
|
|
604
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_RESPONSE_FINISH_REASON,
|
|
597
605
|
value: JSON.stringify(event.finish_reason),
|
|
598
606
|
},
|
|
599
607
|
{
|
|
600
|
-
|
|
608
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_NEXT_SPEAKER_CHECK_RESULT,
|
|
601
609
|
value: JSON.stringify(event.result),
|
|
602
610
|
},
|
|
603
611
|
];
|
|
@@ -607,25 +615,25 @@ export class ClearcutLogger {
|
|
|
607
615
|
logSlashCommandEvent(event) {
|
|
608
616
|
const data = [
|
|
609
617
|
{
|
|
610
|
-
|
|
618
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_SLASH_COMMAND_NAME,
|
|
611
619
|
value: JSON.stringify(event.command),
|
|
612
620
|
},
|
|
613
621
|
];
|
|
614
622
|
if (event.subcommand) {
|
|
615
623
|
data.push({
|
|
616
|
-
|
|
624
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_SLASH_COMMAND_SUBCOMMAND,
|
|
617
625
|
value: JSON.stringify(event.subcommand),
|
|
618
626
|
});
|
|
619
627
|
}
|
|
620
628
|
if (event.status) {
|
|
621
629
|
data.push({
|
|
622
|
-
|
|
630
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_SLASH_COMMAND_STATUS,
|
|
623
631
|
value: JSON.stringify(event.status),
|
|
624
632
|
});
|
|
625
633
|
}
|
|
626
634
|
if (event.extension_id) {
|
|
627
635
|
data.push({
|
|
628
|
-
|
|
636
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_EXTENSION_ID,
|
|
629
637
|
value: event.extension_id,
|
|
630
638
|
});
|
|
631
639
|
}
|
|
@@ -635,7 +643,7 @@ export class ClearcutLogger {
|
|
|
635
643
|
logMalformedJsonResponseEvent(event) {
|
|
636
644
|
const data = [
|
|
637
645
|
{
|
|
638
|
-
|
|
646
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_MALFORMED_JSON_RESPONSE_MODEL,
|
|
639
647
|
value: JSON.stringify(event.model),
|
|
640
648
|
},
|
|
641
649
|
];
|
|
@@ -645,7 +653,7 @@ export class ClearcutLogger {
|
|
|
645
653
|
logIdeConnectionEvent(event) {
|
|
646
654
|
const data = [
|
|
647
655
|
{
|
|
648
|
-
|
|
656
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_IDE_CONNECTION_TYPE,
|
|
649
657
|
value: JSON.stringify(event.connection_type),
|
|
650
658
|
},
|
|
651
659
|
];
|
|
@@ -655,31 +663,21 @@ export class ClearcutLogger {
|
|
|
655
663
|
logConversationFinishedEvent(event) {
|
|
656
664
|
const data = [
|
|
657
665
|
{
|
|
658
|
-
|
|
666
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_SESSION_ID,
|
|
659
667
|
value: this.config?.getSessionId() ?? '',
|
|
660
668
|
},
|
|
661
669
|
{
|
|
662
|
-
|
|
670
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_CONVERSATION_TURN_COUNT,
|
|
663
671
|
value: JSON.stringify(event.turnCount),
|
|
664
672
|
},
|
|
665
673
|
{
|
|
666
|
-
|
|
674
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_APPROVAL_MODE,
|
|
667
675
|
value: event.approvalMode,
|
|
668
676
|
},
|
|
669
677
|
];
|
|
670
678
|
this.enqueueLogEvent(this.createLogEvent(EventNames.CONVERSATION_FINISHED, data));
|
|
671
679
|
this.flushIfNeeded();
|
|
672
680
|
}
|
|
673
|
-
logKittySequenceOverflowEvent(event) {
|
|
674
|
-
const data = [
|
|
675
|
-
{
|
|
676
|
-
gemini_cli_key: EventMetadataKey.CELL_CLI_KITTY_SEQUENCE_LENGTH,
|
|
677
|
-
value: event.sequence_length.toString(),
|
|
678
|
-
},
|
|
679
|
-
];
|
|
680
|
-
this.enqueueLogEvent(this.createLogEvent(EventNames.KITTY_SEQUENCE_OVERFLOW, data));
|
|
681
|
-
this.flushIfNeeded();
|
|
682
|
-
}
|
|
683
681
|
logEndSessionEvent() {
|
|
684
682
|
// Flush immediately on session end.
|
|
685
683
|
this.enqueueLogEvent(this.createLogEvent(EventNames.END_SESSION, []));
|
|
@@ -691,7 +689,7 @@ export class ClearcutLogger {
|
|
|
691
689
|
const data = [];
|
|
692
690
|
if (event.error_message) {
|
|
693
691
|
data.push({
|
|
694
|
-
|
|
692
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_INVALID_CHUNK_ERROR_MESSAGE,
|
|
695
693
|
value: event.error_message,
|
|
696
694
|
});
|
|
697
695
|
}
|
|
@@ -701,19 +699,19 @@ export class ClearcutLogger {
|
|
|
701
699
|
logContentRetryEvent(event) {
|
|
702
700
|
const data = [
|
|
703
701
|
{
|
|
704
|
-
|
|
702
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_CONTENT_RETRY_ATTEMPT_NUMBER,
|
|
705
703
|
value: String(event.attempt_number),
|
|
706
704
|
},
|
|
707
705
|
{
|
|
708
|
-
|
|
706
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_CONTENT_RETRY_ERROR_TYPE,
|
|
709
707
|
value: event.error_type,
|
|
710
708
|
},
|
|
711
709
|
{
|
|
712
|
-
|
|
710
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_CONTENT_RETRY_DELAY_MS,
|
|
713
711
|
value: String(event.retry_delay_ms),
|
|
714
712
|
},
|
|
715
713
|
{
|
|
716
|
-
|
|
714
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_API_REQUEST_MODEL,
|
|
717
715
|
value: event.model,
|
|
718
716
|
},
|
|
719
717
|
];
|
|
@@ -723,127 +721,127 @@ export class ClearcutLogger {
|
|
|
723
721
|
logContentRetryFailureEvent(event) {
|
|
724
722
|
const data = [
|
|
725
723
|
{
|
|
726
|
-
|
|
724
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_CONTENT_RETRY_FAILURE_TOTAL_ATTEMPTS,
|
|
727
725
|
value: String(event.total_attempts),
|
|
728
726
|
},
|
|
729
727
|
{
|
|
730
|
-
|
|
728
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_CONTENT_RETRY_FAILURE_FINAL_ERROR_TYPE,
|
|
731
729
|
value: event.final_error_type,
|
|
732
730
|
},
|
|
733
731
|
{
|
|
734
|
-
|
|
732
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_API_REQUEST_MODEL,
|
|
735
733
|
value: event.model,
|
|
736
734
|
},
|
|
737
735
|
];
|
|
738
736
|
if (event.total_duration_ms) {
|
|
739
737
|
data.push({
|
|
740
|
-
|
|
738
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_CONTENT_RETRY_FAILURE_TOTAL_DURATION_MS,
|
|
741
739
|
value: String(event.total_duration_ms),
|
|
742
740
|
});
|
|
743
741
|
}
|
|
744
742
|
this.enqueueLogEvent(this.createLogEvent(EventNames.CONTENT_RETRY_FAILURE, data));
|
|
745
743
|
this.flushIfNeeded();
|
|
746
744
|
}
|
|
747
|
-
logExtensionInstallEvent(event) {
|
|
745
|
+
async logExtensionInstallEvent(event) {
|
|
748
746
|
const data = [
|
|
749
747
|
{
|
|
750
|
-
|
|
748
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_EXTENSION_NAME,
|
|
751
749
|
value: event.extension_name,
|
|
752
750
|
},
|
|
753
751
|
{
|
|
754
|
-
|
|
752
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_EXTENSION_ID,
|
|
755
753
|
value: event.extension_id,
|
|
756
754
|
},
|
|
757
755
|
{
|
|
758
|
-
|
|
756
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_EXTENSION_VERSION,
|
|
759
757
|
value: event.extension_version,
|
|
760
758
|
},
|
|
761
759
|
{
|
|
762
|
-
|
|
760
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_EXTENSION_SOURCE,
|
|
763
761
|
value: event.extension_source,
|
|
764
762
|
},
|
|
765
763
|
{
|
|
766
|
-
|
|
764
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_EXTENSION_INSTALL_STATUS,
|
|
767
765
|
value: event.status,
|
|
768
766
|
},
|
|
769
767
|
];
|
|
770
768
|
this.enqueueLogEvent(this.createBasicLogEvent(EventNames.EXTENSION_INSTALL, data));
|
|
771
|
-
this.flushToClearcut().catch((error) => {
|
|
769
|
+
await this.flushToClearcut().catch((error) => {
|
|
772
770
|
debugLogger.debug('Error flushing to Clearcut:', error);
|
|
773
771
|
});
|
|
774
772
|
}
|
|
775
|
-
logExtensionUninstallEvent(event) {
|
|
773
|
+
async logExtensionUninstallEvent(event) {
|
|
776
774
|
const data = [
|
|
777
775
|
{
|
|
778
|
-
|
|
776
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_EXTENSION_NAME,
|
|
779
777
|
value: event.extension_name,
|
|
780
778
|
},
|
|
781
779
|
{
|
|
782
|
-
|
|
780
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_EXTENSION_ID,
|
|
783
781
|
value: event.extension_id,
|
|
784
782
|
},
|
|
785
783
|
{
|
|
786
|
-
|
|
784
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_EXTENSION_UNINSTALL_STATUS,
|
|
787
785
|
value: event.status,
|
|
788
786
|
},
|
|
789
787
|
];
|
|
790
788
|
this.enqueueLogEvent(this.createBasicLogEvent(EventNames.EXTENSION_UNINSTALL, data));
|
|
791
|
-
this.flushToClearcut().catch((error) => {
|
|
789
|
+
await this.flushToClearcut().catch((error) => {
|
|
792
790
|
debugLogger.debug('Error flushing to Clearcut:', error);
|
|
793
791
|
});
|
|
794
792
|
}
|
|
795
|
-
logExtensionUpdateEvent(event) {
|
|
793
|
+
async logExtensionUpdateEvent(event) {
|
|
796
794
|
const data = [
|
|
797
795
|
{
|
|
798
|
-
|
|
796
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_EXTENSION_NAME,
|
|
799
797
|
value: event.extension_name,
|
|
800
798
|
},
|
|
801
799
|
{
|
|
802
|
-
|
|
800
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_EXTENSION_ID,
|
|
803
801
|
value: event.extension_id,
|
|
804
802
|
},
|
|
805
803
|
{
|
|
806
|
-
|
|
804
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_EXTENSION_VERSION,
|
|
807
805
|
value: event.extension_version,
|
|
808
806
|
},
|
|
809
807
|
{
|
|
810
|
-
|
|
808
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_EXTENSION_PREVIOUS_VERSION,
|
|
811
809
|
value: event.extension_previous_version,
|
|
812
810
|
},
|
|
813
811
|
{
|
|
814
|
-
|
|
812
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_EXTENSION_SOURCE,
|
|
815
813
|
value: event.extension_source,
|
|
816
814
|
},
|
|
817
815
|
{
|
|
818
|
-
|
|
816
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_EXTENSION_UPDATE_STATUS,
|
|
819
817
|
value: event.status,
|
|
820
818
|
},
|
|
821
819
|
];
|
|
822
820
|
this.enqueueLogEvent(this.createBasicLogEvent(EventNames.EXTENSION_UPDATE, data));
|
|
823
|
-
this.flushToClearcut().catch((error) => {
|
|
821
|
+
await this.flushToClearcut().catch((error) => {
|
|
824
822
|
debugLogger.debug('Error flushing to Clearcut:', error);
|
|
825
823
|
});
|
|
826
824
|
}
|
|
827
825
|
logToolOutputTruncatedEvent(event) {
|
|
828
826
|
const data = [
|
|
829
827
|
{
|
|
830
|
-
|
|
828
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_TOOL_CALL_NAME,
|
|
831
829
|
value: JSON.stringify(event.tool_name),
|
|
832
830
|
},
|
|
833
831
|
{
|
|
834
|
-
|
|
832
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_TOOL_OUTPUT_TRUNCATED_ORIGINAL_LENGTH,
|
|
835
833
|
value: JSON.stringify(event.original_content_length),
|
|
836
834
|
},
|
|
837
835
|
{
|
|
838
|
-
|
|
836
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_TOOL_OUTPUT_TRUNCATED_TRUNCATED_LENGTH,
|
|
839
837
|
value: JSON.stringify(event.truncated_content_length),
|
|
840
838
|
},
|
|
841
839
|
{
|
|
842
|
-
|
|
840
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_TOOL_OUTPUT_TRUNCATED_THRESHOLD,
|
|
843
841
|
value: JSON.stringify(event.threshold),
|
|
844
842
|
},
|
|
845
843
|
{
|
|
846
|
-
|
|
844
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_TOOL_OUTPUT_TRUNCATED_LINES,
|
|
847
845
|
value: JSON.stringify(event.lines),
|
|
848
846
|
},
|
|
849
847
|
];
|
|
@@ -853,85 +851,85 @@ export class ClearcutLogger {
|
|
|
853
851
|
logModelRoutingEvent(event) {
|
|
854
852
|
const data = [
|
|
855
853
|
{
|
|
856
|
-
|
|
854
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_ROUTING_DECISION,
|
|
857
855
|
value: event.decision_model,
|
|
858
856
|
},
|
|
859
857
|
{
|
|
860
|
-
|
|
858
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_ROUTING_DECISION_SOURCE,
|
|
861
859
|
value: event.decision_source,
|
|
862
860
|
},
|
|
863
861
|
{
|
|
864
|
-
|
|
862
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_ROUTING_LATENCY_MS,
|
|
865
863
|
value: event.routing_latency_ms.toString(),
|
|
866
864
|
},
|
|
867
865
|
{
|
|
868
|
-
|
|
866
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_ROUTING_FAILURE,
|
|
869
867
|
value: event.failed.toString(),
|
|
870
868
|
},
|
|
871
869
|
];
|
|
872
870
|
if (event.error_message) {
|
|
873
871
|
data.push({
|
|
874
|
-
|
|
872
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_ROUTING_FAILURE_REASON,
|
|
875
873
|
value: event.error_message,
|
|
876
874
|
});
|
|
877
875
|
}
|
|
878
876
|
this.enqueueLogEvent(this.createLogEvent(EventNames.MODEL_ROUTING, data));
|
|
879
877
|
this.flushIfNeeded();
|
|
880
878
|
}
|
|
881
|
-
logExtensionEnableEvent(event) {
|
|
879
|
+
async logExtensionEnableEvent(event) {
|
|
882
880
|
const data = [
|
|
883
881
|
{
|
|
884
|
-
|
|
882
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_EXTENSION_NAME,
|
|
885
883
|
value: event.extension_name,
|
|
886
884
|
},
|
|
887
885
|
{
|
|
888
|
-
|
|
886
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_EXTENSION_ID,
|
|
889
887
|
value: event.extension_id,
|
|
890
888
|
},
|
|
891
889
|
{
|
|
892
|
-
|
|
890
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_EXTENSION_ENABLE_SETTING_SCOPE,
|
|
893
891
|
value: event.setting_scope,
|
|
894
892
|
},
|
|
895
893
|
];
|
|
896
894
|
this.enqueueLogEvent(this.createBasicLogEvent(EventNames.EXTENSION_ENABLE, data));
|
|
897
|
-
this.flushToClearcut().catch((error) => {
|
|
895
|
+
await this.flushToClearcut().catch((error) => {
|
|
898
896
|
debugLogger.debug('Error flushing to Clearcut:', error);
|
|
899
897
|
});
|
|
900
898
|
}
|
|
901
899
|
logModelSlashCommandEvent(event) {
|
|
902
900
|
const data = [
|
|
903
901
|
{
|
|
904
|
-
|
|
902
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_MODEL_SLASH_COMMAND,
|
|
905
903
|
value: event.model_name,
|
|
906
904
|
},
|
|
907
905
|
];
|
|
908
906
|
this.enqueueLogEvent(this.createLogEvent(EventNames.MODEL_SLASH_COMMAND, data));
|
|
909
907
|
this.flushIfNeeded();
|
|
910
908
|
}
|
|
911
|
-
logExtensionDisableEvent(event) {
|
|
909
|
+
async logExtensionDisableEvent(event) {
|
|
912
910
|
const data = [
|
|
913
911
|
{
|
|
914
|
-
|
|
912
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_EXTENSION_NAME,
|
|
915
913
|
value: event.extension_name,
|
|
916
914
|
},
|
|
917
915
|
{
|
|
918
|
-
|
|
916
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_EXTENSION_ID,
|
|
919
917
|
value: event.extension_id,
|
|
920
918
|
},
|
|
921
919
|
{
|
|
922
|
-
|
|
920
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_EXTENSION_DISABLE_SETTING_SCOPE,
|
|
923
921
|
value: event.setting_scope,
|
|
924
922
|
},
|
|
925
923
|
];
|
|
926
924
|
this.enqueueLogEvent(this.createBasicLogEvent(EventNames.EXTENSION_DISABLE, data));
|
|
927
|
-
this.flushToClearcut().catch((error) => {
|
|
925
|
+
await this.flushToClearcut().catch((error) => {
|
|
928
926
|
debugLogger.debug('Error flushing to Clearcut:', error);
|
|
929
927
|
});
|
|
930
928
|
}
|
|
931
929
|
logSmartEditStrategyEvent(event) {
|
|
932
930
|
const data = [
|
|
933
931
|
{
|
|
934
|
-
|
|
932
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_SMART_EDIT_STRATEGY,
|
|
935
933
|
value: event.strategy,
|
|
936
934
|
},
|
|
937
935
|
];
|
|
@@ -941,7 +939,7 @@ export class ClearcutLogger {
|
|
|
941
939
|
logSmartEditCorrectionEvent(event) {
|
|
942
940
|
const data = [
|
|
943
941
|
{
|
|
944
|
-
|
|
942
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_SMART_EDIT_CORRECTION,
|
|
945
943
|
value: event.correction,
|
|
946
944
|
},
|
|
947
945
|
];
|
|
@@ -951,11 +949,11 @@ export class ClearcutLogger {
|
|
|
951
949
|
logAgentStartEvent(event) {
|
|
952
950
|
const data = [
|
|
953
951
|
{
|
|
954
|
-
|
|
952
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_AGENT_ID,
|
|
955
953
|
value: event.agent_id,
|
|
956
954
|
},
|
|
957
955
|
{
|
|
958
|
-
|
|
956
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_AGENT_NAME,
|
|
959
957
|
value: event.agent_name,
|
|
960
958
|
},
|
|
961
959
|
];
|
|
@@ -965,23 +963,23 @@ export class ClearcutLogger {
|
|
|
965
963
|
logAgentFinishEvent(event) {
|
|
966
964
|
const data = [
|
|
967
965
|
{
|
|
968
|
-
|
|
966
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_AGENT_ID,
|
|
969
967
|
value: event.agent_id,
|
|
970
968
|
},
|
|
971
969
|
{
|
|
972
|
-
|
|
970
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_AGENT_NAME,
|
|
973
971
|
value: event.agent_name,
|
|
974
972
|
},
|
|
975
973
|
{
|
|
976
|
-
|
|
974
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_AGENT_DURATION_MS,
|
|
977
975
|
value: event.duration_ms.toString(),
|
|
978
976
|
},
|
|
979
977
|
{
|
|
980
|
-
|
|
978
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_AGENT_TURN_COUNT,
|
|
981
979
|
value: event.turn_count.toString(),
|
|
982
980
|
},
|
|
983
981
|
{
|
|
984
|
-
|
|
982
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_AGENT_TERMINATE_REASON,
|
|
985
983
|
value: event.terminate_reason,
|
|
986
984
|
},
|
|
987
985
|
];
|
|
@@ -991,27 +989,27 @@ export class ClearcutLogger {
|
|
|
991
989
|
logRecoveryAttemptEvent(event) {
|
|
992
990
|
const data = [
|
|
993
991
|
{
|
|
994
|
-
|
|
992
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_AGENT_ID,
|
|
995
993
|
value: event.agent_id,
|
|
996
994
|
},
|
|
997
995
|
{
|
|
998
|
-
|
|
996
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_AGENT_NAME,
|
|
999
997
|
value: event.agent_name,
|
|
1000
998
|
},
|
|
1001
999
|
{
|
|
1002
|
-
|
|
1000
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_AGENT_RECOVERY_REASON,
|
|
1003
1001
|
value: event.reason,
|
|
1004
1002
|
},
|
|
1005
1003
|
{
|
|
1006
|
-
|
|
1004
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_AGENT_RECOVERY_DURATION_MS,
|
|
1007
1005
|
value: event.duration_ms.toString(),
|
|
1008
1006
|
},
|
|
1009
1007
|
{
|
|
1010
|
-
|
|
1008
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_AGENT_RECOVERY_SUCCESS,
|
|
1011
1009
|
value: event.success.toString(),
|
|
1012
1010
|
},
|
|
1013
1011
|
{
|
|
1014
|
-
|
|
1012
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_AGENT_TURN_COUNT,
|
|
1015
1013
|
value: event.turn_count.toString(),
|
|
1016
1014
|
},
|
|
1017
1015
|
];
|
|
@@ -1021,13 +1019,35 @@ export class ClearcutLogger {
|
|
|
1021
1019
|
logWebFetchFallbackAttemptEvent(event) {
|
|
1022
1020
|
const data = [
|
|
1023
1021
|
{
|
|
1024
|
-
|
|
1022
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_WEB_FETCH_FALLBACK_REASON,
|
|
1025
1023
|
value: event.reason,
|
|
1026
1024
|
},
|
|
1027
1025
|
];
|
|
1028
1026
|
this.enqueueLogEvent(this.createLogEvent(EventNames.WEB_FETCH_FALLBACK_ATTEMPT, data));
|
|
1029
1027
|
this.flushIfNeeded();
|
|
1030
1028
|
}
|
|
1029
|
+
logLlmLoopCheckEvent(event) {
|
|
1030
|
+
const data = [
|
|
1031
|
+
{
|
|
1032
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_PROMPT_ID,
|
|
1033
|
+
value: event.prompt_id,
|
|
1034
|
+
},
|
|
1035
|
+
{
|
|
1036
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_LLM_LOOP_CHECK_FLASH_CONFIDENCE,
|
|
1037
|
+
value: event.flash_confidence.toString(),
|
|
1038
|
+
},
|
|
1039
|
+
{
|
|
1040
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_LLM_LOOP_CHECK_MAIN_MODEL,
|
|
1041
|
+
value: event.main_model,
|
|
1042
|
+
},
|
|
1043
|
+
{
|
|
1044
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_LLM_LOOP_CHECK_MAIN_MODEL_CONFIDENCE,
|
|
1045
|
+
value: event.main_model_confidence.toString(),
|
|
1046
|
+
},
|
|
1047
|
+
];
|
|
1048
|
+
this.enqueueLogEvent(this.createLogEvent(EventNames.LLM_LOOP_CHECK, data));
|
|
1049
|
+
this.flushIfNeeded();
|
|
1050
|
+
}
|
|
1031
1051
|
/**
|
|
1032
1052
|
* Adds default fields to data, and returns a new data array. This fields
|
|
1033
1053
|
* should exist on all log events.
|
|
@@ -1035,29 +1055,33 @@ export class ClearcutLogger {
|
|
|
1035
1055
|
addDefaultFields(data, totalAccounts) {
|
|
1036
1056
|
const defaultLogMetadata = [
|
|
1037
1057
|
{
|
|
1038
|
-
|
|
1058
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_SESSION_ID,
|
|
1039
1059
|
value: this.config?.getSessionId() ?? '',
|
|
1040
1060
|
},
|
|
1041
1061
|
{
|
|
1042
|
-
|
|
1062
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_AUTH_TYPE,
|
|
1043
1063
|
value: JSON.stringify(this.config?.getContentGeneratorConfig()?.authType),
|
|
1044
1064
|
},
|
|
1045
1065
|
{
|
|
1046
|
-
|
|
1066
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_GOOGLE_ACCOUNTS_COUNT,
|
|
1047
1067
|
value: `${totalAccounts}`,
|
|
1048
1068
|
},
|
|
1049
1069
|
{
|
|
1050
|
-
|
|
1070
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_PROMPT_ID,
|
|
1051
1071
|
value: this.promptId,
|
|
1052
1072
|
},
|
|
1053
1073
|
{
|
|
1054
|
-
|
|
1074
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_NODE_VERSION,
|
|
1055
1075
|
value: process.versions.node,
|
|
1056
1076
|
},
|
|
1057
1077
|
{
|
|
1058
|
-
|
|
1078
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_USER_SETTINGS,
|
|
1059
1079
|
value: this.getConfigJson(),
|
|
1060
1080
|
},
|
|
1081
|
+
{
|
|
1082
|
+
CELL_CLI_key: EventMetadataKey.CELL_CLI_INTERACTIVE,
|
|
1083
|
+
value: this.config?.isInteractive().toString() ?? 'false',
|
|
1084
|
+
},
|
|
1061
1085
|
];
|
|
1062
1086
|
return [...data, ...defaultLogMetadata];
|
|
1063
1087
|
}
|