DEV-2032: document context.settings and the three app-settings tiers - #301
Merged
Merged
Conversation
App Actions V3: context has payload and settings; add the context.settings reference (server-only, master values, fresh per run, 100 KB limit, CORS limit, leak rule) with a complete example. App settings: public / _private / __protected tiers, protected-settings behaviour, server-action section. Regenerated .well-known projections for the two pages. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ntext.settings Present both credential sources (AI Builder secure panel field saved as _aiartifact_<settingKey>, private tier; REST-written __ protected key), switch the complete example to the _aiartifact_ form, and state the query-string-only provider limit. Regenerated llms-full.txt. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… key caveat Saving/removing settings uses POST and DELETE /v1/apps/:id/settings with flat keys, not PUT /v1/apps/:id (which never writes settings). Document Studio's settingKey sanitizer, scope the editor-write and snapshot claims to the endpoints and the release that they hold for, and scope the "editor-private" sentence to single-underscore keys. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…lete the PUT field list POST and DELETE /v1/apps/:id/settings are masterOnly; a production app id returns 403. The PUT /v1/apps/:id warning now also names the admin-only isSystemTemplate and isHidden fields it writes. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
DEV-2032. Documents
context.settingsfor V3 app actions, and replaces the two-tier app-settings model with the three tiers the API now enforces.Companion PRs: Fliplet/fliplet-api#8639, plus same-named branches in
fliplet-service-browserandfliplet-studio.Why this one matters more than a normal docs change
Studio's AI Builder fetches
docs/API/core/app-actions-v3.mdat runtime and is told that loaded docs are binding. A wrong sentence here does not only mislead a reader - it steers the code the AI generates for customers.That page previously stated: "The
contextparameter is an object with a single property:payload. Thecontextobject does not contain any other properties." That directly contradicts the feature.Changes
docs/API/core/app-actions-v3.mdpayloadandsettings.context.settingssection: server-environment only, every top-level_-prefixed key of the master app, read fresh on every run,{}forclientandany, the 100 KB limit with the exact error string, and the defensive read.Authorizationheader, and returns fixed error codes so nothing leaks.securepanel field, saved as_aiartifact_<settingKey>(a private key, readable by Studio editors over the API), and a__protected key written through the REST API.docs/API/v3/app-settings.md__for editors, admins and API tokens; editors may write and delete but never read back; task tokens get403; version snapshots no longer store them and a restore keeps current values.app.settingsfrom the model.PUT /v1/apps/:idwith a nestedsettingsobject. That endpoint does not write settings - its handler assigns an allow-list that does not include them - so the call returns200and stores nothing, and a server action then reports the credential as not configured with no error anywhere. The section now documentsPOST /v1/apps/:id/settingswith the keys flat in the body, on the master app id, with the shallow-merge semantics, plus a warning about the old example and a new Removing settings section forDELETE.settingKeysanitizer: characters outsidea-zA-Z0-9_.-become_, and a key containing-or.needs bracket access.Generated projections (
llms-full.txt,llms.txt,agent-skills/index.json,agent-skills/fliplet-js-api/SKILL.md) regenerated with the repo's own generator. No generated file was hand-edited.Testing
npm run test:unit: 163 passing, 0 failing.Every behavioural claim was verified against the shipping source in the companion repos rather than against a brief -
libs/lambda.js,libs/filterPrivateSettings.js,models/app.js,libs/v3/app-version-service.js, the settings and admin routes,core.js, and Studio'suseArtifactDestinationWriters.js. A 26-row table of every protected-key sentence was checked line by line, twice.Note for anyone validating locally:
npm run check:docsexits 0 with no output on Windows and validates nothing. The entry guard atdocs/bin/build-agent-indexes.mjs:1169compares afile://URL against a backslash argv path, somain()never runs. CI on Linux is unaffected. The real local equivalent, which was run and exits 0 across 203 docs with no frontmatter, capability, catalog or cross-link errors:Two pre-existing drifts were deliberately kept out of this diff: the
generatedAttimestamp inllms-v3-libraries.json, and two stale hunks in an unrelated transcription example inllms-full.txt(a doc was changed without regenerating). The second is worth a separate fix.Follow-up to raise
docs/API/v3/routing.md:43carries the same wrong claim - that the route manifest is updated "via the App Settings API (PUT /v1/apps/:idwithsettings.v3)". It is outside this change, but after this merges the two pages contradict each other inside the samellms-full.txt, so an AI writing route-manifest code would still follow the wrong one and silently store nothing.Deploy order
These docs ship last:
fliplet-apiin all three regions, then thefliplet-service-browserrunner image, thenfliplet-studio, then this. Merging tomasterpublishes developers.fliplet.com, which is what the AI Builder fetches at runtime. Shipping early would promisecontext.settingsthe runner does not yet deliver, and promise__protection the API does not yet enforce - an app owner could store a live secret in a__key that is still readable over HTTP.🤖 Generated with Claude Code