@brunobracaioli/aibrain 0.2.0-beta.1 → 0.3.0-beta.7
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/README.md +48 -4
- package/dist/assets/claude/.claude-plugin/plugin.json +48 -0
- package/dist/assets/claude/hooks/context-compaction.ts +4702 -150
- package/dist/assets/claude/hooks/provider-window.js +263 -0
- package/dist/assets/claude/hooks/state-fitting.d.mts +47 -0
- package/dist/assets/claude/hooks/state-fitting.mjs +324 -0
- package/dist/assets/codex-context-compaction.mjs +1271 -157
- package/dist/assets/context-selection-fitting.mjs +194 -0
- package/dist/assets/context-state-fitting.mjs +324 -0
- package/dist/assets/context-telemetry-reporter.mjs +305 -0
- package/dist/assets/jev-paid-pilot-terminal.mjs +571 -125
- package/dist/claude-checkpoint.mjs +1338 -0
- package/dist/claude-observation.mjs +1224 -0
- package/dist/cli.mjs +215 -6
- package/dist/codex-diagnostics.mjs +411 -0
- package/dist/codex-permissions.mjs +590 -0
- package/dist/context-telemetry.mjs +257 -0
- package/dist/launch.mjs +332 -17
- package/dist/mcp.mjs +329 -7
- package/dist/monitor.mjs +11 -0
- package/dist/package.json +1 -1
- package/dist/platform.mjs +1 -1
- package/dist/state.mjs +107 -4
- package/dist/telemetry-report.mjs +133 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Assisted AI Brain context beta client for Linux/WSL with Node.js 22 or newer.
|
|
4
4
|
|
|
5
|
-
The reviewed native compatibility set is Claude Code 2.1.294, 2.1.295,
|
|
6
|
-
2.1.
|
|
7
|
-
compatibility review before setup.
|
|
5
|
+
The reviewed native compatibility set is Claude Code 2.1.294, 2.1.295, 2.1.296,
|
|
6
|
+
2.1.299 or 2.1.300, and Codex CLI 0.161.0,
|
|
7
|
+
0.162.0 or 0.162.1. Other versions require a new compatibility review before setup.
|
|
8
8
|
|
|
9
9
|
```sh
|
|
10
10
|
# Install the published beta:
|
|
@@ -36,7 +36,7 @@ For users of an earlier unscoped review tarball, close its client sessions,
|
|
|
36
36
|
run `npm uninstall -g aibrain`, and install this scoped package. Local
|
|
37
37
|
`~/.aibrain` state, notes, and checkpoints are retained.
|
|
38
38
|
|
|
39
|
-
This `0.
|
|
39
|
+
This `0.3` client adds configurable context profiles. A fresh
|
|
40
40
|
setup defaults to `upstream`: 60% trigger, 0.5 keep threshold, six recent items
|
|
41
41
|
protected, and broader completed text-tool eligibility in Claude. Existing
|
|
42
42
|
schema1 configurations keep their previous behavior. After a reviewed v2 backend
|
|
@@ -54,5 +54,49 @@ text; they do not claim that a live session is being monitored. Codex keeps nati
|
|
|
54
54
|
compaction and recovery notes in the same thread. The backend checks paid access
|
|
55
55
|
and unchanged shared quotas before any JEV request.
|
|
56
56
|
|
|
57
|
+
The `0.3.0-beta.7` Claude launcher uses the durable context strategy:
|
|
58
|
+
JEV selects compatible historical tool evidence, bounded private notes retain
|
|
59
|
+
the selected text, and Claude core summarizes the reduced input. The next
|
|
60
|
+
prompt restores those notes in the same session after verifying native state.
|
|
61
|
+
The final native context contains a summary; this is not summary-free transcript
|
|
62
|
+
replacement. Direct hook-owned history replacement remains experimental because
|
|
63
|
+
resume can replay older content in affected Claude versions.
|
|
64
|
+
|
|
65
|
+
The notes preserve only the selected retained text that fits the local bound;
|
|
66
|
+
oversized entries are omitted as whole entries and counted. The separate full
|
|
67
|
+
checkpoint has its own retention. Neither path guarantees perfect preservation
|
|
68
|
+
of every internal host field. Shadow prefiltering continues to observe without
|
|
69
|
+
changing tool results. Native qualification and publication evidence is tracked
|
|
70
|
+
in the [release record](https://github.com/brunobracaioli/mcp-ai-brain/blob/main/docs/reference/claude-durable-context-2026-10-14.md).
|
|
71
|
+
|
|
72
|
+
The launcher grants the native clients the provider-free `brain_context_budget`
|
|
73
|
+
read alongside the existing context tools. It is a short-lived advisory snapshot,
|
|
74
|
+
not a billing meter, reservation, or provider authorization; atomic admission
|
|
75
|
+
remains authoritative.
|
|
76
|
+
|
|
77
|
+
Codex diagnostics are kept in the launched adapter's private state directory.
|
|
78
|
+
`aibrain diagnostics --client codex --json` shows only bounded stages, closed
|
|
79
|
+
reasons, pseudonymous session identifiers, client versions, and small numeric
|
|
80
|
+
counters. Prompts, notes, paths, credentials, raw errors, and app-server stdout
|
|
81
|
+
are excluded.
|
|
82
|
+
|
|
83
|
+
Context dashboard telemetry is disabled for fresh and existing configurations.
|
|
84
|
+
Enable it only after reviewing the extended disclosure:
|
|
85
|
+
|
|
86
|
+
```sh
|
|
87
|
+
aibrain setup --client both --telemetry on --accept-disclosure
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Omit `--telemetry` to preserve the stored choice, or use `--telemetry off` to stop
|
|
91
|
+
future-launch reports. Settings are captured when a client starts, so close and
|
|
92
|
+
restart currently monitored sessions after opting out to stop their reporting.
|
|
93
|
+
Enabled reports use the existing authenticated MCP transport and
|
|
94
|
+
contain only a hashed native session key, random lifecycle identifiers, native
|
|
95
|
+
client version, phase, timestamps, numeric counts, and allowed measurements or
|
|
96
|
+
reasons. Prompts, notes, paths, tool names, credentials, and raw errors are not
|
|
97
|
+
reported. The dashboard shows a 30-day visible window; physical cleanup runs on
|
|
98
|
+
the next successful daily cleanup. Delivery failure never fails or triggers a
|
|
99
|
+
context operation.
|
|
100
|
+
|
|
57
101
|
Read the [canonical subscriber beta guide](https://github.com/brunobracaioli/mcp-ai-brain/blob/main/docs/how-to/aibrain-subscriber-beta.md)
|
|
58
102
|
for setup, support, disclosure, limits, and disable procedures.
|
|
@@ -89,11 +89,59 @@
|
|
|
89
89
|
"description": "preserve_internal keeps handled messages intact. upstream_compatible rebuilds selected handled read messages from exposed fields and may lose hidden engine metadata.",
|
|
90
90
|
"default": "preserve_internal"
|
|
91
91
|
},
|
|
92
|
+
"compactionStrategy": {
|
|
93
|
+
"type": "string",
|
|
94
|
+
"title": "Compaction strategy",
|
|
95
|
+
"description": "direct_experimental returns a hook-owned transcript; native_summary_notes delegates the final summary to Claude core and keeps selected evidence in private notes.",
|
|
96
|
+
"default": "direct_experimental"
|
|
97
|
+
},
|
|
92
98
|
"diagnosticMode": {
|
|
93
99
|
"type": "boolean",
|
|
94
100
|
"title": "Emit runtime diagnostics",
|
|
95
101
|
"description": "Opt-in content-free hook entry diagnostics for local pilot verification.",
|
|
96
102
|
"default": false
|
|
103
|
+
},
|
|
104
|
+
"telemetryEnabled": {
|
|
105
|
+
"type": "boolean",
|
|
106
|
+
"title": "Enable context dashboard telemetry",
|
|
107
|
+
"description": "Opt-in operational telemetry for the authenticated Contexto dashboard. The launcher enables this only after the extended AI Brain disclosure.",
|
|
108
|
+
"default": false
|
|
109
|
+
},
|
|
110
|
+
"telemetryDisclosed": {
|
|
111
|
+
"type": "boolean",
|
|
112
|
+
"title": "Context telemetry disclosure acknowledged",
|
|
113
|
+
"description": "Permit content-free lifecycle reports containing a hashed session key, bounded measurements, counts, phases and reasons.",
|
|
114
|
+
"default": false
|
|
115
|
+
},
|
|
116
|
+
"telemetryClientVersion": {
|
|
117
|
+
"type": "string",
|
|
118
|
+
"title": "Native Claude version",
|
|
119
|
+
"description": "Launcher-provided native semver used to label telemetry; empty values keep telemetry inactive.",
|
|
120
|
+
"default": ""
|
|
121
|
+
},
|
|
122
|
+
"telemetryNodePath": {
|
|
123
|
+
"type": "string",
|
|
124
|
+
"title": "Owned telemetry Node path",
|
|
125
|
+
"description": "Launcher-provided absolute Node executable path for the report helper.",
|
|
126
|
+
"default": ""
|
|
127
|
+
},
|
|
128
|
+
"telemetryHelperPath": {
|
|
129
|
+
"type": "string",
|
|
130
|
+
"title": "Owned telemetry helper path",
|
|
131
|
+
"description": "Launcher-provided absolute report-only helper path.",
|
|
132
|
+
"default": ""
|
|
133
|
+
},
|
|
134
|
+
"telemetryStateDir": {
|
|
135
|
+
"type": "string",
|
|
136
|
+
"title": "Owned telemetry state path",
|
|
137
|
+
"description": "Launcher-provided private aibrain state directory for the helper.",
|
|
138
|
+
"default": ""
|
|
139
|
+
},
|
|
140
|
+
"telemetryConfigDigest": {
|
|
141
|
+
"type": "string",
|
|
142
|
+
"title": "Owned telemetry configuration binding",
|
|
143
|
+
"description": "Launcher-provided binding for the private endpoint, token and disclosure state.",
|
|
144
|
+
"default": ""
|
|
97
145
|
}
|
|
98
146
|
}
|
|
99
147
|
}
|