apex-dev-tools / apex-dev-tools/apex-log-parser
✨ feat: Fix the event classification: split SOSL from SOQL, separate frames from methods
- 主要语言
- TypeScript
- 星标
- 2
- 派生
- 0
- 平均合并
- 5 小时 51 分钟
- 30 天内合并 PR
- 32
描述
### Problem
MCP builds its own operation taxonomy on top of the parser's `type` and `subCategory` because the
parser's classification does not separate what a reader needs to see apart —
`src/tools/operations.ts`:
- `SOSL` cannot be told from `SOQL`: both share the `SOQL` sub-category, so MCP re-splits them by raw
type in `KIND_BY_TYPE` (lines 185-188).
- `EXECUTION_STARTED` is not a method, so MCP holds `FRAME_TYPES` (line 175) to exclude it.
- `ENTERING_MANAGED_PKG` is a package boundary, not a method, and needs the same treatment.
Because `kindOf` returns nothing for a type its tables do not cover, any unclassified frame drops out
of MCP's `Operation` chain — which is what makes its caller-namespace derivation diverge from the
immediate-parent model (see the `callerNamespace` issue).
### Proposed solution
Fix the classification in the parser rather than in each consumer:
- Split SOSL from SOQL at the sub-category level.
- Distinguish a root or execution frame, and a managed-package boundary, from a method.
- Make the classification total, so no event type is unclassified.
Review MCP's `OPERATION_KINDS`, `LOG_CATEGORY_BY_KIND` and `LEVEL_FIELD_BY_CATEGORY` as the reference
for what consumers actually need, and decide which of those mappings belong here.
#### Acceptance
- SOSL and SOQL are distinguishable without inspecting the raw type string.
- Every event type maps to a kind.
- MCP can drop `FRAME_TYPES` and `KIND_BY_TYPE`.
### Alternatives considered
_None recorded._
贡献指南
调研方向
Start with src/tools/operations.ts, especially OPERATION_KINDS, LOG_CATEGORY_BY_KIND, LEVEL_FIELD_BY_CATEGORY, FRAME_TYPES, and KIND_BY_TYPE, then trace the parser classification definitions they reflect. Compare the consumer mappings with the proposed parser-level kinds and identify the event types that need coverage. Done means SOSL and SOQL are distinguishable, every event type has a kind, and MCP no longer needs its two classification tables.
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- typescript
- 领域
- tooling
- Issue 类型
- 功能
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 活跃
- 描述清晰度
- 基本清楚
- 新手友好度
- 48/100