@absolutejs/meeting 0.0.1-beta.6 → 0.0.1-beta.8

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.
@@ -1,2 +1,28 @@
1
1
  import type { CreateMeetingOptions, MeetingSession } from "./meeting";
2
- export declare const manifest: import("@absolutejs/manifest").PackageManifest<CreateMeetingOptions, MeetingSession>;
2
+ export declare const manifest: Omit<import("@absolutejs/manifest").PackageManifest<CreateMeetingOptions, MeetingSession>, "contract" | "settings" | "tools"> & (({
3
+ contract: 1;
4
+ tools?: Record<string, import("@absolutejs/manifest").LegacyManifestTool<MeetingSession>> | undefined;
5
+ } | {
6
+ contract: 2;
7
+ tools?: Record<string, import("@absolutejs/manifest").AuthorizedManifestTool<MeetingSession>> | undefined;
8
+ }) & {
9
+ settings: import("@sinclair/typebox").TObject<{
10
+ languageStrategy: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
11
+ allowedLanguages: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
12
+ mode: import("@sinclair/typebox").TLiteral<"auto-detect">;
13
+ }>, import("@sinclair/typebox").TObject<{
14
+ mode: import("@sinclair/typebox").TLiteral<"fixed">;
15
+ primaryLanguage: import("@sinclair/typebox").TString;
16
+ secondaryLanguages: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
17
+ }>, import("@sinclair/typebox").TObject<{
18
+ mode: import("@sinclair/typebox").TLiteral<"allow-switching">;
19
+ primaryLanguage: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
20
+ secondaryLanguages: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
21
+ }>]>>;
22
+ phraseHints: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
23
+ aliases: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
24
+ boost: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
25
+ text: import("@sinclair/typebox").TString;
26
+ }>>>;
27
+ }>;
28
+ });
package/dist/manifest.js CHANGED
@@ -33,14 +33,19 @@ var defineImplementation = () => (implementation) => {
33
33
  const defined = implementation;
34
34
  return defined;
35
35
  };
36
- var defineManifest = () => (manifest) => {
37
- const defined = manifest;
38
- return defined;
36
+ var defineManifest = () => (manifest) => manifest;
37
+ var literal = (value) => value;
38
+ var RUNTIME_KIND = literal("runtime");
39
+ var WORKSPACE_KIND = literal("workspace");
40
+ var toolFactory = () => {
41
+ function runtime(definition) {
42
+ return { kind: RUNTIME_KIND, ...definition };
43
+ }
44
+ function workspace(definition) {
45
+ return { kind: WORKSPACE_KIND, ...definition };
46
+ }
47
+ return { runtime, workspace };
39
48
  };
40
- var toolFactory = () => ({
41
- runtime: (definition) => ({ kind: "runtime", ...definition }),
42
- workspace: (definition) => ({ kind: "workspace", ...definition })
43
- });
44
49
  function IsAsyncIterator(value) {
45
50
  return IsObject(value) && globalThis.Symbol.asyncIterator in value;
46
51
  }
@@ -778,7 +783,7 @@ function String2(options) {
778
783
  function* FromUnion(syntax) {
779
784
  const trim = syntax.trim().replace(/"|'/g, "");
780
785
  return trim === "boolean" ? yield Boolean() : trim === "number" ? yield Number2() : trim === "bigint" ? yield BigInt2() : trim === "string" ? yield String2() : yield (() => {
781
- const literals = trim.split("|").map((literal) => Literal(literal.trim()));
786
+ const literals = trim.split("|").map((literal2) => Literal(literal2.trim()));
782
787
  return literals.length === 0 ? Never() : literals.length === 1 ? literals[0] : UnionEvaluated(literals);
783
788
  })();
784
789
  }
@@ -3486,10 +3491,10 @@ function ScoreUnion(schema, references, value) {
3486
3491
  const keys = Object.getOwnPropertyNames(value);
3487
3492
  const entries = Object.entries(object.properties);
3488
3493
  return entries.reduce((acc, [key, schema2]) => {
3489
- const literal = schema2[Kind] === "Literal" && schema2.const === value[key] ? 100 : 0;
3494
+ const literal2 = schema2[Kind] === "Literal" && schema2.const === value[key] ? 100 : 0;
3490
3495
  const checks = Check(schema2, references, value[key]) ? 10 : 0;
3491
3496
  const exists = keys.includes(key) ? 1 : 0;
3492
- return acc + (literal + checks + exists);
3497
+ return acc + (literal2 + checks + exists);
3493
3498
  }, 0);
3494
3499
  } else if (schema[Kind] === "Union") {
3495
3500
  const schemas = schema.anyOf.map((schema2) => Deref(schema2, references));
@@ -5826,7 +5831,13 @@ var wiringSnippet = Type.Object({
5826
5831
  Type.Literal("server-plugin")
5827
5832
  ]))
5828
5833
  });
5829
- var clientFrameworks = ["angular", "client", "react", "svelte", "vue"];
5834
+ var clientFrameworks = [
5835
+ "angular",
5836
+ "client",
5837
+ "react",
5838
+ "svelte",
5839
+ "vue"
5840
+ ];
5830
5841
  var wiringRecipe = Type.Object({
5831
5842
  client: Type.Optional(Type.Partial(Type.Object(Object.fromEntries(clientFrameworks.map((framework) => [framework, wiringSnippet]))))),
5832
5843
  description: Type.Optional(Type.String()),
@@ -5891,8 +5902,47 @@ var toolAnnotations = Type.Object({
5891
5902
  readOnlyHint: Type.Optional(Type.Boolean()),
5892
5903
  title: Type.Optional(Type.String())
5893
5904
  });
5905
+ var toolAuthorization = Type.Object({
5906
+ approval: Type.Union([
5907
+ Type.Literal("always"),
5908
+ Type.Literal("never"),
5909
+ Type.Literal("policy")
5910
+ ]),
5911
+ audience: Type.Union([
5912
+ Type.Literal("admin"),
5913
+ Type.Literal("authenticated"),
5914
+ Type.Literal("owner"),
5915
+ Type.Literal("public")
5916
+ ]),
5917
+ compensatingTool: Type.Optional(Type.String({ pattern: TOOL_NAME_PATTERN.source })),
5918
+ destinationFields: Type.Optional(Type.Array(Type.String({ minLength: 1 }), { minItems: 1 })),
5919
+ destinations: Type.Optional(Type.Array(Type.String({ minLength: 1 }), { minItems: 1 })),
5920
+ effects: Type.Array(Type.String({ minLength: 1 }), { minItems: 1 }),
5921
+ idempotency: Type.Optional(Type.Union([
5922
+ Type.Object({
5923
+ field: Type.String({ minLength: 1 }),
5924
+ mode: Type.Literal("field")
5925
+ }),
5926
+ Type.Object({ mode: Type.Literal("host") }),
5927
+ Type.Object({ mode: Type.Literal("resource") })
5928
+ ])),
5929
+ requiredScopes: Type.Optional(Type.Array(Type.String({ minLength: 1 }), { minItems: 1 })),
5930
+ resource: Type.Optional(Type.Object({
5931
+ idField: Type.Optional(Type.String({ minLength: 1 })),
5932
+ ownerIdField: Type.Optional(Type.String({ minLength: 1 })),
5933
+ tenantIdField: Type.Optional(Type.String({ minLength: 1 })),
5934
+ type: Type.String({ minLength: 1 })
5935
+ })),
5936
+ reversible: Type.Optional(Type.Boolean()),
5937
+ spend: Type.Optional(Type.Object({
5938
+ amountMinorField: Type.String({ minLength: 1 }),
5939
+ currencyField: Type.String({ minLength: 1 }),
5940
+ maximumAmountMinor: Type.Optional(Type.Integer({ minimum: 0 }))
5941
+ }))
5942
+ });
5894
5943
  var serializedTool = Type.Object({
5895
5944
  annotations: Type.Optional(toolAnnotations),
5945
+ authorization: Type.Optional(toolAuthorization),
5896
5946
  capabilities: Type.Optional(Type.Array(Type.Union([
5897
5947
  Type.Literal("exec"),
5898
5948
  Type.Literal("glob"),
@@ -5904,7 +5954,15 @@ var serializedTool = Type.Object({
5904
5954
  kind: Type.Union([Type.Literal("runtime"), Type.Literal("workspace")])
5905
5955
  });
5906
5956
  var manifestSchema = Type.Object({
5907
- contract: Type.Literal(1),
5957
+ contract: Type.Union([Type.Literal(1), Type.Literal(2)]),
5958
+ discovery: Type.Optional(Type.Object({
5959
+ audiences: Type.Optional(Type.Array(Type.String({ minLength: 1 }))),
5960
+ certificationUrl: Type.Optional(Type.String()),
5961
+ intents: Type.Optional(Type.Array(Type.String({ minLength: 1 }))),
5962
+ keywords: Type.Optional(Type.Array(Type.String({ minLength: 1 }))),
5963
+ protocols: Type.Optional(Type.Array(Type.String({ minLength: 1 }))),
5964
+ url: Type.Optional(Type.String())
5965
+ })),
5908
5966
  identity: Type.Object({
5909
5967
  accent: Type.Optional(Type.String({ pattern: "^#[0-9a-fA-F]{3,8}$" })),
5910
5968
  category: Type.String({ minLength: 1 }),
@@ -5914,7 +5972,9 @@ var manifestSchema = Type.Object({
5914
5972
  svg: Type.Optional(Type.String()),
5915
5973
  url: Type.Optional(Type.String())
5916
5974
  })),
5917
- name: Type.String({ pattern: "^(@[a-z0-9-~][a-z0-9-._~]*/)?[a-z0-9-~][a-z0-9-._~]*$" }),
5975
+ name: Type.String({
5976
+ pattern: "^(@[a-z0-9-~][a-z0-9-._~]*/)?[a-z0-9-~][a-z0-9-._~]*$"
5977
+ }),
5918
5978
  tagline: Type.String({ minLength: 1 })
5919
5979
  }),
5920
5980
  implements: Type.Optional(Type.Array(adapterImplementation)),
@@ -6887,7 +6947,7 @@ function String3(options) {
6887
6947
  function* FromUnion21(syntax) {
6888
6948
  const trim = syntax.trim().replace(/"|'/g, "");
6889
6949
  return trim === "boolean" ? yield Boolean2() : trim === "number" ? yield Number3() : trim === "bigint" ? yield BigInt3() : trim === "string" ? yield String3() : yield (() => {
6890
- const literals = trim.split("|").map((literal) => Literal2(literal.trim()));
6950
+ const literals = trim.split("|").map((literal2) => Literal2(literal2.trim()));
6891
6951
  return literals.length === 0 ? Never2() : literals.length === 1 ? literals[0] : UnionEvaluated2(literals);
6892
6952
  })();
6893
6953
  }
@@ -8489,7 +8549,7 @@ var MAX_TRANSCRIPT_TURNS = 200;
8489
8549
  var DEFAULT_TRANSCRIPT_TURNS = 50;
8490
8550
  var MAX_CHAT_LENGTH = 2000;
8491
8551
  var manifest = defineManifest()({
8492
- contract: 1,
8552
+ contract: 2,
8493
8553
  identity: {
8494
8554
  accent: "#f97316",
8495
8555
  category: "voice",
@@ -8579,6 +8639,16 @@ var manifest = defineManifest()({
8579
8639
  tools: {
8580
8640
  leave_meeting: tool.runtime({
8581
8641
  annotations: { destructiveHint: true, idempotentHint: true },
8642
+ authorization: {
8643
+ approval: "policy",
8644
+ audience: "owner",
8645
+ destinations: ["configured-meeting-platform"],
8646
+ effects: ["write", "send", "external-network"],
8647
+ idempotency: { mode: "host" },
8648
+ requiredScopes: ["meeting:leave"],
8649
+ resource: { type: "active-meeting" },
8650
+ reversible: false
8651
+ },
8582
8652
  description: "Make the bot leave the call, finalize the transcript, and end the session.",
8583
8653
  handler: async ({ reason }, meeting) => {
8584
8654
  await meeting.stop(reason);
@@ -8588,6 +8658,12 @@ var manifest = defineManifest()({
8588
8658
  }),
8589
8659
  meeting_participants: tool.runtime({
8590
8660
  annotations: { readOnlyHint: true },
8661
+ authorization: {
8662
+ approval: "never",
8663
+ audience: "owner",
8664
+ effects: ["read"],
8665
+ requiredScopes: ["meeting:read"]
8666
+ },
8591
8667
  description: "List the participants the call platform has reported for this meeting.",
8592
8668
  handler: (_input, meeting) => JSON.stringify(meeting.getParticipants().map((participant) => ({
8593
8669
  id: participant.id,
@@ -8598,6 +8674,12 @@ var manifest = defineManifest()({
8598
8674
  }),
8599
8675
  meeting_transcript: tool.runtime({
8600
8676
  annotations: { readOnlyHint: true },
8677
+ authorization: {
8678
+ approval: "never",
8679
+ audience: "owner",
8680
+ effects: ["read"],
8681
+ requiredScopes: ["meeting:read"]
8682
+ },
8601
8683
  description: "Read the diarized transcript so far \u2014 the most recent turns, each with its speaker and (when known) the resolved participant.",
8602
8684
  handler: ({ limit }, meeting) => {
8603
8685
  const turns = meeting.getTranscript();
@@ -8617,6 +8699,16 @@ var manifest = defineManifest()({
8617
8699
  }),
8618
8700
  send_chat_message: tool.runtime({
8619
8701
  annotations: { openWorldHint: true },
8702
+ authorization: {
8703
+ approval: "policy",
8704
+ audience: "owner",
8705
+ destinations: ["configured-meeting-platform"],
8706
+ effects: ["send", "external-network"],
8707
+ idempotency: { mode: "host" },
8708
+ requiredScopes: ["meeting:chat:send"],
8709
+ resource: { type: "active-meeting" },
8710
+ reversible: false
8711
+ },
8620
8712
  description: "Post a text message into the call chat as the bot. Fails cleanly when the platform adapter can't write chat (check first: not every source supports it).",
8621
8713
  handler: async ({ text }, meeting) => {
8622
8714
  if (!meeting.capabilities.canChat) {
@@ -1,5 +1,5 @@
1
1
  {
2
- "contract": 1,
2
+ "contract": 2,
3
3
  "identity": {
4
4
  "accent": "#f97316",
5
5
  "category": "voice",
@@ -183,6 +183,28 @@
183
183
  "destructiveHint": true,
184
184
  "idempotentHint": true
185
185
  },
186
+ "authorization": {
187
+ "approval": "policy",
188
+ "audience": "owner",
189
+ "destinations": [
190
+ "configured-meeting-platform"
191
+ ],
192
+ "effects": [
193
+ "write",
194
+ "send",
195
+ "external-network"
196
+ ],
197
+ "idempotency": {
198
+ "mode": "host"
199
+ },
200
+ "requiredScopes": [
201
+ "meeting:leave"
202
+ ],
203
+ "resource": {
204
+ "type": "active-meeting"
205
+ },
206
+ "reversible": false
207
+ },
186
208
  "description": "Make the bot leave the call, finalize the transcript, and end the session.",
187
209
  "input": {
188
210
  "type": "object",
@@ -198,6 +220,16 @@
198
220
  "annotations": {
199
221
  "readOnlyHint": true
200
222
  },
223
+ "authorization": {
224
+ "approval": "never",
225
+ "audience": "owner",
226
+ "effects": [
227
+ "read"
228
+ ],
229
+ "requiredScopes": [
230
+ "meeting:read"
231
+ ]
232
+ },
201
233
  "description": "List the participants the call platform has reported for this meeting.",
202
234
  "input": {
203
235
  "type": "object",
@@ -209,6 +241,16 @@
209
241
  "annotations": {
210
242
  "readOnlyHint": true
211
243
  },
244
+ "authorization": {
245
+ "approval": "never",
246
+ "audience": "owner",
247
+ "effects": [
248
+ "read"
249
+ ],
250
+ "requiredScopes": [
251
+ "meeting:read"
252
+ ]
253
+ },
212
254
  "description": "Read the diarized transcript so far — the most recent turns, each with its speaker and (when known) the resolved participant.",
213
255
  "input": {
214
256
  "type": "object",
@@ -227,6 +269,27 @@
227
269
  "annotations": {
228
270
  "openWorldHint": true
229
271
  },
272
+ "authorization": {
273
+ "approval": "policy",
274
+ "audience": "owner",
275
+ "destinations": [
276
+ "configured-meeting-platform"
277
+ ],
278
+ "effects": [
279
+ "send",
280
+ "external-network"
281
+ ],
282
+ "idempotency": {
283
+ "mode": "host"
284
+ },
285
+ "requiredScopes": [
286
+ "meeting:chat:send"
287
+ ],
288
+ "resource": {
289
+ "type": "active-meeting"
290
+ },
291
+ "reversible": false
292
+ },
230
293
  "description": "Post a text message into the call chat as the bot. Fails cleanly when the platform adapter can't write chat (check first: not every source supports it).",
231
294
  "input": {
232
295
  "type": "object",
package/package.json CHANGED
@@ -1,51 +1,54 @@
1
1
  {
2
- "name": "@absolutejs/meeting",
3
- "version": "0.0.1-beta.6",
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
- "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": 1
34
- },
35
- "scripts": {
36
- "build": "rm -rf dist && bun build ./src/index.ts ./src/manifest.ts --outdir dist --root src --target bun --external @absolutejs/voice && tsc --emitDeclarationOnly --project tsconfig.json && absolute-manifest emit",
37
- "format": "prettier --write \"./**/*.{js,ts,json,md}\"",
38
- "release": "bun run format && bun run build && bun publish",
39
- "test": "bun test",
40
- "typecheck": "bun run tsc --noEmit"
41
- },
42
- "dependencies": {
43
- "@absolutejs/manifest": "^0.1.0",
44
- "@absolutejs/voice": "0.0.22-beta.550",
45
- "@sinclair/typebox": "^0.34.0"
46
- },
47
- "devDependencies": {
48
- "@types/bun": "1.3.9",
49
- "typescript": "^5.9.3"
50
- }
2
+ "name": "@absolutejs/meeting",
3
+ "version": "0.0.1-beta.8",
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
+ "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
+ },
35
+ "scripts": {
36
+ "build": "rm -rf dist && bun build ./src/index.ts ./src/manifest.ts --outdir dist --root src --target bun --external @absolutejs/voice && tsc --emitDeclarationOnly --project tsconfig.json && absolute-manifest emit",
37
+ "format": "prettier --write \"./**/*.{js,ts,json,md}\"",
38
+ "release": "bun run format && bun run build && bun publish",
39
+ "test": "bun test",
40
+ "typecheck": "bun run tsc --noEmit"
41
+ },
42
+ "dependencies": {
43
+ "@absolutejs/manifest": "^0.4.0",
44
+ "@sinclair/typebox": "^0.34.0"
45
+ },
46
+ "devDependencies": {
47
+ "@absolutejs/voice": "0.0.22-beta.644",
48
+ "@types/bun": "1.3.9",
49
+ "typescript": "^5.9.3"
50
+ },
51
+ "peerDependencies": {
52
+ "@absolutejs/voice": ">=0.0.22-beta.644 <0.1"
53
+ }
51
54
  }