Skip to content

Require --allow-public-write for an unprotected store scaffold (refs #338) - #343

Merged
jimhoyd merged 1 commit into
mainfrom
feat/store-allow-public-write
Sep 20, 2026
Merged

jimhoyd merged 1 commit into
mainfrom
feat/store-allow-public-write

Conversation

@jimhoyd

@jimhoyd jimhoyd commented Sep 20, 2026

Copy link
Copy Markdown
Collaborator

Refs #338 (does not close it).

  • init --with store / --with ui,store without auth now refuses before writing anything, naming both ways forward (add auth, or pass --allow-public-write).
  • With the flag it scaffolds; the store README and the route fragment (comments) state the public-write access model and that it is not rate limiting, abuse protection or multi-tenant isolation.
  • The flag reaches the scaffold via ScaffoldRequest.allowPublicWrite; the store decides policy. Scaffolds report publicWrite and optional routeNotes; core rejects the flag when no scaffold used it (auth composed, no store, no --with). Core adds no auth/UI and infers no policy.
  • --with ui,auth,store (any order) is unchanged and needs no flag; its README says signed-in only.
  • Docs, CLI help, llms-full.txt, release-scaffold script and tests updated; new refusal/flag/no-op/order tests.

Package audit: core 428 entries (cap 440, unchanged), ui 356904 unpacked (unchanged), store 12 files.

🤖 Generated with Claude Code

@jimhoyd jimhoyd left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

The safety behavior is right: a no-auth writable scaffold must refuse before it writes and print the exact safe/explicit choices.

One AI-first boundary concern before this sets a precedent: --allow-public-write, ScaffoldRequest.allowPublicWrite, and ScaffoldResult.publicWrite put store-specific policy vocabulary in core. Future extension acknowledgements would then add more one-off CLI flags and fields for agents to learn.

Please consider the generic acknowledgement transport proposed in #345: core passes and validates only qualified opaque acknowledgements; an extension declares and consumes its own store:public-write acknowledgement, supplies the refusal text, and can render a generic notice. This retains the current UX and safety properties without making core understand extension-specific risks.

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