@aippy/runtime 0.2.5-dev.1 → 0.2.6
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/README.md +0 -34
- package/dist/core/index.js +14 -15
- package/dist/device/index.js +256 -263
- package/dist/device/sensors.d.ts +8 -56
- package/dist/index/index.js +47 -93
- package/dist/index.d.ts +0 -2
- package/dist/leaderboard/index.js +22 -18
- package/dist/leaderboard/types.d.ts +2 -0
- package/dist/{runtime-CmoG3v2m.js → runtime-DjBdOttl.js} +76 -55
- package/package.json +36 -48
- package/dist/ai/errors.d.ts +0 -21
- package/dist/ai/index.d.ts +0 -45
- package/dist/ai/index.js +0 -20
- package/dist/ai/openai/index.d.ts +0 -11
- package/dist/ai/openai/provider.d.ts +0 -51
- package/dist/ai/shared/config.d.ts +0 -50
- package/dist/ai/shared/index.d.ts +0 -5
- package/dist/ai/ui/config.d.ts +0 -81
- package/dist/ai/ui/endpoints.d.ts +0 -16
- package/dist/ai/ui/index.d.ts +0 -15
- package/dist/ai/ui/types.d.ts +0 -46
- package/dist/ai.d.ts +0 -2
- package/dist/bridge-DdAH4txB.js +0 -222
- package/dist/core/native-bridge.d.ts +0 -9
- package/dist/errors-CDEBaBxB.js +0 -26
- package/dist/errors-D29z-Qus.js +0 -148
- package/dist/native-bridge-JAmH-zTN.js +0 -6
- package/dist/user/api.d.ts +0 -9
- package/dist/user/bridge.d.ts +0 -80
- package/dist/user/config.d.ts +0 -21
- package/dist/user/hooks.d.ts +0 -38
- package/dist/user/index.d.ts +0 -11
- package/dist/user/index.js +0 -28
- package/dist/user/types.d.ts +0 -111
- package/dist/user/userSessionInfo.d.ts +0 -6
- package/dist/user.d.ts +0 -2
- package/dist/userSessionInfo-CBk9ywXi.js +0 -186
package/README.md
CHANGED
|
@@ -87,46 +87,12 @@ button.onclick = async () => {
|
|
|
87
87
|
};
|
|
88
88
|
```
|
|
89
89
|
|
|
90
|
-
### AI (Backend Proxy Adapter)
|
|
91
|
-
|
|
92
|
-
```typescript
|
|
93
|
-
// Default base URL: https://api.aippy.dev/api/aisdk/v1
|
|
94
|
-
|
|
95
|
-
import { streamText, experimental_generateImage as generateImage } from 'ai';
|
|
96
|
-
import { aippy } from '@aippy/runtime/ai';
|
|
97
|
-
|
|
98
|
-
// Create provider (reads from env vars automatically)
|
|
99
|
-
const provider = aippy();
|
|
100
|
-
|
|
101
|
-
// Or override with config
|
|
102
|
-
// const provider = aippy({ baseUrl: '...', userToken: '...' });
|
|
103
|
-
|
|
104
|
-
// Streaming text generation (uses Vercel AI SDK)
|
|
105
|
-
const result = await streamText({
|
|
106
|
-
model: provider('gpt'),
|
|
107
|
-
prompt: 'Write a haiku about TypeScript.',
|
|
108
|
-
});
|
|
109
|
-
|
|
110
|
-
for await (const chunk of result.textStream) {
|
|
111
|
-
console.log(chunk);
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
// Image generation
|
|
115
|
-
const image = await generateImage({
|
|
116
|
-
model: provider.image('dall-e-3'),
|
|
117
|
-
prompt: 'A sunset over mountains',
|
|
118
|
-
});
|
|
119
|
-
|
|
120
|
-
console.log(image.image?.base64);
|
|
121
|
-
```
|
|
122
|
-
|
|
123
90
|
## Packages
|
|
124
91
|
|
|
125
92
|
- `@aippy/runtime/core` - Core types and configuration
|
|
126
93
|
- `@aippy/runtime/device` - Device APIs (camera, geolocation, sensors, file system)
|
|
127
94
|
- `@aippy/runtime/utils` - Platform detection, performance monitoring, PWA utilities
|
|
128
95
|
- `@aippy/runtime/audio` - iOS-compatible Web Audio API wrapper
|
|
129
|
-
- `@aippy/runtime/ai` - AI SDK adapter wrapping `ai` package, routes through backend proxy
|
|
130
96
|
|
|
131
97
|
## Publishing
|
|
132
98
|
|
package/dist/core/index.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { A as m, C as _, R, a as g, p as I } from "../runtime-CmoG3v2m.js";
|
|
1
|
+
import { a as v, A as d, C as u, E as A, R as _, b as m, c as R, p as g } from "../runtime-DjBdOttl.js";
|
|
3
2
|
const s = {
|
|
4
3
|
mode: "development",
|
|
5
4
|
debug: !1,
|
|
@@ -10,7 +9,7 @@ function o() {
|
|
|
10
9
|
const e = {};
|
|
11
10
|
return typeof process < "u" && process.env && (process.env.NODE_ENV && (e.mode = process.env.NODE_ENV), process.env.AIPPY_DEBUG && (e.debug = process.env.AIPPY_DEBUG === "true"), process.env.AIPPY_API_BASE_URL && (e.apiBaseUrl = process.env.AIPPY_API_BASE_URL)), e;
|
|
12
11
|
}
|
|
13
|
-
function
|
|
12
|
+
function c(e) {
|
|
14
13
|
const n = o();
|
|
15
14
|
return {
|
|
16
15
|
...s,
|
|
@@ -23,10 +22,10 @@ function p(e) {
|
|
|
23
22
|
}
|
|
24
23
|
};
|
|
25
24
|
}
|
|
26
|
-
const r = "0.2.
|
|
25
|
+
const r = "0.2.6", a = {
|
|
27
26
|
version: r
|
|
28
27
|
}, i = a.version, t = "@aippy/runtime";
|
|
29
|
-
function
|
|
28
|
+
function p() {
|
|
30
29
|
return {
|
|
31
30
|
name: t,
|
|
32
31
|
version: i,
|
|
@@ -34,18 +33,18 @@ function c() {
|
|
|
34
33
|
};
|
|
35
34
|
}
|
|
36
35
|
export {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
36
|
+
v as AippyRuntime,
|
|
37
|
+
d as AippyRuntimeError,
|
|
38
|
+
u as Cancellable,
|
|
40
39
|
s as DEFAULT_CONFIG,
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
A as ERROR_CODES,
|
|
41
|
+
_ as ReceiveChannel,
|
|
43
42
|
t as SDK_NAME,
|
|
44
43
|
i as VERSION,
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
m as aippyRuntime,
|
|
45
|
+
R as createError,
|
|
47
46
|
o as getConfigFromEnv,
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
47
|
+
p as getVersionInfo,
|
|
48
|
+
c as mergeConfig,
|
|
49
|
+
g as processMotionData
|
|
51
50
|
};
|