Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
eef546a
feat: enhance memory management and CLI functionality
codewithshinde Jul 4, 2026
464a24b
feat(subagents): introduce subagent architecture with loading and reg…
codewithshinde Jul 4, 2026
af4e6dd
feat: Introduce Team Management and Job Queue Services
codewithshinde Jul 4, 2026
ad48013
feat: enhance path resolution and tool guidance
codewithshinde Jul 4, 2026
c0de1d1
Refactor ThinkingRow component for improved display and styling; enha…
codewithshinde Jul 5, 2026
28c4988
feat(TokenMeter): enhance token display with input/output details and…
codewithshinde Jul 5, 2026
9d1556b
feat: enhance PlanActEngine and UI components with new features and s…
codewithshinde Jul 6, 2026
d28da4c
feat: Built the full retrieval eval harness with zero changes to Hyb…
codewithshinde Jul 6, 2026
dfc81b7
feat: update default vector backend to lancedb; add runtime health tr…
codewithshinde Jul 6, 2026
a361ad4
feat: add call graph context source and integrate with language service
codewithshinde Jul 6, 2026
fbd683a
feat: enhance retrieval metrics with deduplication logic for improved…
codewithshinde Jul 6, 2026
463de7d
feat: update README version and enhance ActIntentRouter with new rege…
codewithshinde Jul 6, 2026
c541a8f
refactor: update dispose methods to be async and handle promises
codewithshinde Jul 6, 2026
1cb4886
testcases: Add medium severity planning tasks for various scenarios
codewithshinde Jul 7, 2026
b511bdb
feat: add support for base URL, model, and API key in benchmark tasks
codewithshinde Jul 7, 2026
e7f0453
feat: add support for base URL, model, and API key in manual benchmar…
codewithshinde Jul 7, 2026
3aa756b
feat: enhance native module rebuilding and indexing policies
codewithshinde Jul 9, 2026
1271094
feat: implement external file reading with user approval in ToolExecu…
codewithshinde Jul 9, 2026
1216666
Refactor code structure for improved readability and maintainability
codewithshinde Jul 9, 2026
91c0457
fix: update version number in README and reorder feature detection lo…
codewithshinde Jul 10, 2026
9c6ded0
fix: update version number to 2.7.50 in README and optimize imports i…
codewithshinde Jul 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
28 changes: 28 additions & 0 deletions .github/workflows/mitii-agent.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: mitii agent

on:
issue_comment:
types: [created]

jobs:
mitii:
if: contains(github.event.comment.body, '/mitii')
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
issues: write
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm run compile:cli
- run: node dist/cli.js agent "${{ github.event.comment.body }}" --provider echo --approval auto --json > mitii-events.jsonl
- uses: actions/upload-artifact@v4
with:
name: mitii-audit
path: mitii-events.jsonl
38 changes: 38 additions & 0 deletions .github/workflows/native-binaries.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: native binaries

on:
push:
tags:
- 'v*'
workflow_dispatch:

jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- os: macos-14
target: darwin-arm64
- os: macos-13
target: darwin-x64
- os: ubuntu-latest
target: linux-x64
- os: windows-latest
target: win32-x64
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm --filter mitii build:platform
env:
MITII_PLATFORM_TARGET: ${{ matrix.target }}
- uses: actions/upload-artifact@v4
with:
name: mitii-${{ matrix.target }}
path: dist-native/${{ matrix.target }}
32 changes: 32 additions & 0 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: npm publish

on:
push:
tags:
- 'v*'
workflow_dispatch:

jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm sync:versions
- run: pnpm -r build
- run: pnpm test
- run: npm publish --workspace packages/sdk --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: npm publish --workspace packages/daemon --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm run compile
- run: pnpm exec vsce package
- run: pnpm run package
- name: Generate release notes
run: node dist/cli.js changelog > release-notes.md
- uses: softprops/action-gh-release@v2
Expand Down
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,17 @@ dist/
.thunder/
.thunder V2/
.mitii
.mitii/
.mitti/
project-goals/
mitii-debug-logs/
vendor/
tmp/
logs/
build/
coverage/
*.lock
*.map

# Benchmark / eval runtime (local generation and reports)
tools/benchmark/tasks/eval/generated/
Expand Down
11 changes: 11 additions & 0 deletions .mitiiignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Mitii workspace indexing ignores
node_modules/
dist/
build/
.next/
coverage/
vendor/
tmp/
logs/
*.lock
*.map
221 changes: 164 additions & 57 deletions README.md

Large diffs are not rendered by default.

22 changes: 22 additions & 0 deletions docs/deploy/launchd.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>dev.mitii.serve</string>
<key>ProgramArguments</key>
<array>
<string>/usr/bin/env</string>
<string>mitii</string>
<string>serve</string>
<string>--hostname</string>
<string>127.0.0.1</string>
<string>--port</string>
<string>4310</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
</dict>
</plist>
11 changes: 11 additions & 0 deletions docs/deploy/systemd-user.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[Unit]
Description=Mitii daemon

[Service]
Type=simple
EnvironmentFile=%h/.mitii-serve-env
ExecStart=/usr/bin/env mitii serve --cwd %h/project --hostname 127.0.0.1 --port 4310
Restart=on-failure

[Install]
WantedBy=default.target
75 changes: 75 additions & 0 deletions docs/developers/mitii-serve-protocol.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# Mitii Serve Protocol

`mitii serve` runs one daemon per bound workspace. It exposes a loopback-first HTTP API plus per-session SSE event streams.

Default bind: `127.0.0.1:4310`.

## Security

- Loopback is the default.
- Binding to `0.0.0.0` or another non-loopback host requires `--insecure-bind`.
- Non-loopback binds also require `--token` or `MITII_SERVER_TOKEN`.
- Clients authenticate with `Authorization: Bearer <token>`.
- CORS is denied unless `--allow-origin` is set.
- Daemon actions are appended to `.mitii/daemon/audit.jsonl`.

## Routes

`GET /health`

```json
{ "ok": true, "version": "2.7.31", "cwd": "/repo", "sessions": 1 }
```

`GET /capabilities`

```json
{
"features": ["sessions", "sse", "permissions", "cancel", "subagents", "worktrees"],
"maxSessions": 5,
"supportedModes": ["ask", "plan", "agent", "review"],
"eventReplay": true
}
```

`POST /session`

```json
{ "cwd": "/repo", "mode": "agent", "approval": "manual", "runtime": "real" }
```

`GET /sessions`, `GET /session/:id`, and `DELETE /session/:id` list, inspect, and close sessions.

`POST /session/:id/prompt`

```json
{ "mode": "agent", "message": "Fix the failing test", "attachments": [] }
```

Returns `202` once the prompt is accepted. Results stream through SSE.

`GET /session/:id/events`

SSE frames use `id`, `event`, and JSON `data` fields. Reconnect with `Last-Event-ID` to replay buffered missed events.

```text
id: 7
event: assistant_delta
data: {"type":"assistant_delta","content":"I found the issue"}
```

`POST /session/:id/permissions/:approvalId/respond`

```json
{ "decision": "approved" }
```

`POST /session/:id/cancel` aborts an in-flight turn.

## Error Shape

```json
{ "error": { "code": "workspace_mismatch", "message": "Daemon is bound to ..." } }
```

Common statuses: `400` workspace mismatch, `401` auth failure, `404` missing session, `409` concurrent prompt, `503` session limit.
14 changes: 7 additions & 7 deletions docs/enterprise/PROCUREMENT_FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@ Mitii targets macOS, Linux, and Windows. CI runs `npm test` on `ubuntu-latest`,

## Offline And Local Models

Mitii supports OpenAI-compatible localhost providers such as Ollama and LM Studio. Set `thunder.enterprise.localProvidersOnly` to enforce local-only usage.
Mitii supports OpenAI-compatible localhost providers such as Ollama and LM Studio. Set `mitii.enterprise.localProvidersOnly` to enforce local-only usage.

## Controls Procurement Teams Ask For

| Control | Setting or command |
|---|---|
| Disable session logging | `thunder.telemetry.sessionLogging` |
| Disable verbose diagnostics | `thunder.telemetry.debugMetrics` |
| Require approval for writes | `thunder.safety.requireApprovalForWrites` |
| Require approval for shell | `thunder.safety.requireApprovalForShell` |
| Local providers only | `thunder.enterprise.localProvidersOnly` |
| Strip file contents from audit packs | `thunder.enterprise.stripFileContentsFromAuditPacks` |
| Disable session logging | `mitii.telemetry.sessionLogging` |
| Disable verbose diagnostics | `mitii.telemetry.debugMetrics` |
| Require approval for writes | `mitii.safety.requireApprovalForWrites` |
| Require approval for shell | `mitii.safety.requireApprovalForShell` |
| Local providers only | `mitii.enterprise.localProvidersOnly` |
| Strip file contents from audit packs | `mitii.enterprise.stripFileContentsFromAuditPacks` |
| Export review evidence | `Mitii: Export Audit Pack` |

## License
Expand Down
2 changes: 1 addition & 1 deletion docs/enterprise/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ This folder is the reviewer-facing security, compliance, and procurement packet
- [Procurement FAQ](PROCUREMENT_FAQ.md)
- [Enterprise overview](MITII_ENTERPRISE_OVERVIEW.md)

Key controls are implemented as VS Code settings under `thunder.telemetry.*`, `thunder.safety.*`, `thunder.enterprise.*`, and the `Mitii: Export Audit Pack` command.
Key controls are implemented as VS Code settings under `mitii.telemetry.*`, `mitii.safety.*`, `mitii.enterprise.*`, and the `Mitii: Export Audit Pack` command.

6 changes: 3 additions & 3 deletions docs/enterprise/SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ Mitii is local-first. Workspace indexes, memory, plans, checkpoints, and JSONL s

## What Leaves The Machine

Only prompt data sent to the configured LLM provider leaves the machine. The provider boundary is controlled by `thunder.provider.*`. Enterprises can enable `thunder.enterprise.localProvidersOnly` to require Echo or a localhost OpenAI-compatible endpoint.
Only prompt data sent to the configured LLM provider leaves the machine. The provider boundary is controlled by `mitii.provider.*`. Enterprises can enable `mitii.enterprise.localProvidersOnly` to require Echo or a localhost OpenAI-compatible endpoint.

## Secrets

API keys are stored in VS Code SecretStorage. Logs and audit packs redact keys named like API keys, tokens, passwords, and secrets. Audit packs can additionally strip tool output and file content with `thunder.enterprise.stripFileContentsFromAuditPacks`.
API keys are stored in VS Code SecretStorage. Logs and audit packs redact keys named like API keys, tokens, passwords, and secrets. Audit packs can additionally strip tool output and file content with `mitii.enterprise.stripFileContentsFromAuditPacks`.

## MCP Risk Model

MCP tools are routed through Mitii tool policy. File writes and mutating shell commands require approval according to `thunder.safety.approvalMode` and `thunder.safety.requireApprovalForWrites`.
MCP tools are routed through Mitii tool policy. File writes and mutating shell commands require approval according to `mitii.safety.approvalMode` and `mitii.safety.requireApprovalForWrites`.

## Auditability

Expand Down
15 changes: 15 additions & 0 deletions docs/enterprise/channel-security.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Channel Security

Channel connectors route Slack, Telegram, Discord, and similar messages into the daemon. Treat them as external ingress.

Baseline controls:

| Control | Mitii behavior |
| --- | --- |
| User allowlist | Connectors can reject users not present in `allowedUsers`. |
| Thread allowlist | Connectors can restrict use to approved channel/thread IDs. |
| Read-only mode | Channel policy can downgrade `agent` requests to `plan`. |
| Secret redaction | Long token-like values are redacted from outbound replies. |
| Auditability | Channel prompts flow through daemon sessions and session logs. |

Enterprise deployments should keep connectors bound to loopback daemons or require `MITII_SERVER_TOKEN` for non-loopback hosts.
12 changes: 12 additions & 0 deletions docs/enterprise/daemon-security.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Daemon Security

`mitii serve` is designed for local development first.

- It binds to `127.0.0.1` by default.
- Non-loopback binds require both `--insecure-bind` and a bearer token.
- Bearer tokens are compared with constant-time comparison.
- CORS is opt-in through `--allow-origin`.
- Session `cwd` values are canonicalized and must match the daemon-bound workspace.
- Session lifecycle, prompts, cancellation, and permission responses are logged to `.mitii/daemon/audit.jsonl`.

For enterprise-managed installs, prefer a per-user daemon, managed token provisioning, local provider policy enforcement, and workspace-level audit pack export.
27 changes: 27 additions & 0 deletions docs/enterprise/managed-policy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Managed Enterprise Policy

Mitii can be governed with a managed `.mitii/mitii.policy.json` file distributed by MDM, base images, or repository templates. Policy values are intentionally coarse and override user-facing convenience features before a connector, worker, or team runtime starts.

```json
{
"localProvidersOnly": true,
"channelsDisabled": false,
"maxParallel": 10,
"autoPrEnabled": false,
"stripFileContentsFromAuditPacks": true,
"allowedChannelUsers": [],
"allowedChannelThreads": []
}
```

Recommended controls:

| Policy | Purpose |
| --- | --- |
| `localProvidersOnly` | Require local or approved private model providers. |
| `channelsDisabled` | Disable Slack, Telegram, Discord, and similar external surfaces. |
| `maxParallel` | Cap parallel sessions, workers, and teammates. |
| `autoPrEnabled` | Keep PR creation explicit unless centrally approved. |
| `stripFileContentsFromAuditPacks` | Preserve audit metadata while reducing data exposure. |

Phase 3 treats this as the stable policy contract. Future SSO/OIDC and HA daemon work should extend this file instead of introducing a second policy surface.
Loading
Loading