daedalus-cli 0.4.1 → 0.4.3

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.md ADDED
@@ -0,0 +1,34 @@
1
+ # Daedalus — Agent Conventions
2
+
3
+ ## Project Identity
4
+ - **Name:** Daedalus (`daedalus-cli` on npm)
5
+ - **Description:** Local-first AI coding CLI with embedded model router, multi-agent orchestration, and codebase indexing
6
+ - **Language:** TypeScript (ESM, `"type": "module"`)
7
+ - **Node:** >=20
8
+
9
+ ## Code Conventions
10
+ - **No comments** in source files unless absolutely necessary for clarity
11
+ - No emoji in code or docs unless user explicitly requests
12
+ - Exports: named exports only (no default exports)
13
+ - Types: Zod schemas in config files, interfaces in `src/types.ts`
14
+ - Imports: always include `.js` extension in ESM imports (e.g., `'./file.js'`)
15
+ - Error handling: throw typed errors, prefer `result` pattern for tool returns
16
+
17
+ ## Architecture
18
+ - `src/index.ts` — CLI entry point, REPL loop, command dispatch
19
+ - `src/config/` — Zod-schema validated config at `~/.daedalus/config.json`
20
+ - `src/router/` — Model routing (priority/round-robin/fastest), health checks, rate limiting
21
+ - `src/session/` — SQLite-backed session persistence, project memory, JSONL export
22
+ - `src/agents/` — Multi-agent orchestration (planner, coder, reviewer, debugger, researcher)
23
+ - `src/tools/` — 16 built-in tools + MCP transport (stdio + HTTP/SSE)
24
+ - `src/indexing/` — FTS5 codebase indexing (TS/JS, Python, Go, Rust)
25
+
26
+ ## Testing
27
+ - Framework: vitest
28
+ - Run: `npm test` (vitest run)
29
+ - No tests exist yet — add them under `src/` co-located as `*.test.ts`
30
+
31
+ ## important
32
+ - never lint before asking
33
+ - do not add comments
34
+ - never use emojis
package/CHANGELOG.md ADDED
@@ -0,0 +1,56 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [Unreleased]
9
+
10
+ ### Added
11
+
12
+ - CONTRIBUTING.md, CODE_OF_CONDUCT.md, SECURITY.md — open-source governance docs
13
+ - AGENTS.md — AI assistant conventions for tool-aided development
14
+ - GitHub issue templates (bug report, feature request) and PR template
15
+ - CHANGELOG.md — project changelog
16
+
17
+ ## [0.4.2] - 2026-06-18
18
+
19
+ ### Changed
20
+
21
+ - Word-wrap box content to terminal width for better readability
22
+ - User top border alignment fix
23
+ - All message boxes share consistent border width
24
+
25
+ ### Added
26
+
27
+ - Image paste support via `/paste` command
28
+ - Dynamic version read from package.json
29
+
30
+ ## [0.4.1] - 2026-06-18
31
+
32
+ ### Changed
33
+
34
+ - Made `indexCodebase` fully async so auto-index doesn't block startup
35
+ - Updated README and package metadata
36
+ - Renamed npm package to `daedalus-cli` (name conflict resolution)
37
+
38
+ ## [0.3.0] - 2026-06-18
39
+
40
+ ### Added
41
+
42
+ - Initial release
43
+ - CLI REPL with command dispatch, streaming chat, and tool execution
44
+ - Model router with priority, round-robin, and fastest-response strategies
45
+ - Health checking and token-bucket rate limiter
46
+ - Session persistence via SQLite with JSONL import/export
47
+ - Project memory — persisted facts and conventions auto-injected every turn
48
+ - 16 built-in tools: file read/write/patch, terminal, git, web, todo, delegation, codebase search, project config
49
+ - Interactive diff UI with y/n/a/s/e/d workflow
50
+ - MCP support: stdio and HTTP/SSE transport
51
+ - Multi-agent orchestration with 6 roles (orchestrator, planner, coder, reviewer, debugger, researcher)
52
+ - Codebase indexing with FTS5 for TS/JS, Python, Go, Rust
53
+ - Auto-discovery of local LLM servers (LM Studio, Ollama, llama.cpp, vLLM)
54
+ - First-run onboarding wizard
55
+ - Syntax highlighting for code blocks
56
+ - Cross-platform support (Windows + Unix)
@@ -0,0 +1,112 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our
6
+ community a harassment-free experience for everyone, regardless of age, body
7
+ size, visible or invisible disability, ethnicity, sex characteristics, gender
8
+ identity and expression, level of experience, education, socio-economic status,
9
+ nationality, personal appearance, race, religion, or sexual identity
10
+ and orientation.
11
+
12
+ We pledge to act and interact in ways that contribute to an open, welcoming,
13
+ diverse, inclusive, and healthy community.
14
+
15
+ ## Our Standards
16
+
17
+ Examples of behavior that contributes to a positive environment for our
18
+ community include:
19
+
20
+ - Demonstrating empathy and kindness toward other people
21
+ - Being respectful of differing opinions, viewpoints, and experiences
22
+ - Giving and gracefully accepting constructive feedback
23
+ - Accepting responsibility and apologizing to those affected by our mistakes,
24
+ and learning from the experience
25
+ - Focusing on what is best not just for us as individuals, but for the
26
+ overall community
27
+
28
+ Examples of unacceptable behavior include:
29
+
30
+ - The use of sexualized language or imagery, and sexual attention or
31
+ advances of any kind
32
+ - Trolling, insulting or derogatory comments, and personal or political attacks
33
+ - Public or private harassment
34
+ - Publishing others' private information, such as a physical or email
35
+ address, without their explicit permission
36
+ - Other conduct which could reasonably be considered inappropriate in a
37
+ professional setting
38
+
39
+ ## Enforcement Responsibilities
40
+
41
+ Community leaders are responsible for clarifying and enforcing our standards of
42
+ acceptable behavior and will take appropriate and fair corrective action in
43
+ response to any behavior that they deem inappropriate, threatening, offensive,
44
+ or harmful.
45
+
46
+ ## Scope
47
+
48
+ This Code of Conduct applies within all community spaces, and also applies when
49
+ an individual is officially representing the community in public spaces.
50
+
51
+ ## Enforcement
52
+
53
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
54
+ reported to the community leaders responsible for enforcement at
55
+ bgill55_art@outlook.com. All complaints will be reviewed and investigated
56
+ promptly and fairly.
57
+
58
+ ## Enforcement Guidelines
59
+
60
+ Community leaders will follow these Community Impact Guidelines in determining
61
+ the consequences for any action they deem in violation of this Code of Conduct:
62
+
63
+ ### 1. Correction
64
+
65
+ **Community Impact:** Use of inappropriate language or other behavior deemed
66
+ unprofessional or unwelcome in the community.
67
+
68
+ **Consequence:** A private, written warning from community leaders, providing
69
+ clarity around the nature of the violation and an explanation of why the
70
+ behavior was inappropriate. A public apology may be requested.
71
+
72
+ ### 2. Warning
73
+
74
+ **Community Impact:** A violation through a single incident or series of actions.
75
+
76
+ **Consequence:** A warning with consequences for continued behavior. No
77
+ interaction with the people involved, including unsolicited interaction with
78
+ those enforcing the Code of Conduct, for a specified period of time. This
79
+ includes avoiding interactions in community spaces as well as external channels
80
+ like social media. Violating these terms may lead to a temporary or
81
+ permanent ban.
82
+
83
+ ### 3. Temporary Ban
84
+
85
+ **Community Impact:** A serious violation of community standards, including
86
+ sustained inappropriate behavior.
87
+
88
+ **Consequence:** A temporary ban from any sort of interaction or public
89
+ communication with the community for a specified period of time. No public or
90
+ private interaction with the people involved, including unsolicited interaction
91
+ with those enforcing the Code of Conduct, is allowed during this period.
92
+ Violating these terms may lead to a permanent ban.
93
+
94
+ ### 4. Permanent Ban
95
+
96
+ **Community Impact:** Demonstrating a pattern of violation of community
97
+ standards, including sustained inappropriate behavior, harassment of an
98
+ individual, or aggression toward or disparagement of classes of individuals.
99
+
100
+ **Consequence:** A permanent ban from any sort of public interaction within
101
+ the community.
102
+
103
+ ## Attribution
104
+
105
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
106
+ version 2.1, available at
107
+ https://www.contributor-covenant.org/version/2/1/code_of_conduct.html.
108
+
109
+ [homepage]: https://www.contributor-covenant.org
110
+
111
+ For answers to common questions about this code of conduct, see the FAQ at
112
+ https://www.contributor-covenant.org/faq.
@@ -0,0 +1,165 @@
1
+ # Contributing to Daedalus
2
+
3
+ Thanks for your interest in contributing! Daedalus is a local-first AI coding CLI, and we welcome contributions of all kinds — bug fixes, features, documentation, and more.
4
+
5
+ ## Table of Contents
6
+
7
+ - [Code of Conduct](#code-of-conduct)
8
+ - [Getting Started](#getting-started)
9
+ - [Development Setup](#development-setup)
10
+ - [Project Structure](#project-structure)
11
+ - [Coding Standards](#coding-standards)
12
+ - [Commit Guidelines](#commit-guidelines)
13
+ - [Pull Request Process](#pull-request-process)
14
+ - [Testing](#testing)
15
+ - [Reporting Issues](#reporting-issues)
16
+
17
+ ## Code of Conduct
18
+
19
+ This project is governed by the [Contributor Covenant](CODE_OF_CONDUCT.md). By participating, you agree to uphold its terms.
20
+
21
+ ## Getting Started
22
+
23
+ 1. Fork the repository
24
+ 2. Clone your fork: `git clone https://github.com/<your-username>/daedalus.git`
25
+ 3. Create a feature branch: `git checkout -b feat/your-feature-name`
26
+
27
+ ## Development Setup
28
+
29
+ ```bash
30
+ # Install dependencies
31
+ npm install
32
+
33
+ # Run in dev mode (hot reload)
34
+ npm run dev
35
+
36
+ # Build
37
+ npm run build
38
+
39
+ # Type check
40
+ npx tsc --noEmit
41
+ ```
42
+
43
+ ### Prerequisites
44
+
45
+ - Node.js 20+
46
+ - A local LLM server (LM Studio, Ollama, llama.cpp, vLLM) or a remote API key
47
+
48
+ ## Project Structure
49
+
50
+ ```
51
+ src/
52
+ ├── index.ts # CLI entry point, REPL, command dispatch
53
+ ├── types.ts # Shared type definitions
54
+ ├── highlight.ts # Syntax highlighting
55
+ ├── config/ # Configuration loading, schema, discovery
56
+ ├── router/ # Model routing engine
57
+ ├── session/ # Session persistence (SQLite, JSONL)
58
+ ├── agents/ # Multi-agent system
59
+ ├── tools/ # Tool system (16 built-in tools + MCP)
60
+ │ ├── builtin/ # File, terminal, git, web, todo, etc.
61
+ │ └── mcp/ # MCP transport (stdio, HTTP/SSE)
62
+ ├── indexing/ # FTS5 codebase indexing
63
+ └── onboarding/ # Setup wizard
64
+ ```
65
+
66
+ ## Coding Standards
67
+
68
+ ### Language & Runtime
69
+
70
+ - **TypeScript** with strict mode
71
+ - **ESM** only (`"type": "module"`) — always use `.js` extension in local imports
72
+ - **Node.js 20+** target
73
+
74
+ ### Style
75
+
76
+ - **No comments** in source code unless the logic is non-obvious
77
+ - **No default exports** — use named exports everywhere
78
+ - **No emoji** in code or documentation
79
+ - **Descriptive names** — prefer clarity over brevity
80
+
81
+ ### Imports
82
+
83
+ ```typescript
84
+ // Local imports must include .js extension
85
+ import { RouterConfig } from '../router/types.js';
86
+
87
+ // npm imports need no extension
88
+ import { z } from 'zod';
89
+ ```
90
+
91
+ ### Error Handling
92
+
93
+ - Throw typed errors with descriptive messages
94
+ - Tools return `{ success: boolean, content: string, error?: string }`
95
+
96
+ ## Commit Guidelines
97
+
98
+ We follow [Conventional Commits](https://www.conventionalcommits.org/):
99
+
100
+ ```
101
+ <type>(<scope>): <description>
102
+
103
+ [optional body]
104
+ ```
105
+
106
+ ### Types
107
+
108
+ | Type | Usage |
109
+ |----------|------------------------------|
110
+ | feat | New feature |
111
+ | fix | Bug fix |
112
+ | docs | Documentation only |
113
+ | style | Formatting, missing semicolons |
114
+ | refactor | Code change that fixes neither bug nor adds feature |
115
+ | perf | Performance improvement |
116
+ | test | Adding or updating tests |
117
+ | chore | Build process, tooling, CI |
118
+
119
+ ### Examples
120
+
121
+ ```
122
+ feat(router): add temperature-per-model support
123
+ fix(indexing): handle symlinked directories
124
+ docs: add contributing guide
125
+ test(session): add SQLite CRUD tests
126
+ ```
127
+
128
+ ## Pull Request Process
129
+
130
+ 1. **Small PRs are better** — keep each PR focused on one concern
131
+ 2. **Update the CHANGELOG** — add your change under the `[Unreleased]` section
132
+ 3. **Include tests** — new features should include tests; bug fixes should add a regression test
133
+ 4. **Pass CI** — ensure all checks pass (type check, lint, tests)
134
+ 5. **Request review** — tag a maintainer or mention `@bgill55`
135
+
136
+ ### PR Title Format
137
+
138
+ Same as commit messages: `type(scope): description`
139
+
140
+ ## Testing
141
+
142
+ ```bash
143
+ # Run all tests
144
+ npm test
145
+
146
+ # Watch mode
147
+ npx vitest
148
+
149
+ # With coverage
150
+ npx vitest --coverage
151
+ ```
152
+
153
+ Tests are written with [vitest](https://vitest.dev/) and co-located with source files as `*.test.ts`.
154
+
155
+ ## Reporting Issues
156
+
157
+ - **Bug reports** — use the [bug report template](.github/ISSUE_TEMPLATE/bug_report.md)
158
+ - **Feature requests** — use the [feature request template](.github/ISSUE_TEMPLATE/feature_request.md)
159
+ - **Security issues** — see [SECURITY.md](SECURITY.md)
160
+
161
+ Before filing, please search [existing issues](https://github.com/bgill55/daedalus/issues) to avoid duplicates.
162
+
163
+ ## Questions?
164
+
165
+ Open a [Discussion](https://github.com/bgill55/daedalus/discussions) or reach out to the maintainer.
package/README.md CHANGED
@@ -249,6 +249,20 @@ It's for local-first, private, customizable AI coding — with the power to grow
249
249
 
250
250
  ---
251
251
 
252
+ ## Contributing
253
+
254
+ Contributions are welcome! See [CONTRIBUTING.md](CONTRIBUTING.md) for our contribution guidelines, coding standards, and pull request process.
255
+
256
+ This project is governed by a [Code of Conduct](CODE_OF_CONDUCT.md). Please report any unacceptable behavior.
257
+
258
+ ## Changelog
259
+
260
+ See [CHANGELOG.md](CHANGELOG.md) for the project history.
261
+
262
+ ## Security
263
+
264
+ Report security vulnerabilities privately to bgill55_art@outlook.com — see [SECURITY.md](SECURITY.md) for details.
265
+
252
266
  ## License
253
267
 
254
268
  MIT
package/SECURITY.md ADDED
@@ -0,0 +1,52 @@
1
+ # Security Policy
2
+
3
+ ## Supported Versions
4
+
5
+ We release patches for security vulnerabilities. This table shows which versions are currently supported:
6
+
7
+ | Version | Supported |
8
+ |---------|--------------------|
9
+ | 0.4.x | :white_check_mark: |
10
+ | < 0.4 | :x: |
11
+
12
+ ## Reporting a Vulnerability
13
+
14
+ We take security seriously. If you discover a security vulnerability in Daedalus, please **do not** open a public issue.
15
+
16
+ Instead, send a private report to **bgill55_art@outlook.com** with:
17
+
18
+ - A description of the vulnerability
19
+ - Steps to reproduce it
20
+ - Affected versions
21
+ - Any potential mitigations you've identified
22
+
23
+ You should receive a response within 48 hours. If you don't, please follow up to ensure we received your message.
24
+
25
+ ### What to expect
26
+
27
+ 1. **Acknowledgment** — we'll confirm receipt within 48 hours
28
+ 2. **Assessment** — we'll investigate and determine impact and severity
29
+ 3. **Fix** — we'll develop and test a patch
30
+ 4. **Release** — we'll publish a security advisory and a patched release
31
+
32
+ ### Disclosure
33
+
34
+ We ask that you allow us reasonable time to fix and release a patch before publicly disclosing the vulnerability.
35
+
36
+ ## Security Best Practices
37
+
38
+ When using Daedalus:
39
+
40
+ - **API keys** are stored in `~/.daedalus/config.json` — keep this file secure
41
+ - **Local LLM servers** should be bound to localhost (127.0.0.1) to avoid network exposure
42
+ - **Review tool execution** — Daedalus runs terminal commands you approve; review them before confirming
43
+ - Keep Daedalus updated to the latest version to receive security patches
44
+
45
+ ## Scope
46
+
47
+ The following are **out of scope**:
48
+
49
+ - Social engineering attacks against Daedalus maintainers
50
+ - Attacks requiring physical access to the victim's machine
51
+ - Vulnerabilities in third-party LLM servers or providers
52
+ - Denial of service against local services
@@ -354,6 +354,7 @@ export declare const ConfigSchema: z.ZodObject<{
354
354
  includeGitDiff: boolean;
355
355
  includeIndex: boolean;
356
356
  };
357
+ version: number;
357
358
  tools: {
358
359
  builtin: string[];
359
360
  mcpServers: Record<string, {
@@ -365,7 +366,6 @@ export declare const ConfigSchema: z.ZodObject<{
365
366
  headers?: Record<string, string> | undefined;
366
367
  }>;
367
368
  };
368
- version: number;
369
369
  router: {
370
370
  strategy: "priority" | "round-robin" | "fastest";
371
371
  chain: {
@@ -436,6 +436,7 @@ export declare const ConfigSchema: z.ZodObject<{
436
436
  includeGitDiff?: boolean | undefined;
437
437
  includeIndex?: boolean | undefined;
438
438
  } | undefined;
439
+ version?: number | undefined;
439
440
  tools?: {
440
441
  builtin?: string[] | undefined;
441
442
  mcpServers?: Record<string, {
@@ -447,7 +448,6 @@ export declare const ConfigSchema: z.ZodObject<{
447
448
  headers?: Record<string, string> | undefined;
448
449
  }> | undefined;
449
450
  } | undefined;
450
- version?: number | undefined;
451
451
  agents?: {
452
452
  default?: string | undefined;
453
453
  available?: string[] | undefined;