@dirgha/code 1.43.3 → 1.43.4

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 (3) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/README.md +53 -19
  3. package/package.json +13 -6
package/CHANGELOG.md CHANGED
@@ -2,6 +2,30 @@
2
2
 
3
3
  All notable changes are tracked here. Format loosely follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/); we use [Semantic Versioning](https://semver.org/).
4
4
 
5
+ ## [1.43.4] — unreleased (prepared 2026-11-19)
6
+
7
+ Maintenance release. No runtime source changes.
8
+
9
+ ### Security
10
+
11
+ * **deps:** bump transitive `tar` 7.5.15 → 7.5.23, `ws` 8.20.0 → 8.23.0 and `protobufjs` 8.2.0 → 8.8.1 (lockfile only) to clear one critical and two high npm audit advisories. The four remaining high advisories in `sharp` (libvips/libheif/librsvg), pulled in by `kokoro-js` and the optional `@xenova/transformers`, are cleared by forcing `sharp` 0.35.5 via `overrides`. Verified: the publish gate (`npm audit --audit-level=high --omit=dev --omit=optional`) exits 0 with "found 0 vulnerabilities" on npm 10 and 11, and kokoro-js on-device TTS was smoke-tested with sharp 0.35.5 (9.05 s WAV generated on Windows CPU). Note: making `kokoro-js` optional alone does not clear the gate — npm audit reports optional-chain advisories even with `--omit=optional`.
12
+
13
+ ### Packaging
14
+
15
+ * **package:** `license` is now the SPDX id `FSL-1.1-MIT` (was `SEE LICENSE IN LICENSE`).
16
+ * **package:** `engines.node` is now `>=22`, matching what the `ink@7` dependency already required. Node 18 and 20 were never supported in practice.
17
+ * **package:** `kokoro-js` (on-device TTS) moves from `dependencies` to `optionalDependencies`. The TTS tool already degrades gracefully when it is absent (dynamic import in `src/tools/studio.ts`); install `kokoro-js` alongside Dirgha Code to enable on-device speech. This keeps the default install lighter and the voice stack swappable.
18
+ * **package:** add keywords for local and offline use (`ollama`, `llama.cpp`, `local-llm`, `offline`, `mcp`, `terminal`).
19
+ * **repo:** rebuilt the committed `dist/` so it matches the source and the published 1.43.3 tarball; removed stray `a.out` and `probe.txt` from the repo root.
20
+
21
+ ### Documentation
22
+
23
+ * **readme:** refresh positioning (open source) and counts from the code (tests, tools, slash commands, subcommands, aliases, catalogue, source size) and npm (21,876 downloads, 127 versions as of 2026-11-19); replace the static test badge with the live CI badge.
24
+ * **readme:** add an offline quickstart for Ollama and llama.cpp, and a Related projects section (LOKAHI, Ahimsa AI, Synthetic Humanism, Startup Agent Skills).
25
+ * **docs:** the Windows guide now states Node 22 or later.
26
+
27
+ This file has no entries for most releases between 1.25.0 and 1.43.3. For those, see the [GitHub releases](https://github.com/Dirgha-AI/dirgha-code/releases) (each links a compare view) and the git history.
28
+
5
29
  ## [1.42.3] — 2026-04-25
6
30
 
7
31
  ### Bug Fixes
package/README.md CHANGED
@@ -3,17 +3,18 @@
3
3
  # Dirgha Code
4
4
 
5
5
  [![npm](https://img.shields.io/npm/v/@dirgha/code?style=flat-square&color=000)](https://www.npmjs.com/package/@dirgha/code)
6
- [![Tests](https://img.shields.io/badge/tests-472%20passed-brightgreen?style=flat-square)](https://github.com/Dirgha-AI/dirgha-code/actions)
6
+ [![npm downloads](https://img.shields.io/npm/dt/@dirgha/code?style=flat-square&color=000)](https://www.npmjs.com/package/@dirgha/code)
7
+ [![CI](https://github.com/Dirgha-AI/dirgha-code/actions/workflows/ci.yml/badge.svg)](https://github.com/Dirgha-AI/dirgha-code/actions/workflows/ci.yml)
7
8
  [![License](https://img.shields.io/badge/license-FSL--1.1--MIT-d4a373?style=flat-square)](./LICENSE)
8
9
  [![Sponsor](https://img.shields.io/badge/sponsor-%E2%99%A1-c25a4f?style=flat-square)](https://dirgha.ai/contribute)
9
10
 
10
- **Dirgha Code is the open-source CLI coding agent — 17 providers, BYOK, offline-capable, parallel agents, persistent memory, security-audited. One install command. No vendor lock-in.**
11
+ **Dirgha Code is an open-source CLI coding agent. It works with 17 model providers on your own keys, or fully offline with Ollama or llama.cpp, and adds parallel agents and persistent memory. One install command.**
11
12
 
12
13
  </div>
13
14
 
14
15
  ## The Seed: Why the CLI Comes First
15
16
 
16
- Every operating system starts with a kernel. Dirgha Code — the open-source command-line agent — is the kernel of Dirgha AI OS. It is the smallest, most installable, most hackable piece of the stack: one install command, runs fully offline, ships under FSL → MIT.
17
+ Every operating system starts with a kernel. Dirgha Code, the open-source command-line agent, is the kernel of Dirgha AI OS. It is the smallest and easiest piece of the stack to install and change: one install command, runs fully offline.
17
18
 
18
19
  By design, the CLI is the entry point for every developer — whether you're on a 10 Gbps fiber line or a shared 4G hotspot, in a WeWork in Bengaluru or a basement in Berlin. No browser, no paid account, no telemetry by default. Just `npm install -g @dirgha/code` and a terminal.
19
20
 
@@ -31,9 +32,9 @@ First-class llama.cpp and Ollama support. The setup wizard auto-probes `localhos
31
32
 
32
33
  ### BYOK across 17 providers
33
34
 
34
- Anthropic, OpenAI, Gemini, OpenRouter, NVIDIA NIM, Fireworks, DeepSeek (native), Mistral, Cohere, Cerebras, Together, Perplexity, xAI (Grok), Groq, Z.AI / GLM, plus local Ollama and llama.cpp. Drop multiple keys per provider into a pool — Dirgha rotates with priority + LRU + cooldown when one hits a 429. When a model 4xx/5xxs mid-turn, an inline `[y/n/p=picker]` failover prompt suggests a known-good substitute (via `findFailover` in `prices.ts`) and re-runs the failed turn against it. Other tools just dead-end.
35
+ Anthropic, OpenAI, Gemini, OpenRouter, NVIDIA NIM, Fireworks, DeepSeek (native), Mistral, Cohere, Cerebras, Together, Perplexity, xAI (Grok), Groq, Z.AI / GLM, plus local Ollama and llama.cpp. Drop multiple keys per provider into a pool — Dirgha rotates with priority + LRU + cooldown when one hits a 429. When a model 4xx/5xxs mid-turn, an inline `[y/n/p=picker]` failover prompt suggests a known-good substitute (via `findFailover` in `prices.ts`) and re-runs the failed turn against it.
35
36
 
36
- The model picker is two-step (gemini-cli style): pick a provider card → pick a model within that provider. 104 models in the catalogue, refreshed against the live OpenRouter registry on every release.
37
+ The model picker is two-step (gemini-cli style): pick a provider card → pick a model within that provider. The built-in catalogue lists 110 models (`src/intelligence/prices.ts`); `dirgha models refresh` fetches the live model lists from your configured providers.
37
38
 
38
39
  ### Persistent memory that compounds
39
40
 
@@ -56,43 +57,69 @@ Information flows up. Old context gets distilled, not discarded.
56
57
 
57
58
  ### Skills, scanned
58
59
 
59
- SKILL.md packs are portable Markdown agents — share one git URL, anyone can `dirgha skills install <url>`. Every third-party skill is scanned at install AND load time by a heuristic prompt-injection / supply-chain check. Critical findings block. Today: 112 installed across 4 packs, 74 allow · 36 warn · 2 block. TypeScript / ESM plugins are the sibling concept — drop a `.mjs` at `~/.dirgha/extensions/<name>/index.mjs` and register tools, slashes, subcommands, or lifecycle hooks in ~20 lines.
60
+ SKILL.md packs are portable Markdown agents — share one git URL, anyone can `dirgha skills install <url>`. Every third-party skill is scanned at install AND load time by a heuristic prompt-injection / supply-chain check. Critical findings block; lesser findings show a warning. TypeScript / ESM plugins are the sibling concept — drop a `.mjs` at `~/.dirgha/extensions/<name>/index.mjs` and register tools, slashes, subcommands, or lifecycle hooks in ~20 lines.
60
61
 
61
62
  ## Install
62
63
 
64
+ Requires Node.js 22 or later.
65
+
63
66
  ```bash
64
67
  npm install -g @dirgha/code # or: pnpm add -g @dirgha/code
65
68
  dirgha setup # 3-step wizard: pick provider (local works too) → auth → model
66
69
  dirgha "say ok in one word"
67
70
  ```
68
71
 
69
- Or skip the wizard and go straight to a key: `export NVIDIA_API_KEY=nvapi-…` (any of the 17 providers — see below).
70
- For 100% local: install [Ollama](https://ollama.com) or [llama.cpp](https://github.com/ggerganov/llama.cpp), then run `dirgha setup` and pick **Local**.
72
+ Or skip the wizard and go straight to a key: `export NVIDIA_API_KEY=nvapi-…` (any of the 17 providers, see below).
71
73
 
72
74
  **Windows users**: See the [Windows installation guide](docs/windows-installation.md) for setup of optional features.
73
75
 
74
76
  The interactive TUI is `dirgha` with no args. Resume a session with `dirgha resume <id>`. Fan a parallel sub-agent fleet with `dirgha fleet launch "<goal>"`.
75
77
 
78
+ ### Offline quickstart (local models, no API key)
79
+
80
+ Dirgha Code talks to local models through their OpenAI-compatible endpoints, so prompts and code stay on your machine. Pick one runtime.
81
+
82
+ **Ollama** (default endpoint `http://localhost:11434/v1`):
83
+
84
+ ```bash
85
+ # install Ollama from https://ollama.com, then:
86
+ ollama pull qwen2.5-coder:7b
87
+ dirgha -m ollama/qwen2.5-coder:7b "list the files in this folder and summarise them"
88
+ ```
89
+
90
+ **llama.cpp** (default endpoint `http://localhost:8080/v1`):
91
+
92
+ ```bash
93
+ # build or download llama.cpp from https://github.com/ggml-org/llama.cpp, then:
94
+ llama-server -m ./models/qwen2.5-coder-7b-instruct-q4_k_m.gguf --port 8080 --jinja
95
+ dirgha -m llamacpp/qwen2.5-coder-7b-instruct "list the files in this folder and summarise them"
96
+ ```
97
+
98
+ If llama-server runs on another host or port, set `LLAMACPP_URL` (for example `export LLAMACPP_URL=http://127.0.0.1:9000/v1`).
99
+
100
+ To make a local model the default, run `dirgha setup` and pick **Local**; the wizard probes both ports and lists installed models. `dirgha doctor` shows whether each local server is reachable. Tool calling depends on the model: small models may answer in plain text instead of calling tools, so start with a coder-tuned model of 7B parameters or more.
101
+
76
102
  ## What's in the box
77
103
 
78
104
  | | |
79
105
  | --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
80
- | **17 providers** | anthropic, openai, gemini, openrouter, nvidia, fireworks, deepseek, groq, cerebras, together, deepinfra, mistral, xai, perplexity, cohere, kimi, zai |
81
- | **34 model aliases** | `kimi`, `opus`, `sonnet`, `haiku`, `gemini`, `flash`, `deepseek`, `llama`, `ling`, `hy3`, … resolved before routing |
82
- | **18 built-in tools** | `fs_read`, `fs_write`, `fs_edit`, `fs_ls`, `shell`, `git`, `github`, `search_grep`, `search_glob`, `browser`, `checkpoint`, `cron`, `task`, `go_to_definition`, `find_references`, `hover_documentation`, `document_symbols`, `qmd_search` |
83
- | **20 slash commands** | `/account`, `/clear`, `/compact`, `/cost`, `/fleet`, `/keys`, `/login`, `/memory`, `/mode`, `/models`, `/resume`, `/session`, `/status`, `/theme`, `/upgrade`, … |
84
- | **18 subcommands** | `audit`, `audit-codebase`, `cost`, `kb`, `keys`, `ledger`, `login`, `models`, `resume`, `skills`, `undo`, `update`, `verify`, … |
106
+ | **17 providers** | anthropic, openai, gemini, openrouter, nvidia, fireworks, deepseek, groq, cerebras, together, mistral, xai, perplexity, cohere, zai, plus local ollama and llamacpp |
107
+ | **24 model aliases** | `opus`, `sonnet`, `haiku`, `gpt5`, `gemini`, `flash`, `kimi`, … resolved before routing (`dirgha models` lists them) |
108
+ | **34 built-in tools** | files (`fs_read`, `fs_write`, `fs_edit`, `fs_ls`), `shell`, `git`, `github`, search (`search_grep`, `search_glob`), `browser`, `checkpoint`, `cron`, LSP (`go_to_definition`, `find_references`, `hover_documentation`, `document_symbols`), knowledge (`qmd_search`, `kb_search`, graph tools), media and GPU tools; the `task` sub-agent tool is added per session |
109
+ | **31 slash commands** | `/account`, `/clear`, `/compact`, `/cost`, `/fleet`, `/keys`, `/login`, `/memory`, `/mode`, `/models`, `/resume`, `/session`, `/status`, `/theme`, `/upgrade`, … |
110
+ | **36 subcommands** | `ask`, `audit`, `chat`, `doctor`, `keys`, `login`, `models`, `resume`, `setup`, `skills`, `update`, `verify`, … (`dirgha --help`), plus `dirgha fleet` |
85
111
  | **4 modes** | `act` · `plan` (read-only thinking) · `verify` (read-only audit) · `ask` (read-only Q&A) |
86
112
  | **MCP** | stdio + HTTP/SSE + `bearerProvider` async OAuth rotation |
87
- | **Source** | ~14.5 K LOC across 23 modules in `src/`. Hard rule: every src file ≤ 200 lines. |
113
+ | **Source** | About 54K lines of TypeScript (excluding tests) across 32 top-level modules in `src/`. |
88
114
 
89
115
  ## Numbers worth checking
90
116
 
91
117
  | | |
92
118
  | -------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
93
- | Tests | **232 vitest + 41 offline** in ~40 s. TS 0 errors, ESLint 0 warnings. CI green is a precondition for any PR. |
119
+ | Tests | **484 vitest tests** in 41 files (`npm test`) plus **45 offline CLI suites** (`npm run test:cli:offline`, 41 run without network). TypeScript 0 errors, ESLint 0 warnings. CI must pass before a PR merges. |
120
+ | npm | 21,876 downloads and 127 published versions since April 2026 (npm registry and downloads API, checked 19 Nov 2026). |
94
121
  | 17 providers | Multi-key BYOK pool with cooldown rotation, 4-tier failover cascade, health scoring with compaction. |
95
- | 18 built-in tools | Per-tool timeout enforcement. Shell 300s (PTY streaming via `streamOutput`), reads 30s, default 60s. |
122
+ | 34 built-in tools | Per-tool timeout enforcement. Shell 300s (PTY streaming via `streamOutput`), reads 30s, default 60s. |
96
123
  | Mode enforcement | `git`, `shell`, `fs_write`, `fs_edit`, `browser` are write-gated in `plan` / `verify` / `ask` modes at the kernel hook layer — not just prompt nudging. |
97
124
  | **GPU compute** | 4 providers (Vast, Akash, Spheron, RunPod), cheapest-auto-select, budget caps, audit log, agent tools, CLI subcommand, web UI at [`dirgha.ai/app/gpu`](https://dirgha.ai/app/gpu) |
98
125
 
@@ -100,7 +127,7 @@ The interactive TUI is `dirgha` with no args. Resume a session with `dirgha resu
100
127
 
101
128
  Frontier coding assistants are closed SaaS, charging per-seat, piping your repository through someone else's telemetry. The assumption is that the intelligence must live at the vendor.
102
129
 
103
- The opposite assumption is the right one. Your laptop is the unit of sovereignty. Your keys, your wallet, your session log, your tool executions live on your machine until you choose to hit a network. Providers are swappable. The agent loop is open source.
130
+ The opposite assumption is the right one. Your laptop is the unit of sovereignty. Your keys, your wallet, your session log, your tool executions live on your machine until you choose to hit a network. Providers are swappable. The agent loop's source is public and each release becomes MIT-licensed two years after it ships.
104
131
 
105
132
  ## Documentation
106
133
 
@@ -130,11 +157,18 @@ A few specific ways to plug in:
130
157
  - **Write a plugin.** TypeScript extensions API takes ~20 lines for a real tool. We're keen to feature good ones — drop a link.
131
158
  - **Send a PR.** Every PR adds a `.changeset/<random-name>.md` describing what changed and at what semver tier. Tests must stay green: `npm run test:cli:offline`.
132
159
 
133
- We're a small team. We answer issues. We accept PRs from first-time contributors. If something feels off about the project, the docs, or the experience — tell us.
160
+ We're a small team. We answer issues. We accept PRs from first-time contributors. If something feels off about the project, the docs, or the experience, tell us.
161
+
162
+ ## Related projects
163
+
164
+ - [**LOKAHI**](https://github.com/Dirgha-AI/lokahi) (Apache-2.0, v0.1.4): a gate that checks each MCP tool call against a signed, community-written manifest before it runs. Reference implementation, not yet independently reviewed.
165
+ - [**Ahimsa AI**](https://github.com/Dirgha-AI/ahimsa-ai) (MIT): a design-time impact assessment (AIA v1.1) that compiles approved projects into LOKAHI manifests.
166
+ - [**Synthetic Humanism**](https://github.com/Dirgha-AI/synthetic-humanism) (MIT): the essays behind LOKAHI and Ahimsa AI, plus a benchmark that runs both against 20 documented AI failures.
167
+ - [**Startup Agent Skills**](https://github.com/salikshah/startup-agent-skills) (MIT): SKILL.md packs for startup strategy, growth and positioning, tested against Dirgha Code and other agent CLIs.
134
168
 
135
169
  ## License
136
170
 
137
- [FSL-1.1-MIT](./LICENSE) — Functional Source License with a 2-year sunset to MIT.
171
+ [FSL-1.1-MIT](./LICENSE): the Functional Source License. You can use, modify and redistribute the code for any purpose except offering a competing commercial product. Two years after each release is published, that release converts to the MIT License. See [LICENSING.md](./LICENSING.md) for details.
138
172
 
139
173
  ---
140
174
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dirgha/code",
3
- "version": "1.43.3",
3
+ "version": "1.43.4",
4
4
  "description": "CLI coding agent for complex agentic workflows and long-horizon development. Local models (llama.cpp / Ollama), BYOK across 17 providers, parallel agents, persistent memory, scanned skills.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -42,13 +42,13 @@
42
42
  "dependencies": {
43
43
  "ink": "^7.0.2",
44
44
  "ink-text-input": "^6.0.0",
45
- "kokoro-js": "^1.2.1",
46
45
  "react": "^19.2.0"
47
46
  },
48
47
  "optionalDependencies": {
49
48
  "@xenova/transformers": "^2.17.2",
50
49
  "better-sqlite3": "12.9.0",
51
50
  "chokidar": "^5.0.0",
51
+ "kokoro-js": "^1.2.1",
52
52
  "sqlite-vec": "^0.1.9"
53
53
  },
54
54
  "devDependencies": {
@@ -64,10 +64,11 @@
64
64
  },
65
65
  "overrides": {
66
66
  "esbuild": ">=0.25.0",
67
- "protobufjs": ">=7.5.5"
67
+ "protobufjs": ">=7.5.5",
68
+ "sharp": "^0.35.5"
68
69
  },
69
70
  "engines": {
70
- "node": ">=18.0.0"
71
+ "node": ">=22.0.0"
71
72
  },
72
73
  "keywords": [
73
74
  "cli",
@@ -79,7 +80,13 @@
79
80
  "tool-calling",
80
81
  "openrouter",
81
82
  "anthropic",
82
- "openai"
83
+ "openai",
84
+ "ollama",
85
+ "llama.cpp",
86
+ "local-llm",
87
+ "offline",
88
+ "mcp",
89
+ "terminal"
83
90
  ],
84
91
  "homepage": "https://github.com/Dirgha-AI/dirgha-code",
85
92
  "repository": {
@@ -90,5 +97,5 @@
90
97
  "url": "https://github.com/Dirgha-AI/dirgha-code/issues"
91
98
  },
92
99
  "author": "Dirgha AI Team",
93
- "license": "SEE LICENSE IN LICENSE"
100
+ "license": "FSL-1.1-MIT"
94
101
  }