@kubohiroya/turbowarp-openai-realtime-api 0.2.0 → 0.4.0
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.ja.md +19 -2
- package/README.md +19 -2
- package/dist/turbowarp-openai-realtime-api.js +1 -1
- package/package.json +19 -12
package/README.ja.md
CHANGED
|
@@ -8,6 +8,22 @@ OpenAI Realtime APIと音声やテキストで会話し、ブロックで書い
|
|
|
8
8
|
|
|
9
9
|
**利用ガイド:** [English](https://kubohiroya.github.io/turbowarp-openai-realtime-api/)
|
|
10
10
|
|
|
11
|
+
## 最小サンプル
|
|
12
|
+
|
|
13
|
+
[TurboWarp Editorで開く](https://turbowarp.org/editor?project_url=https%3A%2F%2Fkubohiroya.github.io%2Fturbowarp-openai-realtime-api%2Fsamples%2Frelay-text-reply.sb3) · [SB3をダウンロード](https://kubohiroya.github.io/turbowarp-openai-realtime-api/samples/relay-text-reply.sb3)
|
|
14
|
+
|
|
15
|
+
1. Editorで開き、**Run without sandbox**を選択して拡張を許可します。緑旗はローカル状態の初期化だけです。
|
|
16
|
+
2. localhost relayでproviderを設定して起動し、**Configure**をクリック。ループバックorigin、8桁の一回限りのコードを入力します。API keyは入力しません。最後の確認では空欄のままEnterを押し、入力したコードを消します。
|
|
17
|
+
3. **Relay paired = true**を確認して**Start**をクリック。マイクはoffで、応答はテキストのみ。1応答で切断し、音声は再生しません。
|
|
18
|
+
4. **Stop / Clear**で終了し設定・結果を消去。保存・共有前に空欄回答とClearを実行してください。元のサンプルを開き直すと入力は空に戻ります。
|
|
19
|
+
|
|
20
|
+
**要件:** localhost capability-proxy(openai provider、課金有効なOpenAI APIアカウント、許可済みモデル)、WebRTC対応ブラウザ。API keyはrelayだけに設定。テキスト応答、マイクoff、音声出力off。
|
|
21
|
+
|
|
22
|
+
**未検証範囲:** 実relayペアリング、API課金通信、WebRTC接続と実モデル応答は未検証。 自動検証は無音ブラウザで空設定・未ペアリング・キャンセル分岐だけを確認します。
|
|
23
|
+
|
|
24
|
+
編集元と保守方法: [samples/README.md](samples/README.md)。
|
|
25
|
+
|
|
26
|
+
|
|
11
27
|
## できること
|
|
12
28
|
|
|
13
29
|
- TurboWarpのプロジェクトをWebRTCでOpenAI Realtime APIにつなぐ(マイクあり/なし)
|
|
@@ -39,7 +55,7 @@ OpenAI Realtime APIと音声やテキストで会話し、ブロックで書い
|
|
|
39
55
|
npm packageとして使う場合は、検証済みのversionをexact pinします。
|
|
40
56
|
|
|
41
57
|
```bash
|
|
42
|
-
pnpm add --save-exact @kubohiroya/turbowarp-openai-realtime-api@0.
|
|
58
|
+
pnpm add --save-exact @kubohiroya/turbowarp-openai-realtime-api@0.4.0
|
|
43
59
|
```
|
|
44
60
|
|
|
45
61
|
## クイックスタート
|
|
@@ -336,9 +352,10 @@ Composition APIをimportしても、単独のTurboWarp機能拡張は登録さ
|
|
|
336
352
|
|
|
337
353
|
## 開発
|
|
338
354
|
|
|
339
|
-
Node.js
|
|
355
|
+
Node.js 24以上と、`packageManager`で指定したpnpmを使います。
|
|
340
356
|
|
|
341
357
|
```bash
|
|
358
|
+
npm install --global corepack@latest
|
|
342
359
|
corepack enable
|
|
343
360
|
pnpm install --frozen-lockfile
|
|
344
361
|
pnpm check
|
package/README.md
CHANGED
|
@@ -8,6 +8,22 @@ A TurboWarp extension for talking with the OpenAI Realtime API by voice or text,
|
|
|
8
8
|
|
|
9
9
|
**User guide:** [English](https://kubohiroya.github.io/turbowarp-openai-realtime-api/)
|
|
10
10
|
|
|
11
|
+
## Minimal sample
|
|
12
|
+
|
|
13
|
+
[Open in TurboWarp Editor](https://turbowarp.org/editor?project_url=https%3A%2F%2Fkubohiroya.github.io%2Fturbowarp-openai-realtime-api%2Fsamples%2Frelay-text-reply.sb3) · [Download SB3](https://kubohiroya.github.io/turbowarp-openai-realtime-api/samples/relay-text-reply.sb3)
|
|
14
|
+
|
|
15
|
+
1. Open the sample, enable **Run without sandbox**, and allow the bundled extension. Green flag only resets local state.
|
|
16
|
+
2. Run your localhost relay, configure the provider there, then click **Configure**. Enter its loopback origin, then the eight-digit one-time pairing code. Never enter an API key. At the final prompt, press Enter with an empty answer to clear the entered code.
|
|
17
|
+
3. Confirm **Relay paired = true**, then click **Start**. One reply is displayed as text and the session ends. Microphone stays off and no audio is played.
|
|
18
|
+
4. Click **Stop / Clear** to end the session and clear settings/results. Before saving or sharing, complete the empty-answer prompt and clear; reopening the original sample also restores blank input values.
|
|
19
|
+
|
|
20
|
+
**Requirements:** A localhost @kubohiroya/capability-proxy with the openai provider, a billable OpenAI API account and an allowed model, plus a WebRTC browser. Microphone and audio output are off.
|
|
21
|
+
|
|
22
|
+
**Verification boundary:** Real relay pairing, billed API requests, WebRTC negotiation and real model replies have not been verified. Automated checks cover blank/unpaired state and cancellation only, with browser audio muted. No real relay, API, microphone, or device success is claimed.
|
|
23
|
+
|
|
24
|
+
Editable sources and maintenance: [samples/README.md](samples/README.md).
|
|
25
|
+
|
|
26
|
+
|
|
11
27
|
## What it does
|
|
12
28
|
|
|
13
29
|
- Connects a TurboWarp project to the OpenAI Realtime API over WebRTC, with or without the microphone.
|
|
@@ -45,7 +61,7 @@ The reviewed JavaScript build is committed to this repository, so users do not n
|
|
|
45
61
|
Install an exact version that you have reviewed:
|
|
46
62
|
|
|
47
63
|
```bash
|
|
48
|
-
pnpm add --save-exact @kubohiroya/turbowarp-openai-realtime-api@0.
|
|
64
|
+
pnpm add --save-exact @kubohiroya/turbowarp-openai-realtime-api@0.4.0
|
|
49
65
|
```
|
|
50
66
|
|
|
51
67
|
Standalone bundle:
|
|
@@ -398,9 +414,10 @@ realtime.release();
|
|
|
398
414
|
|
|
399
415
|
## Development
|
|
400
416
|
|
|
401
|
-
Use Node.js
|
|
417
|
+
Use Node.js 24 or newer and the pnpm version declared by `packageManager`.
|
|
402
418
|
|
|
403
419
|
```bash
|
|
420
|
+
npm install --global corepack@latest
|
|
404
421
|
corepack enable
|
|
405
422
|
pnpm install --frozen-lockfile
|
|
406
423
|
pnpm check
|
|
@@ -534,7 +534,7 @@ var block_definitions_default = {
|
|
|
534
534
|
}
|
|
535
535
|
};
|
|
536
536
|
//#endregion
|
|
537
|
-
//#region node_modules/.pnpm/@kubohiroya+turbowarp-named-functions@0.
|
|
537
|
+
//#region node_modules/.pnpm/@kubohiroya+turbowarp-named-functions@0.4.0_react@18.3.1/node_modules/@kubohiroya/turbowarp-named-functions/dist/composition.js
|
|
538
538
|
/**
|
|
539
539
|
* A small JSON Schema validator for function arguments and returns. It interprets the schema at run time and
|
|
540
540
|
* never generates code, so it also works where `eval` is unavailable (for example Cloudflare Workers).
|
package/package.json
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kubohiroya/turbowarp-openai-realtime-api",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "A TurboWarp extension for the OpenAI Realtime API, using a localhost relay for credentials.",
|
|
5
|
-
"author":
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "Hiroya Kubo",
|
|
7
|
+
"email": "hiroya@cuc.ac.jp",
|
|
8
|
+
"url": "https://github.com/kubohiroya"
|
|
9
|
+
},
|
|
6
10
|
"license": "MPL-2.0",
|
|
7
11
|
"homepage": "https://github.com/kubohiroya/turbowarp-openai-realtime-api#readme",
|
|
8
12
|
"repository": {
|
|
@@ -37,9 +41,9 @@
|
|
|
37
41
|
"access": "public",
|
|
38
42
|
"registry": "https://registry.npmjs.org/"
|
|
39
43
|
},
|
|
40
|
-
"packageManager": "pnpm@11.
|
|
44
|
+
"packageManager": "pnpm@11.28.8",
|
|
41
45
|
"engines": {
|
|
42
|
-
"node": ">=
|
|
46
|
+
"node": ">=24"
|
|
43
47
|
},
|
|
44
48
|
"scripts": {
|
|
45
49
|
"dev": "vite build --watch",
|
|
@@ -51,14 +55,17 @@
|
|
|
51
55
|
"docs:check": "node scripts/generate-readme.ts --check",
|
|
52
56
|
"repo:check": "node scripts/check-repo.ts",
|
|
53
57
|
"pack:check": "npm pack --dry-run --ignore-scripts",
|
|
54
|
-
"check": "pnpm run typecheck && pnpm run lint && pnpm run test && pnpm run docs:check && pnpm run check:dist && pnpm run types:composition:check && pnpm run repo:check && pnpm run pack:check",
|
|
58
|
+
"check": "pnpm run typecheck && pnpm run lint && pnpm run test && pnpm run docs:check && pnpm run check:dist && pnpm run types:composition:check && pnpm run repo:check && pnpm run pack:check && pnpm run samples:check",
|
|
55
59
|
"check:dist": "pnpm run build && node scripts/check-dist.ts",
|
|
56
|
-
"types:composition:check": "tsc --project tsconfig.composition-consumer.json"
|
|
60
|
+
"types:composition:check": "tsc --project tsconfig.composition-consumer.json",
|
|
61
|
+
"samples:build": "node scripts/build-samples.mjs",
|
|
62
|
+
"samples:check": "node scripts/build-samples.mjs --check && node --test scripts/verify-samples.mjs",
|
|
63
|
+
"pages:build": "node scripts/prepare-pages.mjs"
|
|
57
64
|
},
|
|
58
65
|
"devDependencies": {
|
|
59
66
|
"@eslint/js": "^9.39.5",
|
|
60
|
-
"@kubohiroya/turbowarp-extension-manifest": "^0.
|
|
61
|
-
"@kubohiroya/vite-plugin-turbowarp-extension": "^0.
|
|
67
|
+
"@kubohiroya/turbowarp-extension-manifest": "^0.5.0",
|
|
68
|
+
"@kubohiroya/vite-plugin-turbowarp-extension": "^0.10.0",
|
|
62
69
|
"@types/node": "^24.13.3",
|
|
63
70
|
"eslint": "^9.39.5",
|
|
64
71
|
"jiti": "^2.7.0",
|
|
@@ -66,7 +73,7 @@
|
|
|
66
73
|
"typescript-eslint": "^8.66.0",
|
|
67
74
|
"vite": "^8.2.2",
|
|
68
75
|
"vitest": "^5.0.0",
|
|
69
|
-
"@kubohiroya/turbowarp-extension-data-editor": "^0.
|
|
76
|
+
"@kubohiroya/turbowarp-extension-data-editor": "^0.5.0"
|
|
70
77
|
},
|
|
71
78
|
"exports": {
|
|
72
79
|
"./composition": {
|
|
@@ -77,11 +84,11 @@
|
|
|
77
84
|
"./package.json": "./package.json"
|
|
78
85
|
},
|
|
79
86
|
"dependencies": {
|
|
80
|
-
"@kubohiroya/turbowarp-named-functions": "^0.
|
|
87
|
+
"@kubohiroya/turbowarp-named-functions": "^0.4.0"
|
|
81
88
|
},
|
|
82
|
-
"gitHead": "
|
|
89
|
+
"gitHead": "2386a92f281d6285af4c9c61f19e2577453708e5",
|
|
83
90
|
"x-turbowarp-source": {
|
|
84
|
-
"revision": "
|
|
91
|
+
"revision": "2386a92f281d6285af4c9c61f19e2577453708e5",
|
|
85
92
|
"revisionRole": "base-commit",
|
|
86
93
|
"sourceState": "local-release-overlay"
|
|
87
94
|
}
|