chore(cursor): relocate cursor bundle to harnesses/cursor/bundle/ + agent restructuring#268
Conversation
📝 WalkthroughWalkthroughRenames the Cursor harness bundle output directory from ChangesCursor Bundle Directory Relocation
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~4 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
| writeFileSync(join(tmpPkg, "cursor", "bundle", "pre-tool-use.js"), "// fake bundle"); | ||
| writeFileSync(join(tmpPkg, "cursor", "bundle", "session-end.js"), "// fake bundle"); | ||
| mkdirSync(join(tmpPkg, "harnesses", "cursor", "bundle"), { recursive: true }); | ||
| writeFileSync(join(tmpPkg, "harnesses", "cursor", "bundle", "session-start.js"), "// fake bundle"); |
| writeFileSync(join(tmpPkg, "cursor", "bundle", "session-end.js"), "// fake bundle"); | ||
| mkdirSync(join(tmpPkg, "harnesses", "cursor", "bundle"), { recursive: true }); | ||
| writeFileSync(join(tmpPkg, "harnesses", "cursor", "bundle", "session-start.js"), "// fake bundle"); | ||
| writeFileSync(join(tmpPkg, "harnesses", "cursor", "bundle", "capture.js"), "// fake bundle"); |
| mkdirSync(join(tmpPkg, "harnesses", "cursor", "bundle"), { recursive: true }); | ||
| writeFileSync(join(tmpPkg, "harnesses", "cursor", "bundle", "session-start.js"), "// fake bundle"); | ||
| writeFileSync(join(tmpPkg, "harnesses", "cursor", "bundle", "capture.js"), "// fake bundle"); | ||
| writeFileSync(join(tmpPkg, "harnesses", "cursor", "bundle", "pre-tool-use.js"), "// fake bundle"); |
| writeFileSync(join(tmpPkg, "harnesses", "cursor", "bundle", "session-start.js"), "// fake bundle"); | ||
| writeFileSync(join(tmpPkg, "harnesses", "cursor", "bundle", "capture.js"), "// fake bundle"); | ||
| writeFileSync(join(tmpPkg, "harnesses", "cursor", "bundle", "pre-tool-use.js"), "// fake bundle"); | ||
| writeFileSync(join(tmpPkg, "harnesses", "cursor", "bundle", "session-end.js"), "// fake bundle"); |
dcf4bae to
9bf4c99
Compare
Move the cursor hook bundle from the top-level cursor/bundle/ to harnesses/cursor/bundle/ for consistency with every other agent harness. Updates: - esbuild.config.mjs: outdir, chmodSync, writeFileSync - .gitignore: cursor/bundle/ -> harnesses/cursor/bundle/ - package.json: files array - .github/workflows/ci.yaml: 4 bundle smoke-test paths (2 jobs) - .github/workflows/release.yaml: 2 artifact paths - README.md: build-output comment - src/cli/install-cursor.ts: srcBundle pkgRoot join - 5 test files: all cursor/bundle path references updated to match
…el-matrix path Move @huggingface/transformers from dependencies to optionalDependencies in package-lock.json — embeddings are opt-in and should not be a hard install requirement, matching the intent of the main package.json. Fix the model-comparison-matrix.md reference in .cursor/rules/plan-construction-protocol.mdc from the stale legion-shared/ path to the correct .cursor/ location where the file actually lives.
9bf4c99 to
d6b6c5b
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 `@tests/cli/cli-install-cursor-fs.test.ts`:
- Around line 114-118: The test for the missing-bundle path is using a
substring-based regex assertion with toThrow(/Cursor bundle missing/) that could
miss incorrect paths in the actual error message. Replace this substring
assertion with an exact error message assertion that includes the full expected
path harnesses/cursor/bundle. Update the expect() call to match the complete
error message that should be thrown by installCursor() to ensure it contains
both the descriptive text and the correct bundle path, following the coding
guideline to prefer asserting on specific values over generic substrings.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: b945f6ce-8b8a-4130-ac7c-65e52379e55f
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json,!**/package-lock.json
📒 Files selected for processing (12)
.github/workflows/ci.yaml.github/workflows/release.yaml.gitignoreesbuild.config.mjspackage.jsonsrc/cli/install-cursor.tstests/claude-code/embeddings-bundle-scan.test.tstests/claude-code/plugin-version-resolution.test.tstests/claude-code/skillify-bundle-scan.test.tstests/claude-code/skillify-session-start-injection.test.tstests/claude-code/version-define-bundles.test.tstests/cli/cli-install-cursor-fs.test.ts
|
@khustup2 @claude @activeloop-bot I can't merge, can you? |
…t review Brings the focused-PR (activeloopai#271) hardening back into the full sweep so activeloopai#270 is the single shippable PR (it correctly keeps the approved cursor relocation from activeloopai#268). Changes: CodeQL Critical (auth.ts): the OAuth browser opener fed a server-derived verification URL into `cmd /c start` on Windows (cmd re-parses its own command line). Now validate the URL (https scheme, parsed) and open via `rundll32 url.dll,FileProtocolHandler` with no shell interpreter. CodeQL High (tests): cli-install-cursor-fs.test.ts creates its temp root with mkdtempSync instead of a predictable tmpdir join. Wiki-summarizer prompt-injection blast radius (Option B, full fix): pivot the Claude summarizer to the stdout model. Session transcript + existing summary are inlined into the prompt as untrusted DATA (delivered over stdin), the agent emits the summary to stdout, and the worker sanitizes (control-char strip + 100k cap) and uploads it from memory. CLAUDE_FLAGS drops bypassPermissions and all --allowedTools, so the agent has zero tools. No tmp summary file is written or read back, removing the file-system race too. CodeRabbit review: pack-check secret patterns are case-insensitive (ID_RSA / Credentials.JSON / .ENV can't bypass the publish gate); grep-core.ts and deeplake-fs.ts wrap sqlIdent() identifiers in double quotes to match the codebase convention and preserve PostgreSQL case semantics; vfs-handler test asserts the stable "Failed to parse snapshot" prefix. Full suite green (cli-update failures are a pre-existing parallel-isolation flake that passes in isolation and on CI).
…MPLATE main advanced (activeloopai#268 cursor relocation + activeloopai#269 memory-backfill merged). activeloopai#269's src/skillify/stage-memory.ts imports WIKI_PROMPT_TEMPLATE and runs its own file-writing summarizer (agent writes the summary file, stage-memory reads it back). Option B had repurposed that shared template for the stdout/no-file model, so on merge stage-memory's agent was told to emit to stdout and never wrote the file, failing all 8 stage-memory.test.ts / stage-memory-wiring.test.ts assertions. Decouple instead of rewriting activeloopai#269: WIKI_PROMPT_TEMPLATE is restored to its original file-based contract (what stage-memory and the cross-fork Next Steps contract expect), and the Option B inline/stdout prompt moves to a dedicated WIKI_STDOUT_PROMPT_TEMPLATE that spawnWikiWorker passes to the live wiki-worker. stage-memory.ts and its tests are untouched and pass as-is. Merged upstream/main into the branch to sync (relocation now lands via activeloopai#268). Full npm test green except the pre-existing cli-index --version parallel-isolation flake (passes in isolation; present on main via activeloopai#269).
Summary
This is PR 3 in a stacked series. It contains two independent changes that both needed to land after the
harnesses/reorganisation from PR #265:cursor/bundle/toharnesses/cursor/bundle/for full consistency with every other agent harness.Stacked on PR #267. The diff against
mainincludes PR #267's changes since that PR is not yet merged; the PR #268-specific commits are the last four in the list.1. Cursor bundle path relocation
Why deferred from #265: the cursor hook bundle and the cursor extension were coupled in the fork. PR #265 added
harnesses/cursor/.gitkeepas a placeholder and noted this would follow. This is that follow-up.Files changed (path-string updates only, zero behavior change):
esbuild.config.mjsoutdir,chmodSync,writeFileSynctargets.gitignorecursor/bundle/->harnesses/cursor/bundle/package.jsonfilesarray entry.github/workflows/ci.yaml.github/workflows/release.yamlREADME.mdsrc/cli/install-cursor.tssrcBundlejoin pathcursor/bundlepath references2. Agent restructuring
Replaces the initial generic 37-bee roster (broad domain advisors) with 25 hivemind-specific worker-bees that know this codebase's actual conventions:
Added (hivemind-specific):
typescript-node-worker-bee,deeplake-dataset-worker-bee,ci-release-worker-bee,retrieval-worker-bee,embeddings-runtime-worker-bee,harness-integration-worker-bee,mcp-protocol-worker-bee,mcp-tool-docs-worker-beeRetained and updated:
security-worker-bee,quality-worker-bee,git-worker-bee,github-repo-health-worker-bee,cursor-ide-worker-bee,dependency-audit-worker-bee,library-worker-bee,knowledge-worker-bee,wiki-worker-bee,adr-writing-worker-bee,branching-strategy-worker-bee,code-review-pr-worker-bee,changelog-release-notes-worker-bee,readme-writing-worker-bee,runbook-writing-worker-bee,technical-writing-craft-worker-bee,terminal-bash-worker-beeRemoved (too generic for this codebase):
agile-scrum,kanban-flow,okr-goal-setting,retrospective,docs-site,api-docs,ai-tools-platform,ai-coding-tools,mind,db,python,react,devops,design-system,discovery-research,slack-app,markdown-mdx, and othersAlso adds
.cursor/model-comparison-matrix.md(380-line scored model-routing rubric) wired into/the-smoker.Additional fixes
package-lock.json: moves@huggingface/transformersfromdependenciestooptionalDependencies(embeddings are opt-in)..cursor/rules/plan-construction-protocol.mdc: fixes stalelegion-shared/model-comparison-matrix.mdpath to.cursor/model-comparison-matrix.md.Testing
npm run build: green, cursor bundle lands atharnesses/cursor/bundle/with no top-levelcursor/bundle/created.npm test: 4483-4487/4487 passing (the 4cli-updatefailures are pre-existing sandbox TTY flakes, byte-identical toupstream/main, confirmed passing in real CI).Contribution by Legion Code Inc. / Mario Aldayuz
Summary by CodeRabbit