Skip to content

Commit bf1c9db

Browse files
authored
Merge pull request #25 from d3cker/release
Release v0.6.6
2 parents c33ef25 + a60e05c commit bf1c9db

59 files changed

Lines changed: 5994 additions & 539 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/release-state.json‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"pullRequest": 11,
3-
"sourceSHA": "4ddfaa21fcaea14090f6110212d9bea40ce0be78",
4-
"version": "0.6.5"
2+
"pullRequest": 24,
3+
"sourceSHA": "7a742115e1eb69fda6c597b9e50b85c07815785f",
4+
"version": "0.6.6"
55
}

‎.github/workflows/ci.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: CI
22

33
on:
44
pull_request:
5-
branches: [release]
5+
branches: [devel, release]
66
types: [opened, synchronize, reopened, ready_for_review, edited]
77

88
permissions:

‎.github/workflows/release.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ concurrency:
1818
jobs:
1919
release:
2020
name: Publish from release and open promotion PR
21-
if: github.event_name == 'push' || github.event.pull_request.merged == true
21+
if: github.event_name == 'push' || (github.event.pull_request.merged == true && github.event.pull_request.head.ref == 'devel' && github.event.pull_request.head.repo.full_name == github.repository)
2222
runs-on: ubuntu-latest
2323
timeout-minutes: 25
2424
permissions:
@@ -37,7 +37,7 @@ jobs:
3737
cache: npm
3838
- name: Install pipeline dependencies
3939
run: npm ci --ignore-scripts
40-
- name: Prepare version, publish package, and promote through a PR
40+
- name: Publish, prepare main PR, and synchronize devel
4141
env:
4242
GH_TOKEN: ${{ github.token }}
4343
run: node scripts/release-pipeline.mjs

‎AGENTS.md‎

Lines changed: 59 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@ Use English for all user-facing prompts, UI labels, errors, generated bot messag
44

55
Never push commits directly to `main` or modify its files through GitHub APIs.
66
All changes reach `main` by merging a PR from `release`. Feature PRs target
7-
`release`; version and post-publication README commits belong on `release`.
7+
`devel`. Only a reviewed `devel` → `release` PR starts automatic publication.
8+
Version and post-publication README commits belong on `release`; after a stable
9+
publication, automation merges that published head back into `devel` without a
10+
PR or force push. Never reset development work to match release.
811

912
## Project context
1013

@@ -24,11 +27,11 @@ steps, project setup, headless operation, and removal.
2427
| --- | --- | --- |
2528
| [docs/architecture.md](docs/architecture.md) | Component responsibilities, a short issue-to-PR overview, configuration ownership, scheduler ownership, and shared state. | Start here to understand how the system is divided before locating implementation code. |
2629
| [docs/bot-workflow.md](docs/bot-workflow.md) | Eight Mermaid diagrams and detailed implementation notes: startup and polling; discovery and routing; task phases; sessions and questions; media helpers; verification and publication; feedback, merging, and tab closure; status, retries, and recovery. Includes links to the source for each area. | Use for exact execution order, state transitions, checkpoint behavior, failure paths, and tracing a bot task from issue to merged PR. |
27-
| [docs/configuration.md](docs/configuration.md) | The standard `.opencode/automation.json` format, defaults, setup flags, configuration tracking across Git branches, authors, triggers, checks, base branches, model capabilities, media helpers, custom prompts, signatures, and auto-merge settings. | Use when adding or changing user-facing configuration, defaults, or setup examples. |
28-
| [docs/runtime.md](docs/runtime.md) | User-visible behavior while the bot runs: GitHub questions and permission replies, branch selection, media inputs, prompt loading, follow-up comments, session tabs, and routine management commands. | Use when changing issue conversations, session continuation, runtime tools, or TUI behavior. |
30+
| [docs/configuration.md](docs/configuration.md) | The standard `.opencode/automation.json` format, defaults, setup flags, configuration tracking across Git branches, repository file approvals, authors, triggers, checks, base branches, model capabilities, media helpers, custom prompts, signatures, and auto-merge settings. | Use when adding or changing user-facing configuration, defaults, or setup examples. |
31+
| [docs/runtime.md](docs/runtime.md) | User-visible behavior while the bot runs: GitHub questions and permission replies, branch selection, media inputs, prompt loading, follow-up comments, session tabs, runtime sidebar/status freshness, host repository inventory and discovery, local task closure, cancelling rounds while retaining tracking, and routine management commands. | Use when changing issue conversations, session continuation, runtime tools, or TUI behavior. |
2932
| [docs/advanced.md](docs/advanced.md) | Separate scheduler/dispatcher setup, multiple repositories, custom RPC jobs, full options, timeouts, management and retry commands, persistence, reconciliation, locks, and known limits. | Use for low-level configuration, operational troubleshooting, recovery, or ownership/concurrency changes. |
3033
| [docs/installation.md](docs/installation.md) | Loader registration, config-directory precedence, prerequisites, source installation, project-local installation, upgrade conflicts, testing on another machine, and migration limits. | Use when working on packaging, installers, registration, upgrades, or deployment troubleshooting. |
31-
| [docs/releases.md](docs/releases.md) | Feature-to-release PR checks, automatic patch versions, manual npm version/tag releases, exact changelog notes, publication recovery, README commits on release, and promotion PRs into protected main. | Use for CI triggers, versioning, packaging, GitHub Release publication, branch permissions, or recovery after a failed release. |
34+
| [docs/releases.md](docs/releases.md) | Feature-to-devel and devel-to-release PR checks, automatic patch versions, manual npm version/tag releases, exact changelog notes, publication recovery, README commits on release, automatic release-to-devel synchronization, and promotion PRs into protected main. | Use for CI triggers, versioning, packaging, GitHub Release publication, branch permissions, or recovery after a failed release. |
3235

3336
For common investigations:
3437

@@ -40,6 +43,10 @@ For common investigations:
4043
and the configuration reference's automatic-merge rules.
4144
- **Why did a session tab open or close?** Read the runtime tab sections and
4245
workflow section 7.
46+
- **Which folders are configured, running, paused, or missing?** Read the runtime
47+
repository inventory section and advanced monitoring notes. `list` and `/bot`
48+
→ **Repositories** use timestamped host snapshots; do not activate owners to
49+
inspect them. Discovery is an explicit registration operation.
4350
- **Why is polling inactive or duplicated?** Read architecture ownership,
4451
workflow section 1, and installation registration details.
4552

@@ -55,33 +62,66 @@ the installation block without making remote writes. Keep its markers intact.
5562
and GitHub plugin entrypoints. `src/easy.ts` resolves standard project settings;
5663
`src/config.ts` defines the configuration schemas and route matching.
5764
- `src/dispatcher.ts` owns discovery, the durable task lifecycle, questions,
58-
feedback rounds, publication coordination, retries, and merge polling.
65+
feedback rounds, publication coordination, retries, durable task closure, round cancellation/resumption, and merge polling.
5966
`src/scheduler.ts` owns interval jobs; `src/state.ts` owns persistence and locks.
6067
- `src/executor.ts` owns analysis, base selection, worktrees, session execution,
6168
verification, and pushing. `src/analysis.ts` and `src/branch.ts` validate model
62-
decisions. `src/github.ts` implements GitHub calls; `src/approval.ts` evaluates
69+
decisions. `src/pr-description.ts` extracts final public reports and renders and
70+
reconciles managed PR descriptions. `src/github.ts` implements GitHub calls; `src/approval.ts` evaluates
6371
approval candidates.
6472
- `src/runtime.ts`, `src/worker.ts`, and `src/bridge.ts` implement worker hooks,
6573
runtime installation, and communication with the owner. `src/prompt.ts` loads
6674
instructions; `prompts/bot.md` contains the bundled bot instructions.
75+
`src/repository-permissions.ts` checks canonical path boundaries for opt-in
76+
repository file approvals; `src/runtime.ts` applies them only to bot sessions.
6777
- `src/tui.ts`, `src/ui.ts`, and `src/activity.ts` implement terminal integration
68-
and task activity. `src/rpc.ts` defines RPC contracts; `src/manage.ts` exposes
78+
and task activity. `src/sidebar.ts` renders the runtime panel;
79+
`src/runtime-panel.ts` owns polling, freshness and presentation;
80+
`src/monitor.ts` defines read-only monitoring schemas. `src/rpc.ts` defines RPC contracts; `src/manage.ts` exposes
6981
management operations.
82+
- `src/repositories.ts` owns host registry registration, explicit discovery and
83+
component snapshot files; `src/repository-report.ts` defines inventory schemas
84+
and shared CLI/TUI formatting. Neither inventory reader starts bot work.
7085
- `src/setup.ts`, `src/wizard.ts`, `src/install.ts`, and `scripts/` cover setup and
7186
installation. `examples/` contains configuration examples; `test/` contains
7287
automated tests. `package.json` defines build and validation commands.
7388

74-
## Keeping documentation accurate
89+
## Keeping documentation accurate — required for every change
7590

76-
Treat the implementation as the source of truth for current behavior. If code
77-
and documentation disagree, inspect the relevant code and tests and make the
78-
discrepancy explicit rather than assuming the documented behavior is implemented.
79-
When changing behavior, update the relevant reference page and any affected
80-
workflow diagrams. Keep the architecture page concise; put detailed execution
81-
paths in `docs/bot-workflow.md` and user-facing runtime guidance in `docs/runtime.md`.
91+
Documentation is part of the implementation, not a later cleanup task. **If a code
92+
change affects anything already described, update that description and every
93+
affected diagram in the same change and PR.** A change is not complete while its
94+
code and documentation disagree. Do not defer documentation to a later release,
95+
follow-up issue, or another agent.
8296

83-
Validate changed Mermaid diagrams with a Mermaid parser when available; checking
84-
Markdown fences alone does not validate diagram syntax. Avoid literal semicolons
85-
in sequence-diagram message labels because they can be parsed as statement
86-
separators. For documentation-only changes, check links and formatting; application
87-
tests are not needed unless executable behavior also changes.
97+
For every code, configuration, CLI/RPC, prompt, or workflow change:
98+
99+
1. Read the affected reference pages and compare their claims with the source and
100+
relevant tests. Use the documentation map above to find all entry points.
101+
2. Update affected behavior, defaults, commands, examples, prerequisites, limits,
102+
failure/retry paths, and recovery instructions. Check README and cross-linked
103+
pages as well as the primary reference; fixing only one mention is insufficient.
104+
3. For automation changes, review all eight sections of `docs/bot-workflow.md`
105+
for impact and update every affected Mermaid diagram and its surrounding text.
106+
Show actual ordering, phase/status transitions, durable checkpoints, questions,
107+
verification/publication gates, and restart paths. Do not draw desired behavior
108+
as if it were implemented. Keep architecture concise and detailed paths in the
109+
workflow/runtime references.
110+
4. Validate modified Mermaid with a parser, and check local links, headings,
111+
examples and Markdown formatting. Fences alone do not prove valid diagrams.
112+
Avoid literal semicolons in sequence-diagram messages. Report any validation
113+
that could not be run; do not claim it passed.
114+
5. Before finishing, review the complete diff for code/documentation agreement.
115+
In the PR description, identify the documentation updated, or state why the
116+
change has no documented or user-visible behavior impact. Add accurate
117+
`Unreleased` notes for changes that enter the next release.
118+
119+
Treat implementation and verified tests as evidence of current behavior. If an
120+
existing discrepancy is discovered, correct the affected documentation within the
121+
authorized scope and make any remaining mismatch explicit. Distinguish model
122+
instructions from enforced runtime behavior, and branch/unreleased features from
123+
features already present in a published package. Do not change an unrelated
124+
runtime behavior merely to make an old description true.
125+
126+
For documentation-only changes, check links, formatting and diagram syntax;
127+
application tests are not needed unless executable behavior also changes.

‎CHANGELOG.md‎

Lines changed: 88 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,99 @@
11
# Changelog
22

33
Release descriptions come from the exact version section committed with the tag.
4-
Add feature changes under `Unreleased`; after a PR merges into `release`, automation
4+
Add feature changes under `Unreleased`; after a `devel` PR merges into `release`, automation
55
moves them into the new patch version's section. For a manual release, prepare
66
and commit the exact version section before creating its tag. Prerelease headings
77
include the full version, for example `## 0.7.0-beta.1`.
88

99
## Unreleased
1010

11+
## 0.6.6
12+
13+
### Documentation
14+
15+
- Align all eight bot workflow diagrams and runtime/recovery references with the
16+
implementation, including owner lifecycle, feedback queuing, session recovery,
17+
verification gates, merge polling and TUI commands.
18+
- Require documentation and affected diagrams to be updated with each relevant
19+
implementation change in repository and bundled bot instructions.
20+
21+
### Fixed
22+
23+
- Restore compatibility with OpenCode 2.0.6: update the pinned SDKs, discover
24+
services through `/api/info`, refresh owner activity with `session.update`,
25+
and interrupt sessions with `resume: false`. Replace the removed headless
26+
activation command with location-scoped `plugin.list` and document validation.
27+
28+
- Honor formal approvals for the exact verified PR commit even when publication
29+
or description recovery finishes later. Retain review revocation, authorization,
30+
and merge-readiness checks; keep timestamp gating for unbound merge comments.
31+
32+
- Retry PR head propagation after a successful push when the remote branch still
33+
matches the verified commit. Preserve a durable push checkpoint across restarts,
34+
avoid repeating acknowledged pushes, and distinguish closed PRs from changed
35+
branches while preserving manual description edits.
36+
37+
- Keep repository inventory RPC responses valid JSON when an owner has no runtime
38+
snapshots. Isolate setup-test registries so validation never adds fixture
39+
repositories to the operator's inventory.
40+
41+
- Use the successful session's final completion report as the PR description instead
42+
of its initial acknowledgement. Persist reports across restarts, retain the
43+
original summary plus the latest follow-up, distinguish dispatcher checks from
44+
agent-reported tests, and preserve manual notes outside the managed section.
45+
46+
- Reconcile timed-out or interrupted sessions completed manually after a blocked
47+
task or service restart. Verify and publish through the dispatcher, then process
48+
queued issue feedback on the same branch and PR, including legacy checkpoints.
49+
50+
### Added
51+
52+
- Per-repository `autoApproveRepositoryFiles` configuration, an opt-in setup
53+
prompt, and `init --auto-approve-repository-files`. Bot sessions and native
54+
workers can automatically access files in the repository and assigned worktree
55+
across rounds/restarts, without global permission changes. Explicit denials,
56+
pending questions, media-helper limits, and shell permissions remain unchanged.
57+
58+
- Cancel a single bot round while retaining issue/PR tracking, with durable stop
59+
recovery, preserved draft worktrees and fresh worktrees for later feedback.
60+
Resume tracking a locally closed task without replaying its abandoned round
61+
or old comments. Expose both actions in `/bot` and the CLI; show historical
62+
errors only in details after closing or cancelling.
63+
64+
- List configured repositories across the host with `opencode2-automation list`
65+
(`--json` for scripts) and `/bot` → **Repositories**. Show owner/checkout paths,
66+
base branches, timestamped dispatcher/scheduler status and concrete issue
67+
failures without activating other bots. Register projects during init/startup;
68+
import older inactive standard configurations with `list --discover <root>`.
69+
Preserve missing entries and explicitly mark stopped, stale or unavailable data.
70+
71+
- Manage tasks directly from `/bot`: inspect details, open sessions, close idle
72+
tabs, restart workflows, or stop sessions and durably end tracking without
73+
deleting work. Preserve closed tasks as history and skip rediscovery, feedback,
74+
runtime hooks and publication after closure, including missing issue/PR cases.
75+
- Identify blocked, failed and closing issue keys and errors in the runtime
76+
sidebar instead of showing only an anonymous attention counter.
77+
78+
- Add a live BOT RUNTIME sidebar and `/botstatus` report with dispatcher operations,
79+
scheduler scans/retries, queue counts and selected-task details. Keep stale and
80+
unavailable readings explicit; monitor through read-only owner-scoped RPC.
81+
- Validate native sidebar rendering, reactive updates and narrow layouts as part
82+
of the standard check command using pinned TUI/Bun development dependencies.
83+
84+
- `/restartworkflow` and the matching CLI/RPC command resume a stopped task from
85+
its saved stage, preserving worktrees, sessions, PRs, and feedback. Checkpoint
86+
continuation requests across restarts without bypassing checks or permissions.
87+
88+
### Changed
89+
90+
- Collect feature PRs on `devel` without publishing a release. Run CI on PRs to
91+
`devel` and `release`, and publish automatic patches only after a same-repository
92+
`devel` to `release` PR is merged.
93+
- After stable publication and README update, automatically merge the published
94+
release head into `devel` without a synchronization PR. Preserve new development
95+
commits, retry concurrent updates, and fail safely on conflicts or denied pushes.
96+
1197
## 0.6.5
1298

1399
### Fixed
@@ -44,7 +130,7 @@ include the full version, for example `## 0.7.0-beta.1`.
44130

45131
- Run full CI when feature PRs target `release`, including new commits to open PRs.
46132
Ordinary feature pushes no longer run CI or build packages.
47-
- Publish an automatic patch after a PR merges into `release`, and support manual
133+
- Publish an automatic patch after a `devel` PR merges into `release`, and support manual
48134
version tags on that branch without a second version bump.
49135
- Recover interrupted publication without moving tags or republishing completed
50136
packages. Commit README on `release` before opening or updating its PR to `main`.

0 commit comments

Comments
 (0)