bazilion 0.3.0 → 0.5.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.
- package/dist/cli.js +308 -129
- package/dist/cli.js.map +1 -1
- package/dist/daemon.js +21921 -1198
- package/dist/daemon.js.map +1 -1
- package/dist/migrations/0002_profile_groups.sql +0 -1
- package/dist/migrations/0007_mcp_servers.sql +30 -0
- package/dist/migrations/0008_seed_user_md.sql +39 -0
- package/dist/worker.js +436 -92
- package/dist/worker.js.map +1 -1
- package/package.json +11 -10
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
-- agents), they don't replace them.
|
|
9
9
|
--
|
|
10
10
|
-- Spawn semantics live in apps/daemon/src/core/profile-group/spawn.ts.
|
|
11
|
-
-- See docs/backlog/todo/BAZ-002-profile-groups.md for the full spec.
|
|
12
11
|
|
|
13
12
|
CREATE TABLE profile_groups (
|
|
14
13
|
id TEXT PRIMARY KEY, -- slug, e.g. "platform-team"
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
-- MCP (Model Context Protocol) servers.
|
|
2
|
+
--
|
|
3
|
+
-- Each row is one configured server the daemon connects to as an MCP client.
|
|
4
|
+
-- Tools discovered on it (`tools/list`) are namespaced `mcp__<name>__<tool>`
|
|
5
|
+
-- and injected into agent turns. v0.4.0 scopes servers globally — every agent
|
|
6
|
+
-- sees the tools of every enabled server.
|
|
7
|
+
--
|
|
8
|
+
-- Transports:
|
|
9
|
+
-- stdio — local subprocess (`command` + JSON `args`); inherits the daemon's
|
|
10
|
+
-- merged secrets env, so a server needing e.g. GITHUB_TOKEN picks it
|
|
11
|
+
-- up from the normal secrets table.
|
|
12
|
+
-- http — Streamable-HTTP endpoint at `url`.
|
|
13
|
+
-- sse — SSE endpoint at `url`.
|
|
14
|
+
--
|
|
15
|
+
-- Bearer auth for http/sse is NOT stored here: the token lives in the encrypted
|
|
16
|
+
-- `secrets` table under key `MCP_TOKEN_<id>`; `has_auth` records whether one is
|
|
17
|
+
-- set so the UI/API can show it without decrypting.
|
|
18
|
+
|
|
19
|
+
CREATE TABLE IF NOT EXISTS mcp_servers (
|
|
20
|
+
id TEXT PRIMARY KEY,
|
|
21
|
+
name TEXT NOT NULL UNIQUE,
|
|
22
|
+
transport TEXT NOT NULL CHECK (transport IN ('stdio','http','sse')),
|
|
23
|
+
command TEXT,
|
|
24
|
+
args TEXT NOT NULL DEFAULT '[]',
|
|
25
|
+
url TEXT,
|
|
26
|
+
has_auth INTEGER NOT NULL DEFAULT 0,
|
|
27
|
+
enabled INTEGER NOT NULL DEFAULT 1,
|
|
28
|
+
created_at INTEGER NOT NULL,
|
|
29
|
+
updated_at INTEGER NOT NULL
|
|
30
|
+
);
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
-- Backfill USER.md content into pre-existing groups.
|
|
2
|
+
--
|
|
3
|
+
-- Before this BAZ, groups.user_md was born as '' and stayed empty unless an
|
|
4
|
+
-- operator hand-edited it, so the "About the User" section of every system
|
|
5
|
+
-- prompt was generic boilerplate. New groups now seed DEFAULT_USER_MD at
|
|
6
|
+
-- insert time (core/repos/groups.ts); this one-shot UPDATE gives the same
|
|
7
|
+
-- starter content to groups that already exist with an empty user_md.
|
|
8
|
+
--
|
|
9
|
+
-- The literal below MUST be kept in sync with DEFAULT_USER_MD in
|
|
10
|
+
-- core/profile/templates.ts — SQL can't import it. Two copies, one source of
|
|
11
|
+
-- truth; flag in review if they drift.
|
|
12
|
+
--
|
|
13
|
+
-- Tradeoff: the column can't distinguish "never set"
|
|
14
|
+
-- from "explicitly cleared", so an operator who deliberately set user_md to ''
|
|
15
|
+
-- sees it replaced. bazilion is alpha; the upside (every install gets the new
|
|
16
|
+
-- template) beats the downside (a power-user re-clears one file). Idempotent:
|
|
17
|
+
-- the WHERE clause matches nothing once every row is non-empty.
|
|
18
|
+
|
|
19
|
+
UPDATE groups SET user_md = '# USER.md — About Your Human
|
|
20
|
+
|
|
21
|
+
_Learn about the person you''re helping. Update via `user_md_write` as you go
|
|
22
|
+
(read with `user_md_get` first for the etag)._
|
|
23
|
+
|
|
24
|
+
- **Name:**
|
|
25
|
+
- **What to call them:**
|
|
26
|
+
- **Pronouns:** _(optional)_
|
|
27
|
+
- **Timezone:**
|
|
28
|
+
- **Notes:**
|
|
29
|
+
|
|
30
|
+
## Context
|
|
31
|
+
|
|
32
|
+
_(What do they care about? What projects are they working on? What''s their
|
|
33
|
+
working style? Build this picture over time, a little each session.)_
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
The more you know, the better you can help. But remember — you''re learning
|
|
38
|
+
about a person, not building a dossier. Respect the difference.
|
|
39
|
+
' WHERE user_md = '';
|