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
15 changes: 15 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,21 @@ OPENROUTER_API_KEY=
# xAI / Grok (optional)
XAI_API_KEY=

# DeepSeek (optional)
DEEPSEEK_API_KEY=

# Moonshot AI / Kimi (optional). KIMI_API_KEY is also accepted.
MOONSHOT_API_KEY=

# Alibaba Qwen via DashScope (optional). QWEN_API_KEY is also accepted.
DASHSCOPE_API_KEY=

# MiniMax (optional)
MINIMAX_API_KEY=

# Z.ai / Zhipu GLM (optional)
ZAI_API_KEY=

# Exa web search (optional)
EXA_API_KEY=

Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ versioning when releases are cut.

- Added a weekly internal patch-release cadence that opens or refreshes release
PRs with generated changelog entries from commits since the latest semver tag.
- Added first-class support for the major Chinese model providers — DeepSeek,
Moonshot/Kimi, Alibaba Qwen (DashScope), MiniMax, and Z.ai/Zhipu GLM — across
the model registry, API-key resolution, `/config` presets, and the native Rust
TUI, including DeepSeek's previously missing `DEEPSEEK_API_KEY` lookup.

### Changed

Expand Down
21 changes: 17 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,31 @@ This README is intentionally short. Use it to get running, then jump into the do

## Install

### Bun (recommended)
### Release Binary (recommended)

Download the binary for your platform from the latest GitHub release:

```bash
bun install -g @evalops/maestro
# macOS Apple Silicon
curl -L https://github.com/evalops/maestro/releases/latest/download/maestro-darwin-arm64 -o maestro
chmod +x ./maestro

# Linux x64
curl -L https://github.com/evalops/maestro/releases/latest/download/maestro-linux-x64 -o maestro
chmod +x ./maestro
```

### npm
### Package Managers (dev/source workflows)

```bash
bun install -g @evalops/maestro
npm install -g @evalops/maestro
```

Package-manager installs are kept for contributors and source-based workflows.
Release binaries are the primary install artifact and are smoke-tested directly
with `maestro --version` and a headless protocol handshake before attachment.

If a global install fails while resolving `@evalops/tui` or
`@evalops/contracts`, you are installing a deprecated 0.10.8-0.10.20 package
that referenced private workspace dependencies. Upgrade to
Expand All @@ -66,7 +79,7 @@ maestro codex login
packaged `@openai/codex` app-server and source checkouts fall back to a `codex`
binary on `PATH`, so an existing `codex login` is reused automatically.

Bare `maestro` defaults to `openai-codex/gpt-5.5`. Maestro also supports OpenAI API keys, Anthropic, Google, OpenRouter, Azure OpenAI, GitHub Copilot, Groq, xAI, Cerebras, and managed EvalOps auth. See [Models](docs/MODELS.md) for provider-specific setup and overrides.
Bare `maestro` defaults to `openai-codex/gpt-5.5`. Maestro also supports OpenAI API keys, Anthropic, Google, OpenRouter, Azure OpenAI, GitHub Copilot, Groq, xAI, Cerebras, the major Chinese model providers (DeepSeek, Moonshot/Kimi, Alibaba Qwen via DashScope, MiniMax, and Z.ai/Zhipu GLM), and managed EvalOps auth. See [Models](docs/MODELS.md) for provider-specific setup and overrides.

For another Codex subscription model, select models under the `openai-codex` provider such as `openai-codex/gpt-5.5`.

Expand Down
33 changes: 33 additions & 0 deletions deploy/helm/maestro/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,39 @@ Service account name
{{- end }}
{{- end }}

{{/*
Resolve the container image reference. image.digest wins; otherwise an empty
image.tag falls back to Chart.appVersion so the chart never defaults to latest.
*/}}
{{- define "maestro.image" -}}
{{- if .Values.image.digest -}}
{{- printf "%s@%s" .Values.image.repository .Values.image.digest -}}
{{- else -}}
{{- printf "%s:%s" .Values.image.repository (default .Chart.AppVersion .Values.image.tag) -}}
{{- end -}}
{{- end }}

{{/*
Resolve the web API key for the Secret. Explicit values win; otherwise preserve
an existing Secret value on upgrade and generate one on first install.
*/}}
{{- define "maestro.webApiKey" -}}
{{- $auth := default dict (get .Values "auth") -}}
{{- $configured := default "" (get $auth "apiKey") -}}
{{- if $configured -}}
{{- $configured -}}
{{- else -}}
{{- $existing := lookup "v1" "Secret" .Release.Namespace (include "maestro.fullname" .) -}}
{{- if and $existing $existing.data (hasKey $existing.data "MAESTRO_WEB_API_KEY") -}}
{{- index $existing.data "MAESTRO_WEB_API_KEY" | b64dec -}}
{{- else if (lookup "v1" "Namespace" "" "default") -}}
{{- randAlphaNum 48 -}}
{{- else -}}
{{- "" -}}
{{- end -}}
Comment thread
cursor[bot] marked this conversation as resolved.
Resolved
{{- end -}}
Comment thread
cursor[bot] marked this conversation as resolved.
Resolved
{{- end }}

{{/*
Validate process-local headless runtime routing before rendering workload
resources. Multi-replica web/headless deployments need sticky sessions or a
Expand Down
2 changes: 1 addition & 1 deletion deploy/helm/maestro/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ spec:
{{- end }}
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
image: "{{ include "maestro.image" . }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- with .Values.securityContext }}
securityContext:
Expand Down
6 changes: 6 additions & 0 deletions deploy/helm/maestro/templates/secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,11 @@ metadata:
name: {{ include "maestro.fullname" . }}
labels:
{{- include "maestro.labels" . | nindent 4 }}
{{- $webApiKey := include "maestro.webApiKey" . }}
type: Opaque
{{- if $webApiKey }}
stringData:
MAESTRO_WEB_API_KEY: {{ $webApiKey | quote }}
{{- else }}
stringData: {}
{{- end }}
Comment thread
cursor[bot] marked this conversation as resolved.
Resolved
9 changes: 8 additions & 1 deletion deploy/helm/maestro/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,15 @@ headlessRuntime:

image:
repository: ghcr.io/evalops/maestro
tag: latest
# Defaults to Chart.appVersion when empty. Prefer immutable sha-* tags or digest.
tag: ""
digest: ""
pullPolicy: IfNotPresent

auth:
# Leave empty to generate an API key on first install and preserve it on upgrades.
apiKey: ""

service:
type: ClusterIP
port: 8080
Expand Down Expand Up @@ -113,6 +119,7 @@ env:
IDENTITY_URL: ""
KEYS_URL: ""
LLM_GATEWAY_URL: ""
MAESTRO_CONTROL_HOST: "0.0.0.0"
MEMORY_URL: ""
TMPDIR: "/tmp"
XDG_CACHE_HOME: "/tmp/.cache"
56 changes: 56 additions & 0 deletions docs/MODELS.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,62 @@ map injects defaults:
| `groq` | Auto-enables when `GROQ_API_KEY` is present |
| ... | (See `src/models/registry.ts` for the full list) |

## Chinese Model Providers (DeepSeek, Kimi, Qwen, MiniMax, GLM)

Maestro ships built-in support for the major Chinese frontier providers. All of
them expose OpenAI-compatible Chat Completions endpoints, so they use
`api: "openai-completions"` and the standard OpenAI request shape (no custom
`compat` flags required). Reasoning models that stream a `reasoning_content`
field (DeepSeek Reasoner, Kimi Thinking, MiniMax M-series, GLM) surface their
chain-of-thought automatically.

| Provider | `provider` id | Default base URL (international) | China-mainland base URL | API key env |
| --- | --- | --- | --- | --- |
| **DeepSeek** | `deepseek` | `https://api.deepseek.com/v1` | (same) | `DEEPSEEK_API_KEY` |
| **Moonshot (Kimi)** | `moonshot` | `https://api.moonshot.ai/v1` | `https://api.moonshot.cn/v1` | `MOONSHOT_API_KEY` (or `KIMI_API_KEY`) |
| **Alibaba Qwen (DashScope)** | `dashscope` | `https://dashscope-intl.aliyuncs.com/compatible-mode/v1` | `https://dashscope.aliyuncs.com/compatible-mode/v1` | `DASHSCOPE_API_KEY` (or `QWEN_API_KEY`) |
| **MiniMax** | `minimax` | `https://api.minimax.io/v1` | `https://api.minimaxi.com/v1` | `MINIMAX_API_KEY` |
| **Z.ai (Zhipu GLM)** | `zai` | `https://api.z.ai/api/coding/paas/v4` | `https://open.bigmodel.cn/api/paas/v4` | `ZAI_API_KEY` |

Representative built-in models:

- **DeepSeek:** `deepseek-chat` (non-thinking), `deepseek-reasoner` (thinking),
`deepseek-v4-flash`, `deepseek-v4-pro`. `deepseek-chat` / `deepseek-reasoner`
are stable aliases DeepSeek keeps pointed at the latest weights.
- **Moonshot:** `kimi-k2.6`, `kimi-k2.5`, `kimi-k2-thinking`,
`kimi-k2-0905-preview`, `kimi-k2-turbo-preview`, `kimi-latest`,
`moonshot-v1-128k`.
- **Qwen:** `qwen3-max`, `qwen-max`, `qwen-plus`, `qwen-turbo`,
`qwen3-coder-plus`, `qwen3-coder-flash`, `qwq-32b`, `qwen-vl-max`.
- **MiniMax:** `MiniMax-M2`, `MiniMax-M2.5`, `MiniMax-M2.7`, `MiniMax-Text-01`.
- **GLM:** `glm-4.6`, `glm-4.5`, `glm-4.5-air`, `glm-4.5v`, `glm-4.5-flash`.

Usage:

```bash
export DEEPSEEK_API_KEY=sk-...
maestro --model deepseek/deepseek-reasoner

export MOONSHOT_API_KEY=sk-... # KIMI_API_KEY also works
maestro --model moonshot/kimi-k2.6
```

To point a provider at its mainland (or a self-hosted) endpoint without editing
the registry, add an override-only entry in `~/.maestro/config.json`:

```json
{
"providers": [
{ "id": "moonshot", "name": "Moonshot", "baseUrl": "https://api.moonshot.cn/v1" }
]
}
```

The override `baseUrl` is applied to every built-in model for that provider.
Both Moonshot/DeepSeek/MiniMax and GLM additionally offer Anthropic-compatible
endpoints (`/anthropic`); to use those, define a custom provider with
`api: "anthropic-messages"` pointed at that base URL.

## Built-in Overlays (Responses API)

Maestro seeds a few Responses-capable models that aren’t yet emitted by the
Expand Down
32 changes: 26 additions & 6 deletions docs/SAFETY.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,30 @@ providing an extra layer of protection when exploring untrusted code.

### Available Modes

| Mode | Description |
| ------- | ----------------------------------------------------- |
| `none` | No sandbox (default) - tools run directly on the host |
| `local` | Local sandbox - minimal isolation (same as `none`) |
| `docker`| Docker container - full isolation |
| Mode | Description |
| -------- | ----------------------------------------------------- |
| `none` | No sandbox (default) - tools run directly on the host |
| `local` | Local sandbox - minimal isolation (same as `none`) |
| `native` | OS-native sandbox where enforcement is implemented |
| `docker` | Docker container - full isolation |

### Platform Enforcement

| Runtime | Platform | Native enforcement |
| --------------- | -------- | ------------------------------------ |
| TypeScript CLI | macOS | Seatbelt via `/usr/bin/sandbox-exec` |
| TypeScript CLI | Linux | Not enforced; requests fail closed |
| TypeScript CLI | Other | Not supported |
| Rust TUI native | Linux | Landlock + seccomp backend |

If a requested `native` or `docker` sandbox cannot be enforced, Maestro fails
closed instead of silently running with host permissions. To deliberately keep
legacy local/none fallback behavior, pass `allowUnsafeLocalFallback` from code or
set:

```bash
export MAESTRO_ALLOW_UNSANDBOXED_SANDBOX_FALLBACK=1
```

### Enabling Sandbox Mode

Expand Down Expand Up @@ -141,7 +160,8 @@ Requirements:
- Docker must be installed and running
- Current user must have permission to run Docker commands

If Docker is unavailable, Maestro falls back to local mode with a warning.
If Docker is unavailable, Maestro fails closed unless unsafe fallback is
explicitly enabled.

## Best Practices

Expand Down
2 changes: 1 addition & 1 deletion nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"default": {
"runner": "nx/tasks-runners/default",
"options": {
"cacheableOperations": ["build", "test", "lint", "evals"],
"cacheableOperations": ["build", "test", "lint"],
"parallel": true
}
}
Expand Down
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,13 @@
"check:maestro-release-gate-events": "tsx scripts/check-maestro-release-gate-events.ts",
"check:scenario-replay-gate": "node scripts/run-scenario-replay-gate.mjs",
"check:workflow-footguns": "node scripts/check-workflow-footguns.mjs",
"check:test-skip-hygiene": "node scripts/check-test-skip-hygiene.mjs",
"check:test-timing-wait-hygiene": "node scripts/check-test-timing-wait-hygiene.mjs",
"check:codex-parity": "node scripts/check-codex-parity-conformance.mjs",
"check:codex-operating-layer": "node scripts/check-codex-operating-layer-conformance.mjs",
"check:platform-runtime-conformance": "node scripts/check-platform-runtime-conformance.mjs",
"check:release-surface": "node scripts/check-release-surface-conformance.mjs",
"lint:evals": "bun run lint:headless-proto && node scripts/ensure-deps.js --no-install --workspace @evalops/contracts && node scripts/verify-evals.js && node scripts/verify-tool-versions.js && node scripts/validate-system-paths.js && node scripts/validate-package-boundaries.js && node scripts/validate-public-package-deps.js && node scripts/check-public-surface-boundary.mjs && npm run check:context-manifest && npm run check:session-wire-contract && npm run check:cli-runtime-conformance && npm run check:rpc-protocol-conformance && npm run check:evidence-integrity && npm run check:maestro-release-gate-events && npm run check:session-replay-fixtures && npm run check:agent-trajectory-fixtures && npm run check:agent-trajectory-replay-fixtures && npm run check:agent-trajectory-score-fixtures && npm run check:agent-trajectory-inspection-fixtures && npm run check:agent-trajectory-scenario-fixtures && npm run check:slack-teammate-runtime-scenarios && npm run check:scripted-scenario-fixtures && node scripts/session-wire-format-codegen.mjs --check && node scripts/headless-protocol-codegen.mjs --check && npm run check:app-server-schema && npm run check:drift-surfaces && npm run check:staged-rollout && npm run check:workflow-footguns && npm run check:codex-parity && npm run check:codex-operating-layer && npm run check:platform-runtime-conformance && npm run check:release-surface && npm run developer-surface:check",
"lint:evals": "bun run lint:headless-proto && node scripts/ensure-deps.js --no-install --workspace @evalops/contracts && node scripts/verify-evals.js && node scripts/verify-tool-versions.js && node scripts/validate-system-paths.js && node scripts/validate-package-boundaries.js && node scripts/validate-public-package-deps.js && node scripts/check-public-surface-boundary.mjs && npm run check:context-manifest && npm run check:session-wire-contract && npm run check:cli-runtime-conformance && npm run check:rpc-protocol-conformance && npm run check:evidence-integrity && npm run check:maestro-release-gate-events && npm run check:session-replay-fixtures && npm run check:agent-trajectory-fixtures && npm run check:agent-trajectory-replay-fixtures && npm run check:agent-trajectory-score-fixtures && npm run check:agent-trajectory-inspection-fixtures && npm run check:agent-trajectory-scenario-fixtures && npm run check:slack-teammate-runtime-scenarios && npm run check:scripted-scenario-fixtures && node scripts/session-wire-format-codegen.mjs --check && node scripts/headless-protocol-codegen.mjs --check && npm run check:app-server-schema && npm run check:drift-surfaces && npm run check:staged-rollout && npm run check:workflow-footguns && npm run check:test-skip-hygiene && npm run check:test-timing-wait-hygiene && npm run check:codex-parity && npm run check:codex-operating-layer && npm run check:platform-runtime-conformance && npm run check:release-surface && npm run developer-surface:check",
"platform:sdk-smoke": "tsx scripts/check-platform-sdk-contract.ts",
"platform:agentruntime-e2e": "tsx scripts/smoke-platform-agentruntime-lifecycle.ts",
"platform:timeline-e2e": "tsx scripts/smoke-platform-timeline-e2e.ts",
Expand All @@ -87,6 +89,7 @@
"check:session-wire-format:generated": "node scripts/session-wire-format-codegen.mjs --check",
"generate:headless-proto:buf": "buf generate --template buf.gen.yaml && bunx biome check --write --unsafe packages/contracts/src/proto/maestro/v1/headless_pb.ts",
"test": "node ./scripts/run-vitest.js --run",
"test:integration:capabilities": "node scripts/run-capability-integration-tests.mjs",
"test:coverage": "node ./scripts/run-vitest.js --run --coverage",
"prepublishOnly": "npm run clean && npm run build && npm run verify:runtime-deps",
"bun:install": "bun install",
Expand All @@ -102,6 +105,7 @@
"bun:check": "bun run bun:lint && bunx tsc -p tsconfig.build.json --noEmit",
"bun:compile": "npm run build && bun build ./src/cli.ts --target node --packages external --external tree-sitter --external tree-sitter-bash --define MAESTRO_BUNDLE_RUNTIME=true --compile --outfile dist/maestro-bun",
"bun:compile:bytecode": "npm run build && bun build ./src/cli.ts --target node --packages external --external tree-sitter --external tree-sitter-bash --define MAESTRO_BUNDLE_RUNTIME=true --compile --bytecode --outfile dist/maestro-bun-bytecode",
"build:release-binary": "node scripts/build-release-binary.mjs",
"bun:evals": "bun run build && bun run ./scripts/run-evals.js",
"compile:binary": "npm run bun:compile && echo \"Binary ready at dist/maestro-bun\"",
"cli": "node ./dist/cli.js",
Expand All @@ -128,6 +132,7 @@
"a2a:codex-bridge": "python3 scripts/codex-a2a-bridge.py",
"a2a:peer": "tsx src/cli.ts a2a",
"smoke:headless": "node scripts/smoke-headless.js",
"smoke:release-binary": "node scripts/smoke-release-binary.mjs",
"smoke:exec-replay-e2e": "node scripts/smoke-exec-replay-e2e.js",
"headless:responsiveness": "node scripts/headless-responsiveness-harness.js",
"smoke:pack": "node scripts/smoke-packed-cli.js",
Expand Down
5 changes: 5 additions & 0 deletions packages/ai/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ Shared Maestro AI SDK providing model registry, multi-provider transport, and ag
| **Cerebras** | OpenAI-compatible models | `CEREBRAS_API_KEY` |
| **AWS Bedrock** | Claude via AWS | AWS credentials |
| **Azure OpenAI** | OpenAI-compatible deployments | `AZURE_OPENAI_API_KEY` |
| **DeepSeek** | `deepseek-chat`, `deepseek-reasoner`, V4 | `DEEPSEEK_API_KEY` |
| **Moonshot (Kimi)** | Kimi K2 / K2.5 / K2.6, `moonshot-v1-*` | `MOONSHOT_API_KEY` / `KIMI_API_KEY` |
| **Alibaba Qwen (DashScope)** | `qwen3-max`, `qwen3-coder-plus`, `qwq-32b` | `DASHSCOPE_API_KEY` / `QWEN_API_KEY` |
| **MiniMax** | `MiniMax-M2`, M2.5 / M2.7 | `MINIMAX_API_KEY` |
| **Z.ai (Zhipu GLM)** | GLM-4.5 / GLM-4.6 family | `ZAI_API_KEY` |

## Installation

Expand Down
1 change: 1 addition & 0 deletions packages/ai/tsconfig.build.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
"../../src/training.ts",
"../../src/timeline/**/*.ts",
"../../src/mcp/elicitation.ts",
"../../src/mcp/names.ts",
"../../src/guardian/**/*.ts",
"../../src/lsp/**/*.ts",
"../../src/ide/**/*.ts",
Expand Down
6 changes: 3 additions & 3 deletions packages/control-plane-rs/src/a2a/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ pub(crate) use ledger::{
pub(crate) use native_turn::{run_a2a_native_turn, A2ATurnResult};
pub(crate) use push_notifications::{
a2a_push_authorization_header, a2a_push_ip_is_private, a2a_push_notification_payloads,
apply_platform_a2a_artifact_update, apply_platform_a2a_status_update,
handle_platform_a2a_push_endpoint, is_platform_a2a_push_endpoint,
normalize_a2a_push_notification_config,
a2a_push_select_pinned_addr, apply_platform_a2a_artifact_update,
apply_platform_a2a_status_update, handle_platform_a2a_push_endpoint,
is_platform_a2a_push_endpoint, normalize_a2a_push_notification_config,
};
pub(crate) use tasks::{
a2a_agent_message, a2a_context_id, a2a_return_immediately, a2a_task_is_terminal,
Expand Down
Loading
Loading