@baldaworks/balda-linux-arm64 0.3.0

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.
Files changed (4) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +308 -0
  3. package/bin/balda +0 -0
  4. package/package.json +20 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Alexey Samoylov
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 ADDED
@@ -0,0 +1,308 @@
1
+ # balda
2
+
3
+ [![test](https://github.com/baldaworks/balda/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/baldaworks/balda/actions/workflows/test.yml)
4
+ [![lint](https://github.com/baldaworks/balda/actions/workflows/lint.yml/badge.svg?branch=main)](https://github.com/baldaworks/balda/actions/workflows/lint.yml)
5
+
6
+ ## Self-hosted engineering agent for team chat
7
+
8
+ Balda is a self-hosted engineering agent that lives in your team chat and works
9
+ inside your project.
10
+
11
+ You can give it a task in chat, open a focused topic for a piece of work, run a
12
+ longer goal loop, or wire external events into the same workflow. Balda keeps
13
+ context, uses your configured tools, and returns something reviewable: a
14
+ summary, changed files, validation output, a commit, or a concrete next step.
15
+
16
+ ## What Balda is good for
17
+
18
+ - chat-native engineering help in Telegram, Zulip, or Slack
19
+ - focused task threads instead of one shared bot conversation
20
+ - long-running goal execution with progress updates and final results
21
+ - `wedge` style operation: put the agent in the middle of your team workflow so
22
+ chat, tools, schedules, and external events all feed the same execution path
23
+ - self-hosted deployment close to your repo, config, and credentials
24
+
25
+ ## Quickstart
26
+
27
+ You need:
28
+
29
+ - one chat surface: Telegram, Zulip, or Slack
30
+ - one supported provider CLI installed on the host or in Docker:
31
+ `codex`, `opencode`, `copilot`, `gemini`, or `claude`
32
+ - Node.js/npm, unless you run the Docker Compose path
33
+
34
+ Install:
35
+
36
+ ```bash
37
+ npm install -g -y @baldaworks/balda
38
+ ```
39
+
40
+ Initialize in your project:
41
+
42
+ ```bash
43
+ balda init
44
+ ```
45
+
46
+ Start:
47
+
48
+ ```bash
49
+ balda start
50
+ ```
51
+
52
+ `balda init` creates `.config/balda/config.yaml`, initializes
53
+ `.config/balda/state.db`, detects available provider CLIs, and prints the next
54
+ step for your selected chat provider.
55
+
56
+ ## First run
57
+
58
+ For Telegram, authenticate the owner with the command printed by `balda init`:
59
+
60
+ ```text
61
+ /start owner=<owner_token>
62
+ ```
63
+
64
+ Then send a normal direct message to the bot, or open an isolated topic:
65
+
66
+ ```text
67
+ /topic release
68
+ ```
69
+
70
+ From there you can:
71
+
72
+ - ask for ordinary help in chat
73
+ - start a goal loop with `/goalkeeper <objective>`
74
+ - stop the current turn with `/cancel`
75
+ - reset the current session with `/reset`
76
+
77
+ ## Main workflows
78
+
79
+ ### 1. Ordinary chat work
80
+
81
+ Send a message in the session where you want work to happen. Balda keeps that
82
+ conversation as the execution context.
83
+
84
+ ### 2. Focused topic work
85
+
86
+ Use `/topic <name>` to create a separate session for a task, incident, release,
87
+ or stream of work.
88
+
89
+ ### 3. Goal-driven execution
90
+
91
+ Use `/goalkeeper <objective>` when you want Balda to keep working until there is a
92
+ result to review.
93
+
94
+ Balda will:
95
+
96
+ - work in repeated passes
97
+ - post progress updates
98
+ - ask follow-up questions when critical input is missing
99
+ - return a terminal result with outcome details
100
+
101
+ See [docs/goal-workflow.md](docs/goal-workflow.md) for the detailed goal
102
+ contract.
103
+
104
+ ### 4. Wedge mode
105
+
106
+ Balda can act as a wedge between team chat and the rest of your engineering
107
+ system:
108
+
109
+ - chat messages start work
110
+ - scheduled jobs wake work up
111
+ - inbound webhooks turn external events into session work
112
+ - the same session can continue through follow-up questions and delayed work
113
+
114
+ This is useful when you want one operational path for human requests,
115
+ automation, and agent execution instead of separate bots and scripts.
116
+
117
+ ## Supported chat providers
118
+
119
+ - Telegram
120
+ - Zulip
121
+ - Slack
122
+
123
+ Balda maps each conversation scope to its own session:
124
+
125
+ - Telegram direct chat or personal/group topic
126
+ - Zulip stream + topic
127
+ - Slack thread
128
+
129
+ ## Docker Compose
130
+
131
+ Balda ships a root [Dockerfile](Dockerfile) and [compose.yaml](compose.yaml)
132
+ for local Docker Compose deployment.
133
+
134
+ The current directory is mounted as `/workspace`, so Balda sees your checkout,
135
+ config, git metadata, and local state.
136
+
137
+ ```bash
138
+ docker compose build balda
139
+ docker compose run --rm balda init
140
+ docker compose up -d balda
141
+ ```
142
+
143
+ Polling mode is the default, so Telegram does not require publishing a port.
144
+ Webhook deployment details live in [docs/balda.md](docs/balda.md).
145
+
146
+ ## Published container image
147
+
148
+ Balda publishes a release image at `ghcr.io/baldaworks/balda:latest`.
149
+
150
+ That image contains the `balda` binary only. It does not bundle provider CLIs.
151
+ Use it as a source stage in your own image and add the provider runtime you
152
+ want.
153
+
154
+ Example with Codex:
155
+
156
+ ```dockerfile
157
+ FROM node:24-bookworm-slim AS cli-builder
158
+ RUN npm install -g @openai/codex
159
+
160
+ FROM ghcr.io/baldaworks/balda:latest AS balda
161
+
162
+ FROM node:24-bookworm-slim
163
+ RUN apt-get update \
164
+ && apt-get install -y --no-install-recommends \
165
+ ca-certificates \
166
+ git \
167
+ openssh-client \
168
+ ripgrep \
169
+ && rm -rf /var/lib/apt/lists/*
170
+
171
+ COPY --from=cli-builder /usr/local/lib/node_modules /usr/local/lib/node_modules
172
+ COPY --from=cli-builder /usr/local/bin/codex /usr/local/bin/codex
173
+ COPY --from=balda /usr/local/bin/balda /usr/local/bin/balda
174
+
175
+ WORKDIR /workspace
176
+ ENTRYPOINT ["balda"]
177
+ ```
178
+
179
+ ## Core commands
180
+
181
+ - `/start owner=<owner_token>` — owner bootstrap in direct messages
182
+ - `/start invite=<invite_token>` — collaborator onboarding
183
+ - `/topic <name>` — open a focused session
184
+ - `/goalkeeper <objective>` — run a longer goal loop
185
+ - `/goalkeeper clear` — stop active goal work in the current session
186
+ - `/cancel` — stop the current turn
187
+ - `/reset` or `/restart` — clear the current session and start fresh
188
+ - `/locator` — show the current session locator for scheduler/webhook routing
189
+
190
+ Full command behavior is documented in [docs/balda.md](docs/balda.md).
191
+
192
+ ## Configuration
193
+
194
+ Balda loads `.config/balda/config.yaml` and then applies `BALDA_*` environment
195
+ overrides. If a local `.env` exists, Balda loads it before resolving config.
196
+
197
+ Minimal shape:
198
+
199
+ ```yaml
200
+ runtime:
201
+ providers:
202
+ codex:
203
+ type: codex_acp
204
+ codex_acp: {}
205
+ mcp_servers: {}
206
+
207
+ balda:
208
+ provider: codex
209
+ telegram:
210
+ token: ""
211
+ ```
212
+
213
+ Common settings:
214
+
215
+ - `balda.provider` — which configured provider runtime to use
216
+ - `balda.telegram.token` — Telegram bot token
217
+ - `balda.telegram.formatting_mode` — Telegram output mode: `rich_markdown`
218
+ (default), `rich_html`, or `none` for literal plain text
219
+ - `balda.zulip.*` — Zulip outgoing webhook bot credentials and receiver config
220
+ - `balda.slack.*` — Slack bot token, signing secret, and HTTP receiver config
221
+ - `balda.webhooks.*` — optional inbound webhook routes
222
+ - `balda.scheduler.jobs` — recurring scheduled jobs
223
+ - `balda.workspace.*` — workspace/worktree behavior for goal execution
224
+ - `balda.permissions.mode` — agent permission policy: `allow_all`, `ask`, or `deny_all`
225
+ - `balda.permissions.timeout` — maximum wait for an interactive permission decision (default `2m`)
226
+ - `balda.memory.enabled` — enable the global explicit-fact memory store and its
227
+ bundled MCP tools (default `true`)
228
+ - `balda.mcp_servers` — MCP servers injected into Balda-started sessions
229
+
230
+ ### Explicit fact memory
231
+
232
+ The bundled `balda.memory.remember` tool stores explicit facts globally for the
233
+ Balda instance. Each update records a latest-memory timestamp. On a subsequent
234
+ session turn, Balda compares that timestamp with the turn's memory cursor. When
235
+ they differ, Balda adds the complete current fact-memory snapshot to that same
236
+ provider user prompt in a delimited application-memory block. Unchanged, empty,
237
+ or disabled memory adds nothing to the prompt. Global fact memory is expected to
238
+ remain small; it is separate from optional durable session memory.
239
+
240
+ ### Knowl sidecar
241
+
242
+ Run [Knowl](https://github.com/baldaworks/knowl) separately, then register its
243
+ MCP endpoint through Balda's existing generic configuration:
244
+
245
+ ```yaml
246
+ runtime:
247
+ mcp_servers:
248
+ knowl:
249
+ type: http
250
+ url: http://127.0.0.1:8080/mcp
251
+
252
+ balda:
253
+ mcp_servers:
254
+ - knowl
255
+ ```
256
+
257
+ This exposes `knowl_retrieve`, `knowl_ingest`, and `knowl_operation` to
258
+ Balda-started sessions. Balda does not start Knowl, initialize its workspace,
259
+ own its provider/storage configuration, or automatically ingest conversation
260
+ turns.
261
+
262
+ `allow_all` preserves historical behavior and should be used only where every
263
+ agent tool call is trusted. Production chat deployments should normally set
264
+ `BALDA_PERMISSIONS_MODE=ask`; unsupported channels, missing requester context,
265
+ cancellation, and timeout fail closed.
266
+
267
+ Set `BALDA_TELEGRAM_FORMATTING_MODE` to override the Telegram mode. Existing
268
+ `markdownv2` configurations must move to `rich_markdown` (or `none`), and
269
+ existing `html` configurations must move to `rich_html` (or `none`). Balda does
270
+ not accept compatibility aliases: an unsupported value fails startup before
271
+ ingress begins accepting messages. See the
272
+ [Telegram formatting guide](docs/telegram-formatting.md) for rollout and
273
+ fallback details.
274
+
275
+ For complete configuration, examples, and provider-specific details, see
276
+ [docs/balda.md](docs/balda.md).
277
+
278
+ ## Troubleshooting
279
+
280
+ - `telegram token is required` — run `balda init` or set
281
+ `BALDA_TELEGRAM_TOKEN`
282
+ - `no supported agent CLI detected` — install or expose one of `codex`,
283
+ `opencode`, `copilot`, `gemini`, or `claude`
284
+ - `balda.provider is required` — rerun `balda init` or set a configured
285
+ provider id manually
286
+ - webhook or Slack/Zulip startup issues — verify the matching `balda.*`
287
+ integration settings in config
288
+ - workspace import/export issues — check `balda.workspace.mode`,
289
+ `balda.workspace.base_branch`, and the git checkout Balda is running in
290
+
291
+ ## Docs
292
+
293
+ - Product and operator docs: [docs/balda.md](docs/balda.md)
294
+ - Goal workflow: [docs/goal-workflow.md](docs/goal-workflow.md)
295
+ - Architecture map: [docs/architecture/index.md](docs/architecture/index.md)
296
+ - Telegram formatting: [docs/telegram-formatting.md](docs/telegram-formatting.md)
297
+ - Zulip webhook setup: [docs/zulip-webhook.md](docs/zulip-webhook.md)
298
+ - Slack setup: [docs/slack.md](docs/slack.md)
299
+ - Contributing: [CONTRIBUTING.md](CONTRIBUTING.md)
300
+
301
+ ## Release
302
+
303
+ - GitHub Releases: <https://github.com/baldaworks/balda/releases>
304
+ - npm package: <https://www.npmjs.com/package/@baldaworks/balda>
305
+
306
+ npm releases are published from Git tags through the Omnidist workflow. The
307
+ `NPM_PUBLISH_TOKEN` repository secret must have permission to publish the public
308
+ `@baldaworks/balda` package in the `baldaworks` npm organization.
package/bin/balda ADDED
Binary file
package/package.json ADDED
@@ -0,0 +1,20 @@
1
+ {
2
+ "bin": {
3
+ "balda": "bin/balda"
4
+ },
5
+ "cpu": [
6
+ "arm64"
7
+ ],
8
+ "description": "@baldaworks/balda binary for linux/arm64",
9
+ "files": [
10
+ "bin",
11
+ "README.md",
12
+ "LICENSE"
13
+ ],
14
+ "license": "SEE LICENSE IN LICENSE",
15
+ "name": "@baldaworks/balda-linux-arm64",
16
+ "os": [
17
+ "linux"
18
+ ],
19
+ "version": "0.3.0"
20
+ }