voice-page-agent 0.1.0 → 0.1.1
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 +74 -4
- package/dist/index.cjs +3 -0
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +10 -8
package/README.md
CHANGED
|
@@ -9,16 +9,26 @@ Wake flow:
|
|
|
9
9
|
|
|
10
10
|
## Install
|
|
11
11
|
|
|
12
|
+
`voice-page-agent` now installs `page-agent` and `vue-demi` automatically.
|
|
13
|
+
|
|
14
|
+
Install by Vue runtime target:
|
|
15
|
+
|
|
12
16
|
```bash
|
|
13
|
-
npm i voice-page-agent
|
|
17
|
+
npm i voice-page-agent@vue2
|
|
18
|
+
npm i voice-page-agent@vue2.7
|
|
19
|
+
npm i voice-page-agent@vue3
|
|
14
20
|
```
|
|
15
21
|
|
|
16
|
-
For
|
|
22
|
+
For Vue 2.7.x and Vue 3.x, no extra composition plugin is needed.
|
|
23
|
+
|
|
24
|
+
For Vue 2.6.x (`voice-page-agent@vue2`), also install composition plugin:
|
|
17
25
|
|
|
18
26
|
```bash
|
|
19
27
|
npm i @vue/composition-api
|
|
20
28
|
```
|
|
21
29
|
|
|
30
|
+
If you do not specify a tag, `npm i voice-page-agent` installs the `latest` tag.
|
|
31
|
+
|
|
22
32
|
## Option Format
|
|
23
33
|
|
|
24
34
|
Use this shape:
|
|
@@ -77,7 +87,24 @@ await controller.openAgent();
|
|
|
77
87
|
await controller.runCommand("打开工具页面");
|
|
78
88
|
```
|
|
79
89
|
|
|
80
|
-
## Vue2 Usage
|
|
90
|
+
## Vue2 Usage (2.7.x)
|
|
91
|
+
|
|
92
|
+
```ts
|
|
93
|
+
import Vue from "vue";
|
|
94
|
+
import VoicePageAgentPlugin from "voice-page-agent";
|
|
95
|
+
|
|
96
|
+
Vue.use(VoicePageAgentPlugin, {
|
|
97
|
+
pageAgent: {
|
|
98
|
+
baseURL: "https://your-api.example.com",
|
|
99
|
+
model: "qwen3.5-plus",
|
|
100
|
+
apiKey: "NA",
|
|
101
|
+
language: "zh-CN",
|
|
102
|
+
},
|
|
103
|
+
wakeWord: "布丁布丁",
|
|
104
|
+
});
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## Vue2 Usage (2.6.x)
|
|
81
108
|
|
|
82
109
|
```ts
|
|
83
110
|
import Vue from "vue";
|
|
@@ -141,6 +168,50 @@ npm i
|
|
|
141
168
|
npm run dev
|
|
142
169
|
```
|
|
143
170
|
|
|
171
|
+
## Maintainer Release Tags
|
|
172
|
+
|
|
173
|
+
This package supports release channels by npm dist-tag:
|
|
174
|
+
|
|
175
|
+
- `vue2` -> Vue `>=2.6.14 <2.7.0`
|
|
176
|
+
- `vue2.7` -> Vue `>=2.7.0 <3.0.0`
|
|
177
|
+
- `vue3` -> Vue `>=3.2.0 <4.0.0`
|
|
178
|
+
|
|
179
|
+
Use release branches if you want long-term independent maintenance:
|
|
180
|
+
|
|
181
|
+
- `release/vue2`
|
|
182
|
+
- `release/vue2.7`
|
|
183
|
+
- `release/vue3`
|
|
184
|
+
|
|
185
|
+
Helper scripts:
|
|
186
|
+
|
|
187
|
+
```bash
|
|
188
|
+
npm run target:vue2
|
|
189
|
+
npm run target:vue2.7
|
|
190
|
+
npm run target:vue3
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
Publish with tag:
|
|
194
|
+
|
|
195
|
+
```bash
|
|
196
|
+
npm run publish:vue2
|
|
197
|
+
npm run publish:vue2.7
|
|
198
|
+
npm run publish:vue3
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
The publish scripts temporarily adjust `peerDependencies.vue` and restore `package.json` automatically after publish.
|
|
202
|
+
|
|
203
|
+
Dry run:
|
|
204
|
+
|
|
205
|
+
```bash
|
|
206
|
+
npm run publish:vue2 -- --dry-run
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
If you see `E403 ... You cannot publish over the previously published versions`, bump version first:
|
|
210
|
+
|
|
211
|
+
```bash
|
|
212
|
+
npm version patch --no-git-tag-version
|
|
213
|
+
```
|
|
214
|
+
|
|
144
215
|
Run Vue2 demo:
|
|
145
216
|
|
|
146
217
|
```bash
|
|
@@ -148,4 +219,3 @@ cd examples/vue2
|
|
|
148
219
|
npm i
|
|
149
220
|
npm run dev
|
|
150
221
|
```
|
|
151
|
-
|
package/dist/index.cjs
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
3
5
|
var vueDemi = require('vue-demi');
|
|
4
6
|
|
|
5
7
|
// src/controller.ts
|
|
@@ -600,4 +602,5 @@ exports.VoicePageAgentController = VoicePageAgentController;
|
|
|
600
602
|
exports.VoicePageAgentPlugin = plugin_default;
|
|
601
603
|
exports.createVoicePageAgent = createVoicePageAgent;
|
|
602
604
|
exports.createVoicePageAgentPlugin = createVoicePageAgentPlugin;
|
|
605
|
+
exports.default = plugin_default;
|
|
603
606
|
exports.useVoicePageAgent = useVoicePageAgent;
|
package/dist/index.d.cts
CHANGED
|
@@ -148,4 +148,4 @@ type VoicePageAgentPlugin = {
|
|
|
148
148
|
declare function createVoicePageAgentPlugin(options: VoicePageAgentOptions): VoicePageAgentPlugin;
|
|
149
149
|
declare const VoicePageAgentVuePlugin: VoicePageAgentPlugin;
|
|
150
150
|
|
|
151
|
-
export { type ResolvedVoicePageAgentOptions, type RuntimePageAgent, VoicePageAgentButton, VoicePageAgentController, type VoicePageAgentOptions, VoicePageAgentVuePlugin as VoicePageAgentPlugin, type VoicePageAgentState, type VoiceStateListener, type VoiceStateStatus, createVoicePageAgent, createVoicePageAgentPlugin, useVoicePageAgent };
|
|
151
|
+
export { type ResolvedVoicePageAgentOptions, type RuntimePageAgent, VoicePageAgentButton, VoicePageAgentController, type VoicePageAgentOptions, VoicePageAgentVuePlugin as VoicePageAgentPlugin, type VoicePageAgentState, type VoiceStateListener, type VoiceStateStatus, createVoicePageAgent, createVoicePageAgentPlugin, VoicePageAgentVuePlugin as default, useVoicePageAgent };
|
package/dist/index.d.ts
CHANGED
|
@@ -148,4 +148,4 @@ type VoicePageAgentPlugin = {
|
|
|
148
148
|
declare function createVoicePageAgentPlugin(options: VoicePageAgentOptions): VoicePageAgentPlugin;
|
|
149
149
|
declare const VoicePageAgentVuePlugin: VoicePageAgentPlugin;
|
|
150
150
|
|
|
151
|
-
export { type ResolvedVoicePageAgentOptions, type RuntimePageAgent, VoicePageAgentButton, VoicePageAgentController, type VoicePageAgentOptions, VoicePageAgentVuePlugin as VoicePageAgentPlugin, type VoicePageAgentState, type VoiceStateListener, type VoiceStateStatus, createVoicePageAgent, createVoicePageAgentPlugin, useVoicePageAgent };
|
|
151
|
+
export { type ResolvedVoicePageAgentOptions, type RuntimePageAgent, VoicePageAgentButton, VoicePageAgentController, type VoicePageAgentOptions, VoicePageAgentVuePlugin as VoicePageAgentPlugin, type VoicePageAgentState, type VoiceStateListener, type VoiceStateStatus, createVoicePageAgent, createVoicePageAgentPlugin, VoicePageAgentVuePlugin as default, useVoicePageAgent };
|
package/dist/index.js
CHANGED
|
@@ -593,4 +593,4 @@ var VoicePageAgentVuePlugin = {
|
|
|
593
593
|
};
|
|
594
594
|
var plugin_default = VoicePageAgentVuePlugin;
|
|
595
595
|
|
|
596
|
-
export { VoicePageAgentButton, VoicePageAgentController, plugin_default as VoicePageAgentPlugin, createVoicePageAgent, createVoicePageAgentPlugin, useVoicePageAgent };
|
|
596
|
+
export { VoicePageAgentButton, VoicePageAgentController, plugin_default as VoicePageAgentPlugin, createVoicePageAgent, createVoicePageAgentPlugin, plugin_default as default, useVoicePageAgent };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "voice-page-agent",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Voice wake plugin for page-agent with Vue2/Vue3 compatibility.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -21,6 +21,12 @@
|
|
|
21
21
|
"build": "tsup",
|
|
22
22
|
"dev": "tsup --watch",
|
|
23
23
|
"typecheck": "tsc --noEmit",
|
|
24
|
+
"target:vue2": "node ./scripts/set-vue-target.mjs vue2",
|
|
25
|
+
"target:vue2.7": "node ./scripts/set-vue-target.mjs vue2.7",
|
|
26
|
+
"target:vue3": "node ./scripts/set-vue-target.mjs vue3",
|
|
27
|
+
"publish:vue2": "node ./scripts/publish-by-target.mjs vue2",
|
|
28
|
+
"publish:vue2.7": "node ./scripts/publish-by-target.mjs vue2.7",
|
|
29
|
+
"publish:vue3": "node ./scripts/publish-by-target.mjs vue3",
|
|
24
30
|
"prepack": "npm run build"
|
|
25
31
|
},
|
|
26
32
|
"keywords": [
|
|
@@ -28,18 +34,14 @@
|
|
|
28
34
|
"wake-word",
|
|
29
35
|
"page-agent",
|
|
30
36
|
"vue2",
|
|
37
|
+
"vue2.7",
|
|
31
38
|
"vue3"
|
|
32
39
|
],
|
|
33
40
|
"peerDependencies": {
|
|
34
|
-
"
|
|
35
|
-
"vue": "^2.6.14 || ^3.2.0"
|
|
36
|
-
},
|
|
37
|
-
"peerDependenciesMeta": {
|
|
38
|
-
"page-agent": {
|
|
39
|
-
"optional": false
|
|
40
|
-
}
|
|
41
|
+
"vue": ">=2.6.14 <2.7.0"
|
|
41
42
|
},
|
|
42
43
|
"dependencies": {
|
|
44
|
+
"page-agent": "^0.2.0",
|
|
43
45
|
"vue-demi": "^0.14.10"
|
|
44
46
|
},
|
|
45
47
|
"devDependencies": {
|