lovekit 4.2.0__tar.gz → 5.1.0__tar.gz

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,10 +1,10 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: lovekit
3
- Version: 4.2.0
3
+ Version: 5.1.0
4
4
  Author-email: jhnnsrs <jhnnsrs@gmail.com>
5
5
  Requires-Python: >=3.11
6
6
  Requires-Dist: aiohttp<4,>=3.9.5
7
- Requires-Dist: arkitekt-spec>=3.19.1
7
+ Requires-Dist: arkitekt-spec>=5.0
8
8
  Requires-Dist: fakts>=6.1
9
9
  Requires-Dist: livekit>=1.0
10
10
  Requires-Dist: numpy>=1.26
@@ -66,11 +66,16 @@
66
66
  "external_modules": [],
67
67
  "additional_bases": {},
68
68
  "additional_config": {},
69
- "directive_class_vars": [
69
+ "class_fields": [
70
70
  {
71
- "directive": "identified",
72
- "argument": "by",
73
- "attribute": "__identifier__"
71
+ "name": "__identifier__",
72
+ "kind": null,
73
+ "collector": {
74
+ "type": "type_directive",
75
+ "directive": "identified",
76
+ "argument": "by"
77
+ },
78
+ "combine": null
74
79
  }
75
80
  ],
76
81
  "force_plugin_order": true,
@@ -92,6 +97,18 @@
92
97
  {
93
98
  "type": "turms.plugins.client.ClientPlugin",
94
99
  "client_class": "LovekitApi",
100
+ "client_fields": [
101
+ {
102
+ "name": "__scopes__",
103
+ "kind": "tuple[str, ...]",
104
+ "collector": {
105
+ "type": "root_field_directive",
106
+ "directive": "auth",
107
+ "argument": "required_scopes"
108
+ },
109
+ "combine": "union"
110
+ }
111
+ ],
95
112
  "reserved_from": [
96
113
  "lovekit.lovekit.Lovekit"
97
114
  ],
@@ -238,57 +238,57 @@ type Mutation {
238
238
  """
239
239
  Create an empty collaboration, to put agents and streams in and grant a guest
240
240
  """
241
- createCollaboration(input: CreateCollaborationInput!): Collaboration! @auth(any_role_of: ["admin", "editor"])
241
+ createCollaboration(input: CreateCollaborationInput!): Collaboration! @auth(required_scopes: ["lovekit_share"], any_role_of: ["lovekit_editor"])
242
242
 
243
243
  """
244
244
  Put an agent or a stream in a collaboration: an agent brings every stream it offers
245
245
  """
246
- addToCollaboration(input: CollaborationObjectInput!): Collaboration! @auth(any_role_of: ["admin", "editor"])
246
+ addToCollaboration(input: CollaborationObjectInput!): Collaboration! @auth(required_scopes: ["lovekit_share"], any_role_of: ["lovekit_editor"])
247
247
 
248
248
  """Take an agent or a stream out of a collaboration"""
249
- removeFromCollaboration(input: CollaborationObjectInput!): Collaboration! @auth(any_role_of: ["admin", "editor"])
249
+ removeFromCollaboration(input: CollaborationObjectInput!): Collaboration! @auth(required_scopes: ["lovekit_share"], any_role_of: ["lovekit_editor"])
250
250
 
251
251
  """
252
252
  Delete a collaboration: whoever was granted it sees nothing of it any more
253
253
  """
254
- deleteCollaboration(id: ID!): ID! @auth(any_role_of: ["admin", "editor"])
254
+ deleteCollaboration(id: ID!): ID! @auth(required_scopes: ["lovekit_share"], any_role_of: ["lovekit_editor"])
255
255
 
256
256
  """
257
257
  Offer exactly these streams as the caller's agent: undeclared ones are removed, unchanged ones untouched
258
258
  """
259
- declareStreams(input: DeclareStreamsInput!): [Stream!]!
259
+ declareStreams(input: DeclareStreamsInput!): [Stream!]! @auth(required_scopes: ["lovekit_publish"], any_role_of: ["lovekit_editor"])
260
260
 
261
261
  """
262
262
  A token for the caller's agent to publish its streams; a newer connection replaces an older one
263
263
  """
264
- publishToken: String!
264
+ publishToken: String! @auth(required_scopes: ["lovekit_publish"], any_role_of: ["lovekit_editor"])
265
265
 
266
266
  """
267
267
  A token to watch a stream: its agent's room, where it is the track named by its key. A guest needs the agent in one of their collaborations
268
268
  """
269
- watchStream(input: WatchStreamInput!): String! @auth(allow_scoped: true)
269
+ watchStream(input: WatchStreamInput!): String! @auth(required_scopes: ["lovekit_watch"], allow_scoped: true)
270
270
 
271
271
  """
272
272
  A token to watch every stream of an agent. A guest needs the agent in one of their collaborations
273
273
  """
274
- watchAgent(input: WatchAgentInput!): String! @auth(allow_scoped: true)
274
+ watchAgent(input: WatchAgentInput!): String! @auth(required_scopes: ["lovekit_watch"], allow_scoped: true)
275
275
 
276
276
  """The live call about these structures, or a new one"""
277
- ensureCall(input: EnsureCallInput!): Call!
277
+ ensureCall(input: EnsureCallInput!): Call! @auth(required_scopes: ["lovekit_call"], any_role_of: ["lovekit_editor"])
278
278
 
279
279
  """
280
280
  Turn a call to these structures: they become what it is about last, and what it was about stays
281
281
  """
282
- addToCall(input: AddToCallInput!): Call!
282
+ addToCall(input: AddToCallInput!): Call! @auth(required_scopes: ["lovekit_call"], any_role_of: ["lovekit_editor"])
283
283
 
284
284
  """Join a call and return the token for it"""
285
- joinCall(input: JoinCallInput!): String!
285
+ joinCall(input: JoinCallInput!): String! @auth(required_scopes: ["lovekit_call"], any_role_of: ["lovekit_editor"])
286
286
 
287
287
  """Ask users into a call; their open apps ring"""
288
- inviteToCall(input: InviteToCallInput!): Call!
288
+ inviteToCall(input: InviteToCallInput!): Call! @auth(required_scopes: ["lovekit_call"], any_role_of: ["lovekit_editor"])
289
289
 
290
290
  """Put an invitation away, on every device"""
291
- dismissCallInvite(input: DismissCallInviteInput!): ID!
291
+ dismissCallInvite(input: DismissCallInviteInput!): ID! @auth(required_scopes: ["lovekit_call"], any_role_of: ["lovekit_editor"])
292
292
  }
293
293
 
294
294
  input OffsetPaginationInput {
@@ -307,7 +307,9 @@ enum Ordering {
307
307
 
308
308
  type Organization @key(fields: "id", resolvable: true) {
309
309
  id: ID!
310
- slug: String!
310
+
311
+ """The organization across issuers and services: `<issuer>#<org>`"""
312
+ identifier: String!
311
313
  }
312
314
 
313
315
  type Query {
@@ -317,33 +319,33 @@ type Query {
317
319
  """
318
320
  The streams of the organization's agents; filter `live` for the ones being published
319
321
  """
320
- streams(filters: StreamFilter, order: StreamOrder, pagination: OffsetPaginationInput): [Stream!]!
322
+ streams(filters: StreamFilter, order: StreamOrder, pagination: OffsetPaginationInput): [Stream!]! @auth(required_scopes: ["lovekit_watch"])
321
323
 
322
324
  """The organization's agents that offer streams"""
323
- agents(filters: AgentFilter, pagination: OffsetPaginationInput): [Agent!]!
325
+ agents(filters: AgentFilter, pagination: OffsetPaginationInput): [Agent!]! @auth(required_scopes: ["lovekit_watch"])
324
326
 
325
327
  """The organization's calls; filter `live` for the ones in progress"""
326
- calls(filters: CallFilter, order: CallOrder, pagination: OffsetPaginationInput): [Call!]!
328
+ calls(filters: CallFilter, order: CallOrder, pagination: OffsetPaginationInput): [Call!]! @auth(required_scopes: ["lovekit_watch"])
327
329
 
328
330
  """
329
331
  List the organization's collaborations: what a guest granted one sees of it (a guest: the collaborations granted to them)
330
332
  """
331
- collaborations: [Collaboration!]!
333
+ collaborations: [Collaboration!]! @auth(required_scopes: ["lovekit_watch"])
332
334
 
333
335
  """Get a single collaboration by ID"""
334
- collaboration(id: ID!): Collaboration!
336
+ collaboration(id: ID!): Collaboration! @auth(required_scopes: ["lovekit_watch"])
335
337
 
336
338
  """Get a stream by ID"""
337
- stream(id: ID!): Stream!
339
+ stream(id: ID!): Stream! @auth(required_scopes: ["lovekit_watch"])
338
340
 
339
341
  """Get an agent by ID"""
340
- agent(id: ID!): Agent!
342
+ agent(id: ID!): Agent! @auth(required_scopes: ["lovekit_watch"])
341
343
 
342
344
  """Get a call by ID"""
343
- call(id: ID!): Call!
345
+ call(id: ID!): Call! @auth(required_scopes: ["lovekit_watch"])
344
346
 
345
347
  """Your pending invitations to calls that are still live"""
346
- myCallInvites: [CallInvite!]!
348
+ myCallInvites: [CallInvite!]! @auth(required_scopes: ["lovekit_watch"])
347
349
  }
348
350
 
349
351
  type Release @key(fields: "id", resolvable: true) {
@@ -463,15 +465,15 @@ type Subscription {
463
465
  """
464
466
  Streams your organization's agents declare, change and drop, as they do
465
467
  """
466
- streams: StreamEvent!
468
+ streams: StreamEvent! @auth(required_scopes: ["lovekit_watch"])
467
469
 
468
470
  """Your invitations to calls as they arrive and go away"""
469
- callInvites: CallInviteEvent!
471
+ callInvites: CallInviteEvent! @auth(required_scopes: ["lovekit_watch"])
470
472
 
471
473
  """
472
474
  The calls others start in your organization as they start, and any call's new topics
473
475
  """
474
- calls: CallEvent!
476
+ calls: CallEvent! @auth(required_scopes: ["lovekit_watch"])
475
477
  }
476
478
 
477
479
  type User @key(fields: "id", resolvable: true) {
@@ -432,6 +432,8 @@ class LovekitApi:
432
432
  Each method hands its operation to ``execute``, ``aexecute``, ``subscribe``, ``asubscribe`` of ``self``, which the class this one is mixed into (or a base of it) provides.
433
433
  """
434
434
 
435
+ __scopes__: ClassVar[tuple[str, ...]] = ("lovekit_publish", "lovekit_watch")
436
+
435
437
  async def adeclare_streams(
436
438
  self, streams: Iterable[StreamDeclarationInput]
437
439
  ) -> tuple[Stream, ...]:
@@ -12,7 +12,7 @@ dependencies = [
12
12
  "numpy>=1.26",
13
13
  "rath>=4.1.1",
14
14
  # The service and structures are declared with arkitekt-spec.
15
- "arkitekt-spec>=3.19.1",
15
+ "arkitekt-spec>=5.0",
16
16
  # The GraphQL-WS link the client subscribes through; it came through rekuest before.
17
17
  "websockets>=15.0.1",
18
18
  # The service wiring (Alias, Require, FaktsAuthLink); it came through rekuest before.
@@ -30,7 +30,7 @@ dev-dependencies = [
30
30
  "python-semantic-release>=9.21.0",
31
31
  "pytest-aiohttp>=1.0.4,<2",
32
32
  "ruff>0.11",
33
- "turms>=2.3.0",
33
+ "turms>=3.0",
34
34
  "dokker>=2.8",
35
35
  "websockets>=15.0.1",
36
36
  "basedpyright>=1.21",
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes