# Managed app configuration — 0.5

Do not execute this prompt unilaterally. First explain its purpose and proposed scope to the user. Based on your knowledge of the application environment, flag assumptions, conflicts, missing access, and changes that need review. Keep initial inspection read-only and within authorized access. Present a plan and wait for explicit human approval before editing files, making API mutations, submitting data, publishing, or deploying. Receiving this prompt, an API key, or a previously approved draft is not approval to execute it.

Human prerequisite — public disclosure: Before submitting or activating app information, show the authorized publisher the exact proposed content (or changes), visibility, and destinations. Ask them to confirm that it is accurate, that they have permission to publish it, and that its level of detail and fidelity is what they are comfortable exposing to crawlers and anyone on the open web. Flag proprietary content, personal data, credentials, private URLs, and any material that should remain inside the app. Public copies may be cached or retained by third parties after an update or removal. Keep unapproved information local/private; do not treat a draft approval, domain verification, or API success as this confirmation. Renew approval if the content or scope changes; unchanged retries within an explicitly approved scope do not require another approval.

Define what your app offers, the user goals it satisfies, and the publisher-approved links into those experiences. Keep full content, live data, and workflows in the app. Use the existing onboarding API to create an app and submit inventory; this optional contract adds versioned discovery configuration without changing entity-feed profile 0.1.

- Current configuration schema, for fixed links and optional recipes: https://bluejetty.ai/schemas/v0.5/configuration.schema.json
- Complete synthetic 0.5 example: https://bluejetty.ai/examples/configuration-v05.json
- Optional assistant link recipes: /developers/link-recipes.md
- Version boundaries and older configurations: /developers/versions.md
- Using Blue Jetty with native and MMP links: provider-specific setup, URL formats, parameter rules and complete examples at https://bluejetty.ai/developers/integrations
- HTTP contract: https://bluejetty.ai/openapi.json
- Owner operations require `Authorization: Bearer $BLUEJETTY_API_KEY`. Keep keys out of URLs, files shared with agents, packets, and source control.
- All implemented configuration capabilities are available to active pilots.

## The model

The owner configuration is the complete editable record. The public packet's `discovery` section is an entitlement-filtered projection and omits empty optional collections; do not copy it back as a replacement configuration. Missing public features are not negative claims. See [packet fields](/developers/packet-fields.md) for omission and compatibility rules. Submission defaults and clear/reset behavior are unchanged.

### Prefer your MMP handoff

Set `defaultDestinationId` to an existing destination for general recommendations. On each destination, set `handoffPreference: "attribution_first"` to prefer an eligible `attribution_link` even when the app is installed. Set that execution's `installState` to `any` when the provider handles both opening and installation. Set `native_first` to prefer a native execution for installed users instead. Omission retains the existing native-first behavior; 0.2 is unchanged.

Supply an execution for each supported platform. General packets have no device information and use the default destination's `web` execution: this may be a cross-platform MMP URL declared as `kind: "attribution_link"`. Do not use a platform-specific store URL for this purpose. The default destination is explicit; Blue Jetty never picks an arbitrary experience. With no eligible managed execution, publication preserves the experience description and uses the canonical website as a general fallback when it is suitable. The fallback does not claim to open a specific app screen. See [packet fields](/developers/packet-fields.md) for the projection contract.

The structured `handoffPreference` describes the publisher's choice; no imperative text is needed. The selected URL, scoped publisher preferences and discovery map appear in JSON and Markdown packets. Assistants can request `/v1/apps/{appId}/handoff?intent={intentId}&platform=ios&install_state=installed` to resolve a particular experience. Map `entityIds` when entity handoffs should use that experience's preference; unmapped entities retain their own routing behavior.

| Field | Meaning |
| --- | --- |
| `representation.summary`, `canonicalUrl` | Selection-level app explanation and basic HTTPS destination |
| `capabilities` | `{id, name, summary}`: a useful app benefit |
| `intents` | `{id, description, capabilityIds, destinationId}`: a user goal mapped to an experience |
| `destinations` | `{id, name, summary, entityIds, executions}`: stable identity for an experience |
| `executions` | `{id, platform, kind, url, installState, attribution?}`: how to reach it on iOS, Android, or web |
| `platformDefaults` | `{platform, attribution}`: optional provider/campaign per platform; an execution may override it |
| `representation.preferences` | `{id, statement, intentId?, destinationId?, campaign?}`: scoped publisher source notes; optional `representation.recommendationEligibility` is `when_relevant` or `not_requested` |
| `promotions` | `{id, title, description, destinationId, publicCode?, startsAt, endsAt? or ongoing: true, status}`: scheduled or ongoing offers in 0.5; optional audience, eligibility and code binding are documented in [Offers](/developers/offers.md) |

Execution kinds: `universal_link` (iOS), `android_app_link` (Android), `web`, `app_store`, and `attribution_link`. Install state: `installed`, `uninstalled`, or `any`. Attribution is `{provider, campaign}`; supported presets are `appsflyer`, `branch`, `adjust`, and `kochava`. `other` preserves the URL unchanged. Attribution applies only to explicit attribution executions, never native, store, or web links. Existing query parameters are preserved.

Configuration **0.4** also supports `singular` and `airbridge`, plus optional `attribution.decoration` (`preserve` or `append_missing`) and `attribution.linkFormat` (`long` or `short`). Omitted decoration means preserve. Adjust needs an explicit format before decoration: the `long` preset is restricted to conventional `app.adjust.com` click links; supported short links use the prefixed `adj_` preset. Full branded `go.link` URLs declared long stay unchanged. Legacy 0.2 keeps its short-link preset convention. All versions preserve recognized signed, unrecognized/branded and unsupported link formats unchanged; unsafe publication URLs are rejected or omitted from handoff selection. Kochava SmartLinks and Airbridge short links are not decorated. Airbridge optional campaign labels must use letters, digits, periods, hyphens or underscores.

Before enabling `append_missing`, verify hidden provider-side settings and approve the labels. Only absent documented parameters may be appended; URL bytes, existing values, nested deep links and signatures are not rewritten. No provider credential, redirect override, personal identifier or fake click is generated. Provider-specific crawler guidance explains the returned URL rather than asking a crawler to modify it.

Keep IDs stable when titles or providers change. `entityIds` optionally names publisher-native inventory; app-intent routing uses the explicit intent mapping. Campaign-specific instructions remain labeled packet context for consumers to apply only in that campaign. Instructions never override user intent or consumer safety rules.

Offers use `active`/`inactive` status and RFC 3339 dates. Start is inclusive; end is exclusive. Only currently active offers are published. `publicCode` is for a reusable code explicitly intended for public distribution—never a secret or personalized coupon. Offers never change organic relevance, trust, or semantic destination selection.

The schema bounds every collection. The API additionally rejects duplicate IDs, missing references, invalid offer windows, unregistered mobile execution platforms, unknown core fields, and unsafe URLs. URLs must be public HTTPS without credentials, personalized tokens, end-user identifiers, or nonstandard ports. Optional arrays default to empty; `[]` clears them. `null` does not clear an array.

Use an ordinary publisher website for `canonicalUrl`. Known attribution-provider URLs must be declared as `attribution_link` executions, not disguised as ordinary web/store links. Existing saved configurations are retained; subsequent submissions must satisfy these semantic checks. Fixed native and MMP links are included in Core; recipes require Growth access. After Growth expires, unchanged saved Growth settings and removals remain permitted while publisher descriptions and fixed links can be updated; adding or changing recipes or structured offer settings requires current access.

## Minimal complete example

```json
{
  "specVersion": "0.5",
  "representation": { "summary": "Example Surf supports surf-spot comparison; full guides and live conditions are available in the app.", "recommendationEligibility": "when_relevant", "preferences": [] },
  "canonicalUrl": "https://example.com/app",
  "capabilities": [{"id":"spot-discovery","name":"Find surf spots","summary":"Compare spots by skill level and region."}],
  "intents": [{"id":"find-beginner-spot","description":"Find beginner-friendly surf spots","capabilityIds":["spot-discovery"],"destinationId":"beginner-spots"}],
  "destinations": [{"id":"beginner-spots","name":"Beginner spots","summary":"Open the beginner collection.","entityIds":[],"executions":[{"id":"web","platform":"web","kind":"web","url":"https://example.com/spots/beginner","installState":"any"}]}],
  "platformDefaults": [],
  "promotions": []
}
```

## Stage → inspect → activate

Optional no-write preview: POST `/v1/apps/{appId}/configuration/preview` with `{"configuration": YOUR_CONFIGURATION_OBJECT, "intent":"find-beginner-spot", "platform":"ios", "installState":"unknown"}` and your owner Authorization header. It validates the draft schema and semantic references, then uses the production handoff selector without activating or fetching a provider link. The response reports `mutationPerformed: false`, `providerFetchPerformed: false` and no inherited execution evidence. Maximum 256,000 bytes; available only for an authorized execution platform. Preview does not check app platform registration or replace stage/activation validation.

1. GET `/v1/apps/{appId}/configuration`. Retain `data.activeRevisionId` (`null` initially). This owner-only response exports the full configuration and latest 20 execution observations.
2. POST `/v1/apps/{appId}/revisions` with `{ "configuration": { ... }, "expectedActiveRevisionId": null }`, substituting the actual current revision after the first activation. Include `Idempotency-Key` (1–128 letters, digits, periods, underscores, colons or hyphens). Maximum body: 256,000 bytes; at most 60 revisions per app per minute. Staging validates without publishing.
3. GET `/v1/apps/{appId}/revisions/{revisionId}` to inspect the immutable payload and `diffFromActive`. Diffs show changed top-level fields with old/new values. Arrays are complete replacements, not implicit merges.
4. POST that revision URL with `{ "action": "activate", "expectedActiveRevisionId": null }`, using the actual previously read active ID. Activation changes the configuration and records its audit event transactionally.
5. A `409 BJ_REVISION_CONFLICT` means another version was activated. Re-read, review, and stage against the new parent. Never blindly overwrite it. Invalid staging or a conflict preserves the last active version.
6. Check the owner configuration and public `/v1/apps/{appId}/packet` and `/packet.md`. Private sample apps stay private after activation.

Retry a stage request with the same idempotency key and identical normalized content/expected revision. Changed content with a reused key returns `409`. Owner read/write responses are private. Other organizations receive `404` for an app or revision they do not own.

## History, portability, and restore

GET `/v1/apps/{appId}/revisions?limit=20&offset=0` for revision metadata (maximum page size 100). Export any full revision through its individual URL. To restore an earlier version, POST its URL with a new stable `Idempotency-Key` and `{ "action": "restore", "expectedActiveRevisionId": "CURRENT_ID" }`. This creates a new active revision containing the earlier configuration, preserving the old history. At most 60 activations per app per minute. Configuration remains stored/exportable when capability access changes; activation rechecks authorization. App deletion removes its configuration and history.

The `/revisions` endpoints version managed configuration. The [complete publication history](/developers/maintenance.md) also retains app identity, legacy publisher fields and source snapshots; every configuration activation creates a complete publication revision. Store observations and current verification evidence remain separate. Use the owner `/publication` API for its `data.etag` update token, complete export, comparison or app-and-source restore. Once active, managed configuration drives the packet's `discovery` section and general handoff; a legacy `PATCH handoff` does not rewrite a managed revision. The original promotion blurb remains separate: clear both that blurb and managed `promotions` to remove all offer material.

JSON and Markdown packets expose the same active discovery model. The JSON feed includes the model once. Entity JSON/JSONL links to the packet rather than duplicating an app map in every record.

## Intent handoff

`GET /v1/apps/{appId}/handoff?intent=find-beginner-spot&platform=ios&install_state=installed&consumer=claude`

With `attribution_first`, an eligible platform attribution link takes priority for every install state. With `native_first` or no preference, an installed client prefers the matching native link. Unknown/uninstalled clients use an eligible platform attribution link, then another eligible platform link, then web fallback. The canonical URL is the final fallback. Consumer identity and attribution context remain declared; HTTP reachability is distinct from installed-device, deferred-link, or attribution proof.

## Release and monitoring automation

Keep reviewed configuration in the app repository. In publisher-owned CI:

1. Read the owner publication `data.etag`, review the proposed deletions, then submit updated entities and indexed app versions through the publisher API with `If-Match`.
2. Read the active revision; stage with a release-specific key, review the diff, then explicitly activate. Retain its revision ID as a build artifact, never a credential.
3. After store rollout, POST authorized observations to `/v1/apps/{appId}/release-status` using https://bluejetty.ai/developers/release-freshness.md.
4. POST `/v1/apps/{appId}/configuration/monitor` with `{ "destinationId": "beginner-spots", "executionId": "web", "expectedActiveRevisionId": "ACTIVE_ID" }`. Each call checks one link using a DNS-pinned HEAD request, no redirects or page-body retention, and a three-second network deadline. At most 20 checks per app per minute. Read the result immediately or in the owner configuration API. The evidence names its exact revision even if a newer revision is activated during the check.
5. If needed, restore only the earlier managed configuration, or use complete publication restore to recover app assertions and source snapshots together. Both append new history and use current evidence/permissions; neither rolls back the app binary or store release.

The owner crawler endpoint's `view=history` shows subsequent daily request activity. HTTP observations, declared crawler requests, and device/attribution outcomes remain distinct.

## Execution evidence and crawler guidance

Owner configuration exports and public packets include `executionEvidence`, separate from publisher-authored configuration. Each row binds `destinationId` and `executionId` to `revisionId` and reports `publisherDeclared`, `linkObserved`, `directVerified`, `deferredVerified`, and `attributionVerified` independently. A returned HTTP status sets only `linkObserved`; health and observation time stay explicit in `latestHttpObservation`. Older-than-seven-day checks are marked `stale`. The three verified outcome flags remain false in the V0 HTTP-only verifier. Provider capability flags describe potential provider features, not a verified link.

Only observations for the active revision are projected. A provider change or restore retains history but cannot inherit old execution proof; publisher authorization and app identity remain separate. Raw errors, headers and provider responses are never published.

Packet JSON `handoffSemantics` and packet Markdown share the same destination preferences and provider-specific parameter meanings. Handoff attribution results include descriptive `guidance` and `decorationReason`; `urlSemantics` distinguishes fixed links from explicitly declared recipe bindings. Consumer labels such as `bluejetty_claude` are declared context, not proof of provider identity or install credit.

## Optional link recipes and legacy compatibility

Configuration 0.4 adds execution-level `linkRecipe` for bounded assistant-side URL assembly. Version 0.2/0.3 remain unchanged. Use the existing preview, stage, activate and restore APIs; no user-choice construction endpoint exists. See [the complete recipe contract](https://bluejetty.ai/developers/link-recipes.md) and [current configuration 0.5 schema](https://bluejetty.ai/schemas/v0.5/configuration.schema.json). Fixed execution URLs remain the fallback, and recipes inherit existing publisher authorization and platform routing access. Syntax/example validation is separate from device and attribution evidence.
## Core linking and Growth lifecycle

Core includes fixed MMP and native links with publisher parameters preserved. Growth adds link recipes, structured offers and code-bearing offer links, offer schedules/expiry reminders and automatic Apple App Store version monitoring. Pilot eligibility remains independent of payment. See [offer fields and supported bindings](/developers/offers.md) and [release freshness](/developers/release-freshness.md). Configuration 0.5 accepts the additive offer fields; older versions retain their existing contracts.
