anycode-py 0.6.0__tar.gz → 0.7.0__tar.gz
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.
- {anycode_py-0.6.0 → anycode_py-0.7.0}/.gitignore +1 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/CHANGELOG.md +17 -1
- {anycode_py-0.6.0 → anycode_py-0.7.0}/PKG-INFO +44 -16
- {anycode_py-0.6.0 → anycode_py-0.7.0}/README.md +16 -13
- {anycode_py-0.6.0 → anycode_py-0.7.0}/pyproject.toml +38 -3
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/__init__.py +60 -4
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/checkpoint/__init__.py +2 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/checkpoint/manager.py +4 -1
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/checkpoint/serializer.py +24 -2
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/checkpoint/store.py +6 -4
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/cli/commands/harness.py +4 -6
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/cli/commands/init.py +1 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/cli/commands/run.py +7 -7
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/cli/commands/runs.py +15 -1
- anycode_py-0.7.0/src/anycode/config/__init__.py +6 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/config/loader.py +101 -13
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/config/validator.py +3 -2
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/constants.py +12 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/core/agent.py +30 -9
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/core/context_artifacts.py +4 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/core/context_manager.py +12 -1
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/core/orchestrator.py +172 -57
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/core/pool.py +40 -12
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/core/runner.py +174 -73
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/core/session_chain.py +13 -5
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/core/stop_reason.py +4 -0
- anycode_py-0.7.0/src/anycode/core/streaming.py +94 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/eval/report.py +9 -3
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/eval/suite.py +2 -1
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/harness/distill.py +3 -22
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/harness/evidence.py +4 -3
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/harness/evolution/loop.py +4 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/harness/evolution/manifest.py +6 -2
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/harness/manifest.py +5 -2
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/harness/meta/report.py +10 -5
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/helpers/concurrency_gate.py +4 -2
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/hitl/channels.py +2 -1
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/mcp/bridge.py +1 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/mcp/client.py +63 -22
- anycode_py-0.7.0/src/anycode/mcp/config.py +66 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/memory/chromadb_store.py +13 -3
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/memory/factory.py +6 -3
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/memory/knowledge.py +9 -1
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/memory/redis_store.py +6 -2
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/memory/sqlite_store.py +7 -3
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/plugins/discovery.py +16 -5
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/plugins/registry.py +25 -23
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/providers/_openai_compat.py +33 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/providers/anthropic.py +58 -3
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/providers/azure.py +17 -9
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/providers/bedrock.py +14 -1
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/providers/fake.py +22 -1
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/providers/google.py +2 -1
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/providers/ollama.py +2 -1
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/providers/openai.py +24 -11
- anycode_py-0.7.0/src/anycode/providers/resilience.py +346 -0
- anycode_py-0.7.0/src/anycode/runstore/__init__.py +12 -0
- anycode_py-0.7.0/src/anycode/runstore/protocol.py +64 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/runstore/store.py +135 -11
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/schedule/scheduler.py +12 -5
- anycode_py-0.7.0/src/anycode/security/__init__.py +22 -0
- anycode_py-0.7.0/src/anycode/security/policy.py +87 -0
- anycode_py-0.7.0/src/anycode/security/redaction.py +91 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/structured/output.py +3 -1
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/telemetry/__init__.py +2 -1
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/telemetry/events.py +27 -6
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/telemetry/metrics.py +49 -4
- anycode_py-0.7.0/src/anycode/telemetry/tracer.py +461 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/tools/__init__.py +12 -0
- anycode_py-0.7.0/src/anycode/tools/_fsutil.py +31 -0
- anycode_py-0.7.0/src/anycode/tools/bash.py +171 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/tools/built_in.py +2 -1
- anycode_py-0.7.0/src/anycode/tools/executor.py +172 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/tools/file_edit.py +12 -5
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/tools/file_read.py +8 -3
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/tools/file_write.py +11 -9
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/tools/grep.py +27 -11
- anycode_py-0.7.0/src/anycode/tools/idempotency.py +271 -0
- anycode_py-0.7.0/src/anycode/tools/list_files.py +139 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/tools/registry.py +10 -1
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/types.py +169 -29
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/verification/builtins.py +2 -1
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/verification/sensor.py +2 -1
- anycode_py-0.6.0/src/anycode/config/__init__.py +0 -6
- anycode_py-0.6.0/src/anycode/mcp/config.py +0 -28
- anycode_py-0.6.0/src/anycode/providers/resilience.py +0 -190
- anycode_py-0.6.0/src/anycode/runstore/__init__.py +0 -5
- anycode_py-0.6.0/src/anycode/telemetry/tracer.py +0 -240
- anycode_py-0.6.0/src/anycode/tools/bash.py +0 -71
- anycode_py-0.6.0/src/anycode/tools/executor.py +0 -80
- {anycode_py-0.6.0 → anycode_py-0.7.0}/LICENSE +0 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/cli/__init__.py +0 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/cli/commands/__init__.py +0 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/cli/commands/eval.py +0 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/cli/commands/inspect.py +0 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/cli/commands/version.py +0 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/cli/main.py +0 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/collaboration/__init__.py +0 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/collaboration/kv_store.py +0 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/collaboration/message_bus.py +0 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/collaboration/shared_mem.py +0 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/collaboration/team.py +0 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/context/__init__.py +0 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/context/profiles.py +0 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/context/reporting.py +0 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/context/tokenizer.py +0 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/core/__init__.py +0 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/core/lifecycle.py +0 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/core/scheduler.py +0 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/cost/__init__.py +0 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/cost/pricing.py +0 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/cost/report.py +0 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/cost/tracker.py +0 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/eval/__init__.py +0 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/eval/scenario.py +0 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/eval/scorer.py +0 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/guardrails/__init__.py +0 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/guardrails/budget.py +0 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/guardrails/hooks.py +0 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/guardrails/validators.py +0 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/handoff/__init__.py +0 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/handoff/executor.py +0 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/handoff/protocol.py +0 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/handoff/tool.py +0 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/harness/__init__.py +0 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/harness/component.py +0 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/harness/evolution/__init__.py +0 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/harness/evolution/acceptance.py +0 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/harness/evolution/workspace.py +0 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/harness/failure_taxonomy.py +0 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/harness/meta/__init__.py +0 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/harness/meta/blueprint.py +0 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/harness/meta/optimizer.py +0 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/harness/registry.py +0 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/helpers/__init__.py +0 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/helpers/usage_tracker.py +0 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/helpers/uuid7.py +0 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/hitl/__init__.py +0 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/hitl/approval.py +0 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/hitl/review.py +0 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/mcp/__init__.py +0 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/memory/__init__.py +0 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/memory/composite.py +0 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/memory/indexer.py +0 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/memory/rag.py +0 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/memory/vector_store.py +0 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/plugins/__init__.py +0 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/plugins/plugin.py +0 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/providers/__init__.py +0 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/providers/adapter.py +0 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/reflection/__init__.py +0 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/reflection/critic.py +0 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/reflection/evaluator.py +0 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/reflection/loop.py +0 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/routing/__init__.py +0 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/routing/classifier.py +0 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/routing/router.py +0 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/routing/rules.py +0 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/schedule/__init__.py +0 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/schedule/tasks.py +0 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/structured/__init__.py +0 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/tasks/__init__.py +0 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/tasks/queue.py +0 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/tasks/task.py +0 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/verification/__init__.py +0 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/verification/gate.py +0 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/verification/registry.py +0 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/viz/__init__.py +0 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/viz/dag.py +0 -0
- {anycode_py-0.6.0 → anycode_py-0.7.0}/src/anycode/viz/timeline.py +0 -0
|
@@ -7,6 +7,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.7.0] - 2026-07-11
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- **MCP, plugin, and tool trust hardening** - agent tool allowlists are now enforced again at execution, including an explicit empty list, so a provider cannot invoke an unadvertised registered tool. MCP tools require exact per-agent server opt-in, remain bound to discovery ownership across prebuilt agents and reconnects, always use side-effect idempotency, fail closed when configured auth is missing, and clean up partial initialization without masking cancellation. Plugin entry points are filtered before import and plugin contributions are preflighted before shared registry mutation. The security threat model and production-readiness checklist define the remaining host, network, identity, storage, and operational responsibilities.
|
|
15
|
+
- **Cross-platform compatibility CI** - pull requests and `main` now run the complete non-integration suite on Linux, Windows, and macOS across Python 3.12 and 3.13. Separate jobs enforce locked quality checks, core-only and per-extra dependency isolation, Redis/ChromaDB integration coverage, and built wheel smoke tests for both core and CLI installations. Repository tests keep the optional-extra matrix synchronized with package metadata.
|
|
16
|
+
- **Enforced compatibility contracts** - the complete v0.6 top-level Python API now has an additive CI baseline, and duplicate public declarations fail tests. Declarative YAML/TOML files use format v1, preserve unversioned v1 compatibility, and reject future versions with `UnsupportedConfigVersionError`. The compatibility reference defines public import boundaries, semantic-version rules, checkpoint and durable-run reader ranges, plus upgrade and rollback procedures.
|
|
17
|
+
- **Operational observability** - agent runs now share durable run/trace correlation across turn, LLM, tool, and terminal spans, with task-local async parenting and deterministic per-trace sampling. Completed spans automatically feed bounded latency, first-token, token, estimated-cost, retry, outcome, and error metrics plus redacted structured events. The new `jsonl` exporter emits one correlated completion record per sampled span for container log collectors; OTLP spans preserve runtime timing, carry explicit AnyCode correlation attributes, and expose flush/shutdown lifecycle controls. Configurable span/event/series/histogram retention prevents long-lived telemetry growth and exposes drop counters, while exporter failures remain isolated from run behavior.
|
|
18
|
+
- **End-to-end cancellation ownership** — caller cancellation now propagates through `AgentRunner`, high-level run and stream APIs, orchestrator waves, provider waits, parallel tools, and shell process trees without being converted into an ordinary result. Agents settle in an explicit `cancelled` state, durable runs persist a `user_cancelled` stop and checkpoint, semaphore accounting remains balanced, and `AnyCode.close()` cancels and awaits all tracked standalone, coordinator, team, reflection, and handoff operations before resource teardown.
|
|
19
|
+
- **Fail-closed side-effect idempotency** — tools can opt into atomic claim-before-execute semantics with `side_effecting=True`. Explicit business keys take precedence over deterministic run/turn/call fallbacks; completed calls replay, mismatched input conflicts, and in-progress or unrecorded outcomes terminate the run with `side_effect_unknown` instead of being retried. Post-invocation errors default to non-retryable unless the tool explicitly proves otherwise, and uncertain claims are retained during pruning for operator reconciliation. Public in-memory and SQLite stores support process-local or restart-safe coordination, hashed storage keys, redacted result persistence, and pruning. Mutating built-ins and every discovered MCP tool are protected by default.
|
|
20
|
+
- **Provider capacity controls** — `ResilientAdapter` now applies a provider-scoped concurrency bulkhead (default `8`) and optional evenly paced `requests_per_minute` limit to chat and streaming attempts, including retries. Capacity is shared across adapters in the same event loop and scope; conflicting limits for one scope fail clearly. Queue waits load-shed with `ProviderCapacityError` after a configurable timeout, while cancellation and early stream closure release slots immediately. `ProviderResilienceConfig` is configurable globally through `OrchestratorConfig`/YAML or per `AgentConfig`, with per-agent precedence.
|
|
21
|
+
- **Protected and bounded durable storage** — `AgentRunner` and `RunScheduler` now accept the public `RunStore` protocol so production backends can replace the local filesystem implementation. `FilesystemRunStore` accepts a `RunPayloadProtector` for versioned, fail-closed protected payload envelopes while retaining read compatibility with legacy plaintext stores. Run records, transcript events, and turn checkpoints now carry an explicit schema version; legacy unversioned artifacts remain readable and unsupported future versions fail clearly. Workflow checkpoints now default correctly to format v2 while retaining v1 compatibility. `RunRetentionPolicy` prunes only terminal runs by age and count, and can be applied through `sweep_once`, `RunScheduler`, or `anycode runs sweep`. Run IDs are constrained to one path segment to prevent storage-root traversal.
|
|
22
|
+
- **Default-on credential redaction** — centralized `redact_text`, `redact_sensitive`, and `safe_exception_message` helpers now protect built-in telemetry exports, exception surfaces, workflow and turn checkpoints, run records and transcripts, context artifacts, session-chain files, persistent memory backends, eval reports, and harness artifacts. Structured sensitive keys and common provider/cloud token formats are replaced with `<redacted-secret>` while token-usage metrics and other non-secret fields retain their shape. Persistence and exporter configs expose explicit `redact_sensitive_data=False` opt-outs for independently protected stores that require exact replay.
|
|
23
|
+
|
|
10
24
|
## [0.6.0] - 2026-07-10
|
|
11
25
|
|
|
12
26
|
### Added
|
|
@@ -33,6 +47,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
33
47
|
|
|
34
48
|
### Changed
|
|
35
49
|
|
|
50
|
+
- Declarative config loading now rejects unknown root, agent, task, context-engineering, and nested model fields with `UnknownConfigFieldError` instead of silently ignoring them. Programmatic model construction is unchanged.
|
|
36
51
|
- **Handoff sentinel encoding** — the built-in `handoff` tool now encodes its payload as `__HANDOFF__:<json>` instead of a colon-delimited string. Free-form `summary`/`reason` text containing `:` (or any other character) now round-trips losslessly through `AgentRunner._detect_handoff`. New helpers `encode_handoff_payload`/`decode_handoff_payload` are exported from `anycode.handoff.tool`.
|
|
37
52
|
- **`AgentState`** uses `Field(default_factory=...)` for `messages` and `token_usage` to guarantee per-instance defaults.
|
|
38
53
|
- **`AgentRunner.stream` handoff path** now appends every executed `ToolCallRecord` from the same batch and emits a `tool_result` event for each before yielding the `handoff`/`done` events. Previously, sibling tool calls executed alongside a handoff were dropped from `RunResult.tool_calls` and never streamed to observers.
|
|
@@ -196,7 +211,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
196
211
|
- Four examples: solo worker, crew workflow, staged pipeline, hybrid tooling.
|
|
197
212
|
- Pydantic-based immutable type system (`frozen=True` on all models).
|
|
198
213
|
|
|
199
|
-
[Unreleased]: https://github.com/Quantlix/anycode/compare/v0.
|
|
214
|
+
[Unreleased]: https://github.com/Quantlix/anycode/compare/v0.7.0...HEAD
|
|
215
|
+
[0.7.0]: https://github.com/Quantlix/anycode/compare/v0.6.0...v0.7.0
|
|
200
216
|
[0.6.0]: https://github.com/Quantlix/anycode/compare/v0.5.0...v0.6.0
|
|
201
217
|
[0.5.0]: https://github.com/Quantlix/anycode/compare/v0.4.0...v0.5.0
|
|
202
218
|
[0.4.0]: https://github.com/Quantlix/anycode/compare/v0.3.0...v0.4.0
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: anycode-py
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.7.0
|
|
4
4
|
Summary: Orchestrate autonomous AI agent teams with dependency-aware task scheduling, inter-agent messaging, and provider-agnostic LLM integration.
|
|
5
5
|
Project-URL: Homepage, https://github.com/Quantlix/anycode
|
|
6
6
|
Project-URL: Repository, https://github.com/Quantlix/anycode
|
|
@@ -18,10 +18,27 @@ Classifier: Programming Language :: Python :: 3.13
|
|
|
18
18
|
Classifier: Topic :: Software Development :: Libraries
|
|
19
19
|
Classifier: Typing :: Typed
|
|
20
20
|
Requires-Python: >=3.12
|
|
21
|
-
Requires-Dist: anthropic>=0.40
|
|
22
|
-
Requires-Dist: openai>=1.50
|
|
23
21
|
Requires-Dist: pydantic>=2.0
|
|
24
22
|
Requires-Dist: python-dotenv>=1.2.2
|
|
23
|
+
Provides-Extra: all
|
|
24
|
+
Requires-Dist: aiosqlite>=0.20; extra == 'all'
|
|
25
|
+
Requires-Dist: anthropic>=0.40; extra == 'all'
|
|
26
|
+
Requires-Dist: boto3>=1.34; extra == 'all'
|
|
27
|
+
Requires-Dist: chromadb>=0.5; extra == 'all'
|
|
28
|
+
Requires-Dist: google-genai>=1.0; extra == 'all'
|
|
29
|
+
Requires-Dist: httpx>=0.27; extra == 'all'
|
|
30
|
+
Requires-Dist: mcp>=1.0; extra == 'all'
|
|
31
|
+
Requires-Dist: openai>=1.50; extra == 'all'
|
|
32
|
+
Requires-Dist: opentelemetry-api>=1.20; extra == 'all'
|
|
33
|
+
Requires-Dist: opentelemetry-exporter-otlp-proto-grpc>=1.20; extra == 'all'
|
|
34
|
+
Requires-Dist: opentelemetry-sdk>=1.20; extra == 'all'
|
|
35
|
+
Requires-Dist: pyyaml>=6.0; extra == 'all'
|
|
36
|
+
Requires-Dist: redis[hiredis]>=5.0; extra == 'all'
|
|
37
|
+
Requires-Dist: rich>=13.0; extra == 'all'
|
|
38
|
+
Requires-Dist: tiktoken>=0.8; extra == 'all'
|
|
39
|
+
Requires-Dist: typer>=0.12; extra == 'all'
|
|
40
|
+
Provides-Extra: anthropic
|
|
41
|
+
Requires-Dist: anthropic>=0.40; extra == 'anthropic'
|
|
25
42
|
Provides-Extra: azure
|
|
26
43
|
Requires-Dist: openai>=1.50; extra == 'azure'
|
|
27
44
|
Provides-Extra: bedrock
|
|
@@ -36,8 +53,16 @@ Provides-Extra: mcp
|
|
|
36
53
|
Requires-Dist: mcp>=1.0; extra == 'mcp'
|
|
37
54
|
Provides-Extra: ollama
|
|
38
55
|
Requires-Dist: httpx>=0.27; extra == 'ollama'
|
|
56
|
+
Provides-Extra: openai
|
|
57
|
+
Requires-Dist: openai>=1.50; extra == 'openai'
|
|
39
58
|
Provides-Extra: persistence
|
|
40
59
|
Requires-Dist: aiosqlite>=0.20; extra == 'persistence'
|
|
60
|
+
Provides-Extra: providers
|
|
61
|
+
Requires-Dist: anthropic>=0.40; extra == 'providers'
|
|
62
|
+
Requires-Dist: boto3>=1.34; extra == 'providers'
|
|
63
|
+
Requires-Dist: google-genai>=1.0; extra == 'providers'
|
|
64
|
+
Requires-Dist: httpx>=0.27; extra == 'providers'
|
|
65
|
+
Requires-Dist: openai>=1.50; extra == 'providers'
|
|
41
66
|
Provides-Extra: redis
|
|
42
67
|
Requires-Dist: redis[hiredis]>=5.0; extra == 'redis'
|
|
43
68
|
Provides-Extra: telemetry
|
|
@@ -64,7 +89,7 @@ Description-Content-Type: text/markdown
|
|
|
64
89
|
|
|
65
90
|
> Developed and maintained by [Quantlix](https://github.com/Quantlix).
|
|
66
91
|
|
|
67
|
-
> **
|
|
92
|
+
> **Alpha status and production boundary:** AnyCode is under active development. Supported top-level APIs and persisted formats have explicit compatibility contracts, but pre-1.0 minor releases may require migration. Production use is workload-specific: bounded deployments are eligible only after the [production readiness checklist](https://quantlix.github.io/anycode/latest/guides/production-readiness/) passes and the operator supplies host and network isolation, identity, durable storage, secrets management, monitoring, and incident controls. Direct safety-critical, critical-infrastructure, or unrestricted irreversible use is a no-go.
|
|
68
93
|
|
|
69
94
|
AnyCode is a Python framework for building coordinated AI agent teams. It helps developers compose autonomous LLM agents, connect them to typed tools, schedule dependent tasks, share memory, stream output, route work across providers, and inspect long-running agent workflows with explicit lifecycle and verification data.
|
|
70
95
|
|
|
@@ -82,7 +107,7 @@ The framework focuses on practical harness engineering:
|
|
|
82
107
|
- Pydantic-validated tool calls and immutable runtime models.
|
|
83
108
|
- Observability, guardrails, structured output, checkpointing, HITL approval, MCP tools, routing, cost tracking, RAG memory, and verification gates.
|
|
84
109
|
|
|
85
|
-
AnyCode is built for experimentation, evaluation, local development, research prototypes, and
|
|
110
|
+
AnyCode is built for experimentation, evaluation, local development, research prototypes, and bounded automation. A pinned deployment can be eligible for production when its workload-specific controls and evidence pass the readiness review; the package alone is not a production guarantee.
|
|
86
111
|
|
|
87
112
|
## Current Package
|
|
88
113
|
|
|
@@ -90,7 +115,7 @@ AnyCode is built for experimentation, evaluation, local development, research pr
|
|
|
90
115
|
| --- | --- |
|
|
91
116
|
| Distribution | `anycode-py` |
|
|
92
117
|
| Import package | `anycode` |
|
|
93
|
-
| Current version | `0.
|
|
118
|
+
| Current version | `0.7.0` |
|
|
94
119
|
| Python | `>=3.12` |
|
|
95
120
|
| Project status | Alpha |
|
|
96
121
|
| License | MIT |
|
|
@@ -162,7 +187,7 @@ The main design rule is simple: the framework owns the harness, while providers
|
|
|
162
187
|
For a new or existing Python project:
|
|
163
188
|
|
|
164
189
|
```bash
|
|
165
|
-
uv add anycode-py
|
|
190
|
+
uv add "anycode-py[anthropic]"
|
|
166
191
|
```
|
|
167
192
|
|
|
168
193
|
For CLI and YAML/TOML configuration support:
|
|
@@ -174,7 +199,7 @@ uv add "anycode-py[cli]"
|
|
|
174
199
|
For the full optional ecosystem:
|
|
175
200
|
|
|
176
201
|
```bash
|
|
177
|
-
uv add "anycode-py[
|
|
202
|
+
uv add "anycode-py[all]"
|
|
178
203
|
```
|
|
179
204
|
|
|
180
205
|
### 3. Add API Keys
|
|
@@ -437,7 +462,7 @@ Custom tools use Pydantic input models and are registered through `define_tool()
|
|
|
437
462
|
|
|
438
463
|
## Examples Cookbook
|
|
439
464
|
|
|
440
|
-
The `examples/` directory contains
|
|
465
|
+
The `examples/` directory contains 34 runnable scripts. They are arranged from beginner workflows to runtime reliability demos.
|
|
441
466
|
|
|
442
467
|
| Examples | Theme |
|
|
443
468
|
| --- | --- |
|
|
@@ -450,6 +475,8 @@ The `examples/` directory contains 26 runnable scripts. They are arranged from b
|
|
|
450
475
|
| `22_deterministic_eval.py` to `25_runtime_cancellation.py` | Fake adapters, context pressure, verification gates, and cancellation telemetry |
|
|
451
476
|
| `26_context_engineering.py` | Huge-context model profiles, section budgets, first-class section inputs, and usage reports |
|
|
452
477
|
| `27_plugin_ecosystem.py` | Plugin bundles wiring custom tools, provider factories, and sensors into the engine |
|
|
478
|
+
| `28_durable_runs.py` to `30_scheduled_wakeups.py` | Durable resumable runs, session chaining, and scheduled wakeups |
|
|
479
|
+
| `31_streaming_runtime.py` to `34_list_files.py` | Provider-token streaming, reasoning-model controls, authenticated MCP over HTTP, and fast file listing |
|
|
453
480
|
|
|
454
481
|
Run an example from the repository root:
|
|
455
482
|
|
|
@@ -484,20 +511,21 @@ The default pytest configuration excludes integration tests. Integration tests m
|
|
|
484
511
|
|
|
485
512
|
AnyCode agents can be connected to tools that read files, write files, execute commands, call providers, and access external systems through MCP. Treat every tool-enabled agent as a privileged automation process.
|
|
486
513
|
|
|
487
|
-
|
|
514
|
+
Required safeguards for any deployment:
|
|
488
515
|
|
|
489
|
-
- Run agents
|
|
490
|
-
-
|
|
516
|
+
- Run tool-enabled agents as a non-root identity inside a container, VM, or equivalent isolation boundary.
|
|
517
|
+
- Set explicit agent tool lists and apply `ToolSecurityPolicy` with narrow path, shell, and environment access.
|
|
491
518
|
- Use fake adapters or deterministic evaluation before live model calls.
|
|
492
|
-
-
|
|
493
|
-
-
|
|
494
|
-
-
|
|
519
|
+
- Inject API keys from a protected secret source and keep them out of prompts, source, images, and logs.
|
|
520
|
+
- Use durable idempotency plus human approval for sensitive or irreversible actions.
|
|
521
|
+
- Allowlist production plugins and MCP endpoints, then enforce network egress outside the framework.
|
|
522
|
+
- Review the [security and threat model](https://quantlix.github.io/anycode/latest/reference/security/) and complete the [production readiness checklist](https://quantlix.github.io/anycode/latest/guides/production-readiness/).
|
|
495
523
|
|
|
496
524
|
## FAQ
|
|
497
525
|
|
|
498
526
|
### Is AnyCode production ready?
|
|
499
527
|
|
|
500
|
-
|
|
528
|
+
Production readiness is workload-specific. AnyCode remains alpha, but a pinned release can support bounded, reversible, operator-monitored workloads when every mandatory readiness control passes. Customer-facing, multi-tenant, sensitive-data, or irreversible workflows require stronger application-owned isolation, authorization, storage, and operations. Direct safety-critical control, critical infrastructure control, and autonomous high-impact decisions are no-go uses for AnyCode as the sole decision or control system.
|
|
501
529
|
|
|
502
530
|
### What makes AnyCode different from a single-agent loop?
|
|
503
531
|
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
> Developed and maintained by [Quantlix](https://github.com/Quantlix).
|
|
14
14
|
|
|
15
|
-
> **
|
|
15
|
+
> **Alpha status and production boundary:** AnyCode is under active development. Supported top-level APIs and persisted formats have explicit compatibility contracts, but pre-1.0 minor releases may require migration. Production use is workload-specific: bounded deployments are eligible only after the [production readiness checklist](https://quantlix.github.io/anycode/latest/guides/production-readiness/) passes and the operator supplies host and network isolation, identity, durable storage, secrets management, monitoring, and incident controls. Direct safety-critical, critical-infrastructure, or unrestricted irreversible use is a no-go.
|
|
16
16
|
|
|
17
17
|
AnyCode is a Python framework for building coordinated AI agent teams. It helps developers compose autonomous LLM agents, connect them to typed tools, schedule dependent tasks, share memory, stream output, route work across providers, and inspect long-running agent workflows with explicit lifecycle and verification data.
|
|
18
18
|
|
|
@@ -30,7 +30,7 @@ The framework focuses on practical harness engineering:
|
|
|
30
30
|
- Pydantic-validated tool calls and immutable runtime models.
|
|
31
31
|
- Observability, guardrails, structured output, checkpointing, HITL approval, MCP tools, routing, cost tracking, RAG memory, and verification gates.
|
|
32
32
|
|
|
33
|
-
AnyCode is built for experimentation, evaluation, local development, research prototypes, and
|
|
33
|
+
AnyCode is built for experimentation, evaluation, local development, research prototypes, and bounded automation. A pinned deployment can be eligible for production when its workload-specific controls and evidence pass the readiness review; the package alone is not a production guarantee.
|
|
34
34
|
|
|
35
35
|
## Current Package
|
|
36
36
|
|
|
@@ -38,7 +38,7 @@ AnyCode is built for experimentation, evaluation, local development, research pr
|
|
|
38
38
|
| --- | --- |
|
|
39
39
|
| Distribution | `anycode-py` |
|
|
40
40
|
| Import package | `anycode` |
|
|
41
|
-
| Current version | `0.
|
|
41
|
+
| Current version | `0.7.0` |
|
|
42
42
|
| Python | `>=3.12` |
|
|
43
43
|
| Project status | Alpha |
|
|
44
44
|
| License | MIT |
|
|
@@ -110,7 +110,7 @@ The main design rule is simple: the framework owns the harness, while providers
|
|
|
110
110
|
For a new or existing Python project:
|
|
111
111
|
|
|
112
112
|
```bash
|
|
113
|
-
uv add anycode-py
|
|
113
|
+
uv add "anycode-py[anthropic]"
|
|
114
114
|
```
|
|
115
115
|
|
|
116
116
|
For CLI and YAML/TOML configuration support:
|
|
@@ -122,7 +122,7 @@ uv add "anycode-py[cli]"
|
|
|
122
122
|
For the full optional ecosystem:
|
|
123
123
|
|
|
124
124
|
```bash
|
|
125
|
-
uv add "anycode-py[
|
|
125
|
+
uv add "anycode-py[all]"
|
|
126
126
|
```
|
|
127
127
|
|
|
128
128
|
### 3. Add API Keys
|
|
@@ -385,7 +385,7 @@ Custom tools use Pydantic input models and are registered through `define_tool()
|
|
|
385
385
|
|
|
386
386
|
## Examples Cookbook
|
|
387
387
|
|
|
388
|
-
The `examples/` directory contains
|
|
388
|
+
The `examples/` directory contains 34 runnable scripts. They are arranged from beginner workflows to runtime reliability demos.
|
|
389
389
|
|
|
390
390
|
| Examples | Theme |
|
|
391
391
|
| --- | --- |
|
|
@@ -398,6 +398,8 @@ The `examples/` directory contains 26 runnable scripts. They are arranged from b
|
|
|
398
398
|
| `22_deterministic_eval.py` to `25_runtime_cancellation.py` | Fake adapters, context pressure, verification gates, and cancellation telemetry |
|
|
399
399
|
| `26_context_engineering.py` | Huge-context model profiles, section budgets, first-class section inputs, and usage reports |
|
|
400
400
|
| `27_plugin_ecosystem.py` | Plugin bundles wiring custom tools, provider factories, and sensors into the engine |
|
|
401
|
+
| `28_durable_runs.py` to `30_scheduled_wakeups.py` | Durable resumable runs, session chaining, and scheduled wakeups |
|
|
402
|
+
| `31_streaming_runtime.py` to `34_list_files.py` | Provider-token streaming, reasoning-model controls, authenticated MCP over HTTP, and fast file listing |
|
|
401
403
|
|
|
402
404
|
Run an example from the repository root:
|
|
403
405
|
|
|
@@ -432,20 +434,21 @@ The default pytest configuration excludes integration tests. Integration tests m
|
|
|
432
434
|
|
|
433
435
|
AnyCode agents can be connected to tools that read files, write files, execute commands, call providers, and access external systems through MCP. Treat every tool-enabled agent as a privileged automation process.
|
|
434
436
|
|
|
435
|
-
|
|
437
|
+
Required safeguards for any deployment:
|
|
436
438
|
|
|
437
|
-
- Run agents
|
|
438
|
-
-
|
|
439
|
+
- Run tool-enabled agents as a non-root identity inside a container, VM, or equivalent isolation boundary.
|
|
440
|
+
- Set explicit agent tool lists and apply `ToolSecurityPolicy` with narrow path, shell, and environment access.
|
|
439
441
|
- Use fake adapters or deterministic evaluation before live model calls.
|
|
440
|
-
-
|
|
441
|
-
-
|
|
442
|
-
-
|
|
442
|
+
- Inject API keys from a protected secret source and keep them out of prompts, source, images, and logs.
|
|
443
|
+
- Use durable idempotency plus human approval for sensitive or irreversible actions.
|
|
444
|
+
- Allowlist production plugins and MCP endpoints, then enforce network egress outside the framework.
|
|
445
|
+
- Review the [security and threat model](https://quantlix.github.io/anycode/latest/reference/security/) and complete the [production readiness checklist](https://quantlix.github.io/anycode/latest/guides/production-readiness/).
|
|
443
446
|
|
|
444
447
|
## FAQ
|
|
445
448
|
|
|
446
449
|
### Is AnyCode production ready?
|
|
447
450
|
|
|
448
|
-
|
|
451
|
+
Production readiness is workload-specific. AnyCode remains alpha, but a pinned release can support bounded, reversible, operator-monitored workloads when every mandatory readiness control passes. Customer-facing, multi-tenant, sensitive-data, or irreversible workflows require stronger application-owned isolation, authorization, storage, and operations. Direct safety-critical control, critical infrastructure control, and autonomous high-impact decisions are no-go uses for AnyCode as the sole decision or control system.
|
|
449
452
|
|
|
450
453
|
### What makes AnyCode different from a single-agent loop?
|
|
451
454
|
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "anycode-py"
|
|
7
|
-
version = "0.
|
|
7
|
+
version = "0.7.0"
|
|
8
8
|
description = "Orchestrate autonomous AI agent teams with dependency-aware task scheduling, inter-agent messaging, and provider-agnostic LLM integration."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = "MIT"
|
|
@@ -33,8 +33,6 @@ classifiers = [
|
|
|
33
33
|
]
|
|
34
34
|
dependencies = [
|
|
35
35
|
"pydantic>=2.0",
|
|
36
|
-
"anthropic>=0.40",
|
|
37
|
-
"openai>=1.50",
|
|
38
36
|
"python-dotenv>=1.2.2",
|
|
39
37
|
]
|
|
40
38
|
|
|
@@ -48,6 +46,12 @@ Changelog = "https://github.com/Quantlix/anycode/blob/main/CHANGELOG.md"
|
|
|
48
46
|
anycode = "anycode.cli.main:app"
|
|
49
47
|
|
|
50
48
|
[project.optional-dependencies]
|
|
49
|
+
anthropic = [
|
|
50
|
+
"anthropic>=0.40",
|
|
51
|
+
]
|
|
52
|
+
openai = [
|
|
53
|
+
"openai>=1.50",
|
|
54
|
+
]
|
|
51
55
|
telemetry = [
|
|
52
56
|
"opentelemetry-api>=1.20",
|
|
53
57
|
"opentelemetry-exporter-otlp-proto-grpc>=1.20",
|
|
@@ -77,6 +81,13 @@ bedrock = [
|
|
|
77
81
|
azure = [
|
|
78
82
|
"openai>=1.50",
|
|
79
83
|
]
|
|
84
|
+
providers = [
|
|
85
|
+
"anthropic>=0.40",
|
|
86
|
+
"openai>=1.50",
|
|
87
|
+
"google-genai>=1.0",
|
|
88
|
+
"httpx>=0.27",
|
|
89
|
+
"boto3>=1.34",
|
|
90
|
+
]
|
|
80
91
|
mcp = [
|
|
81
92
|
"mcp>=1.0",
|
|
82
93
|
]
|
|
@@ -85,9 +96,29 @@ cli = [
|
|
|
85
96
|
"rich>=13.0",
|
|
86
97
|
"pyyaml>=6.0",
|
|
87
98
|
]
|
|
99
|
+
all = [
|
|
100
|
+
"anthropic>=0.40",
|
|
101
|
+
"openai>=1.50",
|
|
102
|
+
"google-genai>=1.0",
|
|
103
|
+
"httpx>=0.27",
|
|
104
|
+
"boto3>=1.34",
|
|
105
|
+
"opentelemetry-api>=1.20",
|
|
106
|
+
"opentelemetry-exporter-otlp-proto-grpc>=1.20",
|
|
107
|
+
"opentelemetry-sdk>=1.20",
|
|
108
|
+
"aiosqlite>=0.20",
|
|
109
|
+
"redis[hiredis]>=5.0",
|
|
110
|
+
"tiktoken>=0.8",
|
|
111
|
+
"chromadb>=0.5",
|
|
112
|
+
"mcp>=1.0",
|
|
113
|
+
"typer>=0.12",
|
|
114
|
+
"rich>=13.0",
|
|
115
|
+
"pyyaml>=6.0",
|
|
116
|
+
]
|
|
88
117
|
|
|
89
118
|
[dependency-groups]
|
|
90
119
|
dev = [
|
|
120
|
+
"anthropic>=0.40",
|
|
121
|
+
"openai>=1.50",
|
|
91
122
|
"pyright>=1.1.408",
|
|
92
123
|
"pytest>=8.0",
|
|
93
124
|
"pytest-asyncio>=0.24",
|
|
@@ -105,6 +136,10 @@ dev = [
|
|
|
105
136
|
"build>=1.4.2",
|
|
106
137
|
"hatchling>=1.29.0",
|
|
107
138
|
"twine>=6.2.0",
|
|
139
|
+
"mkdocs>=1.6.1",
|
|
140
|
+
"mkdocs-material[imaging]>=9.7.6",
|
|
141
|
+
"mkdocstrings[python]>=1.0.4",
|
|
142
|
+
"mike>=2.1.3",
|
|
108
143
|
]
|
|
109
144
|
|
|
110
145
|
[tool.hatch.build.targets.wheel]
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
"""AnyCode — scalable multi-agent AI orchestration framework for Python."""
|
|
2
2
|
|
|
3
3
|
from anycode.checkpoint.manager import CheckpointManager
|
|
4
|
+
from anycode.checkpoint.serializer import UnsupportedCheckpointVersionError
|
|
4
5
|
from anycode.checkpoint.store import FilesystemCheckpointStore
|
|
5
6
|
from anycode.collaboration.kv_store import InMemoryStore
|
|
6
7
|
from anycode.collaboration.message_bus import MessageBus
|
|
7
8
|
from anycode.collaboration.shared_mem import SharedMemory
|
|
8
9
|
from anycode.collaboration.team import Team
|
|
10
|
+
from anycode.config.loader import UnknownConfigFieldError, UnsupportedConfigVersionError
|
|
9
11
|
from anycode.constants import (
|
|
10
12
|
ORCH_EVENT_AGENT_COMPLETE,
|
|
11
13
|
ORCH_EVENT_AGENT_START,
|
|
@@ -106,16 +108,24 @@ from anycode.plugins import (
|
|
|
106
108
|
)
|
|
107
109
|
from anycode.providers.adapter import create_adapter
|
|
108
110
|
from anycode.providers.fake import FakeAdapter, FakeResponse
|
|
109
|
-
from anycode.providers.resilience import
|
|
111
|
+
from anycode.providers.resilience import (
|
|
112
|
+
ProviderCapacityConfigurationError,
|
|
113
|
+
ProviderCapacityError,
|
|
114
|
+
ProviderCapacityLimiter,
|
|
115
|
+
ProviderUnavailableError,
|
|
116
|
+
ResilientAdapter,
|
|
117
|
+
)
|
|
110
118
|
from anycode.reflection.critic import DEFAULT_CRITIC_PROMPT, LLMCritic
|
|
111
119
|
from anycode.reflection.evaluator import parse_critic_json
|
|
112
120
|
from anycode.reflection.loop import ReflectionLoop
|
|
113
121
|
from anycode.routing.classifier import classify_task
|
|
114
122
|
from anycode.routing.router import DefaultRouter
|
|
115
123
|
from anycode.routing.rules import evaluate_rules, match_rule
|
|
116
|
-
from anycode.runstore.
|
|
124
|
+
from anycode.runstore.protocol import RunPayloadProtector, RunStore
|
|
125
|
+
from anycode.runstore.store import FilesystemRunStore, ProtectedPayloadError, UnsupportedRunStoreVersionError
|
|
117
126
|
from anycode.schedule.scheduler import RunScheduler, SweepReport, sweep_once
|
|
118
127
|
from anycode.schedule.tasks import ScheduledTask, ScheduledTaskResult, run_scheduled_task
|
|
128
|
+
from anycode.security import REDACTED_SECRET, redact_sensitive, redact_text, safe_exception_message
|
|
119
129
|
from anycode.structured.output import (
|
|
120
130
|
STRUCTURED_OUTPUT_TOOL_NAME,
|
|
121
131
|
build_retry_prompt,
|
|
@@ -127,9 +137,16 @@ from anycode.tasks.queue import TaskQueue
|
|
|
127
137
|
from anycode.tasks.task import create_task, get_task_dependency_order, is_task_ready, validate_task_dependencies
|
|
128
138
|
from anycode.telemetry.events import EventEmitter, TelemetryEvent
|
|
129
139
|
from anycode.telemetry.metrics import MetricsCollector, Timer
|
|
130
|
-
from anycode.telemetry.tracer import ConsoleExporter, Span, Tracer
|
|
140
|
+
from anycode.telemetry.tracer import ConsoleExporter, JSONLExporter, OTLPExporter, Span, Tracer
|
|
131
141
|
from anycode.tools.built_in import BUILT_IN_TOOLS, register_built_in_tools
|
|
132
142
|
from anycode.tools.executor import ToolExecutor
|
|
143
|
+
from anycode.tools.idempotency import (
|
|
144
|
+
IdempotencyClaim,
|
|
145
|
+
InMemoryToolIdempotencyStore,
|
|
146
|
+
SQLiteToolIdempotencyStore,
|
|
147
|
+
ToolIdempotencyStore,
|
|
148
|
+
create_tool_idempotency_store,
|
|
149
|
+
)
|
|
133
150
|
from anycode.tools.registry import ToolRegistry, define_tool
|
|
134
151
|
from anycode.types import (
|
|
135
152
|
AcceptanceThresholds,
|
|
@@ -201,6 +218,7 @@ from anycode.types import (
|
|
|
201
218
|
LLMToolDef,
|
|
202
219
|
MCPServerConfig,
|
|
203
220
|
MCPToolInfo,
|
|
221
|
+
MCPTrustPolicy,
|
|
204
222
|
MemoryConfig,
|
|
205
223
|
MemoryEntry,
|
|
206
224
|
MemoryStore,
|
|
@@ -214,6 +232,7 @@ from anycode.types import (
|
|
|
214
232
|
PluginInstallation,
|
|
215
233
|
PluginManifest,
|
|
216
234
|
PluginSource,
|
|
235
|
+
PluginTrustPolicy,
|
|
217
236
|
PoolStatus,
|
|
218
237
|
ProviderFactory,
|
|
219
238
|
ProviderResilienceConfig,
|
|
@@ -221,6 +240,7 @@ from anycode.types import (
|
|
|
221
240
|
RAGConfig,
|
|
222
241
|
RAGContext,
|
|
223
242
|
RAGEntry,
|
|
243
|
+
RedactedThinkingBlock,
|
|
224
244
|
ReflectionConfig,
|
|
225
245
|
RetryPolicy,
|
|
226
246
|
RouteDecision,
|
|
@@ -228,8 +248,10 @@ from anycode.types import (
|
|
|
228
248
|
RoutingConfig,
|
|
229
249
|
RoutingRule,
|
|
230
250
|
RunnerOptions,
|
|
251
|
+
RunnerStreamingConfig,
|
|
231
252
|
RunRecord,
|
|
232
253
|
RunResult,
|
|
254
|
+
RunRetentionPolicy,
|
|
233
255
|
RunStatus,
|
|
234
256
|
RunSummary,
|
|
235
257
|
SchedulingStrategy,
|
|
@@ -247,13 +269,17 @@ from anycode.types import (
|
|
|
247
269
|
TaskStatus,
|
|
248
270
|
TeamConfig,
|
|
249
271
|
TeamRunResult,
|
|
272
|
+
TerminalRunStatus,
|
|
250
273
|
TextBlock,
|
|
274
|
+
ThinkingBlock,
|
|
251
275
|
TokenizerStrategy,
|
|
252
276
|
TokenUsage,
|
|
253
277
|
ToolCallRecord,
|
|
254
278
|
ToolDefinition,
|
|
279
|
+
ToolIdempotencyConfig,
|
|
255
280
|
ToolResult,
|
|
256
281
|
ToolResultBlock,
|
|
282
|
+
ToolSecurityPolicy,
|
|
257
283
|
ToolUseBlock,
|
|
258
284
|
ToolUseContext,
|
|
259
285
|
TraceConfig,
|
|
@@ -321,6 +347,11 @@ __all__ = [
|
|
|
321
347
|
"rebuild_from_handoff",
|
|
322
348
|
"offload_text",
|
|
323
349
|
"restore_text",
|
|
350
|
+
# Data protection
|
|
351
|
+
"REDACTED_SECRET",
|
|
352
|
+
"redact_sensitive",
|
|
353
|
+
"redact_text",
|
|
354
|
+
"safe_exception_message",
|
|
324
355
|
# Verification & quality gates
|
|
325
356
|
"QualityGate",
|
|
326
357
|
"Sensor",
|
|
@@ -357,17 +388,29 @@ __all__ = [
|
|
|
357
388
|
"FakeResponse",
|
|
358
389
|
# Provider resilience
|
|
359
390
|
"ResilientAdapter",
|
|
391
|
+
"ProviderCapacityConfigurationError",
|
|
392
|
+
"ProviderCapacityError",
|
|
393
|
+
"ProviderCapacityLimiter",
|
|
360
394
|
"ProviderUnavailableError",
|
|
361
395
|
"ProviderResilienceConfig",
|
|
362
396
|
"RetryPolicy",
|
|
363
397
|
# Durable run store
|
|
364
398
|
"FilesystemRunStore",
|
|
399
|
+
"ProtectedPayloadError",
|
|
400
|
+
"RunPayloadProtector",
|
|
401
|
+
"RunStore",
|
|
365
402
|
"DurabilityConfig",
|
|
366
403
|
"RunRecord",
|
|
404
|
+
"RunRetentionPolicy",
|
|
367
405
|
"RunStatus",
|
|
406
|
+
"TerminalRunStatus",
|
|
368
407
|
"TranscriptEvent",
|
|
369
408
|
"TurnCheckpoint",
|
|
370
409
|
"BudgetSnapshot",
|
|
410
|
+
"UnsupportedCheckpointVersionError",
|
|
411
|
+
"UnsupportedConfigVersionError",
|
|
412
|
+
"UnsupportedRunStoreVersionError",
|
|
413
|
+
"UnknownConfigFieldError",
|
|
371
414
|
# Session chaining
|
|
372
415
|
"SessionChain",
|
|
373
416
|
"GoalContract",
|
|
@@ -415,7 +458,6 @@ __all__ = [
|
|
|
415
458
|
# Memory
|
|
416
459
|
"CompositeMemory",
|
|
417
460
|
"InMemoryVectorStore",
|
|
418
|
-
"create_memory_store",
|
|
419
461
|
# Checkpoint
|
|
420
462
|
"CheckpointManager",
|
|
421
463
|
"FilesystemCheckpointStore",
|
|
@@ -433,6 +475,11 @@ __all__ = [
|
|
|
433
475
|
# Tools
|
|
434
476
|
"ToolRegistry",
|
|
435
477
|
"ToolExecutor",
|
|
478
|
+
"IdempotencyClaim",
|
|
479
|
+
"InMemoryToolIdempotencyStore",
|
|
480
|
+
"SQLiteToolIdempotencyStore",
|
|
481
|
+
"ToolIdempotencyStore",
|
|
482
|
+
"create_tool_idempotency_store",
|
|
436
483
|
"define_tool",
|
|
437
484
|
"BUILT_IN_TOOLS",
|
|
438
485
|
"register_built_in_tools",
|
|
@@ -445,6 +492,8 @@ __all__ = [
|
|
|
445
492
|
"Tracer",
|
|
446
493
|
"Span",
|
|
447
494
|
"ConsoleExporter",
|
|
495
|
+
"JSONLExporter",
|
|
496
|
+
"OTLPExporter",
|
|
448
497
|
"MetricsCollector",
|
|
449
498
|
"Timer",
|
|
450
499
|
"EventEmitter",
|
|
@@ -470,6 +519,8 @@ __all__ = [
|
|
|
470
519
|
"ToolUseBlock",
|
|
471
520
|
"ToolResultBlock",
|
|
472
521
|
"ImageBlock",
|
|
522
|
+
"ThinkingBlock",
|
|
523
|
+
"RedactedThinkingBlock",
|
|
473
524
|
"LLMMessage",
|
|
474
525
|
"TokenUsage",
|
|
475
526
|
"LLMResponse",
|
|
@@ -478,7 +529,9 @@ __all__ = [
|
|
|
478
529
|
"ToolUseContext",
|
|
479
530
|
"AgentInfo",
|
|
480
531
|
"ToolResult",
|
|
532
|
+
"ToolSecurityPolicy",
|
|
481
533
|
"ToolDefinition",
|
|
534
|
+
"ToolIdempotencyConfig",
|
|
482
535
|
"AgentConfig",
|
|
483
536
|
"AgentState",
|
|
484
537
|
"ToolCallRecord",
|
|
@@ -505,6 +558,7 @@ __all__ = [
|
|
|
505
558
|
"LLMStreamOptions",
|
|
506
559
|
"LLMAdapter",
|
|
507
560
|
"MCPServerConfig",
|
|
561
|
+
"MCPTrustPolicy",
|
|
508
562
|
"MCPToolInfo",
|
|
509
563
|
"HandoffRequest",
|
|
510
564
|
"Handoff",
|
|
@@ -516,6 +570,7 @@ __all__ = [
|
|
|
516
570
|
"PluginManifest",
|
|
517
571
|
"PluginRegistry",
|
|
518
572
|
"PluginSource",
|
|
573
|
+
"PluginTrustPolicy",
|
|
519
574
|
"ProviderFactory",
|
|
520
575
|
"discover_entry_point_plugins",
|
|
521
576
|
"get_provider_factory",
|
|
@@ -527,6 +582,7 @@ __all__ = [
|
|
|
527
582
|
"RouteDecision",
|
|
528
583
|
"Router",
|
|
529
584
|
"RunnerOptions",
|
|
585
|
+
"RunnerStreamingConfig",
|
|
530
586
|
"RunResult",
|
|
531
587
|
"PoolStatus",
|
|
532
588
|
"SchedulingStrategy",
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
"""Workflow checkpointing and resume for crash recovery."""
|
|
2
2
|
|
|
3
3
|
from anycode.checkpoint.manager import CheckpointManager
|
|
4
|
+
from anycode.checkpoint.serializer import UnsupportedCheckpointVersionError
|
|
4
5
|
from anycode.checkpoint.store import FilesystemCheckpointStore
|
|
5
6
|
|
|
6
7
|
__all__ = [
|
|
7
8
|
"CheckpointManager",
|
|
8
9
|
"FilesystemCheckpointStore",
|
|
10
|
+
"UnsupportedCheckpointVersionError",
|
|
9
11
|
]
|
|
10
12
|
|
|
11
13
|
try:
|
|
@@ -17,7 +17,10 @@ class CheckpointManager:
|
|
|
17
17
|
|
|
18
18
|
def __init__(self, config: CheckpointConfig, store: CheckpointStore | None = None) -> None:
|
|
19
19
|
self._config = config
|
|
20
|
-
self._store: CheckpointStore = store or FilesystemCheckpointStore(
|
|
20
|
+
self._store: CheckpointStore = store or FilesystemCheckpointStore(
|
|
21
|
+
config.path,
|
|
22
|
+
redact_sensitive_data=config.redact_sensitive_data,
|
|
23
|
+
)
|
|
21
24
|
|
|
22
25
|
@property
|
|
23
26
|
def store(self) -> CheckpointStore:
|