Skip to content

Stream procedure run logs to CloudWatch#265

Merged
endymion merged 5 commits intodevelopfrom
feature/plx-07dc0d-execute-tactus-mcp-tool
May 1, 2026
Merged

Stream procedure run logs to CloudWatch#265
endymion merged 5 commits intodevelopfrom
feature/plx-07dc0d-execute-tactus-mcp-tool

Conversation

@endymion
Copy link
Copy Markdown
Contributor

@endymion endymion commented May 1, 2026

Summary

Brings Derek's latest execute-tactus branch work into develop.

  • Streams procedure lifecycle/tool/cost events to CloudWatch Logs in real time.
  • Writes full LLM prompt-context JSON to a separate per-invocation CloudWatch stream.
  • Stores CloudWatch log group and stream prefix metadata on the Procedure record so dashboard views can locate logs later.
  • Adds IAM permissions for consoleRunWorker to write logs and authenticated dashboard users to read logs.
  • Adds a dashboard CloudWatch Logs client utility for later UI integration.
  • Adds the direct dashboard dependency on @aws-sdk/client-cloudwatch-logs and refreshes the lockfile.

Integration Fixes

  • Merged current develop into the execute-tactus branch after PR Fix procedure grid dispatch stability #261 landed.
  • Fixed the dashboard utility to avoid a static import of local/generated amplify_outputs.json, which would fail CI when the generated file is absent.

Verification

  • cd dashboard && npm run typecheck
  • python -m py_compile plexus/cli/procedure/cloudwatch_logger.py plexus/cli/procedure/procedure_executor.py

Kanbus: plx-5604df

dereknorrbom and others added 5 commits May 1, 2026 15:30
Each procedure invocation opens two CloudWatch log streams under
/plexus/procedures/{account_key}:
  - {procedure_id}/run/{invocation_run_id}         lifecycle/tool/cost events
  - {procedure_id}/llm-context/{invocation_run_id} full LLM prompt_context JSON

Events are written directly on each call (no buffering) so logs appear
live during execution. The log group and stream prefix are stored in
procedure.metadata so the dashboard can locate them by convention.

IAM write permissions added to the consoleRunWorker Lambda role.
IAM read permissions added to the Amplify authenticated Cognito role.
Frontend utility added at dashboard/utils/cloudwatch-logs-client.ts.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@endymion endymion requested a review from a team as a code owner May 1, 2026 22:36
@endymion endymion requested review from dereknorrbom and removed request for a team May 1, 2026 22:36
@endymion endymion merged commit b2315bd into develop May 1, 2026
11 checks passed
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