@bli-cockpit/cli 0.2.47 → 0.2.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adapters/raw-evidence-attribution-gaps.js +133 -0
- package/dist/adapters/raw-evidence.js +360 -349
- package/dist/autostart-contract.js +79 -0
- package/dist/autostart-darwin-plist.js +265 -0
- package/dist/autostart-darwin.js +171 -0
- package/dist/autostart-windows-scripts.js +310 -0
- package/dist/autostart-windows-task-xml.js +260 -0
- package/dist/autostart-windows.js +237 -0
- package/dist/autostart-xml.js +23 -0
- package/dist/autostart.js +35 -1148
- package/dist/commands/agent-rules-command.js +55 -0
- package/dist/commands/agent-session-report.js +290 -0
- package/dist/commands/analyze.js +131 -0
- package/dist/commands/autostart-command.js +105 -0
- package/dist/commands/backfill.js +824 -551
- package/dist/commands/cli-io.js +13 -0
- package/dist/commands/heartbeat.js +18 -0
- package/dist/commands/install-receipts.js +34 -0
- package/dist/commands/jarvis.js +179 -3
- package/dist/commands/local-arg-values.js +169 -0
- package/dist/commands/local-args-collector.js +578 -0
- package/dist/commands/local-args-tower.js +870 -0
- package/dist/commands/local-args.js +8 -1549
- package/dist/commands/local-help.js +11 -3
- package/dist/commands/local.js +18 -1786
- package/dist/commands/login.js +53 -0
- package/dist/commands/logout.js +66 -0
- package/dist/commands/onboard-receipts.js +66 -0
- package/dist/commands/onboard-report.js +274 -0
- package/dist/commands/onboard.js +449 -0
- package/dist/commands/ops-render.js +36 -0
- package/dist/commands/public-root.js +1 -1
- package/dist/commands/serve.js +13 -0
- package/dist/commands/session-sync.js +513 -534
- package/dist/commands/settings-render.js +28 -0
- package/dist/commands/settings.js +66 -2
- package/dist/commands/start.js +47 -0
- package/dist/commands/sync-followups.js +203 -0
- package/dist/commands/sync.js +381 -0
- package/dist/dev-build.js +186 -0
- package/dist/tower-stream.js +20 -4
- package/package.json +2 -2
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { isLiveRawEvidenceSyncAttribution } from "../raw-evidence-attribution-policy.js";
|
|
2
|
+
import { recordScanned, recordSkipCount, recordTruncationCount, } from "./raw-evidence-completeness.js";
|
|
3
|
+
/**
|
|
4
|
+
* Record every Codex session the attribution scan saw, capped or lost, so the
|
|
5
|
+
* pass reports them as its own gaps.
|
|
6
|
+
*/
|
|
7
|
+
export function recordCodexAttributionCompleteness(ledger, scan, selectedPaths) {
|
|
8
|
+
recordScanned(ledger, "codex_attribution", scan.scanned_file_count);
|
|
9
|
+
ledger.caps.push(...codexAttributionCaps(scan));
|
|
10
|
+
recordSkipCount(ledger, "codex_attribution", "session_limit_overflow", Math.max(0, scan.discovered_file_count - scan.scanned_file_count));
|
|
11
|
+
recordSkipCount(ledger, "codex_attribution", "directory_read_failed", scan.directory_read_failed_count);
|
|
12
|
+
recordSkipCount(ledger, "codex_attribution", "file_stat_failed", scan.stat_failed_count);
|
|
13
|
+
recordSkipCount(ledger, "codex_attribution", "secret_like_directory", scan.secret_path_skipped_count);
|
|
14
|
+
recordAttributionResultSkips(ledger, "codex_attribution", scan.results, selectedPaths);
|
|
15
|
+
}
|
|
16
|
+
/** Every limit the Codex attribution scan ran under, and whether it bit. */
|
|
17
|
+
function codexAttributionCaps(scan) {
|
|
18
|
+
return [
|
|
19
|
+
{
|
|
20
|
+
source: "codex_attribution",
|
|
21
|
+
cap_type: "scan_window_minutes",
|
|
22
|
+
limit: scan.since_minutes,
|
|
23
|
+
observed: scan.since_minutes,
|
|
24
|
+
applied: false,
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
source: "codex_attribution",
|
|
28
|
+
cap_type: "session_limit",
|
|
29
|
+
limit: scan.session_limit,
|
|
30
|
+
observed: scan.discovered_file_count,
|
|
31
|
+
applied: scan.session_limit_applied,
|
|
32
|
+
},
|
|
33
|
+
];
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Record every Claude session the attribution scan saw, capped or lost —
|
|
37
|
+
* sidecars included, because a subagent transcript nobody could read is missing
|
|
38
|
+
* evidence exactly like a main.
|
|
39
|
+
*/
|
|
40
|
+
export function recordClaudeAttributionCompleteness(ledger, scan, selectedPaths) {
|
|
41
|
+
recordScanned(ledger, "claude_attribution", scan.scanned_session_count);
|
|
42
|
+
if (scan.disabled_reason) {
|
|
43
|
+
recordSkipCount(ledger, "claude_attribution", scan.disabled_reason, 1);
|
|
44
|
+
}
|
|
45
|
+
ledger.caps.push(...claudeAttributionCaps(scan));
|
|
46
|
+
recordClaudeAttributionSkips(ledger, scan);
|
|
47
|
+
recordTruncationCount(ledger, "claude_attribution", "oversized_jsonl_line", scan.counts.oversized_lines_skipped, { max_bytes: scan.max_line_buffer_bytes });
|
|
48
|
+
recordAttributionResultSkips(ledger, "claude_attribution", scan.results, selectedPaths);
|
|
49
|
+
recordClaudeSidecarSkips(ledger, scan);
|
|
50
|
+
}
|
|
51
|
+
/** Every limit the Claude attribution scan ran under, and whether it bit. */
|
|
52
|
+
function claudeAttributionCaps(scan) {
|
|
53
|
+
return [
|
|
54
|
+
{
|
|
55
|
+
source: "claude_attribution",
|
|
56
|
+
cap_type: "scan_window_minutes",
|
|
57
|
+
limit: scan.since_minutes,
|
|
58
|
+
observed: scan.since_minutes,
|
|
59
|
+
applied: false,
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
source: "claude_attribution",
|
|
63
|
+
cap_type: "session_limit",
|
|
64
|
+
limit: scan.session_limit,
|
|
65
|
+
observed: scan.discovered_session_count,
|
|
66
|
+
applied: scan.session_limit_applied,
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
source: "claude_attribution",
|
|
70
|
+
cap_type: "max_file_bytes",
|
|
71
|
+
limit: scan.max_file_bytes,
|
|
72
|
+
applied: scan.counts.mains_oversized > 0 ||
|
|
73
|
+
scan.results.some((result) => result.reason === "file_too_large"),
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
source: "claude_attribution",
|
|
77
|
+
cap_type: "max_sidecar_files",
|
|
78
|
+
limit: scan.max_sidecar_files,
|
|
79
|
+
observed: scan.max_sidecar_files + scan.counts.sidecars_capped,
|
|
80
|
+
applied: scan.counts.sidecars_capped > 0,
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
source: "claude_attribution",
|
|
84
|
+
cap_type: "max_line_buffer_bytes",
|
|
85
|
+
limit: scan.max_line_buffer_bytes,
|
|
86
|
+
applied: scan.counts.oversized_lines_skipped > 0,
|
|
87
|
+
},
|
|
88
|
+
];
|
|
89
|
+
}
|
|
90
|
+
/** Each way the Claude scan lost whole sessions, one named skip count apiece. */
|
|
91
|
+
function recordClaudeAttributionSkips(ledger, scan) {
|
|
92
|
+
recordSkipCount(ledger, "claude_attribution", "session_limit_overflow", Math.max(0, scan.discovered_session_count - scan.scanned_session_count));
|
|
93
|
+
recordSkipCount(ledger, "claude_attribution", "secret_like_project_dir", scan.project_dirs_skipped);
|
|
94
|
+
recordSkipCount(ledger, "claude_attribution", "project_dir_read_failed", scan.project_dir_read_failed_count);
|
|
95
|
+
recordSkipCount(ledger, "claude_attribution", "session_stat_failed", scan.session_stat_failed_count);
|
|
96
|
+
recordSkipCount(ledger, "claude_attribution", "sidecar_dir_read_failed", scan.sidecar_dir_read_failed_count);
|
|
97
|
+
recordSkipCount(ledger, "claude_attribution", "sidecar_stat_failed", scan.sidecar_stat_failed_count);
|
|
98
|
+
recordSkipCount(ledger, "claude_attribution", "sidecar_limit_overflow", scan.counts.sidecars_capped);
|
|
99
|
+
}
|
|
100
|
+
/** One skip per sidecar the scan declined, labelled with its own reason. */
|
|
101
|
+
function recordClaudeSidecarSkips(ledger, scan) {
|
|
102
|
+
for (const result of scan.results) {
|
|
103
|
+
for (const sidecar of result.sidecar_files) {
|
|
104
|
+
if (!sidecar.skipped_reason)
|
|
105
|
+
continue;
|
|
106
|
+
recordSkipCount(ledger, "claude_attribution", `sidecar_${sidecar.skipped_reason}`, 1);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
/** One skip per scanned session this pass is neither collecting nor excusing. */
|
|
111
|
+
function recordAttributionResultSkips(ledger, source, results, selectedPaths) {
|
|
112
|
+
for (const result of results) {
|
|
113
|
+
if (isAttributionAccountedFor(result, selectedPaths))
|
|
114
|
+
continue;
|
|
115
|
+
const reason = result.state === "skipped"
|
|
116
|
+
? result.reason
|
|
117
|
+
: `attribution_${result.state}:${result.reason}`;
|
|
118
|
+
recordSkipCount(ledger, source, reason, 1);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Not every unattributed result is a gap. A selected session is being collected
|
|
123
|
+
* by this pass, and a live-sync-safe synthetic target is owned by another
|
|
124
|
+
* workspace's pack — neither is missing evidence.
|
|
125
|
+
*/
|
|
126
|
+
function isAttributionAccountedFor(result, selectedPaths) {
|
|
127
|
+
if (result.state === "attributed")
|
|
128
|
+
return true;
|
|
129
|
+
if (selectedPaths.has(result.file_path))
|
|
130
|
+
return true;
|
|
131
|
+
return (result.worktree !== null &&
|
|
132
|
+
isLiveRawEvidenceSyncAttribution(result.state, result.reason, true));
|
|
133
|
+
}
|