Commit Graph

255 Commits

Author SHA1 Message Date
freemo 5bdca88eca feat(change): add tool router for providers 2026-02-21 10:23:31 -05:00
freemo 9f2e7e88b0 feat(plan): add diff review and apply integration
Add PlanApplyService with diff(), artifacts(), persist_apply_summary(),
handle_merge_failure(), and guard_empty_changeset() methods.

- plan diff: renders changeset in rich/plain/json/yaml formats
- plan artifacts: shows plan metadata, changeset summary, sandbox refs
- persist_apply_summary: stores files_changed/validations_run in plan metadata
- handle_merge_failure: transitions plan to error state with conflict details
- guard_empty_changeset: blocks apply on empty changeset (--allow-empty override)

CLI: plan diff and plan artifacts commands with --format flag.
Tests: 20 Behave scenarios, 8 Robot integration tests, 4 ASV benchmarks.
Docs: docs/reference/plan_apply.md with CLI reference.

Implements D0b.apply from the implementation plan.
2026-02-21 10:22:18 -05:00
freemo 1df21e6a64 feat(cli): add output rendering framework with materialization strategies 2026-02-21 10:19:45 -05:00
freemo eae18c7578 feat(skill): add directory and search skills 2026-02-21 10:18:26 -05:00
freemo 582af29a24 feat(skill): add file operation skills 2026-02-21 10:18:26 -05:00
freemo 7aa36759c6 feat(plan): execute strategize and execute via actors 2026-02-21 10:18:26 -05:00
brent.edwards 37018341e3 Merge remote-tracking branch 'origin/master' into develop-aditya 2026-02-20 23:02:06 +00:00
brent.edwards 7bf8056003 style: fix formatting 2026-02-20 20:38:53 +00:00
brent.edwards ab8ed19aa7 fix(tests): remove AutomationLevel references after legacy field removal
Master's refactor(automation) commit removed the AutomationLevel enum
and automation_level field from Plan. Update all behave steps, robot
helpers, and feature scenarios that referenced the removed type:

- cli_lifecycle_robot_alignment_steps.py: drop import and field assignment
- persistence_robot_alignment_steps.py: drop import and field assignment
- subplan_model_steps.py: drop import, parameter, and field assignment
- subplan_model.feature: replace automation level scenario with profile check
- helper_cli_lifecycle.py: drop import and field assignment
- helper_persistence_lifecycle.py: drop import, field assignment, and assertion
2026-02-20 20:34:29 +00:00
brent.edwards aefcc74d76 fix(test): resolve AmbiguousStep collision after master merge
Renamed 'listing actors with namespace' step in actor_loading_steps.py
to 'listing loaded actors with namespace' to avoid collision with
actor_registry_persistence_steps.py from master. Updated
actor_loading.feature to use renamed step.
2026-02-20 20:24:10 +00:00
brent.edwards 85dc638093 Merge branch 'master' into develop-aditya
# Conflicts:
#	implementation_plan.md
2026-02-20 18:58:05 +00:00
brent.edwards d1b3c25a5e Merge branch 'master' into develop-brent-2
# Conflicts:
#	implementation_plan.md
#	src/cleveragents/cli/main.py
2026-02-20 18:25:28 +00:00
brent.edwards a181b774c9 Merge branch 'feature/m6-perf-scale' into develop-brent-2
# Conflicts:
#	docs/development/testing.md
2026-02-20 16:31:01 +00:00
brent.edwards 5c323470e2 Merge branch 'feature/m6-validation-edge' into develop-brent-2 2026-02-20 16:30:19 +00:00
brent.edwards 4d41459800 Merge branch 'feature/m6-review-playbook' into develop-brent-2 2026-02-20 16:30:15 +00:00
brent.edwards 2cfa9eafbc Merge branch 'feature/m5-subplan-tests' into develop-brent-2 2026-02-20 16:30:11 +00:00
brent.edwards 96b5704c8a Merge branch 'feature/m3-config-cli' into develop-brent-2
# Conflicts:
#	src/cleveragents/cli/main.py
2026-02-20 16:29:54 +00:00
brent.edwards 881750ad54 Merge branch 'feature/m3-session-cli' into develop-brent-2 2026-02-20 16:29:16 +00:00
brent.edwards 06c01a1d7b Merge branch 'feature/m1-persistence-tests-robot' into develop-brent-2 2026-02-20 16:29:11 +00:00
freemo 174e117d8e refactor(automation): remove automation_level legacy fields 2026-02-20 15:57:21 +00:00
freemo 81162bfe91 feat(skill): add inline tool executor 2026-02-20 08:50:08 -05:00
freemo c0eb9d1efd feat(skill): add skill context and registry 2026-02-20 08:50:08 -05:00
freemo b18bace06b feat(skill): add skill protocol and metadata 2026-02-20 08:50:08 -05:00
freemo 3bd02a7c6e feat(cli): add automation-profile commands
Add CLI command group `agents automation-profile` with add, remove,
list, and show subcommands for managing automation profiles that
control plan execution autonomy.

Changes:
- New `automation_profile.py` CLI module with YAML config input,
  schema_version guard, namespaced name validation, --update support,
  and all output formats (json/yaml/plain/table/rich)
- Register automation-profile in main CLI app
- Add deprecation warnings for --automation-level on plan use and
  set-automation-level commands
- Update CLI reference docs with command examples, built-in profiles
  list, and deprecation notes
- 26 Behave scenarios covering all commands and error paths
- 9 Robot Framework integration smoke tests
- ASV benchmarks for CLI parsing performance
- Mark A6.cli items complete in implementation_plan.md
2026-02-20 08:50:06 -05:00
freemo 46381750ab feat(cli): add tool and validation commands 2026-02-20 08:49:30 -05:00
freemo ad91b4e89d feat(cli): add resource tree and inspect commands
Add tree, inspect, link-child, and unlink-child subcommands to the
agents resource CLI group. Extend ResourceRegistryService with
link_child, unlink_child, get_children, and get_resource_tree methods.

- tree: display resource hierarchy with --depth, --type, and format options
- inspect: show resource details with --tree and --file options
- link-child/unlink-child: manage DAG edges with cycle detection
- 24 Behave scenarios, 4 Robot integration tests, ASV benchmarks
- CLI reference documentation in docs/reference/resource_cli.md
2026-02-20 08:48:33 -05:00
freemo 0ad18d4306 feat(actor): align actor registry persistence 2026-02-20 08:48:33 -05:00
brent.edwards 0dfdc02564 test(perf): add scale test fixtures 2026-02-20 03:31:43 +00:00
brent.edwards 558bcaf586 test(validation): add edge case suites 2026-02-20 02:54:08 +00:00
brent.edwards 04c8a886db feat(cli): add session commands 2026-02-20 01:10:19 +00:00
brent.edwards f182148d82 test(persistence): add Robot persistence coverage 2026-02-20 00:28:15 +00:00
brent.edwards 69a86858a7 feat(cli): add config get/set/list commands 2026-02-19 23:48:40 +00:00
brent.edwards 4f90d7703b test(cli): add Robot lifecycle CLI coverage 2026-02-19 22:44:34 +00:00
brent.edwards 2ba753c799 test(domain): add subplan model suites 2026-02-19 22:07:56 +00:00
brent.edwards 83dcfe35dc docs(qa): add review playbook and priority matrix 2026-02-19 22:00:53 +00:00
khyari hamza eeb0d49377 test(security): add coverage for audit CLI, logging, and redaction edge cases
Add 22 new Behave scenarios covering:
- audit CLI commands (list, show, prune, count)
- audit service context manager and owned-session paths
- corrupt JSON details fallback in _row_to_entry
- configure_structlog dev/prod/invalid and get_logger
- redaction edge cases (empty key, empty URL, empty pattern,
  show_secrets bypass, nested dict processor)
2026-02-19 20:10:56 +00:00
khyari hamza 201be39632 fix(security): address review findings for audit logging 2026-02-19 19:23:30 +00:00
khyari hamza ae41167a1d feat(security): add audit logging for apply 2026-02-19 19:23:30 +00:00
khyari hamza cea3bad758 refactor(ops): address re-review findings for cleanup commands
- Use model_copy(update=...) in test helpers so Pydantic ge=
  validators are enforced during tests, not just env vars (NEW-1)
- Promote _extract_plan_id_from_sandbox to public staticmethod
  and reuse in CLI active-plan detection to eliminate duplicate
  plan-ID parsing logic (NEW-2)
- Cache _get_sandbox_dirs result for service instance lifetime
  and have CLI active-plan detection use the cached listing so
  /tmp is iterated only once per invocation (NEW-3)
2026-02-19 14:20:16 +00:00
khyari hamza bab4560dde feat(ops): add cleanup commands 2026-02-19 13:46:48 +00:00
aditya ef4ba36779 feat(actor): add actor registry and loader 2026-02-19 11:29:34 +00:00
khyari hamza d815339c52 feat(security): add secrets masking and validation (H-21/SEC5)
Implement centralized redaction utility that masks API keys, tokens,
and credentials across CLI output, structlog logs, and error messages.

- Add shared/redaction.py with pattern-based secret detection (sk-*,
  sk-ant-*, tok_*, Bearer tokens), sensitive key name detection,
  database URL masking, custom pattern registration, and thread-safe
  global show_secrets flag
- Add config/logging.py with structlog configuration integrating the
  secrets_masking_processor into the processor chain
- Add --show-secrets global CLI option to reveal secrets when needed
- Redact error details in main.py, project.py, and auto_debug.py
  error handlers before printing
- Wrap format_output() in formatting.py with automatic dict redaction
- Add show_secrets field and safe __repr__ to Settings model
- Add 43-scenario Behave feature (features/security_secrets.feature)
- Add 10 Robot Framework smoke tests (robot/security_secrets.robot)
- Add ASV benchmarks (benchmarks/security_secrets_bench.py)
- Add reference docs (docs/reference/secrets_handling.md)
2026-02-19 11:15:18 +00:00
aditya 3ea2413b43 Merge branch 'master' into feature/m3-actor-schema-examples
# Conflicts:
#	implementation_plan.md
2026-02-19 05:58:08 +00:00
brent.edwards 9802424a41 Merge branch 'master' into develop-20260217
# Conflicts:
#	robot/database_integration.robot
2026-02-19 00:57:48 +00:00
CoreRasurae 272f6fc255 test(unit): fix failing tests related to RichTerm usage 2026-02-18 23:55:05 +00:00
brent.edwards 2dfad7ec71 Merge branch 'master' into develop-20260217
# Conflicts:
#	implementation_plan.md
2026-02-18 23:08:48 +00:00
brent.edwards b50987731a fix(test): resolve CI test failures from session isolation and subprocess timeouts
- Fix resource_repository Behave scenario 'Resolve by ULID returns the
  resource' by propagating res_type_name through context instead of
  relying on fragile list_types() across SQLAlchemy sessions
- Increase subprocess timeouts in Robot Framework integration tests to
  prevent SIGTERM kills under parallel execution load (10s->30s, 20s->60s,
  30s->60s across 7 robot files)
2026-02-18 22:59:09 +00:00
aditya 4ae7f2d6fe test(actor): fix actor examples test suite issues
- Add missing node descriptions in Behave test scenarios
- Fix context_view and parallel execution step definitions
- Update llm_with_tools.yaml max_context_tokens (10000 → 16000)
- Add context.error compatibility for error assertions

Results: Behave 25/25, Robot 16/16, ASV 7/7 all newly added tests passing.
2026-02-18 12:18:37 +00:00
khyari hamza 02c75fb4bb feat(cli): enhance version/info/diagnostics with --format and --check
Add structured data builders and Rich renderers for version, info, and
diagnostics commands. Support --format rich/plain/json/yaml output parity
and --check flag for diagnostics (exits non-zero on errors).

Includes Behave scenarios, Robot smoke tests, ASV benchmarks, and updates
existing tests to match the new Rich panel output format.
2026-02-18 12:18:03 +00:00
aditya a5fd451a3b fix(actor): resolve Behave test conflicts and add missing step definitions
- Fix ActorType import error in actor_schema_steps.py
- Simplify actor_examples_steps.py to remove duplicate steps
- Add missing Background step and actor validation steps
- Add llm_with_tools.yaml documentation section
- Rename conflicting Given step patterns with 'examples' suffix
- Add comprehensive Then steps for actor config validation
- Fix step patterns to include trailing colons for docstring steps

Test Results:
- 8 scenarios passing (up from 0)
- 138 steps passing (critical path tests working)
- 5 undefined steps remaining (minor edge cases)
- Basic actor example validation fully functional
2026-02-18 11:41:05 +00:00