Skip to content

feat: enable /schedule by adding AGENT_TRIGGERS_REMOTE to default features#88

Merged
claude-code-best merged 1 commit intoclaude-code-best:mainfrom
amDosion:feat/enable-schedule-remote-agents
Apr 3, 2026
Merged

feat: enable /schedule by adding AGENT_TRIGGERS_REMOTE to default features#88
claude-code-best merged 1 commit intoclaude-code-best:mainfrom
amDosion:feat/enable-schedule-remote-agents

Conversation

@amDosion
Copy link
Copy Markdown
Contributor

@amDosion amDosion commented Apr 3, 2026

Summary

  • scripts/dev.ts: DEFAULT_FEATURES 加入 "AGENT_TRIGGERS_REMOTE"
  • build.ts: 新增 DEFAULT_BUILD_FEATURES = ["AGENT_TRIGGERS_REMOTE"],与 env 合并

Why

/schedule skill 和 RemoteTriggerTool 源码已在 src/ 中,但 feature('AGENT_TRIGGERS_REMOTE') 构建时默认 false,Bun DCE 把整条链路裁掉了。只需开启编译开关即可恢复。

Test plan

  • bun run dev → 输入 /schedule 能看到交互式工作流
  • bun run builddist/ 中包含 "scheduled remote agents" 字符串
  • /loop 和 CronCreate/Delete/List 不受影响

🤖 Generated with Claude Code

Summary by CodeRabbit

Release Notes

  • New Features
    • Enabled Agent Triggers Remote feature by default during development and builds, with support for additional features via environment variables.

…tures

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 3, 2026

📝 Walkthrough

Walkthrough

Two files were modified to incorporate the AGENT_TRIGGERS_REMOTE feature into the build system. build.ts introduces a DEFAULT_BUILD_FEATURES constant and updates feature selection logic to combine default features with environment variable-derived features. scripts/dev.ts adds AGENT_TRIGGERS_REMOTE to the dev-time default feature list.

Changes

Cohort / File(s) Summary
Feature Flag Configuration
build.ts
Added DEFAULT_BUILD_FEATURES constant and modified feature selection to merge default features with FEATURE_* environment variables, ensuring the AGENT_TRIGGERS_REMOTE feature is always included during builds.
Dev Default Features
scripts/dev.ts
Updated dev-time default feature list to include AGENT_TRIGGERS_REMOTE alongside existing defaults (BUDDY, TRANSCRIPT_CLASSIFIER, BRIDGE_MODE).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • PR #60: Modifies the dev-mode default feature list in scripts/dev.ts to add BRIDGE_MODE, sharing the same code-level pattern of updating feature flags.

Poem

🐰 A feature springs to life so bright,
With triggers remote, firing right,
Build and dev both know its name,
Default now—in fame and flame! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: adding AGENT_TRIGGERS_REMOTE to default features to enable the /schedule functionality.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

Review ran into problems

🔥 Problems

Git: Failed to clone repository. Please run the @coderabbitai full review command to re-trigger a full review. If the issue persists, set path_filters to include or exclude specific files.


Comment @coderabbitai help to get the list of available commands and usage tips.

@amDosion
Copy link
Copy Markdown
Contributor Author

amDosion commented Apr 3, 2026

image

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@build.ts`:
- Around line 11-19: DEFAULT_BUILD_FEATURES currently only includes
"AGENT_TRIGGERS_REMOTE" causing production builds (the features array derived
from envFeatures and DEFAULT_BUILD_FEATURES) to miss BUDDY,
TRANSCRIPT_CLASSIFIER, and BRIDGE_MODE which are enabled by default in dev;
either add "BUDDY", "TRANSCRIPT_CLASSIFIER", and "BRIDGE_MODE" to
DEFAULT_BUILD_FEATURES in build.ts so the features constant matches the dev
configuration (and update any related docs/tests), or explicitly document the
intentional difference and audit code paths that reference these flags (search
for BUDDY, TRANSCRIPT_CLASSIFIER, BRIDGE_MODE usages) to ensure they handle the
disabled state gracefully.
🪄 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: defaults

Review profile: CHILL

Plan: Pro

Run ID: 619bcef9-0b81-4d2c-b14f-13c7e35d1cff

📥 Commits

Reviewing files that changed from the base of the PR and between a6bef45 and 2ad754d.

📒 Files selected for processing (2)
  • build.ts
  • scripts/dev.ts

Comment on lines +11 to +19
// Default features that match the official CLI build.
// Additional features can be enabled via FEATURE_<NAME>=1 env vars.
const DEFAULT_BUILD_FEATURES = ["AGENT_TRIGGERS_REMOTE"];

// Collect FEATURE_* env vars → Bun.build features
const features = Object.keys(process.env)
const envFeatures = Object.keys(process.env)
.filter(k => k.startsWith("FEATURE_"))
.map(k => k.replace("FEATURE_", ""));
const features = [...new Set([...DEFAULT_BUILD_FEATURES, ...envFeatures])];
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Check if other features like BUDDY, TRANSCRIPT_CLASSIFIER, BRIDGE_MODE are used in production code paths

echo "=== Checking feature gates in src/ ==="
rg -n "feature\(['\"]BUDDY" --type=ts
rg -n "feature\(['\"]TRANSCRIPT_CLASSIFIER" --type=ts
rg -n "feature\(['\"]BRIDGE_MODE" --type=ts

echo "=== Checking if these features have production usage ==="
rg -n "feature\(" src/ --type=ts -C2 | head -50

Repository: claude-code-best/claude-code

Length of output: 19531


Missing features in production build: align DEFAULT_BUILD_FEATURES between build.ts and scripts/dev.ts.

DEFAULT_BUILD_FEATURES in build.ts only enables AGENT_TRIGGERS_REMOTE, but the codebase contains extensive production usage of BUDDY, TRANSCRIPT_CLASSIFIER, and BRIDGE_MODE—features that are enabled by default in scripts/dev.ts.

The shell search confirms these are not experimental flags:

  • TRANSCRIPT_CLASSIFIER: 100+ usages across permission systems, auto-mode, settings, and core permissions logic
  • BUDDY: 30+ usages in UI components (CompanionSprite, REPL, PromptInput)
  • BRIDGE_MODE: 40+ usages in bridge commands, remote control, and core hooks

If disabling these in the production build is intentional, document why and ensure downstream code handles the disabled state gracefully. Otherwise, add them to DEFAULT_BUILD_FEATURES in build.ts to match the dev configuration.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@build.ts` around lines 11 - 19, DEFAULT_BUILD_FEATURES currently only
includes "AGENT_TRIGGERS_REMOTE" causing production builds (the features array
derived from envFeatures and DEFAULT_BUILD_FEATURES) to miss BUDDY,
TRANSCRIPT_CLASSIFIER, and BRIDGE_MODE which are enabled by default in dev;
either add "BUDDY", "TRANSCRIPT_CLASSIFIER", and "BRIDGE_MODE" to
DEFAULT_BUILD_FEATURES in build.ts so the features constant matches the dev
configuration (and update any related docs/tests), or explicitly document the
intentional difference and audit code paths that reference these flags (search
for BUDDY, TRANSCRIPT_CLASSIFIER, BRIDGE_MODE usages) to ensure they handle the
disabled state gracefully.

@claude-code-best claude-code-best merged commit eb86e34 into claude-code-best:main Apr 3, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants