@onairosofficial/onairos-capacitor 0.1.1 โ 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CAPACITOR_QUICK_START.md +379 -0
- package/CONNECTORS.md +122 -0
- package/OnairosofficialOnairosCapacitor.podspec +13 -0
- package/Package.swift +26 -0
- package/README.md +24 -19
- package/dist/onairos.capacitor.esm.js +1 -1
- package/dist/onairos.capacitor.esm.turbopack.js +1 -1
- package/docs/CAPACITOR_INTEGRATION_GUIDE.md +159 -0
- package/docs/CAPACITOR_MOCK_APP_TESTING.md +213 -0
- package/docs/CAPACITOR_SDK_FIXES_SUMMARY.md +65 -0
- package/docs/CROSS_SDK_PARITY.md +239 -0
- package/docs/DATA_FREQUENCY.md +57 -0
- package/docs/DEVELOPER_SDK_CHANGES.md +532 -0
- package/docs/INCIDENT_ENABLETRAINING_PIN_WEB_8.1.9.md +82 -0
- package/docs/ONAIROS_BUTTON_PROPS.md +152 -0
- package/docs/PLATFORM_APIS.md +559 -0
- package/docs/RAW_MEMORIES_API.md +305 -0
- package/docs/RAW_MEMORIES_SDK_UPDATE.md +54 -0
- package/docs/SDK_PARITY_ROLLUP_2026_04_24_to_05_02.md +96 -0
- package/docs/oldFixes.md +216 -0
- package/ios/Sources/OnairosNativeConnectorsPlugin/OnairosChatGPTNativePlugin.swift +993 -0
- package/ios/Sources/OnairosNativeConnectorsPlugin/OnairosNetflixNativePlugin.swift +33 -0
- package/ios/Sources/OnairosNativeConnectorsPlugin/OnairosSpotifyNativePlugin.swift +1082 -0
- package/onairos.d.ts +26 -36
- package/package.json +9 -6
- package/src/capacitorOAuthConfig.js +24 -13
- package/src/components/EmailAuth.js +3 -1
- package/src/components/EmailAuth.jsx +3 -1
- package/src/nativeConnectors.js +5 -0
- package/src/onairos.capacitor.jsx +1 -2
- package/src/onairos.jsx +1 -1
|
@@ -0,0 +1,305 @@
|
|
|
1
|
+
# RAW Memories API - Beta Feature
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
The RAW Memories feature allows developers to request access to users' LLM conversation data from platforms like ChatGPT, Claude, and other AI assistants. This provides rich contextual data about user preferences, communication patterns, and AI interaction history.
|
|
5
|
+
|
|
6
|
+
**Note**: Basic profile data (name, email, account details) is always included in all requests.
|
|
7
|
+
|
|
8
|
+
## Usage Modes
|
|
9
|
+
|
|
10
|
+
### Mode 1: RAW Data Only
|
|
11
|
+
Request only LLM conversation data + basic profile data. Shows only LLM connections (ChatGPT, Claude, Gemini, etc.) in the connection flow.
|
|
12
|
+
|
|
13
|
+
```javascript
|
|
14
|
+
<OnairosButton
|
|
15
|
+
requestData={['rawMemories']} // LLM data + basic (always included)
|
|
16
|
+
rawMemoriesOnly={true} // Show only LLM connections
|
|
17
|
+
webpageName="Your App"
|
|
18
|
+
onComplete={handleRawMemories}
|
|
19
|
+
/>
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
### Mode 2: RAW Data + Normal Data Requests
|
|
23
|
+
Request LLM conversation data plus additional user insights (traits, sentiment analysis, preferences). Shows all connection options.
|
|
24
|
+
|
|
25
|
+
```javascript
|
|
26
|
+
<OnairosButton
|
|
27
|
+
requestData={['rawMemories', 'personality', 'preferences']} // LLM + traits + preferences + basic
|
|
28
|
+
rawMemoriesOnly={false} // Show all data request options (default)
|
|
29
|
+
rawMemoriesConfig={{
|
|
30
|
+
platforms: ['chatgpt', 'claude', 'gemini'], // Specific LLM platforms
|
|
31
|
+
dateRange: {
|
|
32
|
+
from: '2024-01-01',
|
|
33
|
+
to: '2024-12-31'
|
|
34
|
+
},
|
|
35
|
+
includeMetadata: true,
|
|
36
|
+
maxConversations: 100
|
|
37
|
+
}}
|
|
38
|
+
webpageName="Your App"
|
|
39
|
+
onComplete={handleRawMemories}
|
|
40
|
+
/>
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Parameters
|
|
44
|
+
|
|
45
|
+
### `requestData` Array
|
|
46
|
+
- **`'rawMemories'`** - Include LLM conversation data in the request
|
|
47
|
+
- **`'personality'`** - Include AI-analyzed personality traits and behavioral patterns
|
|
48
|
+
- **`'preferences'`** - Include user preferences, interests, and settings
|
|
49
|
+
- **Basic data is always included** (name, email, profile information)
|
|
50
|
+
|
|
51
|
+
### `rawMemoriesOnly` Boolean
|
|
52
|
+
- **`true`** - Only show LLM data sources (ChatGPT, Claude, Gemini, Grok) on connections page
|
|
53
|
+
- **`false`** - Show all available data request options including social media platforms (default)
|
|
54
|
+
|
|
55
|
+
### `rawMemoriesConfig` Object (Optional)
|
|
56
|
+
```javascript
|
|
57
|
+
{
|
|
58
|
+
platforms: string[], // ['chatgpt', 'claude', 'gemini', 'perplexity']
|
|
59
|
+
dateRange: {
|
|
60
|
+
from: string, // ISO date string
|
|
61
|
+
to: string // ISO date string
|
|
62
|
+
},
|
|
63
|
+
includeMetadata: boolean, // Include conversation metadata
|
|
64
|
+
maxConversations: number, // Limit number of conversations
|
|
65
|
+
minLength: number // Minimum conversation length (messages)
|
|
66
|
+
}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Response Format
|
|
70
|
+
|
|
71
|
+
### Success Response
|
|
72
|
+
```javascript
|
|
73
|
+
{
|
|
74
|
+
success: true,
|
|
75
|
+
data: {
|
|
76
|
+
basic: {
|
|
77
|
+
name: string,
|
|
78
|
+
email: string,
|
|
79
|
+
profileInfo: object
|
|
80
|
+
},
|
|
81
|
+
rawMemories: {
|
|
82
|
+
conversations: Conversation[],
|
|
83
|
+
metadata: {
|
|
84
|
+
totalConversations: number,
|
|
85
|
+
platforms: string[],
|
|
86
|
+
dateRange: {
|
|
87
|
+
earliest: string,
|
|
88
|
+
latest: string
|
|
89
|
+
},
|
|
90
|
+
processingInfo: {
|
|
91
|
+
filtered: number,
|
|
92
|
+
included: number,
|
|
93
|
+
totalMessages: number
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
// Additional data types if requested (personality, preferences)
|
|
98
|
+
personality?: object,
|
|
99
|
+
preferences?: object
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### Error Response
|
|
105
|
+
```javascript
|
|
106
|
+
{
|
|
107
|
+
success: false,
|
|
108
|
+
error: string,
|
|
109
|
+
code: 'NO_LLM_DATA' | 'INSUFFICIENT_PERMISSIONS' | 'PROCESSING_ERROR'
|
|
110
|
+
}
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
## Conversation Data Structure
|
|
114
|
+
|
|
115
|
+
Based on ChatGPT conversation format, adapted for cross-platform compatibility:
|
|
116
|
+
|
|
117
|
+
### Root Structure
|
|
118
|
+
```javascript
|
|
119
|
+
[
|
|
120
|
+
{
|
|
121
|
+
id: string, // Unique conversation UUID
|
|
122
|
+
title: string, // Conversation title
|
|
123
|
+
created: number, // Unix timestamp
|
|
124
|
+
model: string, // AI model used (e.g., "gpt-4", "claude-3")
|
|
125
|
+
platform: string, // Platform: "chatgpt" | "claude" | "gemini" | "perplexity"
|
|
126
|
+
messages: Message[] // Array of all messages in conversation
|
|
127
|
+
}
|
|
128
|
+
]
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
### Message Structure
|
|
132
|
+
```javascript
|
|
133
|
+
{
|
|
134
|
+
role: string, // "user" | "assistant" | "system" | "tool"
|
|
135
|
+
time: number | null, // Unix timestamp
|
|
136
|
+
text: string, // Message content
|
|
137
|
+
meta: MessageMeta // Platform-specific metadata
|
|
138
|
+
}
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
### Message Metadata by Type
|
|
142
|
+
|
|
143
|
+
#### User Messages
|
|
144
|
+
```javascript
|
|
145
|
+
{
|
|
146
|
+
request_id?: string, // Unique request identifier
|
|
147
|
+
user_context_message_data?: object, // Custom instructions
|
|
148
|
+
about_user_message?: string, // User preferences/personality
|
|
149
|
+
about_model_message?: string, // Model behavior instructions
|
|
150
|
+
developer_mode_connector_ids?: string[], // Connected tools/extensions
|
|
151
|
+
selected_sources?: object[], // Information sources array
|
|
152
|
+
selected_github_repos?: object[], // GitHub repositories array
|
|
153
|
+
message_source?: string // Origin of message
|
|
154
|
+
}
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
#### Assistant Messages
|
|
158
|
+
```javascript
|
|
159
|
+
{
|
|
160
|
+
model_slug?: string, // Model used for response
|
|
161
|
+
citations?: object[], // Array of citations
|
|
162
|
+
content_references?: object[], // Array of content references
|
|
163
|
+
finish_details?: {
|
|
164
|
+
type: string, // Completion type (e.g., "stop")
|
|
165
|
+
reasoning_status?: string // For thinking models
|
|
166
|
+
},
|
|
167
|
+
finished_duration_sec?: number, // Reasoning duration
|
|
168
|
+
parent_id?: string // Parent message ID for threading
|
|
169
|
+
}
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
#### System Messages
|
|
173
|
+
```javascript
|
|
174
|
+
{
|
|
175
|
+
is_visually_hidden_from_conversation?: boolean,
|
|
176
|
+
is_contextual_answers_system_message?: boolean,
|
|
177
|
+
contextual_answers_message_type?: string,
|
|
178
|
+
is_complete?: boolean,
|
|
179
|
+
rebase_developer_message?: boolean
|
|
180
|
+
}
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
#### Tool/Search Results
|
|
184
|
+
```javascript
|
|
185
|
+
{
|
|
186
|
+
search_result_groups?: {
|
|
187
|
+
domain: string,
|
|
188
|
+
entries: {
|
|
189
|
+
url: string,
|
|
190
|
+
title: string,
|
|
191
|
+
snippet: string,
|
|
192
|
+
ref_id: {
|
|
193
|
+
turn_index: number,
|
|
194
|
+
ref_type: string,
|
|
195
|
+
ref_index: number
|
|
196
|
+
},
|
|
197
|
+
pub_date: number | null,
|
|
198
|
+
attribution: string
|
|
199
|
+
}[]
|
|
200
|
+
}[],
|
|
201
|
+
search_turns_count?: number,
|
|
202
|
+
search_source?: string,
|
|
203
|
+
sonic_classification_result?: {
|
|
204
|
+
latency_ms: number,
|
|
205
|
+
search_prob: number,
|
|
206
|
+
complex_search_prob: number,
|
|
207
|
+
classifier_config_name: string,
|
|
208
|
+
search_complexity: string
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
## Platform Support
|
|
214
|
+
|
|
215
|
+
### Currently Supported
|
|
216
|
+
- **ChatGPT** - Full conversation history with metadata, memories, ChatGPT apps and more data
|
|
217
|
+
- **Claude** - Conversation history (limited metadata)
|
|
218
|
+
- **Gemini** - Basic conversation history
|
|
219
|
+
- **Grok** - Conversation data
|
|
220
|
+
|
|
221
|
+
### Coming Soon
|
|
222
|
+
- **Perplexity** - Search-enhanced conversations
|
|
223
|
+
- **Character.AI** - Character interaction history
|
|
224
|
+
- **Poe** - Multi-model conversation history
|
|
225
|
+
|
|
226
|
+
## Privacy & Security
|
|
227
|
+
|
|
228
|
+
**HIPPA COMPLIANCE** - Via Delve eta early week of 27th
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
### Data Processing
|
|
232
|
+
- All conversation data is processed locally when possible
|
|
233
|
+
- Sensitive information is automatically filtered
|
|
234
|
+
- Users have full control over what data is shared
|
|
235
|
+
|
|
236
|
+
### Consent Flow
|
|
237
|
+
1. User sees clear explanation of what LLM data will be accessed
|
|
238
|
+
2. Platform-by-platform consent (users can select specific platforms)
|
|
239
|
+
3. Date range selection for historical data
|
|
240
|
+
4. Real-time preview of data being shared
|
|
241
|
+
|
|
242
|
+
### Data Retention
|
|
243
|
+
- Raw conversation data is not stored by Onairos
|
|
244
|
+
- Only processed insights and preferences are retained
|
|
245
|
+
- Users can request data deletion at any time
|
|
246
|
+
|
|
247
|
+
## Example Implementation
|
|
248
|
+
|
|
249
|
+
```javascript
|
|
250
|
+
import { OnairosButton } from 'onairos-sdk';
|
|
251
|
+
|
|
252
|
+
function MyApp() {
|
|
253
|
+
const handleRawMemories = (response) => {
|
|
254
|
+
if (response.success) {
|
|
255
|
+
const { conversations, metadata } = response.data.rawMemories;
|
|
256
|
+
|
|
257
|
+
console.log(`Received ${conversations.length} conversations`);
|
|
258
|
+
console.log(`From platforms: ${metadata.platforms.join(', ')}`);
|
|
259
|
+
console.log(`Total messages: ${metadata.processingInfo.totalMessages}`);
|
|
260
|
+
|
|
261
|
+
// Process conversation data
|
|
262
|
+
conversations.forEach(conv => {
|
|
263
|
+
console.log(`Conversation: ${conv.title}`);
|
|
264
|
+
console.log(`Platform: ${conv.platform}`);
|
|
265
|
+
console.log(`Messages: ${conv.messages.length}`);
|
|
266
|
+
|
|
267
|
+
// Analyze user patterns
|
|
268
|
+
const userMessages = conv.messages.filter(m => m.role === 'user');
|
|
269
|
+
const topics = extractTopics(userMessages);
|
|
270
|
+
|
|
271
|
+
// Use conversation insights
|
|
272
|
+
updateUserProfile(topics, conv.platform);
|
|
273
|
+
});
|
|
274
|
+
}
|
|
275
|
+
};
|
|
276
|
+
|
|
277
|
+
return (
|
|
278
|
+
<OnairosButton
|
|
279
|
+
requestData={['rawMemories']} // Gets LLM data + basic profile (always included)
|
|
280
|
+
rawMemoriesOnly={true} // Shows only LLM connections in UI
|
|
281
|
+
rawMemoriesConfig={{
|
|
282
|
+
platforms: ['chatgpt', 'claude'],
|
|
283
|
+
includeMetadata: true,
|
|
284
|
+
maxConversations: 50
|
|
285
|
+
}}
|
|
286
|
+
webpageName="AI Conversation Analyzer"
|
|
287
|
+
onComplete={handleRawMemories}
|
|
288
|
+
/>
|
|
289
|
+
);
|
|
290
|
+
}
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
## Beta Limitations
|
|
294
|
+
|
|
295
|
+
- Maximum 100 conversations per request
|
|
296
|
+
- Processing time may be longer for large datasets
|
|
297
|
+
- Some metadata fields may not be available for all platforms
|
|
298
|
+
- Rate limiting applies to prevent abuse
|
|
299
|
+
|
|
300
|
+
## Feedback
|
|
301
|
+
|
|
302
|
+
This is a beta feature. Please report issues or feature requests to:
|
|
303
|
+
- GitHub Issues: [onairos/sdk/issues](https://github.com/onairos/sdk/issues)
|
|
304
|
+
- Email: beta-feedback@onairos.com
|
|
305
|
+
- Discord: [Onairos Community](https://discord.gg/onairos)
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Raw memories โ SDK update (handoff-aligned)
|
|
2
|
+
|
|
3
|
+
**Status:** Web SDK **8.3.15+**
|
|
4
|
+
**Security:** Backend `authorizedData.rawMemories` + route guards (not optional policy).
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Backend contract (confirm with API team)
|
|
9
|
+
|
|
10
|
+
### `POST /getAPIurlMobile`
|
|
11
|
+
|
|
12
|
+
| Field | Type | SDK usage |
|
|
13
|
+
|-------|------|-----------|
|
|
14
|
+
| `authorizedData.rawMemories` | `boolean` | **Authoritative** โ if `false`, SDK must not send `includeLlmData: true`, must not call `/llm-data/history`, and must not treat user UI approval as granted. |
|
|
15
|
+
| `authorizedData.llmData` | `boolean` (legacy) | Read only when `rawMemories` is absent (transition). |
|
|
16
|
+
| `rawMemoriesPolicy` | `{ offered: boolean, code?: string, connectorPlatforms?: string[] }` | UX: hide consent + raw connectors when `offered === false`. |
|
|
17
|
+
| `traitIntent` | `object` | Passed through on `onComplete` โ SDK does **not** call `/api/trait-intents/resolve`. |
|
|
18
|
+
|
|
19
|
+
### Optional UI only โ `GET /api/raw-memories/policy`
|
|
20
|
+
|
|
21
|
+
| Field | Type | SDK usage |
|
|
22
|
+
|-------|------|-----------|
|
|
23
|
+
| `rawMemoriesAvailable` | `boolean` | Prefetch before handoff to hide raw UI early (not security). |
|
|
24
|
+
| `code` | `string` | e.g. `APP_NOT_APPROVED_FOR_RAW_MEMORIES`, `RAW_MEMORIES_ALLOWED` |
|
|
25
|
+
|
|
26
|
+
Headers: `x-api-key` (required on handoff in production); optional `x-onairos-app-id` on policy prefetch.
|
|
27
|
+
|
|
28
|
+
**Trusted app id:** Backend allowlist uses `req.appId` from the developer API key, not client `Info.appId` / `webpageName`.
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## SDK behavior summary
|
|
33
|
+
|
|
34
|
+
1. **Before handoff:** optional policy prefetch โ `rawMemoriesOffered` state (`true` / `false` / `null`).
|
|
35
|
+
2. **Data Request:** hide Raw Memories row when `rawMemoriesOffered === false`; require explicit `requestData` / `rawMemoriesOnly` / `rawMemoriesConfig` when unknown (`null`).
|
|
36
|
+
3. **Onboarding:** strip raw-export connectors only when the host requested **raw export** (`rawMemoriesOnly`, `rawMemoriesConfig`, or `'rawMemories'` in `requestData`) **and** `rawMemoriesOffered === false`. **`personality` / `preferences` + `allowedPlatforms` including ChatGPT** keeps ChatGPT connect for server-side training; raw export stays blocked on handoff.
|
|
37
|
+
4. **Handoff request:** omit `LLMData` confirmation when `rawMemoriesOffered === false`.
|
|
38
|
+
5. **After handoff:** `includeLlmData` and history fetch gated on `authorizedData.rawMemories === true`.
|
|
39
|
+
6. **Exports:** `normalizeAuthorizedData`, `isRawMemoriesAuthorized`, `fetchRawMemoriesPolicyForUiOptional`, etc. from `onairos`.
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## Integrator checklist
|
|
44
|
+
|
|
45
|
+
- [ ] Register app API key; do not rely on `webpageName` for raw access.
|
|
46
|
+
- [ ] Do not set `requestData={['rawMemories']}` unless Onairos approved the app (e.g. Juno).
|
|
47
|
+
- [ ] Read `onComplete` โ `authorizedData.rawMemories` before using `apiResponse.llmData`.
|
|
48
|
+
- [ ] Use `traitIntent` from handoff / `onComplete`, not a separate resolve call.
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Parity
|
|
53
|
+
|
|
54
|
+
Mirror in React Native / Capacitor: same field names and gating order as `docs/CROSS_SDK_PARITY.md` ยง raw tier.
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# SDK spec & parity rollup (Apr 24 โ May 2, 2026)
|
|
2
|
+
|
|
3
|
+
**Purpose:** Single place for **documentation** and **non-web SDK parity** (mobile, native hosts, server wrappers). Aligns with `CHANGELOG.md` and recent `main` commits (`8.0.0` โ `8.1.9`).
|
|
4
|
+
|
|
5
|
+
**Detailed HTTP/training contracts:** still authoritative in **`docs/DEVELOPER_SDK_CHANGES.md`**.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## 1. Release map (what actually changed for integrators)
|
|
10
|
+
|
|
11
|
+
| Version | Runtime / API surface | Package / install only |
|
|
12
|
+
|--------|------------------------|-------------------------|
|
|
13
|
+
| **8.0.0** | **Breaking:** training props consolidated (`enableTraining` removed; `trainingScreenMode` values). `closeOnConsent`, `backgroundLoadData`, inference retry on `pending`. CDN-only assets (`files` trimmed). | Turbopack-safe ESM entry usage via exports |
|
|
14
|
+
| **8.0.1** | Same entry files; bundler targets `onairos.esm.turbopack.js` for AMD/Turbopack parse issues | โ |
|
|
15
|
+
| **8.1.0** | **`webpageName`** forwarded to **`/persona/train`** and start-training sockets; **`appId`** from JWT / `webpageName` in those payloads | โ |
|
|
16
|
+
| **8.1.4** | Inyo / insufficient-data path; universal onboarding after platform reconnect (bugfix) | โ |
|
|
17
|
+
| **8.1.5** | **Data request UI/UX:** Raw Memories + **`allowedPlatforms`** rules; platform chips; Netflix/Spotify name normalization. **Email:** iOS/Safari OTP autofill (no new public prop names; same `requestData`, `allowedPlatforms`, `rawMemoriesOnly`, `rawMemoriesConfig`) | โ |
|
|
18
|
+
| **8.1.6** | *None* (same `import`/`require` dist paths) | pnpm: testing libs โ `devDependencies`; `socket.io-client` not duplicated as peer; `ajv` out of peers; `tailwindcss` optional peer |
|
|
19
|
+
| **8.1.8** | **Data request:** internal trim in `DataRequest` (no new public props) | โ |
|
|
20
|
+
| **8.1.9** | *None* for `import` / `require` paths (same as 8.1.8) | `exports`: `./package.json`, full `.` conditions (RN, `module`, `browser`, `default`); Laravel โ `onairos-laravel.js`; verify on pack |
|
|
21
|
+
|
|
22
|
+
**Unreleased / shipped in same window on `main` (see `CHANGELOG` โUnreleasedโ + Apr 24 commits):** background training handoff, `pollTrainingStatus` / `normalizeTrainingFromResolution` exports, `GET โฆ/training/status` polling contract, `window.onairosBaseUrl`, Google auth success timing. Treat as **web SDK contract** to mirror in other clients.
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## 2. Public props & objects (parity checklist)
|
|
27
|
+
|
|
28
|
+
### 2.1 Breaking (from **8.0.0**) โ must mirror in every SDK
|
|
29
|
+
|
|
30
|
+
- **`enableTraining`:** removed.
|
|
31
|
+
- **`trainingScreenMode`:** `'mock' | 'fast' | 'real' | 'none'` (replaces old meanings โ see **`docs/ONAIROS_BUTTON_PROPS.md`** migration table).
|
|
32
|
+
|
|
33
|
+
### 2.2 Data request โ **`requestData` host flags** (8.1.5 semantic rules)
|
|
34
|
+
|
|
35
|
+
Same prop names as before; behaviour tightened:
|
|
36
|
+
|
|
37
|
+
| Concept | Developer expectation |
|
|
38
|
+
|--------|------------------------|
|
|
39
|
+
| Raw Memories row | Only if host asked for raw (`requestData.rawMemories`, or `rawMemoriesOnly` / `rawMemoriesConfig`), user has connected raw pipeline, and allowlist rules satisfied when **`allowedPlatforms`** is set. |
|
|
40
|
+
| **`allowedPlatforms`** non-empty | Must include โฅ1 **raw-capable** platform (ChatGPT, Claude, Gemini, Grok, Netflix, Spotify, Sephora) or Raw Memories stays hidden. |
|
|
41
|
+
| Connected row | Shows **connected โฉ allowlist** plus **missing allowlist** chips (dashed); chips call **`onConnectMoreApps`**. |
|
|
42
|
+
| **`allowedPlatforms` empty / omitted** | No platform filter for that row (unchanged empty semantics). |
|
|
43
|
+
|
|
44
|
+
### 2.3 Training / persona โ HTTP & payloads (**8.1.0**)
|
|
45
|
+
|
|
46
|
+
| Item | Spec |
|
|
47
|
+
|------|------|
|
|
48
|
+
| **`/persona/train`** | Include **`webpageName`** (and **`appId`** when derived from JWT / webpage) per backend allowlists. |
|
|
49
|
+
| Start-training socket payloads | Same **`appId` / `webpageName`** plumbing as web. |
|
|
50
|
+
|
|
51
|
+
### 2.4 Training polling โ **`pollTrainingStatus`** (Apr 24 alignment)
|
|
52
|
+
|
|
53
|
+
| Item | Spec |
|
|
54
|
+
|------|------|
|
|
55
|
+
| Canonical URL | Prefer **`GET โฆ/training/status`** with Bearer; use **`training.statusUrl`** from authorize when provided. |
|
|
56
|
+
| Ready condition | `success !== false` and `trainingStatus.isCurrentlyTraining === false` (plus legacy path unchanged). |
|
|
57
|
+
| Intervals | Honor **`polling.recommendedIntervalMs`** when present. |
|
|
58
|
+
| **429** | Backoff via **`Retry-After`** / JSON hints. |
|
|
59
|
+
|
|
60
|
+
Other SDKs should expose the same polling helpers or document equivalent loops.
|
|
61
|
+
|
|
62
|
+
### 2.5 Inference (**8.0.0** contract fragment)
|
|
63
|
+
|
|
64
|
+
- Retry when HTTP **200** but **`InferenceResult.status === 'pending'`** (`model_not_ready`), aligned with **202 `TRAITS_REGENERATING`** semantics.
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## 3. Package / installation (integrators โ not duplicated inside non-JS SDKs)
|
|
69
|
+
|
|
70
|
+
- **8.1.6:** Consumers using **pnpm**: declare **`react` / `react-dom`**; **`tailwindcss`** optional if using only bundled CSS; no **`ajv`** peer from Onairos.
|
|
71
|
+
- **8.1.9:** Strict **`exports`**: subpath **`onairos/package.json`** supported; **`onairos/laravel`** resolves to **`dist/onairos-laravel.js`**; Metro/React Native use **`react-native`** export when resolving **`"."`**.
|
|
72
|
+
- **Next.js 16 + Turbopack:** keep **`onairos`** as direct **`dependency`** and **`transpilePackages: ['onairos']`**; fix **`turbopack.root`** in monorepos if resolution fails (see Next docs).
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## 4. Parity checklist (other SDK teams)
|
|
77
|
+
|
|
78
|
+
- [ ] Training props match **8.0.0** (`trainingScreenMode`, no `enableTraining`).
|
|
79
|
+
- [ ] **`webpageName` / `appId`** on **`/persona/train`** + start-training payloads (**8.1.0**).
|
|
80
|
+
- [ ] Data-request UX rules for **raw** + **`allowedPlatforms`** (**8.1.5**).
|
|
81
|
+
- [ ] Raw memories handoff: gate on **`authorizedData.rawMemories`**, optional **`rawMemoriesPolicy`**, **`traitIntent` from handoff** (**8.3.15** โ **`docs/RAW_MEMORIES_SDK_UPDATE.md`**).
|
|
82
|
+
- [ ] OTP / verification UX if applicable (Safari one-time-code behaviour on web).
|
|
83
|
+
- [ ] **`pollTrainingStatus`** semantics + **`/training/status`** (**Apr 24 / Unreleased** section + **`DEVELOPER_SDK_CHANGES.md`**).
|
|
84
|
+
- [ ] Inference **`pending`** retry behaviour (**8.0.0**).
|
|
85
|
+
- [ ] Document install quirks only where relevant (**pnpm** peers โ **8.1.6**; **Laravel** filename โ **8.1.9**).
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
## 5. Source of truth order
|
|
90
|
+
|
|
91
|
+
1. **`CHANGELOG.md`** โ version-by-version narrative.
|
|
92
|
+
2. This document โ **rollup + parity**.
|
|
93
|
+
3. **`docs/DEVELOPER_SDK_CHANGES.md`** โ training authorize response, polling, security fields.
|
|
94
|
+
4. **`docs/ONAIROS_BUTTON_PROPS.md`** โ prop migration (**8.0.0**).
|
|
95
|
+
|
|
96
|
+
_Last aligned with `main` through **8.1.9** plus changelog entries under **[Unreleased]**._
|
package/docs/oldFixes.md
ADDED
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
# Bug Fixes and New Features Summary
|
|
2
|
+
|
|
3
|
+
## ๐ **Bug Fixes**
|
|
4
|
+
|
|
5
|
+
### 1. **Back Button Navigation Fix**
|
|
6
|
+
**Issue:** When existing users clicked the back button on the data request page, it incorrectly navigated to the training page instead of the email page.
|
|
7
|
+
|
|
8
|
+
**Fix:** Updated `onairos/src/onairosButton.jsx` line 505:
|
|
9
|
+
```javascript
|
|
10
|
+
// Before (WRONG)
|
|
11
|
+
onClick={() => setCurrentFlow('loading')} // Went to training
|
|
12
|
+
|
|
13
|
+
// After (CORRECT)
|
|
14
|
+
onClick={() => setCurrentFlow('email')} // Goes back to email
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
**Impact:** Existing users can now properly navigate back to re-authenticate if needed.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
### 2. **YouTube OAuth Window Premature Closing**
|
|
22
|
+
**Issue:** YouTube OAuth popup was closing immediately (1 second) before users could see verification messages, due to aggressive domain detection.
|
|
23
|
+
|
|
24
|
+
**Fixes:**
|
|
25
|
+
|
|
26
|
+
#### A. **Removed Aggressive Auto-Close**
|
|
27
|
+
Updated `onairos/src/components/UniversalOnboarding.jsx` lines 216-231:
|
|
28
|
+
```javascript
|
|
29
|
+
// Before: Auto-closed immediately on domain detection
|
|
30
|
+
if (popup.location && popup.location.hostname === 'onairos.uk') {
|
|
31
|
+
touched = true;
|
|
32
|
+
popup.close(); // โ Too aggressive
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// After: Let OAuth callback page handle closing
|
|
36
|
+
if (popup.location && popup.location.hostname === 'onairos.uk') {
|
|
37
|
+
touched = true;
|
|
38
|
+
// Don't auto-close here - let the OAuth callback page handle it
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
#### B. **Increased Callback Page Delay**
|
|
43
|
+
Updated `onairos/public/oauth-callback.html` line 126:
|
|
44
|
+
```javascript
|
|
45
|
+
// Before: 2 seconds (too fast)
|
|
46
|
+
setTimeout(() => window.close(), 2000);
|
|
47
|
+
|
|
48
|
+
// After: 4 seconds (users can read the message)
|
|
49
|
+
setTimeout(() => window.close(), 4000);
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
**Impact:** Users now see OAuth verification messages and have time to read them before the popup closes.
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## ๐ **New Feature: RAW Memories (Beta)**
|
|
57
|
+
|
|
58
|
+
### **Overview**
|
|
59
|
+
Added support for accessing users' LLM conversation data from ChatGPT, Claude, and other AI platforms.
|
|
60
|
+
|
|
61
|
+
### **Implementation Files:**
|
|
62
|
+
- **Documentation:** `onairos/docs/RAW_MEMORIES_API.md`
|
|
63
|
+
- **Component Updates:** `onairos/src/components/DataRequest.js`
|
|
64
|
+
- **Main Button:** `onairos/src/onairosButton.jsx`
|
|
65
|
+
|
|
66
|
+
### **Usage Examples:**
|
|
67
|
+
|
|
68
|
+
#### **RAW Memories Only Mode:**
|
|
69
|
+
```javascript
|
|
70
|
+
<OnairosButton
|
|
71
|
+
requestData={['rawMemories']}
|
|
72
|
+
rawMemoriesOnly={true} // Only show LLM data + basic info
|
|
73
|
+
webpageName="AI Chat Analyzer"
|
|
74
|
+
onComplete={handleRawMemories}
|
|
75
|
+
/>
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
#### **Mixed Mode:**
|
|
79
|
+
```javascript
|
|
80
|
+
<OnairosButton
|
|
81
|
+
requestData={['rawMemories', 'personality', 'preferences']}
|
|
82
|
+
rawMemoriesOnly={false} // Show all data options
|
|
83
|
+
rawMemoriesConfig={{
|
|
84
|
+
platforms: ['chatgpt', 'claude'],
|
|
85
|
+
maxConversations: 50,
|
|
86
|
+
includeMetadata: true
|
|
87
|
+
}}
|
|
88
|
+
webpageName="Your App"
|
|
89
|
+
onComplete={handleAllData}
|
|
90
|
+
/>
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### **Response Format:**
|
|
94
|
+
```javascript
|
|
95
|
+
{
|
|
96
|
+
success: true,
|
|
97
|
+
data: {
|
|
98
|
+
rawMemories: {
|
|
99
|
+
conversations: [
|
|
100
|
+
{
|
|
101
|
+
id: "conv-uuid",
|
|
102
|
+
title: "Conversation Title",
|
|
103
|
+
created: 1640995200,
|
|
104
|
+
model: "gpt-4",
|
|
105
|
+
platform: "chatgpt",
|
|
106
|
+
messages: [
|
|
107
|
+
{
|
|
108
|
+
role: "user",
|
|
109
|
+
time: 1640995200,
|
|
110
|
+
text: "Hello, how are you?",
|
|
111
|
+
meta: { /* platform-specific metadata */ }
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
role: "assistant",
|
|
115
|
+
time: 1640995210,
|
|
116
|
+
text: "I'm doing well, thank you!",
|
|
117
|
+
meta: {
|
|
118
|
+
model_slug: "gpt-4",
|
|
119
|
+
finish_details: { type: "stop" }
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
]
|
|
123
|
+
}
|
|
124
|
+
],
|
|
125
|
+
metadata: {
|
|
126
|
+
totalConversations: 25,
|
|
127
|
+
platforms: ["chatgpt", "claude"],
|
|
128
|
+
processingInfo: {
|
|
129
|
+
totalMessages: 150,
|
|
130
|
+
filtered: 5,
|
|
131
|
+
included: 145
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
### **Data Structure Support:**
|
|
140
|
+
- **ChatGPT Format:** Full conversation structure with metadata
|
|
141
|
+
- **Claude Support:** Basic conversation history
|
|
142
|
+
- **Cross-Platform:** Unified format across different LLM platforms
|
|
143
|
+
- **Rich Metadata:** User context, model info, citations, search results
|
|
144
|
+
|
|
145
|
+
### **Privacy Features:**
|
|
146
|
+
- **Granular Consent:** Users select specific platforms
|
|
147
|
+
- **Date Range Control:** Users choose historical data range
|
|
148
|
+
- **Local Processing:** Sensitive data filtered locally when possible
|
|
149
|
+
- **No Storage:** Raw conversations not stored by Onairos
|
|
150
|
+
|
|
151
|
+
---
|
|
152
|
+
|
|
153
|
+
## ๐ง **Technical Changes**
|
|
154
|
+
|
|
155
|
+
### **Modified Files:**
|
|
156
|
+
1. `onairos/src/onairosButton.jsx` - Back button fix + RAW memories props
|
|
157
|
+
2. `onairos/src/components/UniversalOnboarding.jsx` - OAuth popup handling
|
|
158
|
+
3. `onairos/public/oauth-callback.html` - Increased close delay
|
|
159
|
+
4. `onairos/src/components/DataRequest.js` - RAW memories data type support
|
|
160
|
+
5. `onairos/docs/RAW_MEMORIES_API.md` - Complete API documentation
|
|
161
|
+
|
|
162
|
+
### **New Props Added:**
|
|
163
|
+
- `rawMemoriesOnly: boolean` - Show only LLM data options
|
|
164
|
+
- `rawMemoriesConfig: object` - Configuration for RAW memories
|
|
165
|
+
|
|
166
|
+
### **Backward Compatibility:**
|
|
167
|
+
- All existing implementations continue to work unchanged
|
|
168
|
+
- New props are optional with sensible defaults
|
|
169
|
+
- RAW memories feature is opt-in only
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
## ๐งช **Testing**
|
|
174
|
+
|
|
175
|
+
### **Bug Fix Testing:**
|
|
176
|
+
1. **Back Button:** Test existing user flow โ data request โ back button โ should go to email page
|
|
177
|
+
2. **OAuth Popup:** Test YouTube connection โ should see verification message for 4 seconds before closing
|
|
178
|
+
|
|
179
|
+
### **RAW Memories Testing:**
|
|
180
|
+
```javascript
|
|
181
|
+
// Test RAW memories only mode
|
|
182
|
+
<OnairosButton
|
|
183
|
+
requestData={['rawMemories']}
|
|
184
|
+
rawMemoriesOnly={true}
|
|
185
|
+
testMode={false} // Use live API
|
|
186
|
+
onComplete={(result) => console.log('RAW memories:', result)}
|
|
187
|
+
/>
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
---
|
|
191
|
+
|
|
192
|
+
## ๐ **Next Steps**
|
|
193
|
+
|
|
194
|
+
1. **Test all fixes** with live API calls
|
|
195
|
+
2. **Update documentation** with RAW memories examples
|
|
196
|
+
3. **Add platform-specific** LLM connectors (ChatGPT, Claude, etc.)
|
|
197
|
+
4. **Implement data processing** pipeline for conversation analysis
|
|
198
|
+
5. **Add privacy controls** for sensitive data filtering
|
|
199
|
+
|
|
200
|
+
## โ
**Implementation Status**
|
|
201
|
+
|
|
202
|
+
### **All Bug Fixes Applied:**
|
|
203
|
+
1. โ
**Back Button Navigation Fix** - Applied to `onairosButton.jsx` line 555
|
|
204
|
+
2. โ
**OAuth Popup Timing Fix** - Applied to `UniversalOnboarding.jsx` line 234
|
|
205
|
+
3. โ
**OAuth Callback Delay** - Applied to `oauth-callback.html` lines 126 & 166
|
|
206
|
+
|
|
207
|
+
### **RAW Memories Feature:**
|
|
208
|
+
1. โ
**Documentation** - Complete API documentation in `RAW_MEMORIES_API.md`
|
|
209
|
+
2. โ
**OnairosButton Props** - `rawMemoriesOnly` and `rawMemoriesConfig` parameters
|
|
210
|
+
3. โ
**DataRequest Component** - RAW memories data type support
|
|
211
|
+
4. โ
**UniversalOnboarding** - LLM-only mode filtering
|
|
212
|
+
5. โ
**Test File** - `test-raw-memories.html` for testing both modes
|
|
213
|
+
|
|
214
|
+
All fixes are backward compatible and ready for production use! ๐
|
|
215
|
+
|
|
216
|
+
**Last Updated:** October 28, 2025 - All fixes verified and implemented โ
|