fix(install): include agent metadata config in profile installs#279
Closed
Leslie-ller wants to merge 62 commits intodarrenhinde:mainfrom
Closed
fix(install): include agent metadata config in profile installs#279Leslie-ller wants to merge 62 commits intodarrenhinde:mainfrom
Leslie-ller wants to merge 62 commits intodarrenhinde:mainfrom
Conversation
Add ControlEvent types (10 event types), ControlEventFactory, ControlEventBus (in-memory distribution + per-run history), and EventLog (JSONL persistence). Instrument executor to emit structured events for run/step lifecycle, validation results, and obligation signals. Add event-based obligation evaluation path (evaluateControlFromEvents) alongside original step-based path for backward compatibility. Wire EventBus + EventLog into plugin entry point. Add 54 passing tests covering factory, bus, log, event-based obligation evaluation, executor event emission, and bus+log integration.
…ion of model/provider mismatches Adds the third layer of the correction roadmap: Model Drift Audit. - AgentStep type with model/provider expectation fields - executeAgentStep() in executor with model audit data capture - model.observed event emission during agent step dispatch - evaluateModelDrift() consumes event stream for drift summary - hasModelDrift() utility for comparison at emission site - ModelAuditResult wired into ControlResult (audit-only: no gate impact) - 39 passing tests in model-audit.test.ts (no regressions)
…itions - Change TaskType and ObligationKey from closed unions to open strings - Add ObligationDefinition interface for inline obligation declarations - Add obligations field to Ability interface for per-ability obligation config - Create ObligationRegistry with resolution priority: inline > runtime > built-in - Update evaluateControl/evaluateControlFromEvents to use resolveObligations() - Update validator: task_type is now z.string().regex, add ObligationDefinitionSchema - Preserve backward compatibility with built-in defaults for 6 original task types - 38 new tests passing, 0 regressions (201 pass / 21 pre-existing fail)
Phase 1 stability fix — 4 root causes addressed: - Add skill/approval/workflow step dispatch in executor (13 failures) - Add when-condition, on_failure:continue, output interpolation, agent context (4 failures) - Add get()/list()/cancelActive() to ExecutionManager with history tracking (3 failures) - Fix node→python3 in context-passing test for environment compat (1 failure) 201→274 passing tests, 0 failures.
Phase 2 — wire permission checks into step execution: - Add checkStepPermission() with per-type permission semantics - Pre-step permission check block in executor (opt-in model) - Default-deny when permissions configured, approval steps always allowed - Export new permission types from package index - 23 unit tests + 29 integration tests for permission system 274 passing tests, 617 expect() calls.
Phase 3 — resolve plugin.ts compilation errors: - Move class-based plugin.ts (929 lines, 20 TS errors) to _legacy/ - Update enforcement.test.ts import to point to archive location - Canonical plugin is now opencode-plugin.ts (0 TS errors)
… and dispatcher fixes Close the bibliography E2E loop (Batch A): Dispatcher fixes: - Add /bibliography plan → research/bibliography-plan routing - Add /bibliography evidence-pack → research/section-evidence-pack routing - Create research/bibliography-plan ability YAML Artifact persistence (BibliographyStore): - File-based JSON store in .opencode/bibliography-data/ - 6 artifact types: plan, screening, reading-card, decision, evidence-pack, audit - Stage-specific queries: getScreeningByDecision, getDecisionsByVerdict - Queue management: getReviewQueue, getDecisionQueue - Pipeline status summary: getPipelineStatus Pipeline orchestration (BibliographyPipeline): - Runs single stages through the executor with automatic artifact persistence - Loads prior-stage artifacts into stageOutputs for inter-stage data flow - STAGE_CONFIGS maps all 6 stages to abilities, artifact types, and dependencies Types: - Add stageOutputs field to ExecutorContext for inter-stage data passing Tests: 64 new tests (338 total, 791 expect() calls, 0 failures) - bibliography-store.test.ts: 24 tests (CRUD, queries, queues, status) - bibliography-pipeline.test.ts: 22 tests (stages, data flow, full pipeline, gates) - bibliography-dispatch.test.ts: 18 tests (routing, meta-command, parameters)
… inputs - Implement parseTimeout() for human-readable durations (e.g. '30s', '5m') - Add withTimeout() Promise.race wrapper for step-level timeouts - Implement retry logic with on_failure: 'retry' + max_retries - Add before/after hooks execution (before=abort on fail, after=best-effort) - Forward skill step inputs to SkillContext.load() - Unify BaseStepFields interface across all step types (timeout, max_retries, on_failure) - Add Ability.hooks and Ability.settings type definitions - 27 new tests in executor-robustness.test.ts, all 365 tests pass
…n bridge Enforce completion trust by blocking failed validation/review evidence and dependency violations from structured runtime artifacts. Add a compatible .tmp/tasks bridge and document WS3-WS5 implementation mapping so complex-path execution remains auditable and deterministic.
Derive completed/partial/blocked summaries from runtime control evidence and expose completion metadata through executor formatting, SDK, and plugin responses. Prevent optimistic done-language by surfacing remaining risks and next actions when validation or review evidence is incomplete.
Author
|
Superseded by a clean branch-based PR with the same change but correct ancestry. Closing this one because it was accidentally opened from a branch containing unrelated private-main history. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This fixes the root cause behind missing
agent-metadata.jsonin installed OAC profiles.The repository ships
.opencode/config/agent-metadata.json, but the installer did not distribute it because it was not registered as an installable config component. As a result, global/profile installs could complete without~/.config/opencode/config/agent-metadata.json.This PR:
agent-metadata.jsontoregistry.jsonas a config componentcurl | bashstyle installsType of Change
Checklist
Testing
bash scripts/tests/test-non-interactive.shessentialprofile installsconfig/agent-metadata.jsonand includes.agents.openagent.name == "OpenAgent"developerprofile installation path includesconfig/agent-metadata.json(longer-running locally)bash scripts/registry/validate-registry.sh -vwas run locally; it emitted no component path or dependency failures in the log, but still exited non-zero in my environmentContext
This addresses the installation/distribution side of issue #277. Runtime fallback handling can remain a separate hardening change if needed.