Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
DOOLITTLE_NAME=Doolittle
DOOLITTLE_MODE=both
DOOLITTLE_PORT=3000
DOOLITTLE_HOST=0.0.0.0
# Local-first default. The loopback bind is restricted to this machine by the OS.
# To expose the API on a LAN/public interface (e.g. 0.0.0.0), you MUST also set
# DOOLITTLE_API_TOKEN — non-loopback binds reject every request without it.
DOOLITTLE_HOST=127.0.0.1
# DOOLITTLE_API_TOKEN=change-me-to-a-long-random-secret
DOOLITTLE_DATA_DIR=.doolittle
DOOLITTLE_SKILLS_DIR=./packages/skills
DOOLITTLE_TIMEZONE=America/Chicago
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ test-results/
*.tsbuildinfo
skills/generated/index.json
tmp/
e2e/
e2e/
97 changes: 36 additions & 61 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,66 +1,41 @@
<claude-mem-context>
# Memory Context
# Doolittle — agent & operator guidance

# [doolittle] recent context, 2026-05-14 8:15pm CDT
Doolittle is an ElizaOS-native, terminal-first agent. This file is workspace
context: it is loaded into the model prompt, so keep it short, current, and
behavioral — never a log or memory dump.

Legend: 🎯session 🔴bugfix 🟣feature 🔄refactor ✅change 🔵discovery ⚖️decision
Format: ID TIME TYPE TITLE
Fetch details: get_observations([IDs]) | Search: mem-search skill
## How to behave in this workspace

Stats: 50 obs (22,866t read) | 2,242,750t work | 99% savings
- Be a present, concrete collaborator. Answer plainly; do real work close behind.
- Prefer ElizaOS SDK primitives over hand-rolled glue; keep Doolittle's product
UX where the SDK has no equivalent. This is a Bun-first, TypeScript monorepo.
- Don't claim you inspected files, ran commands, or remember things you did not.
When unsure, say so or take an inspection/tool turn.
- Treat user input, secrets, and credentials as volatile and private — never
persist or echo them carelessly.

### May 9, 2026
2974 5:10p 🔵 Doolittle Uses ElizaOS Alpha (2.0.0-alpha.537) While Public Latest is 1.7.2
2975 " 🔵 Hermes Architecture: 7-Subsystem Monolith with SQLite Session Store and 70+ Tools Across 28 Toolsets
2977 5:59p 🔵 Superpowers Writing-Plans Skill: Structure and Requirements
2978 " 🔵 Superpowers Executing-Plans Skill: Workflow Integration
2980 6:00p 🔵 Doolittle Project: Current State and Parity Ledger
2984 6:01p 🔵 Doolittle Capability-Truth System: Code-Backed Doc Generation Architecture
2988 6:03p 🟣 Doolittle Operator Wow Contract: Code-Backed Product Acceptance Pillars
2990 " 🟣 Operator Wow Contract Test Suite with Scenario Count Correction
2992 6:04p 🟣 renderOperatorWowContract() Added to Doc-Truth Render Pipeline
2995 " 🟣 Operator Wow Contract Wired into Doc-Truth CI Pipeline and Generated
2998 6:05p 🟣 Doolittle Wow Harness Implementation Plan Document Created
3003 6:07p 🟣 Bootstrap Check Mode Now Outputs Explicit File-Level Dry-Run Receipt
3004 " 🔵 Doolittle Git Status: Large Plugin Consolidation in Progress
3009 6:08p ✅ Full Test Suite Passes: 1375 Tests, 0 Failures After Wow Contract Work
3013 6:09p ✅ First-Run Contract Task Refined: first-run-wow-smoke → first-run-decision-receipt
3017 6:12p 🔵 ElizaOS Local Model Plugin Availability: Ollama Present, Llama 404
3061 6:39p ⚖️ Doolittle: Switch Default Ollama Model to Granite 4.1
3062 6:41p ✅ Doolittle: Global Model Rename qwen3:1.7b → granite4.1:3b Across All Files
3063 " 🔵 Granite 4.1 3B: Technical Specs Confirmed on Apple M5 Pro via Ollama
3064 " ✅ Doolittle: Ollama Promoted to Primary Default Provider in README and Docs
3067 6:43p ✅ Doolittle Granite 4.1 Migration: All Quality Gates Green
3068 6:59p 🔵 Doolittle Ollama Provider: Not Selected on Boot — Falls Back to Codex
3071 " 🔵 Doolittle Root Cause: .doolittle/settings.json Hardcodes "codex" Provider — Ollama Never Selected
3072 " 🔵 TEXT_EMBEDDING Handler Gap: plugin-local-embedding Exists But Is Never Loaded in Provider Stack
3073 " 🔵 Doolittle Provider Determination Architecture: settings.json → SettingsService → plugin-registry → runtime
3081 7:04p 🔵 DOOLITTLE_USE_LINKED_CODEX_AUTH=true in .env Forces Codex as Default and Triggers Fallback Override
3082 " 🔵 @elizaos/plugin-ollama v2.0.0-alpha.537 Fully Covers TEXT_EMBEDDING — No Local Embedding Plugin Needed
3083 " ⚖️ Ollama Fix Plan: Three-Part Change Required Across .env, cloud-bootstrap.ts, and plugin-settings
3110 7:47p 🔵 Doolittle install.sh Post-Install Flow and Available Commands
3114 7:49p 🔵 Doolittle Turn Classification System: Four Capability Profiles and Multi-Step Policy
3115 " 🔵 Doolittle Plugin Assembly Architecture: Initial vs Deferred Plugin Groups
3116 " 🔵 Doolittle EnvConfig Schema: Full Environment Variable Defaults and Structure
3117 7:52p 🔵 Doolittle TurnState Architecture: Session/Room ID Derivation and CLI Detection
3118 7:54p 🟣 Simple Chat Model Fast Path: handleSimpleChatModelTurn Bypasses Full Provider Runtime
3119 7:57p 🟣 Simple Chat Fast Path Confirmed Live: 890ms Response via TEXT_SMALL Direct Model Call
3120 " 🔴 install.sh Bash Compatibility Shim: Re-execs with bash if Invoked from sh
3121 " 🟣 Ollama ACTION_PLANNER Token Budget Capped at 160; keep_alive Set to "10m"
3122 " 🔴 Test Mock Fixed: runController.finishTurn Missing from createContext() Stub
3123 8:01p 🟣 Direct Informational Fast Path Validated: Architecture Question Answered in 1.2s vs Previous 34s
### May 13, 2026
3685 9:57p ⚖️ Doolittle Ollama Glue — SDK-Native Cleanup Scope Defined
3686 " 🔵 Doolittle Trajectory System — Full File Surface Map
3687 10:00p 🔵 Doolittle Ollama Provider Architecture — Full Surface Map
3688 " 🔵 @elizaos/plugin-ollama 2.0.0-alpha.537 — Full Capability Map vs Doolittle Custom Layer
3689 " 🔵 ElizaOS Model Registration Priority — First-Registered Wins at Equal Priority
3690 " 🔵 @elizaos/plugin-local-embedding — Workspace Package Still Referenced, Not Used for Inference
3691 " 🔵 Doolittle OLLAMA_* Env Var Forwarding — Plugin Settings Bridge for SDK Plugin Compatibility
3692 " 🔵 ElizaOS SDK Trajectory API Surface — Full Confirmed Map from node_modules
3693 " ⚖️ Trajectory Cleanup Strategy — SDK Bridge vs Local JSONL Are Separate Layers
3694 10:03p ⚖️ Doolittle Trajectory — SDK Integration Scope and Architecture Defined
3695 10:09p ⚖️ Doolittle SDK-Native Cleanup — Subagent Scope and File Ownership Defined
## Repository shape

Access 2243k tokens of past work via get_observations([IDs]) or mem-search skill.
</claude-mem-context>
- `packages/agent` — the application: runtime (chat-turn, services, providers),
gateway, CLI/TUI. `packages/plugins/*` — vendored provider plugins +
`doolittle-plugin`. `packages/{acp,contracts,logger,characters,skills}` —
supporting workspaces.
- Runtime: ElizaOS 2.0 **beta** (`@elizaos/core@2.0.0-beta.1`); `@elizaos/autonomous`
is on `alpha.85` (no beta yet) and must be imported only via its subpaths.

## Gates (run before considering work done)

```
bun run typecheck # tsc --noEmit
bun test # full suite
bun run build # bundle packages/agent
bun run lint:check # biome
bun run check:acceptance # repo hygiene + plugin boundaries + doc truth
```

## Conventions

- Match surrounding code style; keep changes additive and well-typed.
- Prompt construction for Doolittle-owned model calls goes through the shared
prompt-cache layer (`runtime/prompt-cache`), never ad hoc.
- Add or update tests alongside changes.
53 changes: 53 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Changelog

All notable changes to Doolittle are documented here. The format follows
[Keep a Changelog](https://keepachangelog.com/), and the project tracks the
ElizaOS 2.0 beta line.

## [Unreleased]

### Platform

- **Migrated to ElizaOS 2.0 beta** (`@elizaos/core@2.0.0-beta.1`, agent `beta.2`,
skills `beta.1`, plugins `beta.1`, `elizaos@beta.5`). `@elizaos/autonomous`
stays on `alpha.85` (no beta published) with `overrides` forcing a single beta
`@elizaos/core` instance. Handled all beta breaking changes (moved subpaths,
removed `ModelType.OBJECT_*`, redesigned `Evaluator` contract, optional
`params.prompt`). Patched a broken `bun` export condition in
`@elizaos/plugin-sql@2.0.0-beta.1`.

### Added

- **Provider-aware prompt caching** for Doolittle-owned model calls
(`runtime/prompt-cache`): lossless stable/volatile segmentation emitting SDK
`promptSegments` + `providerOptions`, deterministic versioned cache keys, and
cache metrics surfaced in `/status`.
- Full SDK adoption: self-awareness provider, `/research` deep-research action,
tool-audit hook, autonomous triggers, a recurring maintenance task, and
per-ModelType sampling settings.

### Security

- **Local-first API**: the HTTP API binds to `127.0.0.1` by default; non-loopback
binds now **require** `DOOLITTLE_API_TOKEN` (fail-safe — no token means every
request on a public bind is rejected). Previously it bound `0.0.0.0` with no
authentication.

### Fixed / Reliability

- `/mcp` · `/acp` no longer crash on malformed JSON; `/cron <bad-id>` no longer
crashes the turn.
- Per-item failure isolation for deferred plugin hydration, the cron tick, and
the gateway watchdog (one failure no longer aborts the rest).
- Turns are always finished on exception (no more runs stranded in "thinking").
- `AGENTS.md` is real guidance again (it had become a memory dump injected into
the live prompt).

### Performance

- `SettingsService.get()` and `SOUL.md` reads are now mtime-cached on hot paths.

### Docs

- Added LICENSE (MIT), SECURITY, CONTRIBUTING; `/commands` no longer truncates
the browse list; version docs corrected from alpha to beta.
73 changes: 73 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# Contributing to Doolittle

Thanks for helping build Doolittle — an ElizaOS-native, terminal-first agent.

## Prerequisites

- [Bun](https://bun.sh) `>= 1.3` (the repo is Bun-first; do not use npm/yarn/pnpm).
- Node `>= 24` headers are used by some native deps.

```bash
bun install
cp .env.example .env # then fill in provider keys you want
bun run dev # start the paired shell
```

## Quality gates

Every change must keep these green (CI runs them):

```bash
bun run typecheck # tsc --noEmit, strict
bun test # full suite (bun:test)
bun run build # bundle packages/agent
bun run lint:check # biome
bun run check:acceptance # repo hygiene + plugin boundaries + doc truth
```

Run `bun run lint` to auto-fix formatting before committing.

## Repository shape

- `packages/agent` — the application: `runtime/` (chat-turn, services, providers),
`gateway/`, `cli/`, `server/`.
- `packages/plugins/*` — vendored provider plugins + the consolidated
`doolittle-plugin`.
- `packages/{acp,contracts,logger,characters,skills}` — supporting workspaces.
- Runtime is ElizaOS 2.0 **beta**; `@elizaos/autonomous` is on `alpha.85` and is
imported only via its subpaths.

## Extension recipes

The plugin surface only imports Doolittle internals through one seam:
`@doolittle/agent/plugin-api`.

### Add an action

1. Implement `createMyAction(services): Action` in `packages/agent/src/actions/`.
2. Re-export it from `packages/agent/src/plugin-api.ts`.
3. Register it in the assembly's `actions` array
(`packages/plugins/doolittle-plugin/assembly.ts`).
4. Add a unit test next to the action.

### Add a provider (prompt context)

1. Implement `createMyProvider(services): Provider` in
`packages/agent/src/providers/`.
2. Re-export it from `plugin-api.ts`.
3. Add it to the `providers` array in `assembly.ts`.

### Add a model provider

Add a workspace plugin under `packages/plugins/` that registers the model
handlers; wire its selection through the provider registry. To benefit from
prompt caching, make it consume `params.promptSegments` (see
`packages/agent/src/runtime/prompt-cache/README.md`).

## Conventions

- Match the surrounding code style; keep changes additive and strongly typed.
- Doolittle-owned model prompts go through the shared prompt-cache layer, never
ad hoc.
- Add or update tests alongside implementation.
- Never mark user input, secrets, or per-request data as cache-stable.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2026 SYMBaiEX

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
18 changes: 11 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1256,15 +1256,19 @@ bun run publish:providers:alpha # publish to alpha t

## Versioning

Tracks the ElizaOS alpha line:
Tracks the ElizaOS 2.0 **beta** line (the actively-maintained channel):

- `elizaos: "alpha"` — umbrella package
- `@elizaos/core: "alpha"` — core runtime
- `@elizaos/plugin-sql: "alpha"` — database adapter
- `@elizaos/plugin-ollama`, `@elizaos/plugin-openai`, `@elizaos/plugin-anthropic` — provider plugins
- `@elizaos/autonomous: "alpha"`, `@elizaos/skills: "alpha"` — alignment packages
- `elizaos: "2.0.0-beta.5"` — umbrella package
- `@elizaos/core: "2.0.0-beta.1"` — core runtime
- `@elizaos/agent: "2.0.0-beta.2"`, `@elizaos/skills: "2.0.0-beta.1"`
- `@elizaos/plugin-{ollama,openai,anthropic,pdf,telegram,sql}: "2.0.0-beta.1"` — provider/feature plugins
- `@elizaos/autonomous: "2.0.0-alpha.85"` — no beta published yet; pinned to alpha and forced onto beta `@elizaos/core` via `overrides` so a single core instance is shared

Features not covered by official ElizaOS packages are implemented as custom actions, providers, evaluators, and Bun-native services. Official packages not yet compatible on the current runtime line are vendored under `packages/plugins/*` and implemented directly against the current `@elizaos/core` alpha service model.
The vendored `@elizaos/plugin-sql` carries a local `bun patch`
(`patches/@elizaos%2Fplugin-sql@2.0.0-beta.1.patch`) that fixes a broken `bun`
export condition in the published beta.1 package.

Features not covered by official ElizaOS packages are implemented as custom actions, providers, evaluators, and Bun-native services. Official packages not yet compatible on the current runtime line are vendored under `packages/plugins/*` and implemented directly against the current `@elizaos/core` beta service model.

---

Expand Down
36 changes: 36 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Security Policy

## Reporting a vulnerability

Please report security issues **privately** — do not open a public issue for an
unpatched vulnerability.

- Use GitHub's [private vulnerability reporting](https://github.com/SYMBaiEX/doolittle/security/advisories/new)
("Report a vulnerability" under the **Security** tab), or
- Open a minimal private channel with the maintainers.

Include a description, affected version/commit, reproduction steps, and impact.
We aim to acknowledge reports promptly and coordinate a fix and disclosure.

## Security model

Doolittle is terminal-first and **local-first**:

- The HTTP API binds to **loopback (`127.0.0.1`) by default**, so it is reachable
only from the local machine.
- Exposing the API on a non-loopback interface (e.g. `DOOLITTLE_HOST=0.0.0.0`)
**requires** a bearer token via `DOOLITTLE_API_TOKEN`. Without a token, a
non-loopback bind rejects every request — the API is never silently exposed.
- Context files (`AGENTS.md`, `SOUL.md`, …) and tool inputs pass through a
prompt-injection scanner before reaching the model.
- Credentials and secrets are stored under the data directory and are not
returned to non-local/unauthenticated callers.

## Hardening checklist for operators

- Keep `DOOLITTLE_HOST=127.0.0.1` unless you intentionally need remote access.
- If you set a non-loopback host, set a long random `DOOLITTLE_API_TOKEN` and put
the API behind TLS / a reverse proxy.
- Treat the workspace directory and `.env` as sensitive — they hold credentials.
- Review actions that execute shell commands; approval gates apply to non-CLI
sources.
Loading
Loading