Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# 0.7.1

- Publish current npm and PyPI install instructions with Python client 0.2.1 and the public SDK quickstart as the npm homepage.
- Document hosted PAYG availability and distinguish content-free behavior receipts from explicitly opted-in feedback text. Runtime behavior is unchanged.

# 0.7.0

- Publish the JavaScript SDK as `@clone-ai/prompt-prediction`. Update imports, generated integration examples, archive names, npm verification and installation guides. Runtime exports and prediction behavior remain unchanged.
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Add next-prompt prediction and Tab completion to your existing composer. Suggestions appear as ghost text. **Tab inserts; your application decides when to send.**

**SDK 0.7.0:** instant display remains the default. Set `presentation="typewriter"` for a cancellable display animation after the complete JSON response arrives; the API does not stream. These options and Clone mode are absent from the 0.3.1 package. Keep ordinary typing and sending available when predictions are loading, fail, or never return. See the [rendering contract](docs/agent-integration.md#suggestion-rendering-contract) before building a custom editor adapter.
**SDK 0.7.1:** instant display remains the default. Set `presentation="typewriter"` for a cancellable display animation after the complete JSON response arrives; the API does not stream. These options and Clone mode are absent from the 0.3.1 package. Keep ordinary typing and sending available when predictions are loading, fail, or never return. See the [rendering contract](docs/agent-integration.md#suggestion-rendering-contract) before building a custom editor adapter.

Use your product's conversation, selected artifact and user preferences as context. Your end users do not need a Clone account. Connecting a user's Clone context is optional.

Expand Down Expand Up @@ -34,7 +34,7 @@ Node **22.13+**, ESM. React integrations support **18 and 19**. The headless con
Install the public npm package. Existing integrations can keep their pinned version while validating an upgrade:

```sh
npm install --save-exact @clone-ai/prompt-prediction@0.7.0
npm install --save-exact @clone-ai/prompt-prediction@0.7.1
```

Use your project's package manager and commit its lockfile. Verified [GitHub release archives](docs/releases.md#download-and-install) remain available. Hosted API access requires a separate app key.
Expand Down Expand Up @@ -118,4 +118,4 @@ See [Contributing](CONTRIBUTING.md) for the repository layout and validation com

## Feedback loop

SDK 0.7.0 can return explicit rejection, evaluations, edited successful submissions and host-observed outcomes to the API. Wire the packaged tracker to your host send and authenticated proxy. Text collection is off by default. See [feedback integration](docs/feedback.md) for scoped memory, delivery, expiry and clearing. These features require the API feedback deployment; event collection alone is not model learning.
SDK 0.7.1 can return explicit rejection, evaluations, edited successful submissions and host-observed outcomes to the API. Wire the packaged tracker to your host send and authenticated proxy. Text collection is off by default. See [feedback integration](docs/feedback.md) for scoped memory, delivery, expiry and clearing. These features require the API feedback deployment; event collection alone is not model learning.
8 changes: 4 additions & 4 deletions docs/agent-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

Implement next-prompt prediction and Tab Completion in the existing customer composer using product context by default, preserving its submission behavior. No Clone end-user account, consent screen or callback is required for this basic path. Offer Clone personalization separately in settings only if desired. Read `README.md`, exported types and `openapi.json`. Do not infer that the customer uses assistant-ui just because the optional adapter exists.

Begin with [start.md](start.md), which covers agent-led self-service app registration and callback updates. This guide supplies the detailed implementation contract for SDK 0.7.0. Verify installed types; 0.3.1 has no typewriter option or Clone mode.
Begin with [start.md](start.md), which covers agent-led self-service app registration and callback updates. This guide supplies the detailed implementation contract for SDK 0.7.1. Verify installed types; 0.3.1 has no typewriter option or Clone mode.

## Prerequisites

- The public `@clone-ai/prompt-prediction@0.7.0` npm package, Node 22.13+, React 18 or 19. Follow the [installation instructions](releases.md#download-and-install). Checksum-verified GitHub archives are also available.
- The public `@clone-ai/prompt-prediction@0.7.1` npm package, Node 22.13+, React 18 or 19. Follow the [installation instructions](releases.md#download-and-install). Checksum-verified GitHub archives are also available.
- A Clone app key (`clnp_...`) for the chosen production or sandbox app and its API base URL. Use an isolated sandbox app for synthetic integration tests. Only optional personalization needs an exact registered HTTPS callback (HTTP loopback is local/test only). The agent obtains these through self-service onboarding; the customer need not prepare them in advance.
- An existing authenticated customer session and server-side session storage.
- Only for optional personalization: a Clone test account with selected profile/Goal context already synced. Basic verification needs no Clone test account. Local-only unsynced content is unavailable.
Expand Down Expand Up @@ -72,13 +72,13 @@ Use the bubbling `onInput` observer shown in the example. Updating observation s

The example distinguishes the SDK insertion from a later edit, removes attribution after clearing or Undo back to the original draft, and associates a submission with the most recently accepted suggestion. It does not measure how much suggested text remains or every suggestion used in a draft. `presented` means the controller offered a candidate; it does not prove the user read it. Adapt these observation boundaries explicitly if your editor behaves differently. No draft or completion text is included in the transmitted `{event_id, request_id, kind}`.

Telemetry is best effort and must not block input or send. The example shows local `pending`/`recorded`/`failed` delivery receipts; fixture receipts are labelled separately. SDK 0.7.0 uses bounded retries with the same event ID/body; it does not persist a durable retry queue. Reset the tracker on account/context changes to abort old-scope delivery. Report failed/missing deliveries instead of treating them as zero engagement. Verify acceptance without send, edited submission, Undo followed by an unrelated manual send, context change, telemetry failure, duplicate delivery, and unchanged billable usage. These event records alone do not establish coverage, usefulness, suggestion quality or human acceptance.
Telemetry is best effort and must not block input or send. The example shows local `pending`/`recorded`/`failed` delivery receipts; fixture receipts are labelled separately. SDK 0.7.1 uses bounded retries with the same event ID/body; it does not persist a durable retry queue. Reset the tracker on account/context changes to abort old-scope delivery. Report failed/missing deliveries instead of treating them as zero engagement. Verify acceptance without send, edited submission, Undo followed by an unrelated manual send, context change, telemetry failure, duplicate delivery, and unchanged billable usage. These event records alone do not establish coverage, usefulness, suggestion quality or human acceptance.

## Suggestion rendering contract

The prediction endpoint returns one complete JSON object, not SSE or token deltas. `createPredictionTransport` waits for that response, the controller validates it, and the controller validates the complete candidate. By default `useTabCompletion` exposes the full `completion` immediately and `TabCompletionInput` renders it as ghost text. With `presentation: "typewriter"`, the hook exposes a visible prefix until the animation completes; `canAccept` remains false until then. The complete candidate remains in `state.candidate`. This is the default for both empty-composer next prompts and draft completions.

Do not add per-character timers, progressively slice `completion`, or route it through an assistant-message streaming renderer by default. A typewriter animation is an optional presentation choice, not evidence that the API streams. In 0.7.0 set `presentation: "typewriter"` only when the customer's stated preference or an AskUserQuestion answer calls for it; do not ask again for a choice already supplied. The entire candidate must be visible before offering Tab acceptance; never accept only a partial string or send unseen text. Cancel any animation on edits, selection/context changes, dismissal, or expiry. Ordinary manual sending must stay available throughout.
Do not add per-character timers, progressively slice `completion`, or route it through an assistant-message streaming renderer by default. A typewriter animation is an optional presentation choice, not evidence that the API streams. In 0.7.1 set `presentation: "typewriter"` only when the customer's stated preference or an AskUserQuestion answer calls for it; do not ask again for a choice already supplied. The entire candidate must be visible before offering Tab acceptance; never accept only a partial string or send unseen text. Cancel any animation on edits, selection/context changes, dismissal, or expiry. Ordinary manual sending must stay available throughout.

Verify the installed package version and lockfile, inspect the actual composer adapter, and check the response format before attributing progressive display to the SDK or customer code. A recording alone cannot establish which layer produced an effect. Return evidence that the default renderer shows a complete candidate, Tab inserts it exactly once without sending, and only the host's explicit-send action submits it.

Expand Down
2 changes: 1 addition & 1 deletion docs/billing.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Pricing and billing

SDK 0.7.0 supports both sandbox and pay-as-you-go (PAYG) usage, including an optional company spending limit. Install the verified [0.7.0 release](https://github.com/cloneisyou/clone-sdk/releases/tag/v0.7.0). Hosted paid activation is available only when the developer console offers it; installing the SDK never enables payment.
SDK 0.7.1 supports both sandbox and pay-as-you-go (PAYG) usage, including an optional company spending limit. Install the verified [0.7.1 release](https://github.com/cloneisyou/clone-sdk/releases/tag/v0.7.1). Hosted paid activation is available only when the developer console offers it; installing the SDK never enables payment.

The company operating your product pays for hosted predictions. End users need no Clone account or personal subscription. SDK code is MIT licensed. The public catalog is [API pricing](https://clone.is/api-platform/pricing); availability depends on rollout, and existing individually negotiated contracts remain unchanged.

Expand Down
4 changes: 2 additions & 2 deletions docs/data-and-service.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Data and service boundaries

The SDK is free under the MIT license. Clone's hosted prediction API is a separate service. The prepared PAYG policy is documented in [pricing and billing](billing.md). Confirm current availability and prices in the [service catalog](https://clone.is/api-platform/pricing) when hosted billing launches; retention commitments and any SLA must still be confirmed with Clone. This repository is not a service-level agreement. See Clone's [privacy policy](https://clone.is/privacy) and [terms](https://clone.is/terms), and confirm application-specific service commitments through [contact@clone.is](mailto:contact@clone.is).
The SDK is free under the MIT license. Clone's hosted prediction API is a separate service. Hosted PAYG billing is available through the developer console with explicit company consent. See [pricing and billing](billing.md) and the current [service catalog](https://clone.is/api-platform/pricing). Confirm application-specific retention commitments and any SLA with Clone. This repository is not a service-level agreement. See Clone's [privacy policy](https://clone.is/privacy) and [terms](https://clone.is/terms), and confirm application-specific service commitments through [contact@clone.is](mailto:contact@clone.is).

## What is sent

Expand All @@ -22,4 +22,4 @@ The demo returns deterministic synthetic suggestions. It proves UI mechanics onl

## Feedback retention

With the API feedback deployment, explicit evaluations and opted-in edited successful submissions are encrypted, scoped to the app/user/connection grant, capped at 50 records per user and retained for 30 days. They can influence subsequent new predictions as bounded evidence. Behavior receipts remain content-free; task outcomes are host reports. Clearing removes memory and fences off late old-request events, in-flight results and replay. No shared model-weight training is performed. See [feedback](feedback.md).
Explicit evaluations and opted-in edited successful submissions are encrypted, scoped to the app/user/connection grant, capped at 50 records per user and retained for 30 days. They can influence subsequent new predictions as bounded evidence. Behavior receipts remain content-free; task outcomes are host reports. Clearing removes memory and fences off late old-request events, in-flight results and replay. No shared model-weight training is performed. See [feedback](feedback.md).
Loading
Loading