@brunobracaioli/aibrain 0.3.0-beta.7 → 0.4.0-beta.10
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 +117 -16
- package/dist/assets/claude/.claude-plugin/plugin.json +1 -1
- package/dist/assets/claude/hooks/context-compaction.ts +1104 -77
- package/dist/assets/claude/hooks/native-host-contract-runtime.ts +18 -0
- package/dist/assets/claude/hooks/native-host-contract.test.ts +51 -0
- package/dist/assets/codex-context-compaction.mjs +2273 -191
- package/dist/assets/jev-paid-pilot-terminal.mjs +334 -35
- package/dist/claude-compatibility.mjs +506 -0
- package/dist/claude-observation.mjs +117 -3
- package/dist/cli.mjs +141 -30
- package/dist/codex-compatibility.mjs +531 -0
- package/dist/codex-diagnostics.mjs +39 -3
- package/dist/codex-engineering.mjs +165 -0
- package/dist/codex-protocol-fingerprint.json +131 -0
- package/dist/engineering-pack-public-key.json +10 -0
- package/dist/engineering-pack.mjs +845 -0
- package/dist/engineering.mjs +194 -0
- package/dist/extensions-catalog.mjs +310 -0
- package/dist/extensions-cli.mjs +486 -0
- package/dist/extensions-preferences.mjs +151 -0
- package/dist/guardrails/continuity.mjs +239 -0
- package/dist/guardrails/format.mjs +111 -0
- package/dist/guardrails/guards.mjs +397 -0
- package/dist/guardrails/run.mjs +211 -0
- package/dist/guardrails/shell-words.mjs +206 -0
- package/dist/guardrails-plugin.mjs +149 -0
- package/dist/launch.mjs +170 -17
- package/dist/mcp-servers.mjs +192 -0
- package/dist/mcp.mjs +8 -8
- package/dist/monitor.mjs +33 -0
- package/dist/package.json +1 -1
- package/dist/platform.mjs +81 -7
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -1,25 +1,110 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
# aisac
|
|
2
|
+
|
|
3
|
+
The AISAC client for Claude Code and Codex on Linux/WSL, and for Claude Code on
|
|
4
|
+
macOS, with Node.js 22 or newer:
|
|
5
|
+
AI Brain memory, context management and, for AISAC Founding Cohort members,
|
|
6
|
+
AISAC Engineering.
|
|
7
|
+
|
|
8
|
+
The command is `aisac`. `aibrain` is an alias for the same program, so existing
|
|
9
|
+
scripts and habits keep working. The same files are published as `@aisac/cli`
|
|
10
|
+
and, for existing installs, `@brunobracaioli/aibrain`. Install only one of them:
|
|
11
|
+
both provide the `aisac` and `aibrain` commands. State stays in `~/.aibrain`.
|
|
12
|
+
|
|
13
|
+
`aisac setup` and `aisac doctor` report the AISAC Engineering license
|
|
14
|
+
(`active`, `inactive` or `unavailable`). The server decides; the client only
|
|
15
|
+
shows the answer and sends the request only to the configured AI Brain address.
|
|
16
|
+
`aisac status` stays offline.
|
|
17
|
+
|
|
18
|
+
For licensed accounts, `aisac claude` downloads the AISAC Engineering pack for
|
|
19
|
+
the session, verifies its Ed25519 signature against the key pinned in this
|
|
20
|
+
release, and loads it as the `aisac-engineering` plugin from the session's
|
|
21
|
+
private folder, which is deleted on exit. Any failure starts Claude without the
|
|
22
|
+
pack. `aisac setup --lang pt-BR|en` picks the pack language without a network
|
|
23
|
+
call. The pack is never part of this npm package.
|
|
24
|
+
|
|
25
|
+
`aisac codex` (Codex 0.164.0 or later) loads the same verified pack for that
|
|
26
|
+
session only: its skills are added to the Codex app-server the launch owns
|
|
27
|
+
(call one with `$`, for example `$spec`) and its agents become session agent
|
|
28
|
+
roles. Nothing is written to `~/.codex`, `~/.agents` or the project, and the
|
|
29
|
+
session's folder is deleted on exit. An older Codex starts without the pack and
|
|
30
|
+
says `codex_outdated`.
|
|
31
|
+
|
|
32
|
+
Licensed `aisac claude` sessions also load guardrail hooks as the session plugin
|
|
33
|
+
`aisac-guardrails`.
|
|
34
|
+
- **Default on:** `secrets-guard` refuses secret files by name. Four more hooks
|
|
35
|
+
keep continuity: a repository snapshot at start and after a compaction, a
|
|
36
|
+
docs reminder, and the NOTES/spec/CHANGELOG pass.
|
|
37
|
+
- **Default off:** `git-guard`, `destructive-guard` and `format-on-edit`.
|
|
38
|
+
- **Changing them:** `aisac hooks` lists them, and `aisac hooks enable|disable
|
|
39
|
+
<id>` or `aisac hooks reset` changes the next session. The agent cannot change
|
|
40
|
+
them from inside a session.
|
|
41
|
+
- **Code:** it ships in this package and runs locally. Nothing comes from the
|
|
42
|
+
server.
|
|
43
|
+
|
|
44
|
+
Licensed sessions of `aisac claude` and `aisac codex` can also load reviewed MCP
|
|
45
|
+
servers: `github` (read-only, token in `GITHUB_PERSONAL_ACCESS_TOKEN`), `supabase`
|
|
46
|
+
(read-only), `vercel`, `playwright` (pinned, isolated) and `context7`.
|
|
47
|
+
- **Default:** every server is off. `aisac mcp` lists them, `aisac mcp enable|disable
|
|
48
|
+
<id>` or `aisac mcp reset` changes the next session, and `aisac mcp info <id>` says
|
|
49
|
+
what a server reaches and how to log in.
|
|
50
|
+
- **Login:** the host does it (`/mcp` in Claude Code, `aisac mcp login <id>` for Codex)
|
|
51
|
+
and keeps it in its own store. No token reaches `~/.aibrain` or AISAC.
|
|
52
|
+
|
|
53
|
+
Codex capture also requires the `flock` utility from `util-linux`, normally
|
|
54
|
+
included in Linux/WSL. The launcher and doctor check availability before a
|
|
55
|
+
monitored Codex session starts. Capture coordination is released by the kernel
|
|
56
|
+
after a process exits unexpectedly. An unidentifiable empty lock left by an
|
|
57
|
+
older client requires a verified support migration; do not delete checkpoints,
|
|
58
|
+
notes or lock files to work around a reported storage error.
|
|
4
59
|
|
|
5
60
|
The reviewed native compatibility set is Claude Code 2.1.294, 2.1.295, 2.1.296,
|
|
6
|
-
2.1.299 or 2.1.
|
|
7
|
-
0.162.0
|
|
61
|
+
2.1.299, 2.1.300, 2.1.301, 2.1.302 or 2.1.303, and Codex CLI 0.161.0,
|
|
62
|
+
0.162.0, 0.162.1, 0.163.0, 0.164.0 or 0.166.0 (0.165.0 was never qualified). A newer stable Codex 0.x release may continue only
|
|
63
|
+
after its locally generated experimental protocol schemas and transport flags
|
|
64
|
+
match the bundled adapter contract; prereleases, older releases and new majors
|
|
65
|
+
remain rejected. Starting with beta14, newer stable Claude 2.1 patches can
|
|
66
|
+
continue after isolated strict plugin validation, required hook/API checks and
|
|
67
|
+
an enabled-hook test in the native offline runner. Doctor distinguishes
|
|
68
|
+
`host_checked` from `qualified`; this check does not establish full behavioral
|
|
69
|
+
equivalence with a tested native release. Unknown older patches, prereleases
|
|
70
|
+
and other major/minor families remain rejected. No credentials, conversations,
|
|
71
|
+
model requests or JEV calls are used by these compatibility probes.
|
|
72
|
+
|
|
73
|
+
Beta17 refreshes the Codex contract to 0.164.0, including its image-generation
|
|
74
|
+
record formats. Native launch/resume qualification is separate from a new
|
|
75
|
+
model/JEV compaction qualification. A later native release that changes the
|
|
76
|
+
consumed contract can still require an AI Brain compatibility update.
|
|
77
|
+
|
|
78
|
+
`0.4.0-beta.9` refreshes the bundled contract to Codex 0.166.0. Its delta is
|
|
79
|
+
additive: optional item timing, an image generation id, an attach-to-source fork
|
|
80
|
+
flag and two error codes. See the
|
|
81
|
+
[Codex 0.166 qualification record](../../docs/reference/codex-166-compatibility-2026-11-04.md).
|
|
82
|
+
|
|
83
|
+
The Codex terminal bridge permits the native session picker's separate read-only
|
|
84
|
+
connection while keeping the primary conversation and monitor intact. A picker
|
|
85
|
+
cannot compact, start a turn, inject history or take ownership of the primary
|
|
86
|
+
connection. Its failure or timeout closes only that auxiliary connection.
|
|
8
87
|
|
|
9
88
|
```sh
|
|
10
89
|
# Install the published beta:
|
|
11
|
-
npm install -g @
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
90
|
+
npm install -g @aisac/cli@beta
|
|
91
|
+
aisac setup --client both
|
|
92
|
+
aisac doctor --json
|
|
93
|
+
aisac claude
|
|
94
|
+
aisac codex
|
|
16
95
|
```
|
|
17
96
|
|
|
97
|
+
To move from `@brunobracaioli/aibrain` to `@aisac/cli`, close running sessions,
|
|
98
|
+
then run `npm uninstall -g @brunobracaioli/aibrain` before
|
|
99
|
+
`npm install -g @aisac/cli@beta`. Setup, notes and checkpoints are kept.
|
|
100
|
+
|
|
18
101
|
Installation does not contact AI Brain, change native client configuration, or
|
|
19
102
|
enable all paid accounts. Setup requires an existing AI Brain PAT, explicit
|
|
20
103
|
versioned disclosure, and successful provider-free pilot access. Claude and
|
|
21
104
|
Codex continue to own their own authentication. Windows native is unsupported;
|
|
22
|
-
run the beta inside WSL.
|
|
105
|
+
run the beta inside WSL. On macOS, `aisac setup` configures Claude Code, and
|
|
106
|
+
`aisac codex` is refused with `CODEX_MACOS_UNSUPPORTED`. Codex capture needs
|
|
107
|
+
Linux procfs and `flock`, so use Codex from Linux/WSL. Pricing and general customer activation are outside
|
|
23
108
|
this beta.
|
|
24
109
|
|
|
25
110
|
For reviewed noninteractive automation only, use a private token file and
|
|
@@ -27,10 +112,10 @@ explicitly acknowledge the displayed disclosure with
|
|
|
27
112
|
`aibrain setup --client both --token-file /private/path/brain.pat
|
|
28
113
|
--accept-disclosure`.
|
|
29
114
|
|
|
30
|
-
For a CI-reviewed tarball, use
|
|
31
|
-
`
|
|
32
|
-
`
|
|
33
|
-
|
|
115
|
+
For a CI-reviewed tarball, use `aisac-cli-*.tgz` with
|
|
116
|
+
`npm install -g ./aisac-cli-*.tgz` (the same files are also packed as
|
|
117
|
+
`brunobracaioli-aibrain-*.tgz`); registry installation is gated on the
|
|
118
|
+
operator's npm review and authentication.
|
|
34
119
|
|
|
35
120
|
For users of an earlier unscoped review tarball, close its client sessions,
|
|
36
121
|
run `npm uninstall -g aibrain`, and install this scoped package. Local
|
|
@@ -54,7 +139,8 @@ text; they do not claim that a live session is being monitored. Codex keeps nati
|
|
|
54
139
|
compaction and recovery notes in the same thread. The backend checks paid access
|
|
55
140
|
and unchanged shared quotas before any JEV request.
|
|
56
141
|
|
|
57
|
-
The `0.3.0-beta.
|
|
142
|
+
The `0.3.0-beta.14` Claude launcher uses the durable context strategy and
|
|
143
|
+
records bounded recovery reasons when native summary proof cannot be confirmed:
|
|
58
144
|
JEV selects compatible historical tool evidence, bounded private notes retain
|
|
59
145
|
the selected text, and Claude core summarizes the reduced input. The next
|
|
60
146
|
prompt restores those notes in the same session after verifying native state.
|
|
@@ -80,6 +166,21 @@ reasons, pseudonymous session identifiers, client versions, and small numeric
|
|
|
80
166
|
counters. Prompts, notes, paths, credentials, raw errors, and app-server stdout
|
|
81
167
|
are excluded.
|
|
82
168
|
|
|
169
|
+
Beta12 reads large Codex histories in bounded pages and keeps their complete
|
|
170
|
+
contents in verified private capture segments. It checks history again before
|
|
171
|
+
selection and before native compaction; notes and recovery stay in the same
|
|
172
|
+
thread. Older captures remain readable. A single turn exceeding 8 MiB, a capture
|
|
173
|
+
exceeding the bounded page/item/128 MiB limits, or exhausted private storage is
|
|
174
|
+
reported explicitly. Such a failure does not authorize discarding protected
|
|
175
|
+
history or retrying a paid operation. The private capture directory remains
|
|
176
|
+
bounded to 256 MiB and 128 managed files, with current recovery references
|
|
177
|
+
protected from cleanup.
|
|
178
|
+
|
|
179
|
+
Claude plan diagnostics distinguish response parsing, identity, expiry and
|
|
180
|
+
history changes. A text JSON plan can use the same 256 KiB limit as structured
|
|
181
|
+
plans; smaller budget/error envelopes retain their separate limits. These local
|
|
182
|
+
diagnostics contain format names and numeric sizes, never plan contents.
|
|
183
|
+
|
|
83
184
|
Context dashboard telemetry is disabled for fresh and existing configurations.
|
|
84
185
|
Enable it only after reviewing the extended disclosure:
|
|
85
186
|
|