@absolutejs/meeting 0.0.1-beta.1 → 0.0.1-beta.10

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/dist/meeting.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { type STTAdapter, type VoiceLanguageStrategy, type VoiceLexiconEntry, type VoicePhraseHint, type VoiceScribeTurn } from "@absolutejs/voice";
2
- import type { MeetingParticipant, MeetingSource, SpeakAudio } from "./source";
2
+ import type { ChatMessage, MeetingCapabilities, MeetingParticipant, MeetingSource, SpeakAudio } from "./source";
3
3
  export type MeetingTurn = VoiceScribeTurn & {
4
4
  /** Resolved participant for this turn, when the source identified speakers. */
5
5
  participant?: MeetingParticipant;
@@ -8,8 +8,15 @@ export type MeetingEventMap = {
8
8
  turn: {
9
9
  turn: MeetingTurn;
10
10
  };
11
+ /** Roster update. `status` mirrors the source: "joined"/absent on appear,
12
+ * "left" when a participant leaves the call. */
11
13
  participant: {
12
14
  participant: MeetingParticipant;
15
+ status?: "joined" | "left";
16
+ };
17
+ /** A text message arrived in the call chat. */
18
+ chat: {
19
+ message: ChatMessage;
13
20
  };
14
21
  end: {
15
22
  reason?: string;
@@ -31,6 +38,19 @@ export type MeetingSession = {
31
38
  * the formats each adapter accepts (Recall: mp3; Discord: pcm).
32
39
  */
33
40
  speak: (audio: SpeakAudio) => Promise<void>;
41
+ /** Cut the bot's in-progress speech (barge-in). No-op when the source can't
42
+ * inject/stop audio or nothing is playing. */
43
+ stopSpeaking: () => Promise<void>;
44
+ /**
45
+ * Post a text message INTO the call chat. Delegates to the source; throws if
46
+ * the underlying adapter doesn't implement `sendChat`. `opts.system` is a hint
47
+ * for platforms that distinguish system messages (ignored elsewhere).
48
+ */
49
+ sendChat: (text: string, opts?: {
50
+ system?: boolean;
51
+ }) => Promise<void>;
52
+ /** What the underlying source can do (speak / chat). */
53
+ readonly capabilities: MeetingCapabilities;
34
54
  getTranscript: () => MeetingTurn[];
35
55
  getParticipants: () => MeetingParticipant[];
36
56
  };
package/dist/source.d.ts CHANGED
@@ -7,6 +7,36 @@ export type MeetingParticipant = {
7
7
  platform?: string;
8
8
  metadata?: Record<string, unknown>;
9
9
  };
10
+ /**
11
+ * A text message in the call's chat. `kind` distinguishes ordinary messages
12
+ * from emoji reactions and platform/system notices; everything but `text` is
13
+ * best-effort and may be absent depending on what the source can report.
14
+ */
15
+ export type ChatMessage = {
16
+ /** The message body (or reaction emoji / system text). */
17
+ text: string;
18
+ /** What sort of chat event this is. Defaults to a normal "message". */
19
+ kind?: "message" | "reaction" | "system";
20
+ /** Resolved sender, when the source identified them. */
21
+ author?: MeetingParticipant;
22
+ /** Raw platform sender id, even when the full participant isn't resolved. */
23
+ authorId?: string;
24
+ /** Epoch ms the message was sent, when the source reports it. */
25
+ timestamp?: number;
26
+ /** Platform channel/thread id the message belongs to, when applicable. */
27
+ channelId?: string;
28
+ };
29
+ /**
30
+ * Which in-call outputs a source supports. Mirrors the optional `speak` /
31
+ * `sendChat` members so a consumer can branch on capabilities up front instead
32
+ * of probing for thrown "not implemented" errors.
33
+ */
34
+ export type MeetingCapabilities = {
35
+ /** The bot can play audio INTO the call (`speak`). */
36
+ canSpeak: boolean;
37
+ /** The bot can post text into the call chat (`sendChat`). */
38
+ canChat: boolean;
39
+ };
10
40
  /**
11
41
  * Audio the bot wants to play INTO the call. Adapters declare which formats
12
42
  * they accept (Recall: mp3; Discord: pcm); a TypeError is the right signal
@@ -29,9 +59,16 @@ export type MeetingSourceEventMap = {
29
59
  chunk: AudioChunk;
30
60
  participant?: string;
31
61
  };
32
- /** Roster update — someone joined / was identified. */
62
+ /** Roster update — someone joined / left / was identified. `status` signals
63
+ * the transition: "joined" (or absent — the historical behavior) when a
64
+ * participant appears/is identified, "left" when they leave the call. */
33
65
  participant: {
34
66
  participant: MeetingParticipant;
67
+ status?: "joined" | "left";
68
+ };
69
+ /** A text message arrived in the call chat. */
70
+ chat: {
71
+ message: ChatMessage;
35
72
  };
36
73
  /** The call ended (everyone left, host stopped, etc.). */
37
74
  end: {
@@ -62,4 +99,24 @@ export type MeetingSource = {
62
99
  * the platform has accepted it, for fire-and-forget transports).
63
100
  */
64
101
  speak?: (audio: SpeakAudio) => Promise<void>;
102
+ /**
103
+ * Stop any in-progress `speak()` output immediately (barge-in / ducking).
104
+ * Optional — sources that can't inject audio (or can't stop it) omit it;
105
+ * `meeting.stopSpeaking()` then no-ops.
106
+ */
107
+ stopSpeaking?: () => Promise<void>;
108
+ /**
109
+ * Post a text message INTO the call chat. Optional — adapters that can't write
110
+ * chat simply don't implement it; `meeting.sendChat()` will throw a clear
111
+ * error in that case. `opts.system` is a hint for platforms that distinguish
112
+ * system/announcement messages from ordinary ones (ignored elsewhere).
113
+ */
114
+ sendChat?: (text: string, opts?: {
115
+ system?: boolean;
116
+ }) => Promise<void>;
117
+ /**
118
+ * What this source can do (speak / chat). Optional — when absent, consumers
119
+ * fall back to probing the presence of `speak` / `sendChat`.
120
+ */
121
+ readonly capabilities?: MeetingCapabilities;
65
122
  };
package/package.json CHANGED
@@ -1,37 +1,72 @@
1
1
  {
2
- "name": "@absolutejs/meeting",
3
- "version": "0.0.1-beta.1",
4
- "description": "Meeting-bot core for AbsoluteJS — join a call (via a source adapter), transcribe it live with the voice scribe, and surface diarized turns + participants for analysis",
5
- "repository": {
6
- "type": "git",
7
- "url": "https://github.com/absolutejs/meeting.git"
8
- },
9
- "files": [
10
- "dist",
11
- "README.md"
12
- ],
13
- "main": "./dist/index.js",
14
- "types": "./dist/index.d.ts",
15
- "exports": {
16
- ".": {
17
- "import": "./dist/index.js",
18
- "types": "./dist/index.d.ts"
19
- }
20
- },
21
- "license": "CC BY-NC 4.0",
22
- "author": "Alex Kahn",
23
- "scripts": {
24
- "build": "rm -rf dist && bun build ./src/index.ts --outdir dist --target bun --external @absolutejs/voice && tsc --emitDeclarationOnly --project tsconfig.json",
25
- "format": "prettier --write \"./**/*.{js,ts,json,md}\"",
26
- "release": "bun run format && bun run build && bun publish",
27
- "test": "bun test",
28
- "typecheck": "bun run tsc --noEmit"
29
- },
30
- "dependencies": {
31
- "@absolutejs/voice": "0.0.22-beta.550"
32
- },
33
- "devDependencies": {
34
- "@types/bun": "1.3.9",
35
- "typescript": "^5.9.3"
36
- }
2
+ "name": "@absolutejs/meeting",
3
+ "version": "0.0.1-beta.10",
4
+ "description": "Meeting-bot core for AbsoluteJS — join a call (via a source adapter), transcribe it live with the voice scribe, and surface diarized turns + participants for analysis",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "git+https://github.com/absolutejs/meeting.git"
8
+ },
9
+ "homepage": "https://github.com/absolutejs/meeting",
10
+ "bugs": {
11
+ "url": "https://github.com/absolutejs/meeting/issues"
12
+ },
13
+ "files": [
14
+ "dist",
15
+ "README.md"
16
+ ],
17
+ "main": "./dist/index.js",
18
+ "types": "./dist/index.d.ts",
19
+ "exports": {
20
+ ".": {
21
+ "import": "./dist/index.js",
22
+ "types": "./dist/index.d.ts"
23
+ },
24
+ "./manifest": {
25
+ "import": "./dist/manifest.js",
26
+ "types": "./dist/manifest.d.ts"
27
+ },
28
+ "./manifest.json": "./dist/manifest.json"
29
+ },
30
+ "license": "BSL-1.1",
31
+ "author": "Alex Kahn",
32
+ "absolutejs": {
33
+ "manifestContract": 2,
34
+ "runtimePeers": {
35
+ "@absolutejs/voice": {
36
+ "artifactImports": [
37
+ "@absolutejs/voice"
38
+ ],
39
+ "buildExternals": [
40
+ "@absolutejs/voice",
41
+ "@absolutejs/voice/*"
42
+ ],
43
+ "optional": false,
44
+ "range": ">=0.0.22-beta.647 <0.1",
45
+ "tested": "0.0.22-beta.647"
46
+ }
47
+ }
48
+ },
49
+ "scripts": {
50
+ "build": "rm -rf dist && bun build ./src/index.ts ./src/manifest.ts --outdir dist --root src --target bun --external @absolutejs/manifest --external '@absolutejs/manifest/*' --external @absolutejs/voice --external '@absolutejs/voice/*' --external @sinclair/typebox --external '@sinclair/typebox/*' && tsc --emitDeclarationOnly --project tsconfig.json && absolute-manifest emit",
51
+ "format": "prettier --write \"./**/*.{js,ts,json,md}\"",
52
+ "release": "bun run check:package && npm publish --access public --tag beta",
53
+ "test": "bun test",
54
+ "typecheck": "bun run tsc --noEmit",
55
+ "verify-package": "absolute-manifest verify-package",
56
+ "check:package": "bun run format && bun run typecheck && bun run test && bun run verify-package && bun run build && bun run verify-package --artifacts"
57
+ },
58
+ "dependencies": {
59
+ "@absolutejs/manifest": "0.7.2",
60
+ "@sinclair/typebox": "0.34.52"
61
+ },
62
+ "devDependencies": {
63
+ "@absolutejs/voice": "0.0.22-beta.647",
64
+ "@types/bun": "1.3.14",
65
+ "elysia": "1.4.29",
66
+ "prettier": "3.9.6",
67
+ "typescript": "^5.9.3"
68
+ },
69
+ "peerDependencies": {
70
+ "@absolutejs/voice": ">=0.0.22-beta.647 <0.1"
71
+ }
37
72
  }