Update Linear plugin for latest OpenClaw runtime#8
Conversation
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe PR shifts the dispatch-history context injection to the before_prompt_build event phase, adds CLI binary path configuration fields (codexBin, claudeBin, geminiBin) to the plugin schema, and establishes a dist/ build output directory with compiled distribution and updated extension entry point. ChangesPlugin Updates and Build Configuration
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
Important Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (1 error)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
9cd5aa1 to
247e502
Compare
247e502 to
f2527b4
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
index.ts (1)
371-371: 🧹 Nitpick | 🔵 Trivial | ⚡ Quick winUpdate the outdated comment.
The comment refers to "agent start" but this hook now runs during
before_prompt_build.📝 Suggested fix
- // Never block agent start for telemetry + // Never block prompt build for telemetry🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@index.ts` at line 371, Update the outdated inline comment that reads "Never block agent start for telemetry" to reference the current hook name and behavior (e.g., "Never block before_prompt_build for telemetry" or "Never block telemetry in before_prompt_build") so it accurately reflects that this hook runs during before_prompt_build; modify the comment near the before_prompt_build hook (around index.ts line where the current comment exists) to use the new wording.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@package.json`:
- Line 45: The package.json currently pins the openclaw dependency exactly as
"openclaw": "2026.6.1-beta.1", which prevents automatic minor/patch updates;
confirm whether this exact pin is intentional for strict beta reproducibility,
and if not, change the version string to allow semver updates (for example use
"^2026.6.1-beta.1") in package.json so the plugin will pick up compatible
patch/beta revisions—update the value associated with the "openclaw" key
accordingly.
---
Outside diff comments:
In `@index.ts`:
- Line 371: Update the outdated inline comment that reads "Never block agent
start for telemetry" to reference the current hook name and behavior (e.g.,
"Never block before_prompt_build for telemetry" or "Never block telemetry in
before_prompt_build") so it accurately reflects that this hook runs during
before_prompt_build; modify the comment near the before_prompt_build hook
(around index.ts line where the current comment exists) to use the new wording.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: e5355289-2586-45d3-b657-a81a616fd0d8
⛔ Files ignored due to path filters (48)
dist/index.jsis excluded by!**/dist/**dist/src/agent/agent.jsis excluded by!**/dist/**dist/src/agent/watchdog.jsis excluded by!**/dist/**dist/src/api/auth.jsis excluded by!**/dist/**dist/src/api/linear-api.jsis excluded by!**/dist/**dist/src/api/oauth-callback.jsis excluded by!**/dist/**dist/src/gateway/dispatch-methods.jsis excluded by!**/dist/**dist/src/infra/cli.jsis excluded by!**/dist/**dist/src/infra/codex-worktree.jsis excluded by!**/dist/**dist/src/infra/commands.jsis excluded by!**/dist/**dist/src/infra/doctor.jsis excluded by!**/dist/**dist/src/infra/file-lock.jsis excluded by!**/dist/**dist/src/infra/multi-repo.jsis excluded by!**/dist/**dist/src/infra/notify.jsis excluded by!**/dist/**dist/src/infra/observability.jsis excluded by!**/dist/**dist/src/infra/resilience.jsis excluded by!**/dist/**dist/src/infra/shared-profiles.jsis excluded by!**/dist/**dist/src/infra/template.jsis excluded by!**/dist/**dist/src/infra/tmux-runner.jsis excluded by!**/dist/**dist/src/infra/tmux.jsis excluded by!**/dist/**dist/src/infra/token-refresh-timer.jsis excluded by!**/dist/**dist/src/infra/validation.jsis excluded by!**/dist/**dist/src/infra/webhook-provision.jsis excluded by!**/dist/**dist/src/pipeline/active-session.jsis excluded by!**/dist/**dist/src/pipeline/artifacts.jsis excluded by!**/dist/**dist/src/pipeline/dag-dispatch.jsis excluded by!**/dist/**dist/src/pipeline/dispatch-service.jsis excluded by!**/dist/**dist/src/pipeline/dispatch-state.jsis excluded by!**/dist/**dist/src/pipeline/guidance.jsis excluded by!**/dist/**dist/src/pipeline/intent-classify.jsis excluded by!**/dist/**dist/src/pipeline/pipeline.jsis excluded by!**/dist/**dist/src/pipeline/planner.jsis excluded by!**/dist/**dist/src/pipeline/planning-state.jsis excluded by!**/dist/**dist/src/pipeline/taskflow-bridge.jsis excluded by!**/dist/**dist/src/pipeline/tier-assess.jsis excluded by!**/dist/**dist/src/pipeline/webhook.jsis excluded by!**/dist/**dist/src/tools/claude-tool.jsis excluded by!**/dist/**dist/src/tools/cli-shared.jsis excluded by!**/dist/**dist/src/tools/code-tool.jsis excluded by!**/dist/**dist/src/tools/codex-tool.jsis excluded by!**/dist/**dist/src/tools/dispatch-history-tool.jsis excluded by!**/dist/**dist/src/tools/gemini-tool.jsis excluded by!**/dist/**dist/src/tools/linear-issues-tool.jsis excluded by!**/dist/**dist/src/tools/orchestration-tools.jsis excluded by!**/dist/**dist/src/tools/planner-tools.jsis excluded by!**/dist/**dist/src/tools/steering-tools.jsis excluded by!**/dist/**dist/src/tools/tools.jsis excluded by!**/dist/**package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (3)
index.tsopenclaw.plugin.jsonpackage.json
| "@vitest/coverage-v8": "^4.0.18", | ||
| "commander": "^14.0.3", | ||
| "openclaw": "^2026.5.9-beta.1", | ||
| "openclaw": "2026.6.1-beta.1", |
There was a problem hiding this comment.
🧹 Nitpick | 🔵 Trivial
Confirm that pinning to exact beta version is intentional.
The openclaw dependency changed from ^2026.5.9-beta.1 to 2026.6.1-beta.1 (caret removed). Pinning to an exact version prevents automatic minor/patch updates. This is appropriate for beta compatibility but means the plugin won't automatically pick up patches like 2026.6.1-beta.2.
Is this exact pinning intentional, or should it be ^2026.6.1-beta.1 to allow patch updates within the same minor version?
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@package.json` at line 45, The package.json currently pins the openclaw
dependency exactly as "openclaw": "2026.6.1-beta.1", which prevents automatic
minor/patch updates; confirm whether this exact pin is intentional for strict
beta reproducibility, and if not, change the version string to allow semver
updates (for example use "^2026.6.1-beta.1") in package.json so the plugin will
pick up compatible patch/beta revisions—update the value associated with the
"openclaw" key accordingly.
There was a problem hiding this comment.
Pull request overview
Updates the Linear integration plugin to align with the latest OpenClaw runtime contract, switching the plugin entrypoint to built dist/ output and expanding the declared plugin contracts/config surface.
Changes:
- Package now ships/loads compiled
dist/output and pins the OpenClaw dev SDK to2026.6.1-beta.1. - Declares startup activation + tool contracts and adds new plugin config keys in
openclaw.plugin.json. - Adds/updates compiled runtime code for dispatch lifecycle, planning tools, CLI backends, and observability helpers.
Reviewed changes
Copilot reviewed 4 out of 52 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| package.json | Switches extension entrypoint to dist/ and adds a build script / SDK pin. |
| openclaw.plugin.json | Declares activation, tool contracts, and additional config schema keys. |
| index.ts | Moves dispatch-history context injection to before_prompt_build. |
| dist/src/tools/tools.js | Registers the plugin’s tool set (code/orchestration/issues/steering). |
| dist/src/tools/steering-tools.js | Adds tmux steering tools (steer/capture/abort). |
| dist/src/tools/planner-tools.js | Adds planning tools + plan snapshot/audit helpers. |
| dist/src/tools/orchestration-tools.js | Adds agent delegation tools (spawn_agent, ask_agent). |
| dist/src/tools/linear-issues-tool.js | Adds direct Linear issue management tool (linear_issues). |
| dist/src/tools/gemini-tool.js | Implements Gemini CLI runner with streaming + tmux support. |
| dist/src/tools/dispatch-history-tool.js | Adds dispatch history search tool over state + memory files. |
| dist/src/tools/codex-tool.js | Implements Codex CLI runner with streaming + tmux support. |
| dist/src/tools/code-tool.js | Implements backend selection + tool wrappers for CLI coding tools. |
| dist/src/tools/cli-shared.js | Adds shared helpers for CLI runners (session/prompt/progress). |
| dist/src/tools/claude-tool.js | Implements Claude CLI runner with streaming + tmux support. |
| dist/src/pipeline/tier-assess.js | Adds LLM-based issue tier assessment with fallback logic. |
| dist/src/pipeline/taskflow-bridge.js | Bridges dispatch lifecycle into OpenClaw durable task-flow API. |
| dist/src/pipeline/planning-state.js | Adds file-backed planning session state with locking. |
| dist/src/pipeline/planner.js | Adds planning session orchestration + cross-model review flow. |
| dist/src/pipeline/intent-classify.js | Adds intent classification for comment routing and planning control. |
| dist/src/pipeline/guidance.js | Extracts/caches workspace guidance and formats prompt appendix. |
| dist/src/pipeline/dispatch-state.js | Adds persistent dispatch state v2 + CAS transitions and session map. |
| dist/src/pipeline/dispatch-service.js | Adds background monitor for stale/zombie dispatch detection + pruning. |
| dist/src/pipeline/dag-dispatch.js | Adds DAG-based project dispatch queue/state scaffolding. |
| dist/src/pipeline/artifacts.js | Adds .claw/ artifact conventions and dispatch memory writing. |
| dist/src/pipeline/active-session.js | Tracks active sessions + issue-agent affinity and hydration on startup. |
| dist/src/infra/webhook-provision.js | Adds webhook provisioning/inspection helpers. |
| dist/src/infra/validation.js | Adds shared ID validation + prompt sanitization helper. |
| dist/src/infra/token-refresh-timer.js | Adds proactive OAuth token refresh timer. |
| dist/src/infra/tmux.js | Adds tmux availability + session naming + shell escaping helpers. |
| dist/src/infra/tmux-runner.js | Adds tmux-based runner with JSONL tailing + completion detection. |
| dist/src/infra/template.js | Adds shared {{key}} template rendering helper. |
| dist/src/infra/shared-profiles.js | Consolidates agent profile loading/resolution and validation helpers. |
| dist/src/infra/resilience.js | Adds retry + circuit breaker wrappers for external calls. |
| dist/src/infra/observability.js | Adds diagnostic log emitter. |
| dist/src/infra/notify.js | Adds unified notification routing (in-process + CLI fallback). |
| dist/src/infra/multi-repo.js | Adds multi-repo resolution for dispatches. |
| dist/src/infra/file-lock.js | Adds shared file lock implementation for state files. |
| dist/src/infra/commands.js | Adds /dispatch command handlers (list/status/retry/escalate). |
| dist/src/infra/codex-worktree.js | Adds worktree management + PR creation helpers. |
| dist/src/gateway/dispatch-methods.js | Adds gateway RPC methods for dispatch lifecycle management. |
| dist/src/api/oauth-callback.js | Adds OAuth callback handler and token storage. |
| dist/src/api/auth.js | Adds Linear auth provider registration and token refresh helper. |
| dist/src/agent/watchdog.js | Adds inactivity watchdog + per-agent watchdog config resolution. |
| dist/src/agent/agent.js | Adds agent runner with embedded streaming + read-only enforcement + retries. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "files": [ | ||
| "index.ts", | ||
| "dist/", | ||
| "src/", | ||
| "openclaw.plugin.json", | ||
| "prompts.yaml", | ||
| "README.md" | ||
| ], |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
index.ts (1)
451-453: 🧹 Nitpick | 🔵 Trivial | 💤 Low valueConsider using absolute paths or validating CLI binary paths.
The CLI binary paths default to
~/.npm-global/bin/<name>, but this directory may not exist on all systems. The current implementation checks availability at startup (lines 456-475), which is good, but it might be clearer to useprocess.env.PATH-based resolution or require absolute paths in the config.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@index.ts` around lines 451 - 453, The plugin CLI entries currently use a default relative/home-based bin path via defaultBinDir and pluginConfig (e.g., the "codex"/"claude"/"gemini" array items) which may not exist on all systems; update the resolution to require/normalize absolute paths by expanding "~" and calling path.resolve on pluginConfig.*Bin if provided, otherwise resolve the binary via process.env.PATH (using a "which" lookup or fs.existsSync on candidate paths) before accepting it, and add validation logic in the existing startup availability check (the code that verifies binaries at boot) to fail fast with a clear error if neither an absolute path nor a PATH-resolvable binary is found; ensure you reference and update the places that construct those array entries (using defaultBinDir and pluginConfig.*Bin) so configs must supply absolute paths or the code auto-resolves via PATH.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@index.ts`:
- Around line 451-453: The plugin CLI entries currently use a default
relative/home-based bin path via defaultBinDir and pluginConfig (e.g., the
"codex"/"claude"/"gemini" array items) which may not exist on all systems;
update the resolution to require/normalize absolute paths by expanding "~" and
calling path.resolve on pluginConfig.*Bin if provided, otherwise resolve the
binary via process.env.PATH (using a "which" lookup or fs.existsSync on
candidate paths) before accepting it, and add validation logic in the existing
startup availability check (the code that verifies binaries at boot) to fail
fast with a clear error if neither an absolute path nor a PATH-resolvable binary
is found; ensure you reference and update the places that construct those array
entries (using defaultBinDir and pluginConfig.*Bin) so configs must supply
absolute paths or the code auto-resolves via PATH.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 75f2033b-c96c-4246-a05a-e9d5242fe4bb
⛔ Files ignored due to path filters (48)
dist/index.jsis excluded by!**/dist/**dist/src/agent/agent.jsis excluded by!**/dist/**dist/src/agent/watchdog.jsis excluded by!**/dist/**dist/src/api/auth.jsis excluded by!**/dist/**dist/src/api/linear-api.jsis excluded by!**/dist/**dist/src/api/oauth-callback.jsis excluded by!**/dist/**dist/src/gateway/dispatch-methods.jsis excluded by!**/dist/**dist/src/infra/cli.jsis excluded by!**/dist/**dist/src/infra/codex-worktree.jsis excluded by!**/dist/**dist/src/infra/commands.jsis excluded by!**/dist/**dist/src/infra/doctor.jsis excluded by!**/dist/**dist/src/infra/file-lock.jsis excluded by!**/dist/**dist/src/infra/multi-repo.jsis excluded by!**/dist/**dist/src/infra/notify.jsis excluded by!**/dist/**dist/src/infra/observability.jsis excluded by!**/dist/**dist/src/infra/resilience.jsis excluded by!**/dist/**dist/src/infra/shared-profiles.jsis excluded by!**/dist/**dist/src/infra/template.jsis excluded by!**/dist/**dist/src/infra/tmux-runner.jsis excluded by!**/dist/**dist/src/infra/tmux.jsis excluded by!**/dist/**dist/src/infra/token-refresh-timer.jsis excluded by!**/dist/**dist/src/infra/validation.jsis excluded by!**/dist/**dist/src/infra/webhook-provision.jsis excluded by!**/dist/**dist/src/pipeline/active-session.jsis excluded by!**/dist/**dist/src/pipeline/artifacts.jsis excluded by!**/dist/**dist/src/pipeline/dag-dispatch.jsis excluded by!**/dist/**dist/src/pipeline/dispatch-service.jsis excluded by!**/dist/**dist/src/pipeline/dispatch-state.jsis excluded by!**/dist/**dist/src/pipeline/guidance.jsis excluded by!**/dist/**dist/src/pipeline/intent-classify.jsis excluded by!**/dist/**dist/src/pipeline/pipeline.jsis excluded by!**/dist/**dist/src/pipeline/planner.jsis excluded by!**/dist/**dist/src/pipeline/planning-state.jsis excluded by!**/dist/**dist/src/pipeline/taskflow-bridge.jsis excluded by!**/dist/**dist/src/pipeline/tier-assess.jsis excluded by!**/dist/**dist/src/pipeline/webhook.jsis excluded by!**/dist/**dist/src/tools/claude-tool.jsis excluded by!**/dist/**dist/src/tools/cli-shared.jsis excluded by!**/dist/**dist/src/tools/code-tool.jsis excluded by!**/dist/**dist/src/tools/codex-tool.jsis excluded by!**/dist/**dist/src/tools/dispatch-history-tool.jsis excluded by!**/dist/**dist/src/tools/gemini-tool.jsis excluded by!**/dist/**dist/src/tools/linear-issues-tool.jsis excluded by!**/dist/**dist/src/tools/orchestration-tools.jsis excluded by!**/dist/**dist/src/tools/planner-tools.jsis excluded by!**/dist/**dist/src/tools/steering-tools.jsis excluded by!**/dist/**dist/src/tools/tools.jsis excluded by!**/dist/**package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (4)
.github/dependabot.ymlindex.tsopenclaw.plugin.jsonpackage.json
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Summary
dist/output and add abuildscript2026.6.1-beta.1for the latest runtime contract surfaceopenclaw.plugin.jsonbefore_agent_starttobefore_prompt_buildVerification
npm run buildnpm run typechecknpm test— 42 files / 1202 tests passedopenclaw@2026.5.28:npm run typecheckandnpm testpassed in a temp copy