# Use AI to access Licentivo Launch

> Currently unpublished changes adopt account identity exchange. Specific responsibilities and migration constraints are detailed in [Purchase Term and Account SDK Boundaries ](/en/launch-documents/account-purchase-boundary/). Launch calculates the purchase term; Licentivo SDK executes authorization.

In the Launch backend, **Operations → AI Quick Access** will generate an English task description that can be given to AI programming tools. It uses the current store, existing software, and publicly available configurations of released packages, and requires AI to install the publicly available Launch client package, call real APIs, place permission checks within business operations, and then complete the integration test.

The **Integration Check & Code / AI Quick Access** navigation on the program integration page also leads to the same functionality. Manual development does not require AI; you can directly read the [Nine Languages Manual Integration Guide ](/en/launch-documents/manual-integration/).

## Preparation before generation

1. Create software and sales packages in Launch, and associate the packages with Licentivo products and authorization policies.
2. Publish the packages to the `sandbox` or `live` environment to be tested.
3. Ensure that Launch’s public address is accessible by client software, and use HTTPS in formal environments.
4. In **Program Integration → Integration Check & Code**, read the product information and confirm that the product mapping and signature public key pass the check.
5. Clearly identify the real business actions to be protected, such as `export`, `save`, or `render`; don’t just write “the entire software.”

Drafts can be generated without completing product configuration, but drafts will clearly mark items that need to be filled in and cannot be used as deliverable integration configurations. After completing product and environment configurations, you should regenerate.

## Generate prompts in the backend

1. Choose Go, Python, C#, Java, JavaScript / Node.js, Rust, Ruby, C, or C++. For web backend solutions, using Go does not count as an additional SDK language.
2. Choose Windows, Linux, macOS, or the applicable platform, as well as a desktop, web backend, or background service project.
3. Fill in the existing project structure, startup method, UI framework, and business functions to be protected in English. Do not fill in passwords, keys, customer data, or private source code.
4. Choose existing software and `sandbox` / `live` environment. Launch automatically reads the current store address, and Launch maps products, environments, and signature public keys with Licentivo.
5. Check the package versions, installation commands, documentation links, and filled connection functions in the preview, then copy or download the prompt.
6. Give the prompt to your AI programming tool to make modifications, compile, and test locally in your project.

Launch only generates text in the browser. It will not automatically connect to any AI service, upload projects, or execute generated programs on behalf of the developer.

## The prompt will tell the AI where to download the SDK.

All nine language public installation verifications for version 0.1.6 have passed (9/9). The following registry commands and native downloads have been verified. Java's Maven Central files and four signatures, Rust's crates.io exact version, and all backend-generated initialization code have also passed independent consumer checks; [v0.1.6 GitHub Release](https://github.com/spf86/licentivo-launch-sdk/releases/tag/v0.1.6) provides both native packages and offline files.

The generated prompt must include a fixed version public installation method corresponding to the selected language.

```text
Go:         go get github.com/spf86/licentivo-launch-sdk/pkg/launchclient@v0.1.6
Python:     python -m pip install licentivo-launch==0.1.6
C# / .NET: dotnet add package Licentivo.Launch --version 0.1.6
Java:       com.licentivo.launch:launch-client:0.1.6
Node.js:    npm install @licentivo/launch@0.1.6
Rust:       cargo add licentivo-launch@=0.1.6
Ruby:       gem install licentivo-launch --version 0.1.6
C / C++:    https://github.com/spf86/licentivo-launch-sdk/releases/tag/v0.1.6
```

Public source code, READMEs for each language, and current release status are located at:

- [Licentivo Launch SDK Repository](https://github.com/spf86/licentivo-launch-sdk)
- [v0.1.6 GitHub Release](https://github.com/spf86/licentivo-launch-sdk/releases/tag/v0.1.6)
- [Nine language public installation verification](https://github.com/spf86/licentivo-launch-sdk/blob/main/docs/registry-verification.json)
- [Version and package description](/en/launch-documents/integration-packages/)
- [Nine-Language Manual Access Guide ](/en/launch-documents/manual-integration/)
- [Application Access Architecture and Security Requirements ](/en/launch-documents/software-sdk-integration/)
- [Access Acceptance Checklist ](/en/launch-documents/acceptance/)

Only install the Launch package for the selected language. v0.1.6 already includes the official Licentivo SDK v0.11.6, the default adapter, and link configuration, so there's no need to install a separate official SDK.

## Prompts will tell the AI how to access

Configured prompts include backend-generated connection functions. This function already contains the store's public address, the Launch to Licentivo product mapping, the signature public key, and the payment environment. The AI doesn’t need to guess or manually enter the two internal product numbers, nor create `launch-config.json` or `product.json`.

The server-side private `config.yaml` is only used to run the Launch website and must never be included in client apps, prompts, or installation packages.

The AI must modify customer software according to the following lifecycle:

```text
Connect/connect → Login or Restore → RunFeature → Logout / Close
                                      └──────────→ ReleaseDevice (explicit device unlink only)
```

- `Connect/connect` creates the Launch client and initializes the built-in official SDK; this does not mean the account is already logged in or functionality is already authorized.
- `Login` obtains the product credentials for this account using the email and password the customer registered with the current store.
- `Restore` restores remembered sessions from secure storage; if there’s no session, it shows login, and refusing is not considered offline success.
- `RunFeature` must wrap real business actions like export, save, render, or background tasks. Just disabling buttons cannot replace checks at execution points.
- `Logout` first calls the official SDK for a unified logout, then clears the account session; `ReleaseDevice` is a compatible entry for the same clear logout process. `Close` retains device binding on a normal close.
- The client object should remain alive while the app is running so the SDK can perform heartbeats, floating seats, and runtime rules.

Web applications only perform authorization checks on trusted backends. Node.js / Electron places credentials and SDKs in the main process or server-side, and the browser and renderer do not store authorization secrets.

## What AI Should Deliver

The prompt requires AI to complete and report the following:

1. Check the language version, dependency management, startup and shutdown processes of existing projects, and real business operations that need protection.
2. Use the above fixed version command to install a Launch package and verify the real interfaces in the corresponding language README.
3. Add customer account login, error prompts, and secure session recovery; do not store passwords or full licenses in source code or logs.
4. Initialize using the connection functions provided by the backend; do not invent product numbers, signature public keys, or configuration files on your own.
5. Use `RunFeature` or corresponding language methods at each protected business operation point, handling counting and retries properly.
6. Differentiate between account failure, email pending verification, entitlement syncing, non-purchase, expired, suspended, device full, network failure, and offline expiration.
7. Implement normal closure, account logout, and explicit device release, and separate caches by store, account, product, and environment.
8. Run the project-appropriate build and tests, and finally list modified files, feature mapping, actual results, and customer acceptance steps.

After AI outputs code, developers still need to verify that function names are fully consistent with Licentivo policies and complete end-to-end tests on a real sandbox store account.

## Content excluded from the prompt

Prompts only include publicly available store sources, product mapping, environment, package version, and signature public keys. The following must not be included in the prompt:

- Customer emails, passwords, login sessions, and refresh tokens;
- Full licenses, device credentials, and local authorization caches;
- Licentivo management API keys;
- Stripe, PayPal, Waffo, or Paddle keys;
- Database connections, `master_key`, and server-side `config.yaml`;
- No need to provide private source code, business data, or logs to external tools.

Public configuration checks, AI drafts, and local builds of Launch cannot prove that real payments, license issuance, or external activations were successful. Payment sandboxes, store accounts, and the Licentivo environment need separate validation.

## Acceptance checklist after integration

- New customers can log in, and unverified emails or wrong passwords get clear but not overly revealing error messages.
- Purchased accounts can run the target features; unpurchased, expired, or suspended accounts cannot run the same business code.
- After a restart, use can continue only if the session is successfully restored and authorization checks pass.
- Effective offline strategies work, offline licenses are rejected when expired; clear 401/403/404 errors are not downgraded to offline success.
- Feature usage counts are only correctly submitted on business success; failures and retries don’t deduct repeatedly.
- Regular closures keep device bindings; explicit logout first calls the official SDK logout, keeps logs for revocation, and reports real results.
- Floating seat heartbeats run while the app is active, and the reclaim time after abnormal exit complies with the current authorization policy.
- Switching stores, accounts, products, or environments doesn’t reuse another identity’s cache.

A more complete auto and external acceptance boundary can be found in [acceptance.md](/en/launch-documents/acceptance/).

## Using a prompt generator in source code distribution packages

`licentivo-launch-0.1.6-source.zip` keeps the following files to help generate prompts with the same structure in your own tools:

- `internal/httpapi/web/integration-prompts.js`: prompt generation module that doesn’t rely on pages or servers;
- `scripts/integration-prompts.test.mjs`: local Node testing;
- `internal/httpapi/web/integration-state.js` and `scripts/integration-state.test.mjs`: isolate configuration drafts and clean old validation results;
- This guide, language integration packages, examples, and acceptance notes.

The module exports `integrationTargets` and `buildIntegrationPrompt(options)`. Options include `language`, `appKind`, `platform`, `projectNotes`, `feature`, `merchantOrigin`, `environment`, and the verified `report`, returning `{ text, ready, title, code }`. If `report` is not provided, only a draft is generated; you cannot bypass public configuration checks by manually tampering with the report.

In development tools that support ES modules, you can generate a local draft from the root directory of the source package:

```powershell
@'
import { readFile, writeFile } from 'node:fs/promises';
const source = await readFile('internal/httpapi/web/integration-prompts.js', 'utf8');
const { buildIntegrationPrompt } = await import(
  'data:text/javascript;base64,' + Buffer.from(source).toString('base64')
);
const prompt = buildIntegrationPrompt({
  language: 'python',
  appKind: 'desktop',
  platform: 'windows',
  projectNotes: 'Existing Python desktop application. Add account sign-in and protect report exports.',
  feature: 'export'
});
await writeFile('integration-prompt.md', prompt.text, 'utf8');
console.log(prompt.title);
'@ | node --input-type=module
```

This command only generates an unconfigured draft and does not call AI or authorized services. Genuine access should return to your own Launch instance and select existing software and environment to regenerate a version with public configuration.

Verify the local generator:

```powershell
node --test scripts/integration-prompts.test.mjs scripts/integration-state.test.mjs
```
