@aghents/identity 0.1.0 → 0.2.0

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.
Files changed (2) hide show
  1. package/dist/index.d.ts +316 -0
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -2,7 +2,56 @@ import { Result } from 'neverthrow';
2
2
  import { SupabaseClient, SupportedStorage } from '@supabase/supabase-js';
3
3
  import { z } from 'zod';
4
4
 
5
+ type Json = string | number | boolean | null | {
6
+ [key: string]: Json | undefined;
7
+ } | Json[];
5
8
  type Database = {
9
+ hub: {
10
+ Tables: {
11
+ games: {
12
+ Row: {
13
+ archetype: string | null;
14
+ key: string;
15
+ name: string;
16
+ status: string;
17
+ tagline: string | null;
18
+ updated_at: string;
19
+ url: string | null;
20
+ };
21
+ Insert: {
22
+ archetype?: string | null;
23
+ key: string;
24
+ name: string;
25
+ status?: string;
26
+ tagline?: string | null;
27
+ updated_at?: string;
28
+ url?: string | null;
29
+ };
30
+ Update: {
31
+ archetype?: string | null;
32
+ key?: string;
33
+ name?: string;
34
+ status?: string;
35
+ tagline?: string | null;
36
+ updated_at?: string;
37
+ url?: string | null;
38
+ };
39
+ Relationships: [];
40
+ };
41
+ };
42
+ Views: {
43
+ [_ in never]: never;
44
+ };
45
+ Functions: {
46
+ [_ in never]: never;
47
+ };
48
+ Enums: {
49
+ [_ in never]: never;
50
+ };
51
+ CompositeTypes: {
52
+ [_ in never]: never;
53
+ };
54
+ };
6
55
  identity: {
7
56
  Tables: {
8
57
  profiles: {
@@ -124,6 +173,273 @@ type Database = {
124
173
  [_ in never]: never;
125
174
  };
126
175
  };
176
+ pulse: {
177
+ Tables: {
178
+ game_events: {
179
+ Row: {
180
+ actor_kind: string;
181
+ created_at: string;
182
+ event: Json;
183
+ game_id: string;
184
+ model: string | null;
185
+ persona_id: string | null;
186
+ seq: number;
187
+ tier: string | null;
188
+ };
189
+ Insert: {
190
+ actor_kind: string;
191
+ created_at?: string;
192
+ event: Json;
193
+ game_id: string;
194
+ model?: string | null;
195
+ persona_id?: string | null;
196
+ seq: number;
197
+ tier?: string | null;
198
+ };
199
+ Update: {
200
+ actor_kind?: string;
201
+ created_at?: string;
202
+ event?: Json;
203
+ game_id?: string;
204
+ model?: string | null;
205
+ persona_id?: string | null;
206
+ seq?: number;
207
+ tier?: string | null;
208
+ };
209
+ Relationships: [
210
+ {
211
+ foreignKeyName: "game_events_game_id_fkey";
212
+ columns: ["game_id"];
213
+ isOneToOne: false;
214
+ referencedRelation: "games";
215
+ referencedColumns: ["id"];
216
+ }
217
+ ];
218
+ };
219
+ game_seats: {
220
+ Row: {
221
+ game_id: string;
222
+ kind: string;
223
+ persona_profile_id: string | null;
224
+ persona_tier: string | null;
225
+ seat_id: string;
226
+ user_id: string | null;
227
+ };
228
+ Insert: {
229
+ game_id: string;
230
+ kind: string;
231
+ persona_profile_id?: string | null;
232
+ persona_tier?: string | null;
233
+ seat_id: string;
234
+ user_id?: string | null;
235
+ };
236
+ Update: {
237
+ game_id?: string;
238
+ kind?: string;
239
+ persona_profile_id?: string | null;
240
+ persona_tier?: string | null;
241
+ seat_id?: string;
242
+ user_id?: string | null;
243
+ };
244
+ Relationships: [
245
+ {
246
+ foreignKeyName: "game_seats_game_id_fkey";
247
+ columns: ["game_id"];
248
+ isOneToOne: false;
249
+ referencedRelation: "games";
250
+ referencedColumns: ["id"];
251
+ }
252
+ ];
253
+ };
254
+ games: {
255
+ Row: {
256
+ config: Json;
257
+ created_at: string;
258
+ game_key: string;
259
+ id: string;
260
+ lease_until: string | null;
261
+ llm_calls: number;
262
+ room_id: string;
263
+ seed: string;
264
+ started_at_ms: number;
265
+ status: string;
266
+ ticked_at: string | null;
267
+ timescale: string;
268
+ };
269
+ Insert: {
270
+ config: Json;
271
+ created_at?: string;
272
+ game_key: string;
273
+ id: string;
274
+ lease_until?: string | null;
275
+ llm_calls?: number;
276
+ room_id: string;
277
+ seed: string;
278
+ started_at_ms: number;
279
+ status?: string;
280
+ ticked_at?: string | null;
281
+ timescale: string;
282
+ };
283
+ Update: {
284
+ config?: Json;
285
+ created_at?: string;
286
+ game_key?: string;
287
+ id?: string;
288
+ lease_until?: string | null;
289
+ llm_calls?: number;
290
+ room_id?: string;
291
+ seed?: string;
292
+ started_at_ms?: number;
293
+ status?: string;
294
+ ticked_at?: string | null;
295
+ timescale?: string;
296
+ };
297
+ Relationships: [
298
+ {
299
+ foreignKeyName: "games_room_id_fkey";
300
+ columns: ["room_id"];
301
+ isOneToOne: false;
302
+ referencedRelation: "rooms";
303
+ referencedColumns: ["id"];
304
+ }
305
+ ];
306
+ };
307
+ room_members: {
308
+ Row: {
309
+ display_name: string;
310
+ joined_at: string;
311
+ room_id: string;
312
+ user_id: string;
313
+ };
314
+ Insert: {
315
+ display_name: string;
316
+ joined_at?: string;
317
+ room_id: string;
318
+ user_id: string;
319
+ };
320
+ Update: {
321
+ display_name?: string;
322
+ joined_at?: string;
323
+ room_id?: string;
324
+ user_id?: string;
325
+ };
326
+ Relationships: [
327
+ {
328
+ foreignKeyName: "room_members_room_id_fkey";
329
+ columns: ["room_id"];
330
+ isOneToOne: false;
331
+ referencedRelation: "rooms";
332
+ referencedColumns: ["id"];
333
+ }
334
+ ];
335
+ };
336
+ rooms: {
337
+ Row: {
338
+ created_at: string;
339
+ game_key: string;
340
+ host_user_id: string;
341
+ id: string;
342
+ invite_code: string;
343
+ settings: Json;
344
+ status: string;
345
+ };
346
+ Insert: {
347
+ created_at?: string;
348
+ game_key: string;
349
+ host_user_id: string;
350
+ id: string;
351
+ invite_code: string;
352
+ settings: Json;
353
+ status?: string;
354
+ };
355
+ Update: {
356
+ created_at?: string;
357
+ game_key?: string;
358
+ host_user_id?: string;
359
+ id?: string;
360
+ invite_code?: string;
361
+ settings?: Json;
362
+ status?: string;
363
+ };
364
+ Relationships: [];
365
+ };
366
+ seat_performances: {
367
+ Row: {
368
+ game_id: string;
369
+ payload: Json;
370
+ seat_id: string;
371
+ };
372
+ Insert: {
373
+ game_id: string;
374
+ payload: Json;
375
+ seat_id: string;
376
+ };
377
+ Update: {
378
+ game_id?: string;
379
+ payload?: Json;
380
+ seat_id?: string;
381
+ };
382
+ Relationships: [
383
+ {
384
+ foreignKeyName: "seat_performances_game_id_fkey";
385
+ columns: ["game_id"];
386
+ isOneToOne: false;
387
+ referencedRelation: "games";
388
+ referencedColumns: ["id"];
389
+ },
390
+ {
391
+ foreignKeyName: "seat_performances_game_id_seat_id_fkey";
392
+ columns: ["game_id", "seat_id"];
393
+ isOneToOne: true;
394
+ referencedRelation: "game_seats";
395
+ referencedColumns: ["game_id", "seat_id"];
396
+ }
397
+ ];
398
+ };
399
+ };
400
+ Views: {
401
+ [_ in never]: never;
402
+ };
403
+ Functions: {
404
+ acquire_tick_lease: {
405
+ Args: {
406
+ p_game_id: string;
407
+ p_ttl_ms: number;
408
+ };
409
+ Returns: boolean;
410
+ };
411
+ append_event: {
412
+ Args: {
413
+ p_actor_kind: string;
414
+ p_event: Json;
415
+ p_game_id: string;
416
+ p_model: string;
417
+ p_persona_id: string;
418
+ p_seq: number;
419
+ p_tier: string;
420
+ };
421
+ Returns: undefined;
422
+ };
423
+ release_tick_lease: {
424
+ Args: {
425
+ p_game_id: string;
426
+ };
427
+ Returns: undefined;
428
+ };
429
+ spend_llm_call: {
430
+ Args: {
431
+ p_game_id: string;
432
+ };
433
+ Returns: number;
434
+ };
435
+ };
436
+ Enums: {
437
+ [_ in never]: never;
438
+ };
439
+ CompositeTypes: {
440
+ [_ in never]: never;
441
+ };
442
+ };
127
443
  };
128
444
 
129
445
  declare const schema: z.ZodObject<{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aghents/identity",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",