feat: add docs site and refresh landing#122
Conversation
|
Warning Review limit reached
More reviews will be available in 33 minutes and 16 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughAdds a public docs site and deployment wiring, migrates the landing app to Starwind-based composition and scripts, and propagates a configurable shadowing policy through core config, attach, and native runtime paths. ChangesPublic docs site and deployment wiring
Landing app Starwind migration
Configurable caplet shadowing
Estimated code review effort🎯 5 (Critical) | ⏱️ ~120 minutes Possibly related PRs
Poem
✨ Finishing Touches🧪 Generate unit tests (beta)
|
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Preview DeployedLanding: https://pr-122.preview.caplets.dev Built from commit 1f18e00 |
|
| Filename | Overview |
|---|---|
| packages/core/src/native/remote.ts | Propagates per-caplet shadowing through primitive tool construction and code mode runner; aggregate codeModeShadowing logic is directionally inconsistent with the !== "allow" predicate used elsewhere. |
| packages/core/src/native/service.ts | Replaces hardcoded localHasCaplet && !remoteHasCaplet routing with shadowing-aware localCanExecute; remoteSuppressedCapletIds correctly uses !== "allow" (safe default for undefined). |
| packages/core/src/attach/api.ts | Adds shadowingPolicy() helper that defaults to "forbid"; consistently applied across all export builders and completionExports now preserves per-caplet policies instead of a flat Set. |
| packages/core/src/config.ts | Adds shadowing field to all six caplet config types and corresponding zod schemas with .default("forbid"); type CapletShadowingPolicy duplicated from config-runtime.ts. |
| packages/core/src/config-runtime.ts | Adds shadowingSchema with .default("forbid") and threads shadowing through commonSchema; CapletShadowingPolicy type is a duplicate of the one in config.ts. |
| scripts/generate-docs-reference.ts | New script generating MDX reference pages from JSON schemas and TypeScript declarations; stdio: "inherit" for oxfmt gives visible formatter errors; --check mode for CI gate. |
| scripts/check-public-docs.ts | Validates required docs pages exist, contain expected content strings, and contain no internal path references; clean implementation with clear failure messages. |
| apps/docs/astro.config.mjs | Starlight/Astro config for new docs site with sitemap, correct sidebar structure, and custom theme components. |
| packages/core/test/native-remote.test.ts | Adds four new tests covering: allow-shadowing keeps local visible, forbid-shadowing routes execution to remote, allow-shadowing on direct tools routes execution locally, and direct tools carry their source caplet ID. |
| alchemy.run.ts | Adds docsPage Astro deployment; preview comment now lists both Landing and Docs URLs with a simplified format. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["CompositeNativeCapletsService.execute(capletId)"] --> B{capletId === codeModeToolId?}
B -- yes --> C[executeCodeModeRunNative]
B -- no --> D{localCanExecute?}
D -- yes --> E[local.execute]
D -- no --> F[remote.execute]
D --> G["remoteSuppressedCapletIds(remote.listTools())"]
G --> H["allRemoteTools.filter(tool.shadowing !== 'allow')"]
G --> I["remoteCodeModeTools.filter(tool.shadowing !== 'allow')"]
H --> J["Set of suppressed caplet IDs"]
I --> J
J --> K["localExecutionKeys(local.listTools(), capletId)"]
K --> L{any key NOT in suppressed set?}
L -- yes --> E
L -- no --> F
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
A["CompositeNativeCapletsService.execute(capletId)"] --> B{capletId === codeModeToolId?}
B -- yes --> C[executeCodeModeRunNative]
B -- no --> D{localCanExecute?}
D -- yes --> E[local.execute]
D -- no --> F[remote.execute]
D --> G["remoteSuppressedCapletIds(remote.listTools())"]
G --> H["allRemoteTools.filter(tool.shadowing !== 'allow')"]
G --> I["remoteCodeModeTools.filter(tool.shadowing !== 'allow')"]
H --> J["Set of suppressed caplet IDs"]
I --> J
J --> K["localExecutionKeys(local.listTools(), capletId)"]
K --> L{any key NOT in suppressed set?}
L -- yes --> E
L -- no --> F
Reviews (10): Last reviewed commit: "fix: address docs setup review feedback" | Re-trigger Greptile
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d2b4457bd7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Actionable comments posted: 14
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
apps/landing/package.json (1)
30-31:⚠️ Potential issue | 🟠 MajorAlign landing Node engine floor with repo contract (Line 31).
"node": ">=22.12.0"conflicts with the repository requirement of Node>=24, which can allow unsupported runtimes into CI/local development.Suggested fix
"engines": { - "node": ">=22.12.0" + "node": ">=24" }🤖 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 `@apps/landing/package.json` around lines 30 - 31, The Node.js engine requirement in the engines object is set to ">=22.12.0", which conflicts with the repository's minimum Node version contract of >=24. Update the "node" field within the "engines" object in the package.json to align with the repository requirement by changing the version constraint to match the repo contract (>=24).Source: Coding guidelines
🤖 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 `@apps/docs/package.json`:
- Line 26: The Node engine requirement in the engines object of the package.json
file is set to >=22.12.0, but it should be >=24 to align with the repository's
coding guidelines. Update the "node" field in the engines section to specify
">=24" instead of ">=22.12.0".
In `@apps/docs/src/styles/global.css`:
- Around line 25-27: The stylelint `value-keyword-case` rule is flagging
mixed-case font names in the CSS custom properties (--sl-font-mono and related
font-family declarations) that are unquoted. To fix this, quote all the
mixed-case font names such as BlinkMacSystemFont, SFMono-Regular, Menlo, Monaco,
and Consolas in the font-family values. This suppresses the lint warning without
changing the actual font rendering, as quoted font names are treated the same as
unquoted ones by browsers.
In `@apps/landing/src/components/starwind/button/Button.astro`:
- Around line 13-20: The Button component does not explicitly set a type
attribute when rendering as a button element (when href is absent). This causes
the button to default to type="submit" inside forms, triggering unintended form
submissions. Add a conditional type attribute to the Tag element that sets
type="button" only when Astro.props.href is falsy, ensuring the button maintains
its intended behavior and doesn't submit forms unexpectedly.
In `@apps/landing/src/components/starwind/card/variants.ts`:
- Line 6: The data attribute selectors in the has() variants use invalid
Tailwind v4 syntax. Replace all instances of has-data-[slot=...] with
has-[[data-slot=...]] using double brackets, where the outer brackets define the
arbitrary :has() variant and the inner brackets properly encapsulate the CSS
attribute selector. This fix needs to be applied in the class string definitions
wherever the has-data-[slot=...] pattern appears.
In `@apps/landing/src/components/starwind/dialog/Dialog.astro`:
- Around line 90-96: When replacing a wrapper button with its child element in
the data-as-child handling block (in the forEach loop that checks
hasAttribute("data-as-child")), the wrapper's attributes are being lost. After
adding the "starwind-dialog-close" class to the child element but before calling
replaceChild, copy all attributes from the wrapper button to the child element
to preserve attributes like data-slot. This ensures the child element retains
both the newly added class and any existing attributes from its wrapper.
In `@apps/landing/src/components/starwind/dialog/DialogTitle.astro`:
- Around line 6-12: The Props type definition for DialogTitle component in
DialogTitle.astro currently omits the id attribute using
Omit<HTMLAttributes<"h2">, "id">, which prevents accessibility labeling via
aria-labelledby. Remove the Omit wrapper and directly extend
HTMLAttributes<"h2"> to preserve all native h2 attributes including id, allowing
dialog compositions to link labels using aria-labelledby for proper
accessibility semantics.
In `@apps/landing/src/components/starwind/tabs/Tabs.astro`:
- Around line 240-245: The nested tab ID generation at the line where `const
uniqueIdx = 1000 + nestedIdx;` is defined uses a hardcoded offset that can
produce duplicate IDs across different nested groups. Replace this line to use
the global counter (which should be incremented for each tab) instead of the
formula `1000 + nestedIdx`. This ensures that every nested tab receives a truly
unique identifier regardless of which group it belongs to or its position within
that group.
- Around line 77-88: The initializeTab method has a bug where an invalid or
non-existent stored/default tab value causes findIndex to return -1, which then
breaks the roving tabindex behavior in setTabIndex(). After assigning
this.currentTabIndex from findIndex on line 84, add validation to check if the
index is -1 (meaning the persisted or default value doesn't match any trigger),
and if so, fall back to the first enabled trigger before calling setTabIndex().
This ensures that roving tabindex is always applied to a valid trigger rather
than failing silently with an invalid index.
In `@apps/landing/src/components/starwind/tabs/TabsContent.astro`:
- Around line 6-21: The TabsContent component in TabsContent.astro lacks proper
ARIA linkage between tab triggers and panels. The Props interface explicitly
omits `id` (line 6), and the rendered tabpanel element (lines 13-21) has no
`aria-labelledby` attribute. To fix this, add `id` to the Props interface so
consumers can pass an identifier, then add an `aria-labelledby` attribute to the
div element that will reference the corresponding tab trigger's ID. This
establishes the required accessibility relationship for assistive technologies
to correctly associate the tabpanel with its trigger.
In `@apps/landing/src/components/starwind/tabs/TabsTrigger.astro`:
- Around line 13-20: The button element in TabsTrigger.astro defaults to
type="submit" since no explicit type attribute is specified, which can cause
accidental form submissions when this component is used inside a form. Add
type="button" as an explicit attribute on the button element alongside the
existing data-tabs-trigger, data-value, data-state, role, and aria-selected
attributes to prevent unwanted form submission behavior.
In `@apps/landing/src/scripts/aperture-scene.ts`:
- Around line 480-497: The updateScrollMode function never checks for a section
that would trigger the remote aperture mode, making it unreachable during normal
page scroll. Add a reference to the remote section element (likely with ID
"remote") similar to the whySection, setupSection, and benchmarkSection
declarations, then add a conditional check in the if-else chain to set nextMode
to "remote" when the user scrolls past that section's offsetTop. The remote
check should be positioned in the conditional hierarchy at the appropriate
scroll position alongside the existing checks for benchmarkSection (code_mode)
and setupSection (progressive).
In `@docs/plans/2026-06-15-docs-site.md`:
- Around line 106-108: Update the Node engine version constraint in the
"engines" object from ">=22.12.0" to ">=24" to align with the repository's
minimum Node version floor as documented in the coding guidelines. This ensures
the documentation example reflects the actual project requirements and prevents
invalid scaffolding if followed.
In `@packages/core/src/native/service.ts`:
- Around line 834-838: The current change at lines 834-838 removes local tools
from the blocklist when shadowing is "allow", but the routing logic in
CompositeNativeCapletsService.execute() still prioritizes remote caplets even
when both local and remote have the same ID. To complete this fix, modify the
routing logic in CompositeNativeCapletsService.execute() to check if the remote
tool has shadowing set to "allow", and if so, allow the local caplet to be
routed to and executed instead of always defaulting to the remote one.
In `@scripts/generate-docs-reference.ts`:
- Around line 22-25: The generatedMarkerComment variable wraps the
generatedMarker string in JSX comment syntax, causing the emitted marker to be
{/* <!-- ... --> */} instead of the exact HTML comment string. When emitting the
generated file marker in the output, use generatedMarker directly instead of
generatedMarkerComment to ensure the marker matches the documented contract
exactly without the JSX wrapper.
---
Outside diff comments:
In `@apps/landing/package.json`:
- Around line 30-31: The Node.js engine requirement in the engines object is set
to ">=22.12.0", which conflicts with the repository's minimum Node version
contract of >=24. Update the "node" field within the "engines" object in the
package.json to align with the repository requirement by changing the version
constraint to match the repo contract (>=24).
🪄 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: ce115ec9-6b77-4a34-907d-72668f651bf8
⛔ Files ignored due to path filters (4)
apps/docs/public/favicon.svgis excluded by!**/*.svgapps/docs/src/assets/caplets-icon.pngis excluded by!**/*.pngapps/landing/public/favicon.svgis excluded by!**/*.svgpnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (121)
.changeset/config.json.github/workflows/deploy.yml.github/workflows/pr-preview-deploy.ymlREADME.mdalchemy.run.tsapps/docs/.gitignoreapps/docs/README.mdapps/docs/astro.config.mjsapps/docs/package.jsonapps/docs/src/content.config.tsapps/docs/src/content/docs/agent-integrations.mdxapps/docs/src/content/docs/capabilities.mdxapps/docs/src/content/docs/changelog.mdxapps/docs/src/content/docs/code-mode.mdxapps/docs/src/content/docs/configuration.mdxapps/docs/src/content/docs/index.mdxapps/docs/src/content/docs/install.mdxapps/docs/src/content/docs/reference/caplet-files.mdxapps/docs/src/content/docs/reference/code-mode-api.mdxapps/docs/src/content/docs/reference/config.mdxapps/docs/src/content/docs/remote-attach.mdxapps/docs/src/content/docs/troubleshooting.mdxapps/docs/src/styles/global.cssapps/docs/tsconfig.jsonapps/landing/package.jsonapps/landing/public/config.schema.jsonapps/landing/src/components/HugeIcon.astroapps/landing/src/components/landing/Activation.astroapps/landing/src/components/landing/AgentTrace.astroapps/landing/src/components/landing/CapabilityAperture.astroapps/landing/src/components/landing/CommandBlock.astroapps/landing/src/components/landing/Footer.astroapps/landing/src/components/landing/Header.astroapps/landing/src/components/landing/Hero.astroapps/landing/src/components/landing/Proof.astroapps/landing/src/components/landing/RemoteStory.astroapps/landing/src/components/landing/WhyCaplets.astroapps/landing/src/components/starwind/badge/Badge.astroapps/landing/src/components/starwind/badge/index.tsapps/landing/src/components/starwind/badge/variants.tsapps/landing/src/components/starwind/button/Button.astroapps/landing/src/components/starwind/button/index.tsapps/landing/src/components/starwind/button/variants.tsapps/landing/src/components/starwind/card/Card.astroapps/landing/src/components/starwind/card/CardAction.astroapps/landing/src/components/starwind/card/CardContent.astroapps/landing/src/components/starwind/card/CardDescription.astroapps/landing/src/components/starwind/card/CardFooter.astroapps/landing/src/components/starwind/card/CardHeader.astroapps/landing/src/components/starwind/card/CardTitle.astroapps/landing/src/components/starwind/card/index.tsapps/landing/src/components/starwind/card/variants.tsapps/landing/src/components/starwind/dialog/Dialog.astroapps/landing/src/components/starwind/dialog/DialogClose.astroapps/landing/src/components/starwind/dialog/DialogContent.astroapps/landing/src/components/starwind/dialog/DialogDescription.astroapps/landing/src/components/starwind/dialog/DialogFooter.astroapps/landing/src/components/starwind/dialog/DialogHeader.astroapps/landing/src/components/starwind/dialog/DialogTitle.astroapps/landing/src/components/starwind/dialog/DialogTrigger.astroapps/landing/src/components/starwind/dialog/index.tsapps/landing/src/components/starwind/dialog/variants.tsapps/landing/src/components/starwind/separator/Separator.astroapps/landing/src/components/starwind/separator/index.tsapps/landing/src/components/starwind/separator/variants.tsapps/landing/src/components/starwind/sheet/Sheet.astroapps/landing/src/components/starwind/sheet/SheetClose.astroapps/landing/src/components/starwind/sheet/SheetContent.astroapps/landing/src/components/starwind/sheet/SheetDescription.astroapps/landing/src/components/starwind/sheet/SheetFooter.astroapps/landing/src/components/starwind/sheet/SheetHeader.astroapps/landing/src/components/starwind/sheet/SheetTitle.astroapps/landing/src/components/starwind/sheet/SheetTrigger.astroapps/landing/src/components/starwind/sheet/index.tsapps/landing/src/components/starwind/sheet/variants.tsapps/landing/src/components/starwind/table/Table.astroapps/landing/src/components/starwind/table/TableBody.astroapps/landing/src/components/starwind/table/TableCaption.astroapps/landing/src/components/starwind/table/TableCell.astroapps/landing/src/components/starwind/table/TableFoot.astroapps/landing/src/components/starwind/table/TableHead.astroapps/landing/src/components/starwind/table/TableHeader.astroapps/landing/src/components/starwind/table/TableRow.astroapps/landing/src/components/starwind/table/index.tsapps/landing/src/components/starwind/table/variants.tsapps/landing/src/components/starwind/tabs/Tabs.astroapps/landing/src/components/starwind/tabs/TabsContent.astroapps/landing/src/components/starwind/tabs/TabsList.astroapps/landing/src/components/starwind/tabs/TabsTrigger.astroapps/landing/src/components/starwind/tabs/index.tsapps/landing/src/components/starwind/tabs/variants.tsapps/landing/src/data/landing.tsapps/landing/src/layouts/LandingLayout.astroapps/landing/src/lib/utils/starwind/positioning.tsapps/landing/src/pages/index.astroapps/landing/src/scripts/agent-trace.tsapps/landing/src/scripts/aperture-scene.tsapps/landing/src/scripts/capability-aperture.tsapps/landing/src/scripts/copy.tsapps/landing/src/scripts/header-collapse.tsapps/landing/src/scripts/reveal.tsapps/landing/src/styles/global.cssapps/landing/src/styles/starwind.cssapps/landing/starwind.config.jsonapps/landing/test/campaign-copy.check.mjsapps/landing/tsconfig.jsondocs/plans/2026-06-15-docs-site.mddocs/plans/2026-06-15-landing-starwind-migration.mdinfra/alchemy-domains.tspackage.jsonpackages/core/src/attach/api.tspackages/core/src/code-mode/types.tspackages/core/src/config.tspackages/core/src/native/remote.tspackages/core/src/native/service.tspackages/core/test/attach-api.test.tspackages/core/test/config.test.tspackages/core/test/native-remote.test.tsschemas/caplets-config.schema.jsonscripts/check-public-docs.tsscripts/generate-docs-reference.ts
💤 Files with no reviewable changes (2)
- apps/landing/src/components/HugeIcon.astro
- apps/landing/test/campaign-copy.check.mjs
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0f0d2b4ca1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
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)
packages/core/src/native/service.ts (1)
758-767:⚠️ Potential issue | 🟠 Major | ⚡ Quick winRoute execution through the same shadowing blocklist used for merged visibility.
execute()still decides local routing from exact remote presence plusremoteAllowsShadowing(capletId). That misses source-Caplet suppression: a hidden local direct tool likecaplet: "shared__ping", sourceCaplet: "shared"remains executable when the remote forbidsshared, because the remote does not expose exactshared__ping. Base local routing on the same remote ID blocklist used bymergeTools()so forbidden shadowing also blocks direct execution.Suggested direction
async execute(capletId: string, request: unknown): Promise<unknown> { if (capletId === nativeCodeModeToolId) { return await executeCodeModeRunNative(this, request); } - const localHasCaplet = serviceHasCaplet(this.local, capletId); - const remoteHasCaplet = serviceHasCaplet(this.remote, capletId); - if (localHasCaplet && (!remoteHasCaplet || this.remoteAllowsShadowing(capletId))) { + if (this.localCanExecute(capletId)) { return await this.local.execute(capletId, request); } return await this.remote.execute(capletId, request); } + + private localCanExecute(capletId: string): boolean { + const remoteIds = this.remoteSuppressedCapletIds(); + return localExecutionKeys(this.local.listTools(), capletId).some( + (key) => !remoteIds.has(key), + ); + } + + private remoteSuppressedCapletIds(): Set<string> { + const allRemoteTools = this.remote.listTools(); + const remoteCodeModeTools = codeModeCallableNativeTools(allRemoteTools, { + fallbackToVisible: true, + }); + return new Set( + [ + ...allRemoteTools + .filter((tool) => tool.codeModeRun !== true && tool.shadowing !== "allow") + .map((tool) => tool.sourceCaplet ?? tool.caplet), + ...remoteCodeModeTools + .filter((tool) => tool.shadowing !== "allow") + .map((tool) => tool.caplet), + ].filter((caplet) => caplet !== nativeCodeModeToolId), + ); + }function localExecutionKeys(tools: NativeCapletTool[], capletId: string): string[] { const keys: string[] = []; for (const tool of tools) { if (tool.codeModeRun) { for (const caplet of tool.codeModeCaplets ?? []) { if (caplet.id === capletId) keys.push(caplet.id); } continue; } if (tool.caplet === capletId || tool.sourceCaplet === capletId) { keys.push(tool.sourceCaplet ?? tool.caplet); } } return keys; }Also applies to: 877-890
🤖 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 `@packages/core/src/native/service.ts` around lines 758 - 767, The execute() method currently makes local routing decisions based only on exact remote presence and remoteAllowsShadowing(), which fails to block forbidden shadowing when a local tool has a sourceCaplet that is suppressed remotely. Create or use a function that checks the remote ID blocklist the same way mergeTools() does for visibility, examining both the caplet and sourceCaplet properties of tools. Update the execute() method's local routing logic to use this blocklist instead of just calling remoteAllowsShadowing(capletId), so that tools with suppressed sourceCaplets are prevented from executing locally even if their exact caplet ID is not exposed remotely. The same fix should apply at the other affected location mentioned in the comment (lines 877-890).
🤖 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 `@packages/core/src/native/service.ts`:
- Around line 758-767: The execute() method currently makes local routing
decisions based only on exact remote presence and remoteAllowsShadowing(), which
fails to block forbidden shadowing when a local tool has a sourceCaplet that is
suppressed remotely. Create or use a function that checks the remote ID
blocklist the same way mergeTools() does for visibility, examining both the
caplet and sourceCaplet properties of tools. Update the execute() method's local
routing logic to use this blocklist instead of just calling
remoteAllowsShadowing(capletId), so that tools with suppressed sourceCaplets are
prevented from executing locally even if their exact caplet ID is not exposed
remotely. The same fix should apply at the other affected location mentioned in
the comment (lines 877-890).
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 5eb4caf5-0ed4-4445-9a21-d9b80ac582a8
📒 Files selected for processing (15)
.changeset/fresh-rings-attach.mdapps/docs/package.jsonapps/docs/src/content/docs/configuration.mdxapps/docs/src/content/docs/install.mdxapps/docs/src/styles/global.cssapps/landing/src/components/starwind/button/Button.astroapps/landing/src/components/starwind/card/variants.tsapps/landing/src/components/starwind/dialog/DialogTitle.astroapps/landing/src/components/starwind/tabs/Tabs.astroapps/landing/src/components/starwind/tabs/TabsContent.astroapps/landing/src/components/starwind/tabs/TabsTrigger.astrodocs/plans/2026-06-15-docs-site.mdpackages/core/src/native/service.tspackages/core/test/native-remote.test.tsscripts/generate-docs-reference.ts
✅ Files skipped from review due to trivial changes (4)
- apps/docs/src/content/docs/install.mdx
- .changeset/fresh-rings-attach.md
- apps/docs/src/content/docs/configuration.mdx
- docs/plans/2026-06-15-docs-site.md
🚧 Files skipped from review as they are similar to previous changes (6)
- apps/docs/package.json
- apps/landing/src/components/starwind/card/variants.ts
- apps/landing/src/components/starwind/tabs/TabsTrigger.astro
- apps/docs/src/styles/global.css
- scripts/generate-docs-reference.ts
- apps/landing/src/components/starwind/tabs/Tabs.astro
|
Addressed the outside-diff review feedback in
Validated with |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 321ca6b655
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Actionable comments posted: 7
🤖 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 `@apps/docs/src/components/CapletsThemeProvider.astro`:
- Around line 18-25: The updatePickers method accepts a theme parameter with
default value of storedTheme or "light", but this persisted value from
localStorage is not validated and can be an invalid arbitrary value. Normalize
the theme value before using it by applying validation or sanitization logic
(likely already exists in the codebase for this purpose) to ensure only valid
theme values are passed to updatePickers, preventing mismatched select and icon
states.
In `@apps/docs/src/components/CapletsThemeSelect.astro`:
- Line 71: The customElements.define() call for the "starlight-theme-select"
element will crash if the script runs multiple times in the same document
lifecycle (such as during hot module reloading). Wrap the
customElements.define("starlight-theme-select", StarlightThemeSelect) call in a
guard that first checks if the element is already registered using
customElements.get("starlight-theme-select"). Only call define() if the result
is falsy (element not yet registered).
- Around line 19-21: The inline script calls
window.StarlightThemeProvider.updatePickers() without first verifying that the
StarlightThemeProvider object has been initialized on the window object. If the
provider script hasn't loaded yet, this will throw an error and break theme
initialization. Add a guard check to ensure that window.StarlightThemeProvider
exists and has the updatePickers method before attempting to call it.
In `@apps/docs/src/content/docs/troubleshooting.mdx`:
- Line 110: In the troubleshooting.mdx file at line 110, change "Cloud native
integrations" to "Cloud-native integrations" by adding a hyphen between "Cloud"
and "native" to properly format the compound modifier according to technical
documentation style standards.
In `@apps/docs/src/styles/global.css`:
- Around line 169-176: The deprecated `clip: rect(0 0 0 0)` property in the
`.sl-markdown-content table:has(thead th:nth-child(4):last-child) thead`
selector is triggering Stylelint warnings. Remove the `clip` property line
entirely since the `clip-path: inset(50%);` property already provides the
equivalent visually-hidden functionality in modern browsers, eliminating the
need for the legacy property and resolving the lint error.
- Around line 194-203: The CSS rule for `.sl-markdown-content table:has(thead
th:nth-child(4):last-child) td` contains the deprecated `word-break: break-word`
declaration which stylelint flags as deprecated. Since `overflow-wrap: anywhere`
is already present in the same rule and provides the same functionality for
breaking words, simply remove the deprecated `word-break: break-word` line
entirely.
In `@apps/landing/src/components/landing/Hero.astro`:
- Around line 43-49: The Hero.astro component directly accesses heroCommands[0]
without checking if the array has any elements, which will crash rendering if
heroCommands is empty. Add a guard condition to verify that heroCommands array
has at least one element before accessing heroCommands[0], or provide a fallback
command value. This guard should protect both the code element display and the
button's data-copy-value attribute to ensure safe rendering regardless of
whether heroCommands is populated.
🪄 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: 2b3d542f-f583-4351-a37a-e22ce852e0cc
📒 Files selected for processing (28)
DESIGN.mdapps/docs/astro.config.mjsapps/docs/src/components/CapletsThemeProvider.astroapps/docs/src/components/CapletsThemeSelect.astroapps/docs/src/content/docs/code-mode.mdxapps/docs/src/content/docs/index.mdxapps/docs/src/content/docs/install.mdxapps/docs/src/content/docs/reference/caplet-files.mdxapps/docs/src/content/docs/reference/code-mode-api.mdxapps/docs/src/content/docs/reference/config.mdxapps/docs/src/content/docs/troubleshooting.mdxapps/docs/src/styles/global.cssapps/landing/astro.config.mjsapps/landing/src/components/landing/Activation.astroapps/landing/src/components/landing/CommandBlock.astroapps/landing/src/components/landing/Footer.astroapps/landing/src/components/landing/Header.astroapps/landing/src/components/landing/Hero.astroapps/landing/src/components/landing/Proof.astroapps/landing/src/components/landing/WhyCaplets.astroapps/landing/src/components/starwind/dialog/variants.tsapps/landing/src/components/starwind/sheet/variants.tsapps/landing/src/components/starwind/tabs/variants.tsapps/landing/src/scripts/capability-aperture.tsapps/landing/src/scripts/copy.tsapps/landing/src/scripts/header-collapse.tsapps/landing/src/styles/global.cssscripts/generate-docs-reference.ts
✅ Files skipped from review due to trivial changes (5)
- DESIGN.md
- apps/docs/src/content/docs/index.mdx
- apps/docs/src/content/docs/reference/config.mdx
- apps/docs/src/content/docs/reference/caplet-files.mdx
- apps/docs/src/content/docs/reference/code-mode-api.mdx
🚧 Files skipped from review as they are similar to previous changes (12)
- apps/landing/src/components/landing/Footer.astro
- apps/landing/src/components/landing/Activation.astro
- apps/docs/astro.config.mjs
- apps/landing/src/components/landing/Proof.astro
- apps/docs/src/content/docs/install.mdx
- apps/landing/src/components/starwind/sheet/variants.ts
- apps/landing/src/components/starwind/tabs/variants.ts
- apps/landing/src/components/starwind/dialog/variants.ts
- apps/landing/src/components/landing/Header.astro
- apps/landing/src/components/landing/WhyCaplets.astro
- apps/landing/src/components/landing/CommandBlock.astro
- apps/landing/src/styles/global.css
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ccd6111b56
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fd0920eaa1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
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 `@packages/core/src/config-runtime.ts`:
- Line 67: The `shadowing` field type definition is marked as optional
(shadowing?: CapletShadowingPolicy | undefined) at line 210, but the
corresponding Zod schema at line 278 uses `.default("forbid")` which guarantees
a value will always be present at runtime. Remove the optional indicator and
undefined from the type definition to make it required as `shadowing:
CapletShadowingPolicy;`, matching the schema's behavior and the pattern used by
the `disabled` field which also has a default value in the schema.
🪄 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: 8aa7ba49-6102-4c2a-b1c3-15bfc104575a
📒 Files selected for processing (11)
apps/docs/src/components/CapletsThemeProvider.astroapps/docs/src/components/CapletsThemeSelect.astroapps/docs/src/content/docs/remote-attach.mdxapps/docs/src/content/docs/troubleshooting.mdxapps/docs/src/styles/global.cssapps/landing/src/components/landing/Hero.astroapps/landing/src/components/starwind/dialog/Dialog.astropackages/core/src/config-runtime.tspackages/core/src/native/service.tspackages/core/test/caplet-source.test.tspackages/core/test/native-remote.test.ts
💤 Files with no reviewable changes (1)
- apps/docs/src/styles/global.css
✅ Files skipped from review due to trivial changes (1)
- apps/docs/src/content/docs/remote-attach.mdx
🚧 Files skipped from review as they are similar to previous changes (4)
- packages/core/src/native/service.ts
- apps/docs/src/content/docs/troubleshooting.mdx
- packages/core/test/native-remote.test.ts
- apps/landing/src/components/starwind/dialog/Dialog.astro
| | "code_mode" | ||
| | "direct_and_code_mode" | ||
| | "progressive_and_code_mode"; | ||
| export type CapletShadowingPolicy = "forbid" | "allow"; |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Verify Zod 4 enum syntax and default behavior with array literals
rg -nC3 'z\.enum\(\[' --type=ts --glob '!**/node_modules/**'Repository: spiritledsoftware/caplets
Length of output: 5659
🏁 Script executed:
# Find the CommonCapletConfig type definition and examine shadowing field
rg -nA10 "type CommonCapletConfig" packages/core/src/config-runtime.tsRepository: spiritledsoftware/caplets
Length of output: 521
🏁 Script executed:
# Check the disabled field pattern for comparison
rg -nC3 "disabled.*boolean" packages/core/src/config-runtime.tsRepository: spiritledsoftware/caplets
Length of output: 570
🏁 Script executed:
# Verify downstream usage of entry.shadowing in the mentioned files
rg -n "entry\.shadowing|\.shadowing\s*[=!]" packages/core/src --glob "**/(attach/api.ts|native/remote.ts|native/service.ts)"Repository: spiritledsoftware/caplets
Length of output: 51
🏁 Script executed:
# Search for reload tests to understand the constraint mentioned in coding guidelines
fd -e "\.ts$" -p "*reload*test*" packages/coreRepository: spiritledsoftware/caplets
Length of output: 362
🏁 Script executed:
# Search for shadowing usage more broadly
rg -n "\.shadowing" packages/core/src --type ts -B2 -A2Repository: spiritledsoftware/caplets
Length of output: 6944
🏁 Script executed:
# Find test files related to reload/config
fd "test\|spec" packages/core --type f -path "*reload*" -o -path "*config*reload*"Repository: spiritledsoftware/caplets
Length of output: 238
🏁 Script executed:
# Search for reload test files with a simpler pattern
find packages/core -type f -name "*reload*" -o -name "*test*reload*"Repository: spiritledsoftware/caplets
Length of output: 51
🏁 Script executed:
# Find test files more broadly
find packages/core -type f \( -name "*.test.ts" -o -name "*.spec.ts" \) | grep -i reloadRepository: spiritledsoftware/caplets
Length of output: 51
🏁 Script executed:
# Search for test files in src
find packages/core -path "*.test.ts" -o -path "*.spec.ts" | head -20Repository: spiritledsoftware/caplets
Length of output: 884
🏁 Script executed:
# Look for test directory structure
ls -la packages/core/ | grep -i testRepository: spiritledsoftware/caplets
Length of output: 191
🏁 Script executed:
# Search for any references to reload tests in the codebase
rg -n "reload.*test|test.*reload" packages/core --type ts -iRepository: spiritledsoftware/caplets
Length of output: 51
🏁 Script executed:
# List all test files
ls packages/core/test/*.test.ts | wc -lRepository: spiritledsoftware/caplets
Length of output: 72
🏁 Script executed:
# Search for config reload tests
rg -l "reload|config.*reload" packages/core/test --type tsRepository: spiritledsoftware/caplets
Length of output: 555
🏁 Script executed:
# Search for shadowing in test files
rg -n "shadowing" packages/core/test --type tsRepository: spiritledsoftware/caplets
Length of output: 5077
🏁 Script executed:
# Check if there are integration tests for config loading
rg -n "parse.*error|validation.*error|last.*known.*good" packages/core/test --type ts -iRepository: spiritledsoftware/caplets
Length of output: 2120
🏁 Script executed:
# Check the reload test that validates config - see if it tests shadowing specifically
rg -nA30 "keeps the last known-good tools when reload validation fails" packages/core/test/runtime.test.tsRepository: spiritledsoftware/caplets
Length of output: 1122
🏁 Script executed:
# Check the engine reload test
rg -nA30 "keeps last known-good config when reload validation fails" packages/core/test/engine.test.tsRepository: spiritledsoftware/caplets
Length of output: 1214
🏁 Script executed:
# Verify Zod 4 documentation or check current package version
cat packages/core/package.json | grep -A2 -B2 "zod"Repository: spiritledsoftware/caplets
Length of output: 169
Change shadowing field from optional to required to match schema default behavior.
The type-runtime inconsistency is confirmed:
- Type definition (line 210):
shadowing?: CapletShadowingPolicy | undefined;(optional) - Schema (line 278):
z.enum(["forbid", "allow"]).default("forbid")(always provides a value) - At runtime,
shadowingis always present due to the schema default
This inconsistency allows downstream code to handle shadowing as potentially undefined, yet the schema guarantees a value will always be set. This is inconsistent with the disabled field pattern, where the type disabled: boolean; matches the schema's .default(false).
Direct property access without optional chaining appears in multiple locations (native/remote.ts:349, 559, 571, 548, 616, 630–635; native/service.ts:898, 901), confirming the field should be non-optional in the type.
Zod 4 enum syntax with array literals and .default() chaining is correct and works as expected.
Update the type to match the schema:
- Change
shadowing?: CapletShadowingPolicy | undefined;toshadowing: CapletShadowingPolicy;
🤖 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 `@packages/core/src/config-runtime.ts` at line 67, The `shadowing` field type
definition is marked as optional (shadowing?: CapletShadowingPolicy | undefined)
at line 210, but the corresponding Zod schema at line 278 uses
`.default("forbid")` which guarantees a value will always be present at runtime.
Remove the optional indicator and undefined from the type definition to make it
required as `shadowing: CapletShadowingPolicy;`, matching the schema's behavior
and the pattern used by the `disabled` field which also has a default value in
the schema.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 324a164c6c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| your agent can see and call a Caplet. | ||
|
|
||
| ```sh | ||
| npx caplets setup |
There was a problem hiding this comment.
Use a persistent binary in the quickstart
Fresh evidence beyond the earlier install-page finding is that this Start here snippet still runs npx caplets setup before any global install. In that no-global flow, setup writes agent config that launches caplets serve (for example localMcpConfig and the Codex/Claude setup args in packages/core/src/cli/setup.ts), so the agent later cannot start Caplets unless caplets remains on PATH; point this quickstart at the global install path or at manual MCP config using npx --yes caplets serve.
Useful? React with 👍 / 👎.
Summary
apps/docssite with public docs content, reference pages, sitemap/search support, and deploy wiringapps/landingto Starwind/Tailwind components, remove HugeIcons, simplify the landing composition, and replace the old campaign copy checkValidation
pnpm verifypnpm verifyBoth runs completed successfully. The landing build still reports the existing Vite large chunk warning for the Three.js-backed landing scene.
Summary by CodeRabbit
Release Notes
New Features
shadowing(forbid/allow) to Caplets configuration to control whether attached local Caplets can override remote Caplets, including Code Mode behavior.Documentation
docs.caplets.dev, with install guides, capabilities, Code Mode, configuration/reference, remote attach, troubleshooting, and an expanded changelog.Chores
Tests
shadowingbehavior and public docs generation/validation checks.