Преглед изворни кода

feat: expand dev full experimental bundle

paoloanzn пре 2 месеци
родитељ
комит
8e159b6ec3
3 измењених фајлова са 59 додато и 4 уклоњено
  1. 4 3
      FEATURES.md
  2. 1 1
      package.json
  3. 54 0
      scripts/build.ts

+ 4 - 3
FEATURES.md

@@ -22,9 +22,10 @@ externalized `@ant/*` packages.
 - `bun run build:dev`
   Builds `./cli-dev` with a dev-stamped version and experimental GrowthBook key.
 - `bun run build:dev:full`
-  Builds `./cli-dev` with the current compile-safe experimental bundle:
-  `QUICK_SEARCH`, `HISTORY_PICKER`, `TOKEN_BUDGET`, `ULTRAPLAN`,
-  `CACHED_MICROCOMPACT`, and `PROMPT_CACHE_BREAK_DETECTION`.
+  Builds `./cli-dev` with the entire current "Working Experimental Features"
+  bundle from this document, minus `CHICAGO_MCP`. That flag still compiles,
+  but the external binary does not boot cleanly with it because startup
+  reaches the missing `@ant/computer-use-mcp` runtime package.
 
 ## Default Build Flags
 

+ 1 - 1
package.json

@@ -15,7 +15,7 @@
   "scripts": {
     "build": "bun run ./scripts/build.ts",
     "build:dev": "bun run ./scripts/build.ts --dev",
-    "build:dev:full": "bun run ./scripts/build.ts --dev --feature=QUICK_SEARCH --feature=HISTORY_PICKER --feature=TOKEN_BUDGET --feature=ULTRAPLAN --feature=CACHED_MICROCOMPACT --feature=PROMPT_CACHE_BREAK_DETECTION",
+    "build:dev:full": "bun run ./scripts/build.ts --dev --feature-set=dev-full",
     "compile": "bun run ./scripts/build.ts --compile",
     "dev": "bun run ./src/entrypoints/cli.tsx"
   },

+ 54 - 0
scripts/build.ts

@@ -10,6 +10,45 @@ const args = process.argv.slice(2)
 const compile = args.includes('--compile')
 const dev = args.includes('--dev')
 
+const fullExperimentalFeatures = [
+  'AGENT_MEMORY_SNAPSHOT',
+  'AGENT_TRIGGERS',
+  'AGENT_TRIGGERS_REMOTE',
+  'AWAY_SUMMARY',
+  'BASH_CLASSIFIER',
+  'BRIDGE_MODE',
+  'BUILTIN_EXPLORE_PLAN_AGENTS',
+  'CACHED_MICROCOMPACT',
+  'CCR_AUTO_CONNECT',
+  'CCR_MIRROR',
+  'CCR_REMOTE_SETUP',
+  'COMPACTION_REMINDERS',
+  'CONNECTOR_TEXT',
+  'EXTRACT_MEMORIES',
+  'HISTORY_PICKER',
+  'HOOK_PROMPTS',
+  'KAIROS_BRIEF',
+  'KAIROS_CHANNELS',
+  'LODESTONE',
+  'MCP_RICH_OUTPUT',
+  'MESSAGE_ACTIONS',
+  'NATIVE_CLIPBOARD_IMAGE',
+  'NEW_INIT',
+  'POWERSHELL_AUTO_MODE',
+  'PROMPT_CACHE_BREAK_DETECTION',
+  'QUICK_SEARCH',
+  'SHOT_STATS',
+  'TEAMMEM',
+  'TOKEN_BUDGET',
+  'TREE_SITTER_BASH',
+  'TREE_SITTER_BASH_SHADOW',
+  'ULTRAPLAN',
+  'ULTRATHINK',
+  'UNATTENDED_RETRY',
+  'VERIFICATION_AGENT',
+  'VOICE_MODE',
+] as const
+
 function runCommand(cmd: string[]): string | null {
   const proc = Bun.spawnSync({
     cmd,
@@ -44,6 +83,21 @@ const defaultFeatures = ['VOICE_MODE']
 const featureSet = new Set(defaultFeatures)
 for (let i = 0; i < args.length; i += 1) {
   const arg = args[i]
+  if (arg === '--feature-set' && args[i + 1]) {
+    if (args[i + 1] === 'dev-full') {
+      for (const feature of fullExperimentalFeatures) {
+        featureSet.add(feature)
+      }
+    }
+    i += 1
+    continue
+  }
+  if (arg === '--feature-set=dev-full') {
+    for (const feature of fullExperimentalFeatures) {
+      featureSet.add(feature)
+    }
+    continue
+  }
   if (arg === '--feature' && args[i + 1]) {
     featureSet.add(args[i + 1]!)
     i += 1