Skip to content

Feat: perstack log command #183

@FL4TLiN3

Description

@FL4TLiN3

Description

Add a log viewing command for inspecting job/run history and events.

depends on #177

Use Case

Enable developers and operators to:

  • View execution history for debugging
  • Inspect specific checkpoints
  • Filter events with jq-like queries
  • Analyze run behavior post-execution

Proposed Solution

Add command to apps/perstack/src/:

src/
├── log.ts                 # New command
└── lib/
    └── log-filter.ts      # jq-like query implementation

CLI Options

perstack log --job <jobId>
perstack log --run <runId>
perstack log --checkpoint <checkpointId>
perstack log --filter <jq-like-query>

Options can be combined:

perstack log --job abc123 --filter '.type == "completeRun"'

Filter Examples

# Show only completeRun events
perstack log --job abc123 --filter '.type == "completeRun"'

# Show tool calls for specific skill
perstack log --run xyz789 --filter '.toolCalls[]? | select(.skillName == "base")'

# Show events after step 5
perstack log --job abc123 --filter '.stepNumber > 5'

Output Format

  • Terminal output with colors (event type, timestamp, summary)
  • JSON output with --json flag
  • Pagination for large result sets

Acceptance Criteria

  • --job shows all events for a job
  • --run shows events for specific run
  • --checkpoint shows checkpoint details (messages, status, etc.)
  • --filter supports basic jq-like queries
  • Output formatted for terminal with colors
  • --json flag for machine-readable output
  • Graceful handling of non-existent job/run/checkpoint

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions