Commit Graph

661 Commits

Author SHA1 Message Date
khyari hamza 2c46a0be5a revert(test): remove StaticPool from skill registry in-memory db
Reverts the StaticPool fix (68bc068) as it is no longer needed on
develop-hamza-2. Restores the original SingletonThreadPool default
for sqlite:///:memory: engine creation.
2026-02-23 22:20:44 +00:00
khyari hamza e880aa13d9 docs(plan): check off M3.1 quality gates for PR #128 2026-02-23 22:20:44 +00:00
khyari hamza bd58cc04f4 docs(plan): check off M3.1 decision-domain tasks from merged PR #128 2026-02-23 22:20:44 +00:00
khyari hamza 1eb028402c fix(test): use StaticPool for skill registry in-memory db
The default SingletonThreadPool for sqlite:///:memory: can
non-deterministically lose flushed data when multiple sessions are
created without closing (as in the bulk-register table step).
Under CI with coverage --parallel-mode and behave-parallel --processes 32,
this caused list_all() to return 2 skills instead of 3.

StaticPool guarantees all sessions share the exact same DBAPI connection,
which is the SQLAlchemy-recommended pattern for :memory: test databases.
2026-02-23 22:20:44 +00:00
khyari hamza 1a0a501f66 refactor(resource): address PR review feedback for handler runtime
- extract BaseResourceHandler to eliminate ~90% duplication between
  GitCheckoutHandler and FsDirectoryHandler
- raise RuntimeError when sandbox.context is None instead of silent
  empty string fallback
- add threading.Lock to resolver handler cache for thread safety
- type resource_lookup/type_lookup as Callable instead of Any
- log original HandlerResolutionError at DEBUG before fallback
- use behave.runner.Context in step definitions per repo convention
2026-02-23 22:20:44 +00:00
khyari hamza bfc6ab0fb1 feat(resource): add handler runtime for git-checkout and fs-directory 2026-02-23 22:20:44 +00:00
khyari hamza 832fe369fe refactor(benchmark): clean up resource registry bench per review
- remove unused imports (UTC, datetime, ResourceKind, SandboxStrategy)
- remove dead code (_bench_ulid, _CB32, _BENCH_CTR)
- use StaticPool for in-memory SQLite consistency
2026-02-23 22:20:44 +00:00
khyari hamza 78213084ae feat(resource): add resource registry and DAG metadata 2026-02-23 22:20:44 +00:00
khyari hamza 91f1a3d1eb chore: add worktrees/ to gitignore 2026-02-23 22:20:03 +00:00
khyari hamza 229dbc8925 refactor(decision): address PR review feedback
- add with_superseded_by() helper for frozen model mutation
- document frozen model + superseded_by interaction in docstring
- clarify sequence_number uniqueness is a persistence concern
- add scenario for invalid corrects_decision_id ULID validation
- add scenario for with_superseded_by copy behavior
- type step helper dict as dict[str, Any]
2026-02-23 22:20:03 +00:00
khyari hamza abcfba7e66 feat(decision): add decision domain and context snapshots 2026-02-23 22:19:19 +00:00
freemo bb7612c0d3 Docs: Daily update to implementation plan 2026-02-23 12:31:07 -05:00
freemo 5816fe2eb3 fix(test): harden database_integration robot suite against CI flakiness
- Replace NamedTemporaryFile with mkstemp to avoid leaking an open fd
- Increase subprocess timeout from 30s to 60s for CI headroom
- Retry once on empty-output failure (signal-killed by OOM/CPU starvation)
- Include return code in failure message for easier diagnosis
2026-02-23 16:38:17 +00:00
freemo 76375134f1 Fix: linting errors fixed 2026-02-23 09:47:00 -05:00
freemo f69224e7e9 feat(cli): add action and plan CLI extensions 2026-02-23 10:46:53 +00:00
freemo 999013a4a4 feat(plan): add phase reversion state machine 2026-02-23 10:45:01 +00:00
freemo 234a2fe52a feat(config): add config service with multi-level resolution 2026-02-23 10:44:58 +00:00
freemo 55f83771b9 Docs: Added gantt charts to Implementation Timeline section 2026-02-23 01:11:36 -05:00
brent.edwards a4685d374c Merge pull request 'feat(cli): add interactive repl' (#379) from develop-rui-1 into master
Reviewed-on: cleveragents/cleveragents-core#379
2026-02-23 03:50:17 +00:00
brent.edwards f48eb5a05f feat(cli): add interactive repl
Implement `agents repl` command providing an interactive read-eval-print
loop that dispatches to existing CLI commands without the `agents` prefix.

Features:
- Command dispatch via existing Typer app
- readline history with --no-history opt-out (default: ~/.cleveragents/history)
- Tab-completion for all CLI commands and built-in commands
- !! last-command repetition
- Prompt context from CLEVERAGENTS_PROJECT / CLEVERAGENTS_PLAN env vars
- Ctrl+C (continue) and Ctrl+D (exit) signal handling
- Multi-line input with \ continuation
- :help and :exit/:quit built-in commands

Test coverage:
- 15 Behave scenarios (features/repl.feature)
- 10 Robot Framework smoke tests (robot/repl_smoke.robot)
- ASV benchmark suite (benchmarks/repl_bench.py)
- All nox sessions pass: lint, typecheck, unit_tests, integration_tests
- Coverage: 97.2% (threshold: 97%)
2026-02-23 03:11:12 +00:00
freemo 18b7cf8107 Docs: daily update to implementation plan 2026-02-22 17:12:54 -05:00
freemo e24c7bf731 Fix: Fixed lint again 2026-02-22 16:15:49 -05:00
freemo 41ca082022 Tests: Improved coverage to get us back above 97% 2026-02-22 15:29:41 -05:00
freemo 92c83ecc7e Fix: Fixed linting errors 2026-02-22 14:18:24 -05:00
freemo a0000afc72 fix: update Robot helper and CLI to use target_decision_id, fix lint import order
- robot/helper_correction_model.py: decision_id -> target_decision_id in all
  request_correction calls; update validate_guidance test to accept empty
  guidance (M4.2 allows it); remove unused ValidationError import
- robot/correction_model.robot: update Validate Empty Guidance doc string
- src/cleveragents/cli/commands/plan.py: decision_id -> target_decision_id
- src/cleveragents/cli/main.py: fix import ordering (invariant before lsp)
2026-02-22 18:47:41 +00:00
freemo 029f09db1c fix: update M4.1 scenarios for M4.2 allowing empty/whitespace guidance in request_correction 2026-02-22 17:56:18 +00:00
freemo 8182ac2917 fix: update M4.1 tests for M4.2 CorrectionRequest empty guidance now allowed 2026-02-22 17:41:10 +00:00
freemo 50e5bd6f9b fix: update M4.1 step file to use target_decision_id matching M4.2 CorrectionService API 2026-02-22 17:38:43 +00:00
freemo 787ee5d0dd fix: rename ACP 'a ValueError should be raised' step to avoid AmbiguousStep with LSP step 2026-02-22 17:22:52 +00:00
freemo f1f68804ed fix: rename 'I try to get correction' step to 'correction flow' prefix to avoid AmbiguousStep 2026-02-22 17:15:51 +00:00
freemo 2097a548d8 docs: mark M1.2, M4.2, M6.1 checklist items as complete (PRs #149, #147, #148) 2026-02-22 17:11:22 +00:00
freemo dd3c70665e Merge remote-tracking branch 'origin/feature/m6-acp-stubs' into feature/jeff-combined-day14-batch2 2026-02-22 17:05:00 +00:00
freemo ee67ecb7cb merge: resolve M4.1+M4.2 conflicts (M4.2 supersedes M4.1 models/service) 2026-02-22 17:04:03 +00:00
freemo e2fa756be4 merge: resolve M1.2 conflict in services/__init__.py 2026-02-22 16:54:36 +00:00
freemo 9371992525 Merge remote-tracking branch 'origin/feature/m5-automation-profiles' into feature/jeff-combined-day14-batch2 2026-02-22 16:50:42 +00:00
freemo 5946dcc636 merge: resolve M3.5+M4.1 conflict in services/__init__.py 2026-02-22 16:49:56 +00:00
freemo 62605bc6f8 merge: resolve M2.7+M3.5 conflict in cli/main.py 2026-02-22 16:46:07 +00:00
freemo dc2a42889a Merge remote-tracking branch 'origin/feature/m2-lsp-stubs' into feature/jeff-combined-day14-batch2 2026-02-22 16:43:52 +00:00
freemo 33a5adcfee feat(M4.2): Correction service with revert/append BFS + dry-run
Adds CorrectionRequest, CorrectionResult, CorrectionMode,
CorrectionPatch, CorrectionDryRunReport, CorrectionNotFoundError,
and CorrectionConflictError domain models.

Implements CorrectionService with BFS-based revert (marks decisions
as rolled back and restores via inverse changes) and append mode
(spawns a child correction plan).  Includes request_correction()
with dry-run support and dispatch_correction() convenience method.

33 Behave scenarios, 8 Robot smoke tests, ASV benchmark suite,
and reference documentation.

Ref: Day-14 Rebaseline – M4.2 Decision-correction flows [Jeff]
2026-02-22 16:40:06 +00:00
freemo a2da043cbd feat(M1.2): PlanExecutionContext, RuntimeExecuteActor, and runtime mode
Adds PlanExecutionContext carrying plan metadata and delegating
changeset ops to ChangeSetStore.  RuntimeExecuteResult captures
execution output (changeset_id, tool_call_count, sandbox_refs,
decision_ids_processed, execution_duration_ms).

RuntimeExecuteActor dispatches StrategyDecision lists through
ToolRunner with full changeset capture and optional streaming
callbacks.  PlanExecutor gains execution_context param with
has_runtime / changeset_store / execution_context properties
and _run_execute_with_runtime / _run_execute_with_stub split.

31 Behave scenarios, 5 Robot smoke tests, ASV benchmark suite,
and reference documentation.

Ref: Day-14 Rebaseline – M1.2 Plan-execute runtime wiring [Jeff]
2026-02-22 15:13:43 +00:00
freemo 7153050211 feat(M6.1): ACP facade stubs with transport, events, and versioning
Adds cleveragents.acp package with seven modules: models (AcpMessage,
AcpEnvelope, AcpCapability, AcpPeerInfo), errors (AcpError hierarchy),
facade (AcpFacade with register/discover/send/receive), transport
(AcpTransportBase, LoopbackTransport), events (AcpEventBus),
and versioning (AcpVersion with compatible_with check).

44 Behave scenarios, 5 Robot smoke tests, ASV benchmark suite,
and reference documentation.

Ref: Day-14 Rebaseline – M6.1 ACP-facade stubs [Jeff]
2026-02-22 15:02:19 +00:00
freemo 67bd287a6c feat(correction): add correction model and CLI hooks 2026-02-22 11:07:35 +00:00
freemo cbb985627d feat(automation): add automation profiles and guards 2026-02-22 10:19:43 +00:00
freemo 50316e97be feat(lsp): add registry and runtime stubs 2026-02-22 10:15:25 +00:00
freemo 2d4b330f75 feat(invariant): add invariant models and enforcement 2026-02-22 09:23:35 +00:00
freemo c6d831b5ff feat(actor): add tool-calling runtime for execution actors 2026-02-22 08:31:45 +00:00
freemo e40dd75478 Docs: Fixed broken navigation menu on mobile 2026-02-22 01:15:07 -05:00
freemo 431f827ac4 Docs: Added implementation timeline to specification, seperate from the implementation plan itself. 2026-02-22 01:15:03 -05:00
freemo ca1c341b18 Tests: Significantly improved coverage of the unit tests 2026-02-22 00:43:08 -05:00
freemo e3aa0984bb Docs: Updated implementation plan to include missing v2 actor functionality 2026-02-21 21:44:18 -05:00