@frockbot/plugin-shell 0.3.17 → 0.3.18

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@frockbot/plugin-shell",
3
- "version": "0.3.17",
3
+ "version": "0.3.18",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "exports": {
@@ -26,6 +26,7 @@
26
26
  "./debug-protocol": "./src/debug-protocol.ts",
27
27
  "./client/FrockBotApp.vue": "./src/client/FrockBotApp.vue",
28
28
  "./client/notify": "./src/client/notify.ts",
29
+ "./client/voice-microphone": "./src/client/voice-microphone.ts",
29
30
  "./client/styles.css": "./src/client/styles.css",
30
31
  "./client/voice-worklet": "./src/client/voice-worklet.ts",
31
32
  "./focus": "./src/focus.ts",
@@ -51,42 +52,42 @@
51
52
  },
52
53
  "dependencies": {
53
54
  "@cordisjs/plugin-webui": "0.8.2",
54
- "@frockbot/agent-runtime": "0.3.17",
55
- "@frockbot/application-foundation": "0.3.17",
56
- "@frockbot/catalog-core": "0.3.17",
57
- "@frockbot/client-core": "0.3.17",
58
- "@frockbot/client-ui": "0.3.17",
59
- "@frockbot/computer-core": "0.3.17",
60
- "@frockbot/computer-host-protocol": "0.3.17",
61
- "@frockbot/configuration-core": "0.3.17",
62
- "@frockbot/connection-core": "0.3.17",
63
- "@frockbot/kernel-agent-loop": "0.3.17",
64
- "@frockbot/kernel-composition": "0.3.17",
65
- "@frockbot/kernel-contracts": "0.3.17",
66
- "@frockbot/kernel-do": "0.3.17",
67
- "@frockbot/machine-protocol": "0.3.17",
68
- "@frockbot/plugin-applets": "0.3.17",
69
- "@frockbot/plugin-authoring": "0.3.17",
70
- "@frockbot/plugin-bot-template": "0.3.17",
71
- "@frockbot/plugin-computer": "0.3.17",
72
- "@frockbot/plugin-flock": "0.3.17",
73
- "@frockbot/plugin-image": "0.3.17",
74
- "@frockbot/plugin-machine-messages": "0.3.17",
75
- "@frockbot/plugin-mcp": "0.3.17",
76
- "@frockbot/plugin-memory": "0.3.17",
77
- "@frockbot/plugin-package-catalog": "0.3.17",
78
- "@frockbot/plugin-routines": "0.3.17",
79
- "@frockbot/plugin-skills": "0.3.17",
80
- "@frockbot/plugin-subagents": "0.3.17",
81
- "@frockbot/plugin-user-machine": "0.3.17",
82
- "@frockbot/protocol": "0.3.17",
55
+ "@frockbot/agent-runtime": "0.3.18",
56
+ "@frockbot/application-foundation": "0.3.18",
57
+ "@frockbot/catalog-core": "0.3.18",
58
+ "@frockbot/client-core": "0.3.18",
59
+ "@frockbot/client-ui": "0.3.18",
60
+ "@frockbot/computer-core": "0.3.18",
61
+ "@frockbot/computer-host-protocol": "0.3.18",
62
+ "@frockbot/configuration-core": "0.3.18",
63
+ "@frockbot/connection-core": "0.3.18",
64
+ "@frockbot/kernel-agent-loop": "0.3.18",
65
+ "@frockbot/kernel-composition": "0.3.18",
66
+ "@frockbot/kernel-contracts": "0.3.18",
67
+ "@frockbot/kernel-do": "0.3.18",
68
+ "@frockbot/machine-protocol": "0.3.18",
69
+ "@frockbot/plugin-applets": "0.3.18",
70
+ "@frockbot/plugin-authoring": "0.3.18",
71
+ "@frockbot/plugin-bot-template": "0.3.18",
72
+ "@frockbot/plugin-computer": "0.3.18",
73
+ "@frockbot/plugin-flock": "0.3.18",
74
+ "@frockbot/plugin-image": "0.3.18",
75
+ "@frockbot/plugin-machine-messages": "0.3.18",
76
+ "@frockbot/plugin-mcp": "0.3.18",
77
+ "@frockbot/plugin-memory": "0.3.18",
78
+ "@frockbot/plugin-package-catalog": "0.3.18",
79
+ "@frockbot/plugin-routines": "0.3.18",
80
+ "@frockbot/plugin-skills": "0.3.18",
81
+ "@frockbot/plugin-subagents": "0.3.18",
82
+ "@frockbot/plugin-user-machine": "0.3.18",
83
+ "@frockbot/protocol": "0.3.18",
83
84
  "cordis": "4.0.0-rc.8",
84
85
  "vue": "3.5.41"
85
86
  },
86
87
  "devDependencies": {
87
88
  "@cloudflare/workers-types": "latest",
88
- "@frockbot/plugin-prompt": "0.3.17",
89
- "@frockbot/plugin-tools": "0.3.17",
89
+ "@frockbot/plugin-prompt": "0.3.18",
90
+ "@frockbot/plugin-tools": "0.3.18",
90
91
  "@types/bun": "1.3.6",
91
92
  "@types/node": "26.2.0",
92
93
  "@vitejs/plugin-vue": "6.0.8",
package/src/backend.ts CHANGED
@@ -5302,6 +5302,12 @@ export class ShellBotBackendContribution {
5302
5302
  };
5303
5303
  }
5304
5304
 
5305
+ /** Count inputs waiting for the next conversational Turn without draining them. */
5306
+ async pendingInputCount(identity: BotIdentity): Promise<number> {
5307
+ await this.validateIdentity(identity);
5308
+ return (await this.routineInbox.pending()).length;
5309
+ }
5310
+
5305
5311
  /**
5306
5312
  * Acknowledge inbox entries. An explicit command, never a side effect of
5307
5313
  * reading: a background poll must not clear the badge.
@@ -21,10 +21,14 @@ export interface VoiceMicrophoneV1 {
21
21
  }
22
22
 
23
23
  export interface VoiceMicrophoneOptionsV1 {
24
- /** One frame of PCM16, little-endian, mono, 24 kHz. */
24
+ /** One frame of PCM16, little-endian, mono, at `sampleRate`. */
25
25
  audio(pcm16: ArrayBuffer): void;
26
26
  /** Peak amplitude of the frame, 0…1, for the capture animation. */
27
27
  level(value: number): void;
28
+ /** Defaults to dictation's 24 kHz. Voice assistant input uses 16 kHz. */
29
+ sampleRate?: number;
30
+ /** Defaults to 32 ms at the selected sample rate. */
31
+ frameSamples?: number;
28
32
  }
29
33
 
30
34
  /** False on a platform with no microphone API at all; the button stays hidden. */
@@ -83,8 +87,14 @@ export async function startVoiceMicrophoneV1(
83
87
  numberOfOutputs: 1,
84
88
  outputChannelCount: [1],
85
89
  processorOptions: {
86
- targetRate: VOICE_CAPTURE_SAMPLE_RATE_V1,
87
- frameSamples: FRAME_SAMPLES,
90
+ targetRate: options.sampleRate ?? VOICE_CAPTURE_SAMPLE_RATE_V1,
91
+ frameSamples:
92
+ options.frameSamples ??
93
+ Math.round(
94
+ FRAME_SAMPLES *
95
+ ((options.sampleRate ?? VOICE_CAPTURE_SAMPLE_RATE_V1) /
96
+ VOICE_CAPTURE_SAMPLE_RATE_V1),
97
+ ),
88
98
  },
89
99
  });
90
100
  node.port.onmessage = (event: MessageEvent) => {