agent-mockingbird 0.0.1
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/.agents/skills/btca-cli/SKILL.md +64 -0
- package/.agents/skills/btca-cli/agents/openai.yaml +3 -0
- package/.agents/skills/frontend-design/SKILL.md +42 -0
- package/.agents/skills/frontend-design/agents/openai.yaml +3 -0
- package/.env.example +36 -0
- package/.githooks/pre-commit +33 -0
- package/.github/workflows/ci.yml +309 -0
- package/.opencode/bun.lock +18 -0
- package/.opencode/package.json +5 -0
- package/.opencode/tools/agent_type_manager.ts +100 -0
- package/.opencode/tools/config_manager.ts +87 -0
- package/.opencode/tools/cron_manager.ts +145 -0
- package/.opencode/tools/memory_get.ts +43 -0
- package/.opencode/tools/memory_remember.ts +53 -0
- package/.opencode/tools/memory_search.ts +48 -0
- package/AGENTS.md +126 -0
- package/MEMORY.md +2 -0
- package/README.md +451 -0
- package/THIRD_PARTY_NOTICES.md +11 -0
- package/agent-mockingbird.config.example.json +135 -0
- package/apps/server/package.json +32 -0
- package/apps/server/src/backend/agents/bootstrapContext.ts +362 -0
- package/apps/server/src/backend/agents/openclawImport.test.ts +133 -0
- package/apps/server/src/backend/agents/openclawImport.ts +797 -0
- package/apps/server/src/backend/agents/opencodeConfig.ts +428 -0
- package/apps/server/src/backend/agents/service.ts +10 -0
- package/apps/server/src/backend/config/example-config.test.ts +20 -0
- package/apps/server/src/backend/config/orchestration.ts +243 -0
- package/apps/server/src/backend/config/policy.ts +158 -0
- package/apps/server/src/backend/config/schema.test.ts +15 -0
- package/apps/server/src/backend/config/schema.ts +391 -0
- package/apps/server/src/backend/config/semantic.test.ts +34 -0
- package/apps/server/src/backend/config/semantic.ts +149 -0
- package/apps/server/src/backend/config/service.test.ts +75 -0
- package/apps/server/src/backend/config/service.ts +207 -0
- package/apps/server/src/backend/config/smoke.ts +77 -0
- package/apps/server/src/backend/config/store.test.ts +123 -0
- package/apps/server/src/backend/config/store.ts +581 -0
- package/apps/server/src/backend/config/testFixtures.ts +5 -0
- package/apps/server/src/backend/config/types.ts +56 -0
- package/apps/server/src/backend/contracts/events.ts +320 -0
- package/apps/server/src/backend/contracts/runtime.ts +111 -0
- package/apps/server/src/backend/cron/executor.ts +435 -0
- package/apps/server/src/backend/cron/repository.ts +170 -0
- package/apps/server/src/backend/cron/service.ts +660 -0
- package/apps/server/src/backend/cron/storage.ts +92 -0
- package/apps/server/src/backend/cron/types.ts +138 -0
- package/apps/server/src/backend/cron/utils.ts +351 -0
- package/apps/server/src/backend/db/client.ts +20 -0
- package/apps/server/src/backend/db/migrate.ts +40 -0
- package/apps/server/src/backend/db/repository.ts +1762 -0
- package/apps/server/src/backend/db/schema.ts +113 -0
- package/apps/server/src/backend/db/usageDashboard.test.ts +102 -0
- package/apps/server/src/backend/db/wipe.ts +13 -0
- package/apps/server/src/backend/defaults.ts +32 -0
- package/apps/server/src/backend/env.ts +48 -0
- package/apps/server/src/backend/heartbeat/activeHours.ts +45 -0
- package/apps/server/src/backend/heartbeat/defaultJob.ts +88 -0
- package/apps/server/src/backend/heartbeat/heartbeat.test.ts +110 -0
- package/apps/server/src/backend/heartbeat/runtimeService.ts +190 -0
- package/apps/server/src/backend/heartbeat/service.ts +176 -0
- package/apps/server/src/backend/heartbeat/state.test.ts +63 -0
- package/apps/server/src/backend/heartbeat/state.ts +167 -0
- package/apps/server/src/backend/heartbeat/types.ts +54 -0
- package/apps/server/src/backend/http/boundedQueue.test.ts +49 -0
- package/apps/server/src/backend/http/boundedQueue.ts +92 -0
- package/apps/server/src/backend/http/parsers.ts +40 -0
- package/apps/server/src/backend/http/router.ts +61 -0
- package/apps/server/src/backend/http/routes/agentRoutes.ts +67 -0
- package/apps/server/src/backend/http/routes/backgroundRoutes.ts +203 -0
- package/apps/server/src/backend/http/routes/chatRoutes.ts +107 -0
- package/apps/server/src/backend/http/routes/configRoutes.ts +602 -0
- package/apps/server/src/backend/http/routes/cronRoutes.ts +221 -0
- package/apps/server/src/backend/http/routes/dashboardRoutes.ts +308 -0
- package/apps/server/src/backend/http/routes/eventRoutes.ts +7 -0
- package/apps/server/src/backend/http/routes/heartbeatRoutes.test.ts +41 -0
- package/apps/server/src/backend/http/routes/heartbeatRoutes.ts +28 -0
- package/apps/server/src/backend/http/routes/index.ts +101 -0
- package/apps/server/src/backend/http/routes/mcpRoutes.ts +213 -0
- package/apps/server/src/backend/http/routes/memoryRoutes.ts +154 -0
- package/apps/server/src/backend/http/routes/runRoutes.ts +310 -0
- package/apps/server/src/backend/http/routes/runtimeRoutes.ts +197 -0
- package/apps/server/src/backend/http/routes/skillRoutes.ts +112 -0
- package/apps/server/src/backend/http/routes/uiRoutes.test.ts +161 -0
- package/apps/server/src/backend/http/routes/uiRoutes.ts +177 -0
- package/apps/server/src/backend/http/routes/usageRoutes.test.ts +104 -0
- package/apps/server/src/backend/http/routes/usageRoutes.ts +767 -0
- package/apps/server/src/backend/http/schemas.ts +64 -0
- package/apps/server/src/backend/http/sse.ts +144 -0
- package/apps/server/src/backend/integration/backend-core.test.ts +2316 -0
- package/apps/server/src/backend/logging/logger.ts +64 -0
- package/apps/server/src/backend/mcp/service.ts +326 -0
- package/apps/server/src/backend/memory/cli.ts +170 -0
- package/apps/server/src/backend/memory/conceptExpansion.test.ts +28 -0
- package/apps/server/src/backend/memory/conceptExpansion.ts +80 -0
- package/apps/server/src/backend/memory/qmdPort.test.ts +54 -0
- package/apps/server/src/backend/memory/qmdPort.ts +61 -0
- package/apps/server/src/backend/memory/records.test.ts +66 -0
- package/apps/server/src/backend/memory/records.ts +229 -0
- package/apps/server/src/backend/memory/service.ts +2012 -0
- package/apps/server/src/backend/memory/sqliteVec.ts +58 -0
- package/apps/server/src/backend/memory/types.ts +104 -0
- package/apps/server/src/backend/opencode/agentMockingbirdPlugin.test.ts +396 -0
- package/apps/server/src/backend/opencode/client.ts +98 -0
- package/apps/server/src/backend/opencode/models.ts +41 -0
- package/apps/server/src/backend/opencode/systemPrompt.test.ts +146 -0
- package/apps/server/src/backend/opencode/systemPrompt.ts +284 -0
- package/apps/server/src/backend/paths.ts +57 -0
- package/apps/server/src/backend/prompts/service.ts +100 -0
- package/apps/server/src/backend/queue/queue.test.ts +189 -0
- package/apps/server/src/backend/queue/service.ts +177 -0
- package/apps/server/src/backend/queue/types.ts +39 -0
- package/apps/server/src/backend/run/service.ts +576 -0
- package/apps/server/src/backend/run/storage.ts +47 -0
- package/apps/server/src/backend/run/types.ts +44 -0
- package/apps/server/src/backend/runtime/errors.ts +61 -0
- package/apps/server/src/backend/runtime/index.ts +72 -0
- package/apps/server/src/backend/runtime/memoryPromptDedup.test.ts +153 -0
- package/apps/server/src/backend/runtime/memoryPromptDedup.ts +76 -0
- package/apps/server/src/backend/runtime/opencodeRuntime/backgroundMethods.ts +765 -0
- package/apps/server/src/backend/runtime/opencodeRuntime/coreMethods.ts +705 -0
- package/apps/server/src/backend/runtime/opencodeRuntime/eventMethods.ts +503 -0
- package/apps/server/src/backend/runtime/opencodeRuntime/memoryMethods.ts +462 -0
- package/apps/server/src/backend/runtime/opencodeRuntime/promptMethods.ts +1167 -0
- package/apps/server/src/backend/runtime/opencodeRuntime/shared.ts +254 -0
- package/apps/server/src/backend/runtime/opencodeRuntime.test.ts +2899 -0
- package/apps/server/src/backend/runtime/opencodeRuntime.ts +135 -0
- package/apps/server/src/backend/runtime/sessionScope.ts +45 -0
- package/apps/server/src/backend/skills/service.ts +442 -0
- package/apps/server/src/backend/workspace/resolve.ts +27 -0
- package/apps/server/src/cli/agent-mockingbird.mjs +2522 -0
- package/apps/server/src/cli/agent-mockingbird.test.ts +68 -0
- package/apps/server/src/cli/runtime-assets.mjs +269 -0
- package/apps/server/src/cli/runtime-assets.test.ts +52 -0
- package/apps/server/src/cli/runtime-layout.mjs +75 -0
- package/apps/server/src/cli/standaloneBuild.test.ts +19 -0
- package/apps/server/src/cli/standaloneBuild.ts +19 -0
- package/apps/server/src/cli/standaloneCronBinary.test.ts +187 -0
- package/apps/server/src/index.ts +178 -0
- package/apps/server/tsconfig.json +12 -0
- package/backlog.md +5 -0
- package/bin/agent-mockingbird +2522 -0
- package/bin/runtime-layout.mjs +75 -0
- package/build-bin.ts +34 -0
- package/build-cli.mjs +37 -0
- package/build.ts +40 -0
- package/bun-env.d.ts +11 -0
- package/bun.lock +888 -0
- package/bunfig.toml +2 -0
- package/components.json +21 -0
- package/config.json +130 -0
- package/deploy/RELEASE_INSTALL.md +112 -0
- package/deploy/docker-compose.yml +42 -0
- package/deploy/systemd/README.md +46 -0
- package/deploy/systemd/agent-mockingbird.service +28 -0
- package/deploy/systemd/opencode.service +25 -0
- package/docs/legacy-config-ui-reference.md +51 -0
- package/docs/memory-e2e-trace-2026-03-04.md +63 -0
- package/docs/memory-ops.md +96 -0
- package/docs/memory-runtime-contract.md +42 -0
- package/docs/memory-tuning-remote-2026-03-04.md +59 -0
- package/docs/opencode-rebase-workflow-plan.md +614 -0
- package/docs/opencode-startup-sync-plan.md +94 -0
- package/docs/vendor-opencode.md +41 -0
- package/drizzle/0000_famous_turbo.sql +49 -0
- package/drizzle/0001_cron_memory_aux.sql +160 -0
- package/drizzle/0002_runtime_session_bindings.sql +28 -0
- package/drizzle/0003_background_runs.sql +27 -0
- package/drizzle/0004_memory_open_write.sql +63 -0
- package/drizzle/0005_signal_channel.sql +47 -0
- package/drizzle/0006_usage_event_dimensions.sql +7 -0
- package/drizzle/meta/0000_snapshot.json +341 -0
- package/drizzle/meta/_journal.json +55 -0
- package/drizzle.config.ts +14 -0
- package/eslint.config.mjs +77 -0
- package/knip.json +18 -0
- package/memory/2026-03-04.md +4 -0
- package/opencode.lock.json +16 -0
- package/package.json +67 -0
- package/packages/agent-mockingbird-installer/README.md +31 -0
- package/packages/agent-mockingbird-installer/bin/agent-mockingbird-installer.mjs +44 -0
- package/packages/agent-mockingbird-installer/opencode.lock.json +16 -0
- package/packages/agent-mockingbird-installer/package.json +23 -0
- package/packages/contracts/package.json +19 -0
- package/packages/contracts/src/agentTypes.ts +122 -0
- package/packages/contracts/src/cron.ts +146 -0
- package/packages/contracts/src/dashboard.ts +378 -0
- package/packages/contracts/src/index.ts +3 -0
- package/packages/contracts/tsconfig.json +4 -0
- package/patches/opencode/0001-Wafflebot-OpenCode-baseline.patch +2341 -0
- package/patches/opencode/0002-Fix-OpenCode-web-entry-and-settings-icons.patch +104 -0
- package/patches/opencode/0003-fix-app-remove-duplicate-sidebar-mount.patch +32 -0
- package/patches/opencode/0004-Add-heartbeat-settings-and-usage-nav.patch +506 -0
- package/patches/opencode/0005-Use-chart-icon-for-usage-nav.patch +38 -0
- package/patches/opencode/0006-Modernize-cron-settings.patch +399 -0
- package/patches/opencode/0007-Rename-waffle-namespaces-to-mockingbird.patch +1110 -0
- package/patches/opencode/0008-Remove-cron-contract-section.patch +178 -0
- package/patches/opencode/0009-Rework-cron-tab-as-operations-console.patch +414 -0
- package/patches/opencode/0010-Refine-heartbeat-settings-controls.patch +208 -0
- package/runtime-assets/opencode-config/opencode.jsonc +25 -0
- package/runtime-assets/opencode-config/package.json +5 -0
- package/runtime-assets/opencode-config/plugins/agent-mockingbird.ts +715 -0
- package/runtime-assets/workspace/.agents/skills/config-auditor/SKILL.md +25 -0
- package/runtime-assets/workspace/.agents/skills/config-editor/SKILL.md +24 -0
- package/runtime-assets/workspace/.agents/skills/cron-manager/SKILL.md +57 -0
- package/runtime-assets/workspace/.agents/skills/memory-ops/SKILL.md +120 -0
- package/runtime-assets/workspace/.agents/skills/runtime-diagnose/SKILL.md +25 -0
- package/runtime-assets/workspace/AGENTS.md +56 -0
- package/runtime-assets/workspace/MEMORY.md +4 -0
- package/scripts/build-release-bundle.sh +66 -0
- package/scripts/check-ship.ts +383 -0
- package/scripts/dev-opencode.sh +17 -0
- package/scripts/dev-stack-opencode.sh +15 -0
- package/scripts/dev-stack.sh +61 -0
- package/scripts/install-systemd.sh +87 -0
- package/scripts/memory-e2e.sh +76 -0
- package/scripts/memory-trace-e2e.sh +141 -0
- package/scripts/migrate-opencode-env.ts +108 -0
- package/scripts/onboard/bootstrap.sh +32 -0
- package/scripts/opencode-swap.ts +78 -0
- package/scripts/opencode-sync.ts +715 -0
- package/scripts/runtime-assets-sync.mjs +83 -0
- package/scripts/setup-git-hooks.ts +39 -0
- package/tsconfig.json +45 -0
- package/tui.json +98 -0
- package/turbo.json +36 -0
- package/vendor/OPENCODE_VENDOR.md +13 -0
package/README.md
ADDED
|
@@ -0,0 +1,451 @@
|
|
|
1
|
+
# agent-mockingbird
|
|
2
|
+
|
|
3
|
+
Bun-native orchestration dashboard scaffold for a long-running agent stack.
|
|
4
|
+
|
|
5
|
+
## Stack
|
|
6
|
+
|
|
7
|
+
- Runtime: `bun`
|
|
8
|
+
- Frontend: `react` + `typescript`
|
|
9
|
+
- Styling: `tailwindcss v4`
|
|
10
|
+
- UI primitives: `@base-ui-components/react` with shadcn-style component structure
|
|
11
|
+
- Linting: `eslint` (flat config) + `typescript-eslint` + `react-hooks` + `jsx-a11y`
|
|
12
|
+
|
|
13
|
+
## Commands
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
bun install
|
|
17
|
+
bun run dev
|
|
18
|
+
bun run build:cli
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Canonical install flow for end users on Linux:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npx --yes \
|
|
25
|
+
--package "@waffleophagus/agent-mockingbird-installer@latest" \
|
|
26
|
+
agent-mockingbird-installer install
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
That command installs the packaged CLI `agent-mockingbird` from npm, installs and starts the `opencode` and `agent-mockingbird` user services, and then launches the interactive onboarding wizard on TTY installs.
|
|
30
|
+
|
|
31
|
+
Local development installs a git `pre-commit` hook automatically via `core.hooksPath=.githooks`. The hook runs:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
bun run build:cli
|
|
35
|
+
bun run lint
|
|
36
|
+
bun run typecheck
|
|
37
|
+
bun run build
|
|
38
|
+
bun run build:bin
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
and builds local output into `dist/app` plus the tracked CLI shim.
|
|
42
|
+
|
|
43
|
+
Run agent-mockingbird + OpenCode together for smoke testing:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
bun run dev:stack
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
`dev:stack` now builds the bundled app, starts the local OpenCode sidecar on `127.0.0.1:4096`, and starts the Agent Mockingbird server in one command. `bun run dev:opencode` is also available if you want to run the sidecar separately.
|
|
50
|
+
|
|
51
|
+
Production build and run:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
bun run build
|
|
55
|
+
./dist/agent-mockingbird
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Code quality:
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
bun run test
|
|
62
|
+
bun run lint
|
|
63
|
+
bun run typecheck
|
|
64
|
+
bun run check:ship
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
`bun run test` is intentionally scoped to `src` so local `opencode/` clone tests are not included.
|
|
68
|
+
|
|
69
|
+
`bun run check:ship` is the full ship-readiness gate. It bootstraps `vendor/opencode` if needed, verifies the OpenCode patch stack is reproducible, runs the repo lint/typecheck/build checks, checks generated artifacts, and compares full OpenCode workspace typecheck results against cleanroom so upstream-only baseline failures can be ignored.
|
|
70
|
+
|
|
71
|
+
OpenCode workflow:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
bun run opencode:sync --status
|
|
75
|
+
bun run opencode:sync --rebuild-only
|
|
76
|
+
bun run opencode:sync --check
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
The repo now treats `cleanroom/opencode` as a pristine upstream clone, `vendor/opencode` as a generated editable worktree, and `patches/opencode/*.patch` as the tracked patch stack. If `vendor/opencode` is missing, run `bun run opencode:sync --rebuild-only` before local build/dev commands that need OpenCode sources.
|
|
80
|
+
|
|
81
|
+
Database migrations (Drizzle + SQLite):
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
bun run db:generate
|
|
85
|
+
bun run db:migrate
|
|
86
|
+
bun run db:check
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
By default the SQLite file is `./data/agent-mockingbird.db`. Override with `AGENT_MOCKINGBIRD_DB_PATH`.
|
|
90
|
+
|
|
91
|
+
Reset local database to defaults (including cron job tables):
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
bun run db:wipe
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Memory CLI:
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
bun run memory:status
|
|
101
|
+
bun run memory:sync
|
|
102
|
+
bun run memory:reindex
|
|
103
|
+
bun run memory:search "query"
|
|
104
|
+
bun run memory:e2e
|
|
105
|
+
bun run memory:trace:e2e
|
|
106
|
+
bun run src/backend/memory/cli.ts remember "some note to store"
|
|
107
|
+
bun run src/backend/memory/cli.ts activity 20
|
|
108
|
+
bun run memory:lint
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
`memory:trace:e2e` auto-selects a model from existing sessions (prefers `main`). Override with `AGENT_MOCKINGBIRD_E2E_MODEL=provider/model`.
|
|
112
|
+
|
|
113
|
+
Memory operator references:
|
|
114
|
+
|
|
115
|
+
- `docs/memory-ops.md`
|
|
116
|
+
- `docs/memory-runtime-contract.md`
|
|
117
|
+
- `runtime-assets/workspace/.agents/skills/memory-ops/SKILL.md` (runtime bundle source)
|
|
118
|
+
- `.agents/skills/memory-ops/SKILL.md` (development copy)
|
|
119
|
+
|
|
120
|
+
## Runtime
|
|
121
|
+
|
|
122
|
+
Agent Mockingbird runs with an OpenCode-backed runtime that forwards prompts to OpenCode and stores mirrored messages locally.
|
|
123
|
+
|
|
124
|
+
Runtime configuration is stored in JSON (`./data/agent-mockingbird.config.json` by default). On first boot, agent-mockingbird migrates legacy env/DB runtime settings into this file.
|
|
125
|
+
Example config template: `agent-mockingbird.config.example.json`.
|
|
126
|
+
`./config.json` at repo root is OpenCode config, not agent-mockingbird runtime config.
|
|
127
|
+
Runtime behavior is sourced from agent-mockingbird config JSON. OpenCode runtime env vars are no longer accepted for model/provider/timeouts/directory.
|
|
128
|
+
If you still have legacy `AGENT_MOCKINGBIRD_OPENCODE_*` runtime vars, run `bun run config:migrate-opencode-env` once, then unset them.
|
|
129
|
+
|
|
130
|
+
Skill deployment behavior (install/update):
|
|
131
|
+
|
|
132
|
+
- Runtime bundle source files live in `runtime-assets/workspace` and `runtime-assets/opencode-config`.
|
|
133
|
+
- Install/update syncs workspace files into the active workspace root, and syncs OpenCode managed config into an external config dir under `data/opencode-config/...`.
|
|
134
|
+
- Sync state is tracked separately in `data/runtime-assets-workspace-state.json` and `data/runtime-assets-opencode-config-state.json`.
|
|
135
|
+
- On update, interactive installs prompt only when both:
|
|
136
|
+
- local file changed since last sync
|
|
137
|
+
- packaged runtime asset also changed since last sync
|
|
138
|
+
- On non-interactive update conflicts, install creates `<file>.backup-<UTCSTAMP>` then overwrites with packaged content.
|
|
139
|
+
- Runtime OpenCode `skills.paths` is synced to include workspace `.agents/skills`.
|
|
140
|
+
- If `ui.skills` is empty, install/update initializes defaults:
|
|
141
|
+
- `config-editor`
|
|
142
|
+
- `config-auditor`
|
|
143
|
+
- `runtime-diagnose`
|
|
144
|
+
- `memory-ops`
|
|
145
|
+
- Install/update also seeds managed OpenCode config at `data/opencode-config/<fingerprint>/opencode.jsonc` from `runtime-assets/opencode-config`:
|
|
146
|
+
- default `agent.general.tools` enables `memory_search`, `memory_get`, and `memory_remember`.
|
|
147
|
+
|
|
148
|
+
Config API:
|
|
149
|
+
|
|
150
|
+
- `GET /api/config`
|
|
151
|
+
- `PATCH /api/config` (partial update with optimistic `expectedHash`)
|
|
152
|
+
- `PUT /api/config` (full replace with optimistic `expectedHash`)
|
|
153
|
+
- `GET /api/runtime/info` (effective OpenCode connection + directory/config persistence metadata)
|
|
154
|
+
|
|
155
|
+
After every config change, agent-mockingbird performs:
|
|
156
|
+
|
|
157
|
+
- schema validation
|
|
158
|
+
- semantic provider/model validation via OpenCode `config/providers`
|
|
159
|
+
- gateway smoke test prompt (expects an `OK` response pattern)
|
|
160
|
+
|
|
161
|
+
If any validation step fails, the config change is not persisted.
|
|
162
|
+
|
|
163
|
+
Auth and path env variables:
|
|
164
|
+
|
|
165
|
+
- `AGENT_MOCKINGBIRD_DB_PATH` (default `./data/agent-mockingbird.db`)
|
|
166
|
+
- `AGENT_MOCKINGBIRD_CONFIG_PATH` (default `./data/agent-mockingbird.config.json`)
|
|
167
|
+
- `AGENT_MOCKINGBIRD_OPENCODE_AUTH_HEADER` (optional full `Authorization` header)
|
|
168
|
+
- `AGENT_MOCKINGBIRD_OPENCODE_USERNAME` / `AGENT_MOCKINGBIRD_OPENCODE_PASSWORD` (optional Basic auth fallback)
|
|
169
|
+
|
|
170
|
+
Cron environment variables:
|
|
171
|
+
|
|
172
|
+
- `AGENT_MOCKINGBIRD_CRON_ENABLED` (default `true`)
|
|
173
|
+
- `AGENT_MOCKINGBIRD_CRON_SCHEDULER_POLL_MS` (default `1000`)
|
|
174
|
+
- `AGENT_MOCKINGBIRD_CRON_WORKER_POLL_MS` (default `1000`)
|
|
175
|
+
- `AGENT_MOCKINGBIRD_CRON_LEASE_MS` (default `30000`)
|
|
176
|
+
- `AGENT_MOCKINGBIRD_CRON_MAX_ENQUEUE_PER_JOB_TICK` (default `25`)
|
|
177
|
+
|
|
178
|
+
Memory mode environment variables:
|
|
179
|
+
|
|
180
|
+
- `AGENT_MOCKINGBIRD_MEMORY_ENABLED` (default `true`)
|
|
181
|
+
- `AGENT_MOCKINGBIRD_MEMORY_WORKSPACE_DIR` (default `./data/workspace`)
|
|
182
|
+
- `AGENT_MOCKINGBIRD_MEMORY_EMBED_PROVIDER` (`ollama` or `none`, default `ollama`)
|
|
183
|
+
- `AGENT_MOCKINGBIRD_MEMORY_EMBED_MODEL` (default `qwen3-embedding:4b`)
|
|
184
|
+
- `AGENT_MOCKINGBIRD_MEMORY_OLLAMA_BASE_URL` (default `http://127.0.0.1:11434`)
|
|
185
|
+
- `AGENT_MOCKINGBIRD_MEMORY_CHUNK_TOKENS` (default `400`)
|
|
186
|
+
- `AGENT_MOCKINGBIRD_MEMORY_CHUNK_OVERLAP` (default `80`)
|
|
187
|
+
- `AGENT_MOCKINGBIRD_MEMORY_MAX_RESULTS` (default `6`)
|
|
188
|
+
- `AGENT_MOCKINGBIRD_MEMORY_MIN_SCORE` (default `0.25`)
|
|
189
|
+
- `AGENT_MOCKINGBIRD_MEMORY_SYNC_COOLDOWN_MS` (default `10000`)
|
|
190
|
+
- `AGENT_MOCKINGBIRD_MEMORY_TOOL_MODE` (`hybrid`, `inject_only`, `tool_only`; default `hybrid`)
|
|
191
|
+
- `AGENT_MOCKINGBIRD_MEMORY_INJECTION_DEDUPE_ENABLED` (default `true`)
|
|
192
|
+
- `AGENT_MOCKINGBIRD_MEMORY_INJECTION_DEDUPE_FALLBACK_RECALL_ONLY` (default `true`)
|
|
193
|
+
- `AGENT_MOCKINGBIRD_MEMORY_INJECTION_DEDUPE_MAX_TRACKED` (default `256`)
|
|
194
|
+
|
|
195
|
+
OpenCode local Agent Mockingbird plugin:
|
|
196
|
+
|
|
197
|
+
- `data/opencode-config/<fingerprint>/plugins/agent-mockingbird.ts`
|
|
198
|
+
|
|
199
|
+
The plugin registers these custom tools against Agent Mockingbird APIs:
|
|
200
|
+
|
|
201
|
+
- `memory_search`
|
|
202
|
+
- `memory_get`
|
|
203
|
+
- `memory_remember`
|
|
204
|
+
- `cron_manager`
|
|
205
|
+
- `config_manager`
|
|
206
|
+
- `agent_type_manager`
|
|
207
|
+
|
|
208
|
+
Set `AGENT_MOCKINGBIRD_MEMORY_API_BASE_URL`, `AGENT_MOCKINGBIRD_CRON_API_BASE_URL`, and/or `AGENT_MOCKINGBIRD_CONFIG_API_BASE_URL` for the OpenCode process if needed (default `http://127.0.0.1:3001`).
|
|
209
|
+
|
|
210
|
+
Memory API endpoints used by tools:
|
|
211
|
+
|
|
212
|
+
- `POST /api/memory/retrieve`
|
|
213
|
+
- `POST /api/memory/read`
|
|
214
|
+
- `POST /api/memory/remember`
|
|
215
|
+
- `POST /api/memory/remember/validate`
|
|
216
|
+
- `GET /api/memory/activity`
|
|
217
|
+
|
|
218
|
+
Run API endpoints:
|
|
219
|
+
|
|
220
|
+
- `POST /api/runs`
|
|
221
|
+
- `GET /api/runs/:id`
|
|
222
|
+
- `GET /api/runs/:id/events`
|
|
223
|
+
- `GET /api/runs/:id/events/stream`
|
|
224
|
+
|
|
225
|
+
Cron API endpoints:
|
|
226
|
+
|
|
227
|
+
- `GET /api/mockingbird/cron/health`
|
|
228
|
+
- `GET /api/mockingbird/cron/jobs`
|
|
229
|
+
- `POST /api/mockingbird/cron/jobs`
|
|
230
|
+
- `GET /api/mockingbird/cron/jobs/:id`
|
|
231
|
+
- `PATCH /api/mockingbird/cron/jobs/:id`
|
|
232
|
+
- `DELETE /api/mockingbird/cron/jobs/:id`
|
|
233
|
+
- `POST /api/mockingbird/cron/jobs/:id/run`
|
|
234
|
+
- `GET /api/mockingbird/cron/instances`
|
|
235
|
+
- `GET /api/mockingbird/cron/instances/:id/steps`
|
|
236
|
+
- `POST /api/mockingbird/cron/manage` (used by `cron_manager` and `describe_contract`)
|
|
237
|
+
|
|
238
|
+
Cron jobs no longer support `handlerKey`; use the current `runMode` contract with `conditionModulePath` and/or `agentPromptTemplate` instead.
|
|
239
|
+
|
|
240
|
+
Environment variables are parsed and validated at startup via `@t3-oss/env-core` + `zod`.
|
|
241
|
+
|
|
242
|
+
`bun run dev:stack` launcher env knobs:
|
|
243
|
+
|
|
244
|
+
- `OPENCODE_HOST` (default `127.0.0.1`)
|
|
245
|
+
- `OPENCODE_PORT` (default `4096`)
|
|
246
|
+
- `AGENT_MOCKINGBIRD_PORT` (default `3001`)
|
|
247
|
+
- `OPENCODE_LOG_LEVEL` (default `INFO`)
|
|
248
|
+
|
|
249
|
+
## OpenCode Agent Persistence
|
|
250
|
+
|
|
251
|
+
Agent Mockingbird now manages OpenCode agents directly in an external managed OpenCode config dir.
|
|
252
|
+
|
|
253
|
+
- Save target is `data/opencode-config/<fingerprint>/opencode.jsonc` by default.
|
|
254
|
+
- Managed agent markdown files live under that external config dir as well.
|
|
255
|
+
- Agents UI shows both the bound workspace and the effective config path.
|
|
256
|
+
|
|
257
|
+
## Workspace Bootstrap Context (OpenClaw-style)
|
|
258
|
+
|
|
259
|
+
Agent Mockingbird now injects workspace markdown context into runtime system prompts using OpenClaw-style files from your bound workspace root (not `.opencode/`):
|
|
260
|
+
|
|
261
|
+
- `AGENTS.md`
|
|
262
|
+
- `SOUL.md`
|
|
263
|
+
- `TOOLS.md`
|
|
264
|
+
- `IDENTITY.md`
|
|
265
|
+
- `USER.md`
|
|
266
|
+
- `HEARTBEAT.md`
|
|
267
|
+
- `BOOTSTRAP.md`
|
|
268
|
+
- `MEMORY.md` / `memory.md`
|
|
269
|
+
|
|
270
|
+
Behavior:
|
|
271
|
+
|
|
272
|
+
- Per-file and total prompt injection caps are configurable at `runtime.opencode.bootstrap`.
|
|
273
|
+
- If a selected OpenCode agent is `mode: "subagent"` and `runtime.opencode.bootstrap.subagentMinimal=true`, only `AGENTS.md` and `TOOLS.md` are injected.
|
|
274
|
+
- `IDENTITY.md` is parsed for metadata (name/emoji/avatar/theme/creature/vibe) and returned via `GET /api/runtime/info`.
|
|
275
|
+
- Selected agent prompt text can also be mirrored into runtime system prompts with `runtime.opencode.bootstrap.includeAgentPrompt=true`.
|
|
276
|
+
|
|
277
|
+
- `POST /api/config/opencode/bootstrap/import-openclaw`
|
|
278
|
+
- Body:
|
|
279
|
+
- Local source: `{ "source": { "mode": "local", "path": "/path/to/openclaw/workspace" } }`
|
|
280
|
+
- Git source: `{ "source": { "mode": "git", "url": "git@github.com:you/openclaw-memory.git", "ref": "main" } }`
|
|
281
|
+
- Optional: `targetDirectory`
|
|
282
|
+
- Performs one-shot migration with conflict rules:
|
|
283
|
+
- Missing target path: copy source file wholesale.
|
|
284
|
+
- Existing target path: keep target by default.
|
|
285
|
+
- `AGENTS.md` conflicts: attempt model-assisted rewrite/merge; if unavailable/invalid, keep target.
|
|
286
|
+
- Compatibility bridge: if source has no `AGENTS.md` but has `CLAUDE.md`, importer maps `CLAUDE.md -> AGENTS.md` during migration.
|
|
287
|
+
- Preserves protected Agent Mockingbird runtime files and triggers a memory index sync after import.
|
|
288
|
+
|
|
289
|
+
CLI migration UX is now integrated into `agent-mockingbird onboard`:
|
|
290
|
+
|
|
291
|
+
- Choose onboarding path: `quickstart`, `model-only`, `memory-only`, `openclaw-only`, or `skip`.
|
|
292
|
+
- OpenClaw migration runs through an onboarding wizard (git clone or local folder source).
|
|
293
|
+
- `AGENTS.md` conflicts go through a model-assisted rewrite/merge pass via OpenCode; on failure, existing target content is kept.
|
|
294
|
+
- If memory is enabled, onboarding runs memory sync after successful migration.
|
|
295
|
+
- Legacy `agent-mockingbird import openclaw ...` commands are removed.
|
|
296
|
+
|
|
297
|
+
If OpenCode UI/TUI looks different from Agent Mockingbird:
|
|
298
|
+
|
|
299
|
+
1. Confirm `GET /api/runtime/info` reports the directory you expect.
|
|
300
|
+
2. Launch/attach OpenCode against the same workspace directory.
|
|
301
|
+
3. Verify the same external `opencode.jsonc` file path is being used.
|
|
302
|
+
|
|
303
|
+
## Deployment
|
|
304
|
+
|
|
305
|
+
Recommended production topology is **single VM + systemd sidecar**:
|
|
306
|
+
|
|
307
|
+
- `opencode.service` running on `127.0.0.1:4096`
|
|
308
|
+
- `agent-mockingbird.service` running on `127.0.0.1:3001`
|
|
309
|
+
- both pinned to one workspace path via `runtime.opencode.directory` in agent-mockingbird config
|
|
310
|
+
- `runtime.memory.workspaceDir` must resolve to the same path as `runtime.opencode.directory`
|
|
311
|
+
|
|
312
|
+
Deployment artifacts:
|
|
313
|
+
|
|
314
|
+
- `deploy/systemd/opencode.service`
|
|
315
|
+
- `deploy/systemd/agent-mockingbird.service`
|
|
316
|
+
- `deploy/systemd/README.md`
|
|
317
|
+
- `deploy/docker-compose.yml` (reference stack)
|
|
318
|
+
|
|
319
|
+
## CI/CD Release Bundles
|
|
320
|
+
|
|
321
|
+
This repo uses one CI/CD workflow:
|
|
322
|
+
|
|
323
|
+
- `.github/workflows/ci.yml` runs `bun run check:ship`, verifies the committed ship artifacts, and publishes the same packed artifact to npm from GitHub Actions.
|
|
324
|
+
- Pull requests run checks only (no publish).
|
|
325
|
+
- Pushes to `main` run checks only. `latest` is reserved for versioned releases.
|
|
326
|
+
- Pushes to matching `v*` tags publish the exact `package.json` version with npm tag `latest`.
|
|
327
|
+
- Pushes to non-`main` branches by `waffleophagus` publish preview builds to npm tag `next`.
|
|
328
|
+
- Manual dispatch runs the workflow but does not publish by itself.
|
|
329
|
+
- Tag pushes must match `v<package.json version>` or CI fails.
|
|
330
|
+
|
|
331
|
+
Published package artifact:
|
|
332
|
+
|
|
333
|
+
- `agent-mockingbird@<version>` generated from a single packed `.tgz` built in CI after `bun run check:ship`.
|
|
334
|
+
- `@waffleophagus/agent-mockingbird-installer@<version>` published alongside it.
|
|
335
|
+
|
|
336
|
+
Detailed install instructions are in `deploy/RELEASE_INSTALL.md`.
|
|
337
|
+
|
|
338
|
+
## Linux Onboarding (GitHub + npm)
|
|
339
|
+
|
|
340
|
+
Primary path (interactive by default):
|
|
341
|
+
|
|
342
|
+
```bash
|
|
343
|
+
curl -fsSL "https://raw.githubusercontent.com/waffleophagus/agent-mockingbird/main/scripts/onboard/bootstrap.sh" | bash
|
|
344
|
+
```
|
|
345
|
+
|
|
346
|
+
Run a different lifecycle command:
|
|
347
|
+
|
|
348
|
+
```bash
|
|
349
|
+
curl -fsSL "https://raw.githubusercontent.com/waffleophagus/agent-mockingbird/main/scripts/onboard/bootstrap.sh" | bash -s -- status
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
Install from a feature branch preview:
|
|
353
|
+
|
|
354
|
+
```bash
|
|
355
|
+
BRANCH="<branch-name>"
|
|
356
|
+
VERSION="<published-preview-version>"
|
|
357
|
+
AGENT_MOCKINGBIRD_TAG="${VERSION}" \
|
|
358
|
+
curl -fsSL "https://raw.githubusercontent.com/waffleophagus/agent-mockingbird/${BRANCH}/scripts/onboard/bootstrap.sh" | bash
|
|
359
|
+
```
|
|
360
|
+
|
|
361
|
+
Branch preview installs should pin `AGENT_MOCKINGBIRD_TAG` to the exact published `next` version so the bootstrap script and installed package stay aligned.
|
|
362
|
+
|
|
363
|
+
Direct package execution from npm:
|
|
364
|
+
|
|
365
|
+
```bash
|
|
366
|
+
npx --yes \
|
|
367
|
+
--package "@waffleophagus/agent-mockingbird-installer@latest" \
|
|
368
|
+
agent-mockingbird-installer install
|
|
369
|
+
```
|
|
370
|
+
|
|
371
|
+
```bash
|
|
372
|
+
bunx --bun npm exec --yes \
|
|
373
|
+
--package "@waffleophagus/agent-mockingbird-installer@latest" \
|
|
374
|
+
agent-mockingbird-installer -- install
|
|
375
|
+
```
|
|
376
|
+
|
|
377
|
+
Agent Mockingbird commands:
|
|
378
|
+
|
|
379
|
+
```bash
|
|
380
|
+
agent-mockingbird install
|
|
381
|
+
agent-mockingbird update
|
|
382
|
+
agent-mockingbird onboard
|
|
383
|
+
agent-mockingbird status
|
|
384
|
+
agent-mockingbird restart
|
|
385
|
+
agent-mockingbird start
|
|
386
|
+
agent-mockingbird stop
|
|
387
|
+
agent-mockingbird uninstall
|
|
388
|
+
```
|
|
389
|
+
|
|
390
|
+
`agent-mockingbird install` and `agent-mockingbird update` now show a mode-specific action plan before confirmation.
|
|
391
|
+
|
|
392
|
+
- `install` flow now launches interactive provider/model onboarding immediately (interactive installs).
|
|
393
|
+
- `update` plan explicitly calls out what is refreshed vs what is preserved (data/workspace/config are not reset).
|
|
394
|
+
- `update --dry-run` previews planned update actions without mutating files/services.
|
|
395
|
+
- `onboard` reruns interactive provider/model onboarding without reinstalling.
|
|
396
|
+
- Install/update now also maintain an `opencode` shim in `~/.local/bin` so the OpenCode CLI is directly available.
|
|
397
|
+
- Onboarding model selection is searchable + paginated (works with providers that expose large model catalogs).
|
|
398
|
+
- During onboarding, provider-auth changes trigger a transparent `opencode.service` refresh before model selection, so newly added providers/models show up immediately.
|
|
399
|
+
- Onboarding can now configure memory embeddings for Ollama: set the Ollama URL, discover `/api/tags` models live, then select an embedding model with searchable pagination.
|
|
400
|
+
- `agent-mockingbird onboard` supports `memory-only` and `openclaw-only` paths for focused setup.
|
|
401
|
+
|
|
402
|
+
Compatibility alias remains available:
|
|
403
|
+
|
|
404
|
+
```bash
|
|
405
|
+
agent-mockingbird-installer install
|
|
406
|
+
```
|
|
407
|
+
|
|
408
|
+
Default install root is `~/.agent-mockingbird`, with systemd **user** services:
|
|
409
|
+
|
|
410
|
+
- `opencode.service` (local sidecar on `127.0.0.1:4096`)
|
|
411
|
+
- `agent-mockingbird.service` (dashboard/API on `127.0.0.1:3001`)
|
|
412
|
+
|
|
413
|
+
On Linux, installer attempts `loginctl enable-linger $USER` so services keep running after logout.
|
|
414
|
+
|
|
415
|
+
## Install Directly From GitHub (No npmjs.org)
|
|
416
|
+
|
|
417
|
+
You can still install the main CLI directly from git:
|
|
418
|
+
|
|
419
|
+
```bash
|
|
420
|
+
OWNER="<github-owner>"
|
|
421
|
+
REPO="<repo-name>"
|
|
422
|
+
VERSION="v0.1.0"
|
|
423
|
+
bun add -g "github:${OWNER}/${REPO}#${VERSION}"
|
|
424
|
+
```
|
|
425
|
+
|
|
426
|
+
2. Run:
|
|
427
|
+
|
|
428
|
+
```bash
|
|
429
|
+
agent-mockingbird
|
|
430
|
+
```
|
|
431
|
+
|
|
432
|
+
## Publish To Package Registry
|
|
433
|
+
|
|
434
|
+
`ci.yml` publish steps expect this repository secret:
|
|
435
|
+
|
|
436
|
+
- `NPM_TOKEN` with publish permission for `agent-mockingbird` and `@waffleophagus/agent-mockingbird-installer` on npmjs
|
|
437
|
+
|
|
438
|
+
On a tag push like `v0.1.0`, CI publishes `agent-mockingbird@0.1.0` and `@waffleophagus/agent-mockingbird-installer@0.1.0` to npm with the `latest` tag.
|
|
439
|
+
|
|
440
|
+
`main` pushes do not publish. To update `latest`, tag a version from `main`.
|
|
441
|
+
|
|
442
|
+
Non-`main` branch pushes by `waffleophagus` publish preview builds like `0.0.1-next.<branch>.<run-number>` with the `next` tag.
|
|
443
|
+
|
|
444
|
+
Install from npm with Bun:
|
|
445
|
+
|
|
446
|
+
```bash
|
|
447
|
+
bun add -g agent-mockingbird
|
|
448
|
+
agent-mockingbird
|
|
449
|
+
```
|
|
450
|
+
|
|
451
|
+
If you need to publish or consume the package from a non-default registry later, `AGENT_MOCKINGBIRD_REGISTRY_URL` and `--registry-url` still exist, but the repo now assumes npmjs by default.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Third-Party Notices
|
|
2
|
+
|
|
3
|
+
## qmd
|
|
4
|
+
|
|
5
|
+
Portions of `src/backend/memory/qmdPort.ts` are adapted from qmd:
|
|
6
|
+
|
|
7
|
+
- Repository: https://github.com/tobi/qmd
|
|
8
|
+
- License: MIT
|
|
9
|
+
- Copyright (c) 2024-2026 Tobi Lutke
|
|
10
|
+
|
|
11
|
+
The qmd MIT license terms apply to those adapted portions.
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 2,
|
|
3
|
+
"workspace": {
|
|
4
|
+
"pinnedDirectory": "./data/workspace"
|
|
5
|
+
},
|
|
6
|
+
"runtime": {
|
|
7
|
+
"opencode": {
|
|
8
|
+
"baseUrl": "http://127.0.0.1:4096",
|
|
9
|
+
"providerId": "opencode",
|
|
10
|
+
"modelId": "big-pickle",
|
|
11
|
+
"fallbackModels": [],
|
|
12
|
+
"imageModel": null,
|
|
13
|
+
"smallModel": "opencode/big-pickle",
|
|
14
|
+
"timeoutMs": 120000,
|
|
15
|
+
"promptTimeoutMs": 300000,
|
|
16
|
+
"runWaitTimeoutMs": 180000,
|
|
17
|
+
"childSessionHideAfterDays": 3,
|
|
18
|
+
"directory": "./data/workspace",
|
|
19
|
+
"bootstrap": {
|
|
20
|
+
"enabled": true,
|
|
21
|
+
"maxCharsPerFile": 20000,
|
|
22
|
+
"maxCharsTotal": 150000,
|
|
23
|
+
"subagentMinimal": true,
|
|
24
|
+
"includeAgentPrompt": true
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"smokeTest": {
|
|
28
|
+
"prompt": "Just respond \"OK\" to this to confirm the gateway is working.",
|
|
29
|
+
"expectedResponsePattern": "\\bok\\b"
|
|
30
|
+
},
|
|
31
|
+
"runStream": {
|
|
32
|
+
"heartbeatMs": 15000,
|
|
33
|
+
"replayPageSize": 200
|
|
34
|
+
},
|
|
35
|
+
"memory": {
|
|
36
|
+
"enabled": true,
|
|
37
|
+
"workspaceDir": "./data/workspace",
|
|
38
|
+
"embedProvider": "ollama",
|
|
39
|
+
"embedModel": "granite-embedding:278m",
|
|
40
|
+
"ollamaBaseUrl": "http://127.0.0.1:11434",
|
|
41
|
+
"chunkTokens": 400,
|
|
42
|
+
"chunkOverlap": 80,
|
|
43
|
+
"maxResults": 4,
|
|
44
|
+
"minScore": 0.35,
|
|
45
|
+
"syncCooldownMs": 10000,
|
|
46
|
+
"toolMode": "tool_only",
|
|
47
|
+
"injectionDedupeEnabled": true,
|
|
48
|
+
"injectionDedupeFallbackRecallOnly": true,
|
|
49
|
+
"injectionDedupeMaxTracked": 256,
|
|
50
|
+
"retrieval": {
|
|
51
|
+
"engine": "qmd_hybrid",
|
|
52
|
+
"strongSignalMinScore": 0.85,
|
|
53
|
+
"strongSignalMinGap": 0.15,
|
|
54
|
+
"candidateLimit": 40,
|
|
55
|
+
"rrfK": 60,
|
|
56
|
+
"expansionEnabled": true,
|
|
57
|
+
"conceptExpansionEnabled": true,
|
|
58
|
+
"conceptExpansionMaxPacks": 3,
|
|
59
|
+
"conceptExpansionMaxTerms": 10,
|
|
60
|
+
"rerankEnabled": true,
|
|
61
|
+
"rerankTopN": 40,
|
|
62
|
+
"semanticRescueEnabled": true,
|
|
63
|
+
"semanticRescueMinVectorScore": 0.75,
|
|
64
|
+
"semanticRescueMaxResults": 2,
|
|
65
|
+
"expansionModel": null,
|
|
66
|
+
"rerankModel": null,
|
|
67
|
+
"vectorBackend": "sqlite_vec",
|
|
68
|
+
"vectorUnavailableFallback": "disabled",
|
|
69
|
+
"vectorK": 60,
|
|
70
|
+
"vectorProbeLimit": 20
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"heartbeat": {
|
|
74
|
+
"enabled": true,
|
|
75
|
+
"interval": "30m",
|
|
76
|
+
"agentId": "build",
|
|
77
|
+
"model": "opencode/big-pickle",
|
|
78
|
+
"prompt": "Read HEARTBEAT.md if it exists (workspace context). Follow it strictly. Do not infer or repeat old tasks from prior chats. If nothing needs attention, reply HEARTBEAT_OK.",
|
|
79
|
+
"ackMaxChars": 300,
|
|
80
|
+
"activeHours": null
|
|
81
|
+
},
|
|
82
|
+
"cron": {
|
|
83
|
+
"defaultMaxAttempts": 3,
|
|
84
|
+
"defaultRetryBackoffMs": 30000,
|
|
85
|
+
"retryBackoffCapMs": 3600000,
|
|
86
|
+
"conditionalModuleTimeoutMs": 30000
|
|
87
|
+
},
|
|
88
|
+
"configPolicy": {
|
|
89
|
+
"mode": "builder",
|
|
90
|
+
"denyPaths": [
|
|
91
|
+
"version",
|
|
92
|
+
"runtime.configPolicy",
|
|
93
|
+
"runtime.smokeTest"
|
|
94
|
+
],
|
|
95
|
+
"strictAllowPaths": [
|
|
96
|
+
"runtime.opencode.runWaitTimeoutMs",
|
|
97
|
+
"runtime.opencode.childSessionHideAfterDays",
|
|
98
|
+
"runtime.opencode.bootstrap",
|
|
99
|
+
"runtime.runStream",
|
|
100
|
+
"runtime.memory",
|
|
101
|
+
"runtime.heartbeat",
|
|
102
|
+
"runtime.cron",
|
|
103
|
+
"ui.skills",
|
|
104
|
+
"ui.mcps",
|
|
105
|
+
"ui.mcpServers",
|
|
106
|
+
"ui.agents",
|
|
107
|
+
"ui.agentTypes"
|
|
108
|
+
],
|
|
109
|
+
"requireExpectedHash": true,
|
|
110
|
+
"requireSmokeTest": true,
|
|
111
|
+
"autoRollbackOnFailure": true
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
"ui": {
|
|
115
|
+
"skills": [
|
|
116
|
+
"config-editor",
|
|
117
|
+
"config-auditor",
|
|
118
|
+
"runtime-diagnose"
|
|
119
|
+
],
|
|
120
|
+
"mcps": [],
|
|
121
|
+
"mcpServers": [],
|
|
122
|
+
"agents": [],
|
|
123
|
+
"agentTypes": [
|
|
124
|
+
{
|
|
125
|
+
"id": "build",
|
|
126
|
+
"name": "Agent Mockingbird",
|
|
127
|
+
"description": "Default primary agent.",
|
|
128
|
+
"mode": "primary",
|
|
129
|
+
"hidden": false,
|
|
130
|
+
"disable": false,
|
|
131
|
+
"options": {}
|
|
132
|
+
}
|
|
133
|
+
]
|
|
134
|
+
}
|
|
135
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@agent-mockingbird/server",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"private": true,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"module": "src/index.ts",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"dev": "bun --hot src/index.ts",
|
|
9
|
+
"start": "NODE_ENV=production bun src/index.ts",
|
|
10
|
+
"build": "bun run ../../build.ts",
|
|
11
|
+
"build:bin": "bun run ../../build-bin.ts",
|
|
12
|
+
"lint": "eslint .",
|
|
13
|
+
"test": "bun test ./src",
|
|
14
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
15
|
+
"db:generate": "drizzle-kit generate --config ../../drizzle.config.ts",
|
|
16
|
+
"db:migrate": "bun run src/backend/db/migrate.ts",
|
|
17
|
+
"db:check": "drizzle-kit check --config ../../drizzle.config.ts",
|
|
18
|
+
"db:wipe": "bun run src/backend/db/wipe.ts"
|
|
19
|
+
},
|
|
20
|
+
"dependencies": {
|
|
21
|
+
"hono": "^4.10.7",
|
|
22
|
+
"@opencode-ai/plugin": "^1.2.15",
|
|
23
|
+
"@opencode-ai/sdk": "^1.2.15",
|
|
24
|
+
"@t3-oss/env-core": "^0.13.10",
|
|
25
|
+
"@agent-mockingbird/contracts": "workspace:*",
|
|
26
|
+
"cron": "^4.4.0",
|
|
27
|
+
"drizzle-orm": "^0.45.1",
|
|
28
|
+
"jsonc-parser": "^3.3.1",
|
|
29
|
+
"sqlite-vec": "0.1.7-alpha.2",
|
|
30
|
+
"zod": "^4.3.6"
|
|
31
|
+
}
|
|
32
|
+
}
|