Skip to content

Conversation

@MichaelAnders
Copy link
Contributor

@MichaelAnders MichaelAnders commented Jan 27, 2026

Problem: PR #20 introduced new code but unintentionally introduced inconsistent code.

Changes implemented:

  1. Existing code corrected
  2. Added missing dns-logger.js
  3. Implemented audit logging code (partly)

Testing:
success: npm run test:unit
success: Claude connects to Lynkr correctly

Remaining task for me (delayed due to time constraints on my end):

  • Re-adding missing logging calls - these are not triggered & do not affect Lynkr negatively (which is imo the most important fix!).
  • So only the "calls of the logging code" are missing, which I can add very easily + safe after this code has been added and I find the time to add it (not much, but not possible right now).

Problem: PR Fast-Editor#20 introduced new code but unintentionally introduced

inconsistent code.

Changes implemented:

1. Files cleaned up

2. Missing dns-logger.js added

3. New code added

Testing:

success: npm run test:unit

success: Claude connects to Lynkr correctly
@vishalveerareddy123
Copy link
Collaborator

Thanks @MichaelAnders I will take a look at this one today

Integrates the audit logging infrastructure with the orchestrator's
runAgentLoop function to capture all LLM request/response pairs
for compliance and debugging purposes.

Changes:
- Add crypto module import for correlation ID generation
- Add getDestinationUrl() helper to resolve provider endpoints
- Instantiate audit logger at the start of runAgentLoop
- Log LLM requests before invokeModel() with correlation IDs
- Log LLM responses after invokeModel() with token usage and latency
- Handle streaming, success, and error response cases
- Add logs/ directory to .gitignore

The audit logger is a no-op when disabled, ensuring zero overhead
when not in use. All logs use structured JSON format with correlation
IDs to link request/response pairs.

Implements plan from PR Fast-Editor#27 for intelligent audit logging.
@MichaelAnders
Copy link
Contributor Author

I have added the missing code as my plans for the next 3 days have changed this morning.

Testing:
success: npm run test:unit
success: Claude connects to Lynkr correctly
success: Logging works. I can see logs being created after setting:
export LLM_AUDIT_ENABLED=true
export LLM_AUDIT_LOG_FILE="./logs/llm-audit.log"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants