Metadata-Version: 2.4
Name: iabee
Version: 0.1.1
Summary: IABEE: AI CLI coding agent with LLM, tool-use loop, MCP bridge, sessions, streaming output, and secure runtime controls.
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
Classifier: License :: OSI Approved :: MIT License
Requires-Python: >=3.8
Description-Content-Type: text/markdown

# IABEE (Python Package)

IABEE is a AI CLI coding agent framework.\
It supports real LLM calls, tool-use loops, MCP bridge, session persistence, streaming outputs, and security-focused runtime controls.

## Implemented Features

- CLI entry and modes
  - `text` / `json` / `stream-json` output
  - session list and resume (`--list-sessions`, `--resume`)
- Command layer
  - `/help`, `/files`, `/mcp-tools`
  - command disable rules (`--disabled-commands`)
- Tool layer
  - local tools: `FileRead`, `FileWrite`, `Glob`, `Grep`
  - MCP tools discovery and invocation
  - allow/deny filters (`--allowed-tools`, `--disallowed-tools`)
- LLM integration (OpenAI-compatible API)
  - providers for `qwen`, `kimi`, `minimax`
  - dynamic model/base-url/api-key-env/api-key runtime settings
  - configurable timeout/retry/backoff/max-tokens
  - multi-step tool-use loop (`tool_calls -> tool_result -> follow-up`)
- Context and prompt assembly
  - system prompt composition with project file sampling
  - extra system prompt injection (`--llm-system-prompt`)
- Long conversation controls
  - conversation window compression by message count and serialized size
  - configurable limits (`--convo-max-messages`, `--convo-max-chars`)
- Tool safety and reliability
  - tool call budget and circuit breaker
  - configurable thresholds (`--tool-call-budget`, `--tool-error-threshold`)
  - tool result truncation before feeding back to LLM (`tool_result_max_chars`)
- Security controls
  - settings sanitizer removes secret-like keys
  - subprocess environment whitelist for MCP/Rust calls
  - error masking to prevent key leakage
- Auditing
  - per-session tool audit logs under `.iabee/audit/*.jsonl`
  - records sanitized inputs, key result summary, and duration

## Quick Start

```bash
iabee "分析这个项目并给出改造建议" \
  --llm-provider qwen \
  --llm-model qwen-plus \
  --llm-api-key-env DASHSCOPE_API_KEY \
  --llm-max-steps 6 \
  --tool-call-budget 8 \
  --tool-error-threshold 3 \
  --convo-max-messages 16 \
  --convo-max-chars 10000 \
  --output-format stream-json
```

## Dynamic LLM Configuration

- Provider/model/base URL:
  - `--llm-provider`, `--llm-model`, `--llm-api-base`
- Secret (recommended):
  - `--llm-api-key-env <ENV_NAME>`
- Secret (runtime direct, less safe):
  - `--llm-api-key <SECRET>`
- Reliability:
  - `--llm-timeout-sec`, `--llm-retry`, `--llm-retry-backoff-ms`, `--llm-max-tokens`

## MCP / Tool Usage

```bash
iabee "/mcp-tools" --output-format json
iabee "/mcp-call local echo {\"msg\":\"hello\"}" --output-format stream-json
iabee "/read src/iabee/main.py" --output-format stream-json
```

## Session Usage

```bash
iabee --list-sessions
iabee --resume <session_id> --output-format text
```

