|
16 | 16 | * - `keepAlive` starts NEVER count and never touch the owner sets: |
17 | 17 | * custody is not an execution. |
18 | 18 | * - `sticky` starts count ONCE per `(nodePath, owner)` pair. |
19 | | - * - `access: 'shell'` starts NEVER count: a heuristic path sighting |
20 | | - * parsed out of a shell command is not an execution (spec §Capture |
21 | | - * level rung 5, "a SIGHTING, not evidence"). The sighting still |
22 | | - * lands in the typed recent log (both ends, `kind: 'shell'`) so |
23 | | - * the inspector can show who named the file, and the frame rides |
24 | | - * WITH the node's unchanged (count 0) stats so a client learns the |
25 | | - * node has a log to show. |
| 19 | + * - `access: 'shell'` starts COUNT like any other resource access |
| 20 | + * (user decision 2026-08-30, reversing the 2026-08-18 no-count |
| 21 | + * rule: the card's execution pill is the map's only per-node |
| 22 | + * counter, and a sighted-only node was invisible there). The entry |
| 23 | + * stays tagged `kind: 'shell'` in the typed recent log (both ends) |
| 24 | + * so the inspector tells a sighting apart from a read; the |
| 25 | + * session-journal fold admits it as a `reads` relation too. |
26 | 26 | * - Everything else (skill invocations, command expansions, markdown |
27 | | - * reads) counts on every signal. |
| 27 | + * reads and writes) counts on every signal. |
28 | 28 | * |
29 | 29 | * Every bound below saturates or evicts oldest entries; hitting a cap |
30 | 30 | * never errors and never blocks ingestion. |
@@ -327,9 +327,6 @@ export class ActivityStatsService { |
327 | 327 | record(data: INodeActivityEventData): INodeActivityStats | null { |
328 | 328 | if (data.nodePath === undefined || data.phase !== 'start') return null; |
329 | 329 | if (data.keepAlive === true) return null; |
330 | | - if (data.access === 'shell') { |
331 | | - return this.sight(data.nodePath, data.owner, data.detail, data.access); |
332 | | - } |
333 | 330 | if (data.sticky === true && data.owner !== undefined) { |
334 | 331 | if (!this.claimStickyOnce(data.nodePath, data.owner)) return null; |
335 | 332 | } |
@@ -473,34 +470,16 @@ export class ActivityStatsService { |
473 | 470 | } |
474 | 471 |
|
475 | 472 | /** |
476 | | - * A shell SIGHTING: lands in the typed recent log on both ends (the |
477 | | - * sighted node's entry plus the caller's mirrored one) but mutates |
478 | | - * NO execution stat, `count` / `lastStartAt` / `lastOwner` / owner |
479 | | - * set stay untouched (spec §Execution stats). Returns the node's |
480 | | - * UNCHANGED stats so the WS frame carries them and a client learns |
481 | | - * the node has a log to show (a count of 0 next to a non-empty |
482 | | - * recent log reads as sighted-only); custody `keepAlive` starts keep |
483 | | - * riding bare, they log nothing. |
| 473 | + * Count one start: every node-attributed start that survived the |
| 474 | + * gates above, a unit's own execution or a resource access (mcp / |
| 475 | + * read / write / shell alike, spec §Execution stats). The typed |
| 476 | + * recent entry lands on both ends of a resource access. |
484 | 477 | */ |
485 | | - private sight( |
486 | | - nodePath: string, |
487 | | - owner: string | undefined, |
488 | | - detail: string | undefined, |
489 | | - access: 'shell', |
490 | | - ): INodeActivityStats { |
491 | | - const at = Date.now(); |
492 | | - const caller = this.correlateCaller(nodePath, owner, access); |
493 | | - const state = this.stateFor(nodePath); |
494 | | - this.pushRecent(state, buildRecentEntry({ at, owner, detail, caller, kind: access })); |
495 | | - this.trackAccess(nodePath, owner, detail, access, caller, at); |
496 | | - return projectStats(state); |
497 | | - } |
498 | | - |
499 | 478 | private count( |
500 | 479 | nodePath: string, |
501 | 480 | owner: string | undefined, |
502 | 481 | detail: string | undefined, |
503 | | - access: 'mcp' | 'read' | 'write' | undefined, |
| 482 | + access: 'mcp' | 'read' | 'write' | 'shell' | undefined, |
504 | 483 | ): INodeActivityStats { |
505 | 484 | const state = this.stateFor(nodePath); |
506 | 485 | state.count += 1; |
|
0 commit comments