brainclaw 1.5.3 → 1.5.4

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/LICENSE CHANGED
@@ -1,74 +1,21 @@
1
- Business Source License 1.1
2
-
3
- Licensor: Juan Berdah
4
- Licensed Work: brainclaw
5
- The Licensed Work is (c) 2024-2026 Juan Berdah
6
- Change Date: Four years from the release date of each version
7
- Change License: MIT License
8
-
9
- For information about alternative licensing arrangements, contact the Licensor.
10
-
11
- ---
12
-
13
- Parameters
14
-
15
- Licensor: Juan Berdah
16
- Licensed Work: brainclaw
17
- Additional Use Grant: You may make production use of the Licensed Work, including use
18
- for internal business operations, provided that you do not use the
19
- Licensed Work to build or offer a competing product or service that
20
- provides shared agent memory, coordination, or context management
21
- for coding agents or development teams.
22
- Change Date: Four years after the release date of each version
23
- Change License: MIT License
24
-
25
- ---
26
-
27
- Notice
28
-
29
- The Business Source License (this document, or the "License") is not an Open Source
30
- license. However, the Licensed Work will eventually be made available under an Open
31
- Source License, as stated in this License.
32
-
33
- Use Limitation: The additional use grant in the Parameters specifies the permitted
34
- production use. If your use case falls outside that grant, you need a separate
35
- commercial license from the Licensor.
36
-
37
- License text
38
-
39
- The Licensor hereby grants you the right to copy, modify, create derivative works,
40
- redistribute, and make non-production use of the Licensed Work. The Licensor may
41
- make an Additional Use Grant, above, permitting limited production use.
42
-
43
- Effective on the Change Date, or the fourth anniversary of the first publicly available
44
- distribution of a specific version of the Licensed Work under this License, whichever
45
- comes first, the Licensor hereby grants you rights under the terms of the Change
46
- License, and the rights granted in the paragraph above terminate.
47
-
48
- If your use of the Licensed Work does not comply with the requirements currently in
49
- effect as described in this License, you must purchase a commercial license from the
50
- Licensor, its affiliated entities, or authorized resellers, or you must refrain from
51
- using the Licensed Work.
52
-
53
- All copies of the original and modified Licensed Work, and derivative works of the
54
- Licensed Work, are subject to this License. This License applies separately for each
55
- version of the Licensed Work and the Change Date may vary for each version of the
56
- Licensed Work released by the licensor.
57
-
58
- You must conspicuously display this License on each original or modified copy of the
59
- Licensed Work. If you receive the Licensed Work in original or modified form from a
60
- third party, the terms and conditions set forth in this License apply to your use of
61
- that work.
62
-
63
- Any use of the Licensed Work in violation of this License will automatically terminate
64
- your rights under this License for the current and all future versions of the Licensed
65
- Work.
66
-
67
- This License does not grant you any right in any trademark or logo of Licensor or its
68
- affiliates (provided that you may use a trademark or logo of Licensor as expressly
69
- required by this License).
70
-
71
- TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON AN "AS
72
- IS" BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS, EXPRESS OR
73
- IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
74
- PARTICULAR PURPOSE, NON-INFRINGEMENT, AND TITLE.
1
+ MIT License
2
+
3
+ Copyright (c) 2024-2026 Juan Berdah
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -380,15 +380,15 @@ For older releases (v0.x and the early v1.0 launch series), `git log` on `master
380
380
 
381
381
  ---
382
382
 
383
- ## License
384
-
385
- Current releases of brainclaw are published under the [Business Source License 1.1](LICENSE) — (c) 2024-2026 Juan Berdah.
386
-
387
- The long-term direction is simpler than the current wording might suggest:
388
-
389
- - the local-first brainclaw core is intended to move to MIT after the closed beta
390
- - cloud shared-memory, remote collaboration services, advanced dashboards, and related hosted add-ons will live in separate commercial products
391
-
392
- The intended MIT core covers what makes brainclaw useful inside a repo today: local project memory, local MCP and CLI coordination, onboarding and bootstrap, plans, claims, handoffs, runtime notes, and local agent integrations.
383
+ ## License
384
+
385
+ brainclaw core is published under the [MIT License](LICENSE) — (c) 2024-2026 Juan Berdah.
386
+
387
+ The licensing split is simple:
388
+
389
+ - the local-first brainclaw core is MIT
390
+ - cloud shared-memory, remote collaboration services, advanced dashboards, and related hosted add-ons will live in separate commercial products
391
+
392
+ The MIT core covers what makes brainclaw useful inside a repo today: local project memory, local MCP and CLI coordination, onboarding and bootstrap, plans, claims, handoffs, runtime notes, and local agent integrations.
393
393
 
394
394
  The goal is not to close brainclaw down. The goal is to keep the local-first core open and genuinely useful on its own, while keeping hosted collaboration features separate.
Binary file
package/dist/cli.js CHANGED
@@ -109,6 +109,42 @@ const program = new Command();
109
109
  function collect(value, previous) {
110
110
  return [...previous, value];
111
111
  }
112
+ function parseLeadingGlobalOptions(argv) {
113
+ const result = {};
114
+ for (let i = 0; i < argv.length; i++) {
115
+ const token = argv[i];
116
+ if (!token.startsWith('-')) {
117
+ break;
118
+ }
119
+ if (token === '--verbose') {
120
+ result.verbose = true;
121
+ continue;
122
+ }
123
+ if (token === '--debug') {
124
+ result.debug = true;
125
+ continue;
126
+ }
127
+ if (token === '--cwd') {
128
+ result.cwd = argv[i + 1];
129
+ i++;
130
+ continue;
131
+ }
132
+ if (token.startsWith('--cwd=')) {
133
+ result.cwd = token.slice('--cwd='.length);
134
+ continue;
135
+ }
136
+ if (token === '--project') {
137
+ result.project = argv[i + 1];
138
+ i++;
139
+ continue;
140
+ }
141
+ if (token.startsWith('--project=')) {
142
+ result.project = token.slice('--project='.length);
143
+ continue;
144
+ }
145
+ }
146
+ return result;
147
+ }
112
148
  function isCodevEnabled() {
113
149
  return process.env.BRAINCLAW_ENABLE_CODEV === '1';
114
150
  }
@@ -121,7 +157,7 @@ program
121
157
  .option('--cwd <path>', 'Override working directory for this invocation')
122
158
  .option('--project <name>', 'Run the command against a linked project (cross_project_links or workspace store-chain child). Resolves via resolveProjectCwd; mutually exclusive with --cwd.')
123
159
  .hook('preAction', (_thisCommand, actionCommand) => {
124
- const root = actionCommand.optsWithGlobals();
160
+ const root = parseLeadingGlobalOptions(process.argv.slice(2));
125
161
  initLogLevel({ verbose: root.verbose, debug: root.debug });
126
162
  // Skip effective cwd resolution for commands that create the store
127
163
  const cmdName = actionCommand.name();
@@ -20,12 +20,207 @@ export const generatedSchemas = {
20
20
  "all",
21
21
  "any"
22
22
  ]
23
+ },
24
+ "context_filter": {
25
+ "minItems": 1,
26
+ "type": "array",
27
+ "items": {
28
+ "type": "string",
29
+ "enum": [
30
+ "traps",
31
+ "feedback",
32
+ "runtime_notes",
33
+ "decisions",
34
+ "constraints",
35
+ "handoffs",
36
+ "plans",
37
+ "candidates",
38
+ "project_vision",
39
+ "critique_history",
40
+ "revision_history",
41
+ "synthesis_artifact",
42
+ "*"
43
+ ]
44
+ }
45
+ },
46
+ "advance_gate": {
47
+ "$ref": "#/$defs/__schema0"
23
48
  }
24
49
  },
25
50
  "required": [
26
51
  "name"
27
52
  ],
28
- "additionalProperties": false
53
+ "additionalProperties": false,
54
+ "$defs": {
55
+ "__schema0": {
56
+ "anyOf": [
57
+ {
58
+ "oneOf": [
59
+ {
60
+ "type": "object",
61
+ "properties": {
62
+ "kind": {
63
+ "type": "string",
64
+ "const": "phase_reached"
65
+ },
66
+ "phase": {
67
+ "type": "string",
68
+ "minLength": 1
69
+ }
70
+ },
71
+ "required": [
72
+ "kind",
73
+ "phase"
74
+ ],
75
+ "additionalProperties": false
76
+ },
77
+ {
78
+ "type": "object",
79
+ "properties": {
80
+ "kind": {
81
+ "type": "string",
82
+ "const": "reviewer_green"
83
+ }
84
+ },
85
+ "required": [
86
+ "kind"
87
+ ],
88
+ "additionalProperties": false
89
+ },
90
+ {
91
+ "type": "object",
92
+ "properties": {
93
+ "kind": {
94
+ "type": "string",
95
+ "const": "max_iterations"
96
+ },
97
+ "n": {
98
+ "type": "integer",
99
+ "exclusiveMinimum": 0,
100
+ "maximum": 9007199254740991
101
+ }
102
+ },
103
+ "required": [
104
+ "kind",
105
+ "n"
106
+ ],
107
+ "additionalProperties": false
108
+ },
109
+ {
110
+ "type": "object",
111
+ "properties": {
112
+ "kind": {
113
+ "type": "string",
114
+ "const": "artifact_produced"
115
+ },
116
+ "phase": {
117
+ "type": "string",
118
+ "minLength": 1
119
+ },
120
+ "type": {
121
+ "type": "string",
122
+ "minLength": 1
123
+ }
124
+ },
125
+ "required": [
126
+ "kind",
127
+ "phase",
128
+ "type"
129
+ ],
130
+ "additionalProperties": false
131
+ },
132
+ {
133
+ "type": "object",
134
+ "properties": {
135
+ "kind": {
136
+ "type": "string",
137
+ "const": "min_artifacts_by_type"
138
+ },
139
+ "type": {
140
+ "type": "string",
141
+ "minLength": 1
142
+ },
143
+ "n": {
144
+ "type": "integer",
145
+ "exclusiveMinimum": 0,
146
+ "maximum": 9007199254740991
147
+ },
148
+ "scope": {
149
+ "type": "string",
150
+ "enum": [
151
+ "phase",
152
+ "loop"
153
+ ]
154
+ }
155
+ },
156
+ "required": [
157
+ "kind",
158
+ "type",
159
+ "n",
160
+ "scope"
161
+ ],
162
+ "additionalProperties": false
163
+ },
164
+ {
165
+ "type": "object",
166
+ "properties": {
167
+ "kind": {
168
+ "type": "string",
169
+ "const": "manual"
170
+ }
171
+ },
172
+ "required": [
173
+ "kind"
174
+ ],
175
+ "additionalProperties": false
176
+ }
177
+ ]
178
+ },
179
+ {
180
+ "type": "object",
181
+ "properties": {
182
+ "kind": {
183
+ "type": "string",
184
+ "const": "any"
185
+ },
186
+ "conditions": {
187
+ "minItems": 1,
188
+ "type": "array",
189
+ "items": {
190
+ "$ref": "#/$defs/__schema0"
191
+ }
192
+ }
193
+ },
194
+ "required": [
195
+ "kind",
196
+ "conditions"
197
+ ],
198
+ "additionalProperties": false
199
+ },
200
+ {
201
+ "type": "object",
202
+ "properties": {
203
+ "kind": {
204
+ "type": "string",
205
+ "const": "all"
206
+ },
207
+ "conditions": {
208
+ "minItems": 1,
209
+ "type": "array",
210
+ "items": {
211
+ "$ref": "#/$defs/__schema0"
212
+ }
213
+ }
214
+ },
215
+ "required": [
216
+ "kind",
217
+ "conditions"
218
+ ],
219
+ "additionalProperties": false
220
+ }
221
+ ]
222
+ }
223
+ }
29
224
  },
30
225
  "LoopSlotInput": {
31
226
  "type": "object",
@@ -54,6 +54,8 @@ export const SCHEMA_VERSION = '1.0.0';
54
54
  export const MCP_PROTOCOL_VERSIONS = ['2025-11-25', '2024-11-05'];
55
55
  export const MCP_SERVER_NOT_INITIALIZED = -32002;
56
56
  const MCP_RUNTIME_REPAIR_COMMAND = 'brainclaw doctor --repair';
57
+ const { $defs: loopPhaseDefs, ...loopPhaseItemSchema } = generatedSchemas.LoopPhase;
58
+ const loopSlotInputItemSchema = generatedSchemas.LoopSlotInput;
57
59
  export const MCP_READ_TOOLS = [
58
60
  {
59
61
  name: 'bclaw_bootstrap',
@@ -917,6 +919,7 @@ const MCP_WRITE_TOOLS = [
917
919
  annotations: { tier: 'facade', category: 'loops', headlessApproval: 'auto', experimental: true, schemaSource: 'zod-derived' },
918
920
  inputSchema: {
919
921
  type: 'object',
922
+ ...(loopPhaseDefs ? { $defs: loopPhaseDefs } : {}),
920
923
  properties: {
921
924
  intent: {
922
925
  type: 'string',
@@ -927,8 +930,8 @@ const MCP_WRITE_TOOLS = [
927
930
  kind: { type: 'string', enum: ['review', 'ideation', 'implementation', 'research', 'debug'], description: 'Loop kind for open / list filter.' },
928
931
  title: { type: 'string', description: 'Human-readable title (open).' },
929
932
  goal: { type: 'string', description: 'Optional goal statement (open).' },
930
- phases: { type: 'array', items: generatedSchemas.LoopPhase, description: 'Optional phase list override (open). Items derived from LoopPhaseSchema (zod source) — see mcp-schemas.generated.ts.' },
931
- slots: { type: 'array', items: generatedSchemas.LoopSlotInput, description: 'Optional initial slot specs (open). Items derived from LoopSlotInputSchema (zod source). Each item carries at least { role }.' },
933
+ phases: { type: 'array', items: loopPhaseItemSchema, description: 'Optional phase list override (open). Items derived from LoopPhaseSchema (zod source) — see mcp-schemas.generated.ts.' },
934
+ slots: { type: 'array', items: loopSlotInputItemSchema, description: 'Optional initial slot specs (open). Items derived from LoopSlotInputSchema (zod source). Each item carries at least { role }.' },
932
935
  linked: { type: 'object', description: 'Optional top-level plan/sequence refs (open).' },
933
936
  stop_condition: { type: 'object', description: 'Optional stop_condition override (open). Composite any/all supported.' },
934
937
  mode: { type: 'string', enum: ['asymmetric', 'symmetric'], description: 'Review mode selector for open (review kind only).' },
package/dist/facts.js CHANGED
@@ -1,8 +1,8 @@
1
1
  // Generated by scripts/emit-site-facts.mjs at build time. Do not edit manually.
2
- // Source: brainclaw v1.5.3 on 2026-05-10T19:05:14.160Z
2
+ // Source: brainclaw v1.5.4 on 2026-05-10T22:45:47.168Z
3
3
  export const FACTS = {
4
- "version": "1.5.3",
5
- "generated_at": "2026-05-10T19:05:14.160Z",
4
+ "version": "1.5.4",
5
+ "generated_at": "2026-05-10T22:45:47.168Z",
6
6
  "tools": {
7
7
  "count": 60,
8
8
  "published_count": 59,
package/dist/facts.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
- "version": "1.5.3",
3
- "generated_at": "2026-05-10T19:05:14.160Z",
2
+ "version": "1.5.4",
3
+ "generated_at": "2026-05-10T22:45:47.168Z",
4
4
  "tools": {
5
5
  "count": 60,
6
6
  "published_count": 59,
@@ -82,7 +82,7 @@ will still succeed. A follow-up PR will strip the dead handler code.
82
82
  changelog records the published MCP surface fingerprint. When a tool
83
83
  name, tier, category, or input schema changes, the test fails until
84
84
  this section is updated.
85
- - MCP public surface fingerprint: `sha256:860fbaa30a486093`
85
+ - MCP public surface fingerprint: `sha256:724085642dc3e2d7`
86
86
 
87
87
  See `docs/integrations/mcp.md` for the full canonical surface + an
88
88
  example gallery per verb. See `docs/concepts/mcp-governance.md` for
@@ -65,16 +65,16 @@ Local-first gives teams:
65
65
  - Git history for shared project state
66
66
  - compatibility with enterprise or offline environments
67
67
 
68
- ## License direction
69
-
70
- Today, brainclaw is published under the **Business Source License 1.1 (BSL 1.1)**.
71
-
72
- The direction after the closed beta is simpler:
73
-
74
- - the local-first brainclaw core is intended to move to MIT
75
- - remote shared-memory, hosted collaboration, advanced dashboards, and related private add-ons will stay separate commercial products
76
-
77
- The intended MIT core covers the local coordination layer:
68
+ ## License
69
+
70
+ brainclaw core is published under the **MIT License**.
71
+
72
+ The product split is:
73
+
74
+ - the local-first brainclaw core is MIT
75
+ - remote shared-memory, hosted collaboration, advanced dashboards, and related private add-ons will stay separate commercial products
76
+
77
+ The MIT core covers the local coordination layer:
78
78
 
79
79
  - local project memory
80
80
  - local MCP and CLI workflows
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "brainclaw",
3
- "version": "1.5.3",
3
+ "version": "1.5.4",
4
4
  "description": "Shared project memory for humans and coding agents.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -52,7 +52,7 @@
52
52
  "handoff",
53
53
  "local-first"
54
54
  ],
55
- "license": "BUSL-1.1",
55
+ "license": "MIT",
56
56
  "homepage": "https://brainclaw.dev",
57
57
  "dependencies": {
58
58
  "commander": "^14.0.3",