Skip to content

feat: add docs site and refresh landing#122

Merged
ian-pascoe merged 10 commits into
mainfrom
feat/docs-site
Jun 16, 2026
Merged

feat: add docs site and refresh landing#122
ian-pascoe merged 10 commits into
mainfrom
feat/docs-site

Conversation

@ian-pascoe

@ian-pascoe ian-pascoe commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add a new Starlight-based apps/docs site with public docs content, reference pages, sitemap/search support, and deploy wiring
  • migrate apps/landing to Starwind/Tailwind components, remove HugeIcons, simplify the landing composition, and replace the old campaign copy check
  • update landing copy, remote attach examples, the fixed aperture background behavior, mobile navigation, collapsed header behavior, and the new Why Caplets section
  • add docs generation/check scripts and public docs validation to the repo gate
  • update core attach/config/remote support and generated config schema for remote attach URL handling

Validation

  • pnpm verify
  • pre-push hook reran pnpm verify

Both 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

    • Added shadowing (forbid/allow) to Caplets configuration to control whether attached local Caplets can override remote Caplets, including Code Mode behavior.
  • Documentation

    • Launched the public documentation site at docs.caplets.dev, with install guides, capabilities, Code Mode, configuration/reference, remote attach, troubleshooting, and an expanded changelog.
  • Chores

    • Updated CI deploy/preview triggers to run on infrastructure-only changes; preview output now includes both Landing and Docs URLs. Added docs generation/check scripts.
  • Tests

    • Added automated coverage for shadowing behavior and public docs generation/validation checks.

@coderabbitai

coderabbitai Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@ian-pascoe, we couldn't start this review because you've reached your PR review rate limit.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: d28cd745-cda4-426d-b640-fb469a62332a

📥 Commits

Reviewing files that changed from the base of the PR and between 387a2be and 324a164.

📒 Files selected for processing (5)
  • apps/docs/src/content/docs/install.mdx
  • apps/docs/src/content/docs/reference/caplet-files.mdx
  • apps/landing/src/data/landing.ts
  • scripts/check-public-docs.ts
  • scripts/generate-docs-reference.ts
📝 Walkthrough

Walkthrough

Adds 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.

Changes

Public docs site and deployment wiring

Layer / File(s) Summary
Docs app bootstrap
apps/docs/*, apps/docs/src/content.config.ts, apps/docs/src/styles/global.css, apps/docs/src/content/docs/*
Creates the Astro/Starlight docs app, public MDX pages, generated reference pages, and shared docs styling.
Docs generation and deployment
infra/alchemy-domains.ts, alchemy.run.ts, .github/workflows/*, .changeset/config.json, README.md, package.json, scripts/*
Adds docs domain/url values, deploys a docs app resource, includes docs links in preview comments and README, updates workflow path filters, ignores the docs package in Changesets, and adds docs generation/check tooling.

Landing app Starwind migration

Layer / File(s) Summary
Landing foundation
apps/landing/package.json, apps/landing/tsconfig.json, apps/landing/starwind.config.json, apps/landing/src/components/HugeIcon.astro, apps/landing/test/campaign-copy.check.mjs, docs/plans/2026-06-15-landing-starwind-migration.md
Updates landing config for Starwind/Tailwind, removes legacy artifacts, and records the migration plan tasks.
Landing data, layout, and composition
apps/landing/src/data/landing.ts, apps/landing/src/layouts/LandingLayout.astro, apps/landing/src/pages/index.astro, apps/landing/src/components/landing/*
Moves landing copy into shared data, adds a layout wrapper, and composes the page from section components.
Landing Starwind primitives
apps/landing/src/components/starwind/..., apps/landing/src/lib/utils/starwind/positioning.ts
Adds reusable badge, button, card, dialog, sheet, separator, table, tabs, and floating-placement utilities.
Landing scripts and styles
apps/landing/src/scripts/*, apps/landing/src/styles/*
Adds the landing behavior scripts and rewrites the landing/global CSS for the new layout and interactive states.

Configurable caplet shadowing

Layer / File(s) Summary
Shadowing contracts and schemas
packages/core/src/config.ts, packages/core/src/code-mode/types.ts, schemas/caplets-config.schema.json, apps/landing/public/config.schema.json, apps/landing/public/caplet-frontmatter.schema.json, packages/core/src/caplet-files-bundle.ts, schemas/caplet.schema.json
Adds a `"forbid"
Attach and native shadowing propagation
packages/core/src/attach/api.ts, packages/core/src/native/remote.ts, packages/core/src/native/service.ts
Propagates shadowing through attach manifest exports, remote/native tool conversion, Code Mode descriptors, primitive tool generation, and remote/local merge and execution logic.
Shadowing tests and release note
packages/core/test/*.ts, .changeset/fresh-rings-attach.md
Adds tests for config parsing, attach manifest shadowing output, native routing behavior, and includes the release note entry.

Estimated code review effort

🎯 5 (Critical) | ⏱️ ~120 minutes

Possibly related PRs

Poem

🐇 I hopped through docs with a Starwind grin,
and landing sections stitched themselves in.
Two sites now shine, one shadowed core,
with attach paths and previews galore.
I nibble clover, then rest at dawn—
new paths are set, and the diff hops on.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/docs-site

@socket-security

socket-security Bot commented Jun 15, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​astrojs/​starlight@​0.40.0981008597100
Addedtailwind-variants@​3.2.210010010085100
Addedtailwind-merge@​3.6.01001008695100
Addedtw-animate-css@​1.4.01001009486100
Added@​tailwindcss/​forms@​0.5.1110010010088100
Added@​tabler/​icons@​3.44.010010010090100

View full report

@github-actions

github-actions Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Preview Deployed

Landing: https://pr-122.preview.caplets.dev
Docs: https://docs.pr-122.preview.caplets.dev

Built from commit 1f18e00

@ian-pascoe ian-pascoe marked this pull request as ready for review June 15, 2026 20:53
@greptile-apps

greptile-apps Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR ships a new Starlight-based apps/docs site, migrates apps/landing to Starwind/Tailwind components, and adds a shadowing (forbid/allow) policy to every caplet config type so remote attach manifests can declare whether local Caplets may override a remote Caplet ID.

  • Docs site: new apps/docs Astro/Starlight app with install, configuration, code-mode, reference, and changelog pages; scripts/generate-docs-reference.ts generates MDX from JSON schemas and TypeScript declarations; scripts/check-public-docs.ts validates required content and blocks internal-path leaks as a CI gate.
  • Shadowing feature: shadowing field added to all six caplet config types and caplet-file frontmatter schema; shadowingPolicy() helper in attach/api.ts replaces hardcoded \"forbid\"; CompositeNativeCapletsService routing updated from a simple localHas && !remoteHas check to a localCanExecute predicate that consults per-caplet shadowing policies; four new tests cover allow/forbid routing at both the caplet and direct-tool level.
  • Landing migration: HugeIcons removed, Starwind UI components vendored, new WhyCaplets section and updated copy.

Confidence Score: 5/5

Safe to merge — the shadowing enforcement logic is correct and well-covered by new tests; only minor style observations found.

The shadowing routing in CompositeNativeCapletsService is correct: suppression uses !== "allow" throughout, which safely defaults undefined to "forbid". The one inconsistency (codeModeShadowing computed with === "forbid" instead of !== "allow") is on a field that isn't consulted by the actual suppression logic, so it carries no runtime impact. Tests cover allow/forbid routing at both caplet and direct-tool granularity. The docs site addition and landing migration are additive and do not touch production runtime paths.

No files require special attention.

Important Files Changed

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
Loading
%%{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
Loading

Reviews (10): Last reviewed commit: "fix: address docs setup review feedback" | Re-trigger Greptile

Comment thread scripts/generate-docs-reference.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment thread packages/core/src/native/service.ts Outdated
Comment thread apps/docs/src/content/docs/configuration.mdx Outdated
Comment thread packages/core/src/config.ts
Comment thread apps/docs/src/content/docs/install.mdx Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 | 🟠 Major

Align 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

📥 Commits

Reviewing files that changed from the base of the PR and between 65405bb and d2b4457.

⛔ Files ignored due to path filters (4)
  • apps/docs/public/favicon.svg is excluded by !**/*.svg
  • apps/docs/src/assets/caplets-icon.png is excluded by !**/*.png
  • apps/landing/public/favicon.svg is excluded by !**/*.svg
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (121)
  • .changeset/config.json
  • .github/workflows/deploy.yml
  • .github/workflows/pr-preview-deploy.yml
  • README.md
  • alchemy.run.ts
  • apps/docs/.gitignore
  • apps/docs/README.md
  • apps/docs/astro.config.mjs
  • apps/docs/package.json
  • apps/docs/src/content.config.ts
  • apps/docs/src/content/docs/agent-integrations.mdx
  • apps/docs/src/content/docs/capabilities.mdx
  • apps/docs/src/content/docs/changelog.mdx
  • apps/docs/src/content/docs/code-mode.mdx
  • apps/docs/src/content/docs/configuration.mdx
  • apps/docs/src/content/docs/index.mdx
  • apps/docs/src/content/docs/install.mdx
  • apps/docs/src/content/docs/reference/caplet-files.mdx
  • apps/docs/src/content/docs/reference/code-mode-api.mdx
  • apps/docs/src/content/docs/reference/config.mdx
  • apps/docs/src/content/docs/remote-attach.mdx
  • apps/docs/src/content/docs/troubleshooting.mdx
  • apps/docs/src/styles/global.css
  • apps/docs/tsconfig.json
  • apps/landing/package.json
  • apps/landing/public/config.schema.json
  • apps/landing/src/components/HugeIcon.astro
  • apps/landing/src/components/landing/Activation.astro
  • apps/landing/src/components/landing/AgentTrace.astro
  • apps/landing/src/components/landing/CapabilityAperture.astro
  • apps/landing/src/components/landing/CommandBlock.astro
  • apps/landing/src/components/landing/Footer.astro
  • apps/landing/src/components/landing/Header.astro
  • apps/landing/src/components/landing/Hero.astro
  • apps/landing/src/components/landing/Proof.astro
  • apps/landing/src/components/landing/RemoteStory.astro
  • apps/landing/src/components/landing/WhyCaplets.astro
  • apps/landing/src/components/starwind/badge/Badge.astro
  • apps/landing/src/components/starwind/badge/index.ts
  • apps/landing/src/components/starwind/badge/variants.ts
  • apps/landing/src/components/starwind/button/Button.astro
  • apps/landing/src/components/starwind/button/index.ts
  • apps/landing/src/components/starwind/button/variants.ts
  • apps/landing/src/components/starwind/card/Card.astro
  • apps/landing/src/components/starwind/card/CardAction.astro
  • apps/landing/src/components/starwind/card/CardContent.astro
  • apps/landing/src/components/starwind/card/CardDescription.astro
  • apps/landing/src/components/starwind/card/CardFooter.astro
  • apps/landing/src/components/starwind/card/CardHeader.astro
  • apps/landing/src/components/starwind/card/CardTitle.astro
  • apps/landing/src/components/starwind/card/index.ts
  • apps/landing/src/components/starwind/card/variants.ts
  • apps/landing/src/components/starwind/dialog/Dialog.astro
  • apps/landing/src/components/starwind/dialog/DialogClose.astro
  • apps/landing/src/components/starwind/dialog/DialogContent.astro
  • apps/landing/src/components/starwind/dialog/DialogDescription.astro
  • apps/landing/src/components/starwind/dialog/DialogFooter.astro
  • apps/landing/src/components/starwind/dialog/DialogHeader.astro
  • apps/landing/src/components/starwind/dialog/DialogTitle.astro
  • apps/landing/src/components/starwind/dialog/DialogTrigger.astro
  • apps/landing/src/components/starwind/dialog/index.ts
  • apps/landing/src/components/starwind/dialog/variants.ts
  • apps/landing/src/components/starwind/separator/Separator.astro
  • apps/landing/src/components/starwind/separator/index.ts
  • apps/landing/src/components/starwind/separator/variants.ts
  • apps/landing/src/components/starwind/sheet/Sheet.astro
  • apps/landing/src/components/starwind/sheet/SheetClose.astro
  • apps/landing/src/components/starwind/sheet/SheetContent.astro
  • apps/landing/src/components/starwind/sheet/SheetDescription.astro
  • apps/landing/src/components/starwind/sheet/SheetFooter.astro
  • apps/landing/src/components/starwind/sheet/SheetHeader.astro
  • apps/landing/src/components/starwind/sheet/SheetTitle.astro
  • apps/landing/src/components/starwind/sheet/SheetTrigger.astro
  • apps/landing/src/components/starwind/sheet/index.ts
  • apps/landing/src/components/starwind/sheet/variants.ts
  • apps/landing/src/components/starwind/table/Table.astro
  • apps/landing/src/components/starwind/table/TableBody.astro
  • apps/landing/src/components/starwind/table/TableCaption.astro
  • apps/landing/src/components/starwind/table/TableCell.astro
  • apps/landing/src/components/starwind/table/TableFoot.astro
  • apps/landing/src/components/starwind/table/TableHead.astro
  • apps/landing/src/components/starwind/table/TableHeader.astro
  • apps/landing/src/components/starwind/table/TableRow.astro
  • apps/landing/src/components/starwind/table/index.ts
  • apps/landing/src/components/starwind/table/variants.ts
  • apps/landing/src/components/starwind/tabs/Tabs.astro
  • apps/landing/src/components/starwind/tabs/TabsContent.astro
  • apps/landing/src/components/starwind/tabs/TabsList.astro
  • apps/landing/src/components/starwind/tabs/TabsTrigger.astro
  • apps/landing/src/components/starwind/tabs/index.ts
  • apps/landing/src/components/starwind/tabs/variants.ts
  • apps/landing/src/data/landing.ts
  • apps/landing/src/layouts/LandingLayout.astro
  • apps/landing/src/lib/utils/starwind/positioning.ts
  • apps/landing/src/pages/index.astro
  • apps/landing/src/scripts/agent-trace.ts
  • apps/landing/src/scripts/aperture-scene.ts
  • apps/landing/src/scripts/capability-aperture.ts
  • apps/landing/src/scripts/copy.ts
  • apps/landing/src/scripts/header-collapse.ts
  • apps/landing/src/scripts/reveal.ts
  • apps/landing/src/styles/global.css
  • apps/landing/src/styles/starwind.css
  • apps/landing/starwind.config.json
  • apps/landing/test/campaign-copy.check.mjs
  • apps/landing/tsconfig.json
  • docs/plans/2026-06-15-docs-site.md
  • docs/plans/2026-06-15-landing-starwind-migration.md
  • infra/alchemy-domains.ts
  • package.json
  • packages/core/src/attach/api.ts
  • packages/core/src/code-mode/types.ts
  • packages/core/src/config.ts
  • packages/core/src/native/remote.ts
  • packages/core/src/native/service.ts
  • packages/core/test/attach-api.test.ts
  • packages/core/test/config.test.ts
  • packages/core/test/native-remote.test.ts
  • schemas/caplets-config.schema.json
  • scripts/check-public-docs.ts
  • scripts/generate-docs-reference.ts
💤 Files with no reviewable changes (2)
  • apps/landing/src/components/HugeIcon.astro
  • apps/landing/test/campaign-copy.check.mjs

Comment thread apps/docs/package.json Outdated
Comment thread apps/docs/src/styles/global.css Outdated
Comment thread apps/landing/src/components/starwind/button/Button.astro Outdated
Comment thread apps/landing/src/components/starwind/card/variants.ts Outdated
Comment thread apps/landing/src/components/starwind/dialog/Dialog.astro
Comment thread apps/landing/src/components/starwind/tabs/TabsTrigger.astro
Comment thread apps/landing/src/scripts/aperture-scene.ts
Comment thread docs/plans/2026-06-15-docs-site.md
Comment thread packages/core/src/native/service.ts Outdated
Comment thread scripts/generate-docs-reference.ts

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment thread packages/core/src/native/service.ts Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 win

Route execution through the same shadowing blocklist used for merged visibility.

execute() still decides local routing from exact remote presence plus remoteAllowsShadowing(capletId). That misses source-Caplet suppression: a hidden local direct tool like caplet: "shared__ping", sourceCaplet: "shared" remains executable when the remote forbids shared, because the remote does not expose exact shared__ping. Base local routing on the same remote ID blocklist used by mergeTools() 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

📥 Commits

Reviewing files that changed from the base of the PR and between d2b4457 and 89e8a47.

📒 Files selected for processing (15)
  • .changeset/fresh-rings-attach.md
  • apps/docs/package.json
  • apps/docs/src/content/docs/configuration.mdx
  • apps/docs/src/content/docs/install.mdx
  • apps/docs/src/styles/global.css
  • apps/landing/src/components/starwind/button/Button.astro
  • apps/landing/src/components/starwind/card/variants.ts
  • apps/landing/src/components/starwind/dialog/DialogTitle.astro
  • apps/landing/src/components/starwind/tabs/Tabs.astro
  • apps/landing/src/components/starwind/tabs/TabsContent.astro
  • apps/landing/src/components/starwind/tabs/TabsTrigger.astro
  • docs/plans/2026-06-15-docs-site.md
  • packages/core/src/native/service.ts
  • packages/core/test/native-remote.test.ts
  • scripts/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

Copy link
Copy Markdown
Contributor Author

Addressed the outside-diff review feedback in 321ca6b:

  • Updated apps/landing/package.json to require Node >=24.
  • Changed composite native execution routing to use the same remote suppressed-ID blocklist as merged visibility, so hidden local direct tools cannot still execute when their source Caplet is shadow-forbidden remotely.
  • Added a regression assertion for suppressed local direct execution.

Validated with pnpm --filter @caplets/core test -- test/native-remote.test.ts, pnpm verify, and the pre-push pnpm verify hook.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment thread packages/core/src/config.ts
Comment thread apps/docs/src/content/docs/remote-attach.mdx Outdated
Comment thread apps/docs/src/content/docs/remote-attach.mdx Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between 289764c and ccd6111.

📒 Files selected for processing (28)
  • DESIGN.md
  • apps/docs/astro.config.mjs
  • apps/docs/src/components/CapletsThemeProvider.astro
  • apps/docs/src/components/CapletsThemeSelect.astro
  • apps/docs/src/content/docs/code-mode.mdx
  • apps/docs/src/content/docs/index.mdx
  • apps/docs/src/content/docs/install.mdx
  • apps/docs/src/content/docs/reference/caplet-files.mdx
  • apps/docs/src/content/docs/reference/code-mode-api.mdx
  • apps/docs/src/content/docs/reference/config.mdx
  • apps/docs/src/content/docs/troubleshooting.mdx
  • apps/docs/src/styles/global.css
  • apps/landing/astro.config.mjs
  • apps/landing/src/components/landing/Activation.astro
  • apps/landing/src/components/landing/CommandBlock.astro
  • apps/landing/src/components/landing/Footer.astro
  • apps/landing/src/components/landing/Header.astro
  • apps/landing/src/components/landing/Hero.astro
  • apps/landing/src/components/landing/Proof.astro
  • apps/landing/src/components/landing/WhyCaplets.astro
  • apps/landing/src/components/starwind/dialog/variants.ts
  • apps/landing/src/components/starwind/sheet/variants.ts
  • apps/landing/src/components/starwind/tabs/variants.ts
  • apps/landing/src/scripts/capability-aperture.ts
  • apps/landing/src/scripts/copy.ts
  • apps/landing/src/scripts/header-collapse.ts
  • apps/landing/src/styles/global.css
  • scripts/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

Comment thread apps/docs/src/components/CapletsThemeProvider.astro
Comment thread apps/docs/src/components/CapletsThemeSelect.astro
Comment thread apps/docs/src/components/CapletsThemeSelect.astro Outdated
Comment thread apps/docs/src/content/docs/troubleshooting.mdx Outdated
Comment thread apps/docs/src/styles/global.css
Comment thread apps/docs/src/styles/global.css
Comment thread apps/landing/src/components/landing/Hero.astro Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment thread packages/core/src/native/service.ts
Comment thread packages/core/src/caplet-files-bundle.ts
Comment thread apps/docs/src/content/docs/remote-attach.mdx Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment thread apps/docs/src/content/docs/install.mdx Outdated
Comment thread apps/landing/src/data/landing.ts Outdated
Comment thread scripts/generate-docs-reference.ts Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

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 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

📥 Commits

Reviewing files that changed from the base of the PR and between ccd6111 and 387a2be.

📒 Files selected for processing (11)
  • apps/docs/src/components/CapletsThemeProvider.astro
  • apps/docs/src/components/CapletsThemeSelect.astro
  • apps/docs/src/content/docs/remote-attach.mdx
  • apps/docs/src/content/docs/troubleshooting.mdx
  • apps/docs/src/styles/global.css
  • apps/landing/src/components/landing/Hero.astro
  • apps/landing/src/components/starwind/dialog/Dialog.astro
  • packages/core/src/config-runtime.ts
  • packages/core/src/native/service.ts
  • packages/core/test/caplet-source.test.ts
  • packages/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";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 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.ts

Repository: spiritledsoftware/caplets

Length of output: 521


🏁 Script executed:

# Check the disabled field pattern for comparison
rg -nC3 "disabled.*boolean" packages/core/src/config-runtime.ts

Repository: 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/core

Repository: spiritledsoftware/caplets

Length of output: 362


🏁 Script executed:

# Search for shadowing usage more broadly
rg -n "\.shadowing" packages/core/src --type ts -B2 -A2

Repository: 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 reload

Repository: 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 -20

Repository: spiritledsoftware/caplets

Length of output: 884


🏁 Script executed:

# Look for test directory structure
ls -la packages/core/ | grep -i test

Repository: 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 -i

Repository: spiritledsoftware/caplets

Length of output: 51


🏁 Script executed:

# List all test files
ls packages/core/test/*.test.ts | wc -l

Repository: spiritledsoftware/caplets

Length of output: 72


🏁 Script executed:

# Search for config reload tests
rg -l "reload|config.*reload" packages/core/test --type ts

Repository: spiritledsoftware/caplets

Length of output: 555


🏁 Script executed:

# Search for shadowing in test files
rg -n "shadowing" packages/core/test --type ts

Repository: 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 -i

Repository: 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.ts

Repository: 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.ts

Repository: 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, shadowing is 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; to shadowing: 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.

@ian-pascoe ian-pascoe merged commit 522ffe0 into main Jun 16, 2026
7 checks passed
@ian-pascoe ian-pascoe deleted the feat/docs-site branch June 16, 2026 13:42

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

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.

1 participant