@pellux/goodvibes-contracts 0.33.6 → 0.33.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.
@@ -3,7 +3,7 @@
3
3
  "product": {
4
4
  "id": "goodvibes",
5
5
  "surface": "operator",
6
- "version": "0.33.6"
6
+ "version": "0.33.8"
7
7
  },
8
8
  "auth": {
9
9
  "modes": [
@@ -20121,8 +20121,7 @@
20121
20121
  "source": "builtin",
20122
20122
  "access": "authenticated",
20123
20123
  "transport": [
20124
- "http",
20125
- "ws"
20124
+ "http"
20126
20125
  ],
20127
20126
  "scopes": [
20128
20127
  "read:sessions"
@@ -20148,7 +20147,12 @@
20148
20147
  "properties": {},
20149
20148
  "additionalProperties": false
20150
20149
  },
20151
- "invokable": true
20150
+ "invokable": false,
20151
+ "metadata": {
20152
+ "responseKind": "sse",
20153
+ "stream": true,
20154
+ "wireEventPrefix": "companion-chat."
20155
+ }
20152
20156
  },
20153
20157
  {
20154
20158
  "id": "companion.chat.messages.create",
@@ -20239,7 +20243,34 @@
20239
20243
  "type": "array",
20240
20244
  "items": {
20241
20245
  "type": "object",
20242
- "properties": {},
20246
+ "properties": {
20247
+ "id": {
20248
+ "type": "string"
20249
+ },
20250
+ "sessionId": {
20251
+ "type": "string"
20252
+ },
20253
+ "role": {
20254
+ "type": "string",
20255
+ "enum": [
20256
+ "user",
20257
+ "assistant"
20258
+ ]
20259
+ },
20260
+ "content": {
20261
+ "type": "string"
20262
+ },
20263
+ "createdAt": {
20264
+ "type": "number"
20265
+ }
20266
+ },
20267
+ "required": [
20268
+ "id",
20269
+ "sessionId",
20270
+ "role",
20271
+ "content",
20272
+ "createdAt"
20273
+ ],
20243
20274
  "additionalProperties": false
20244
20275
  }
20245
20276
  }
@@ -20396,14 +20427,42 @@
20396
20427
  "kind": {
20397
20428
  "type": "string",
20398
20429
  "enum": [
20399
- "tui",
20400
- "companion-task",
20401
20430
  "companion-chat"
20402
20431
  ]
20403
20432
  },
20404
20433
  "title": {
20405
20434
  "type": "string"
20406
20435
  },
20436
+ "model": {
20437
+ "anyOf": [
20438
+ {
20439
+ "type": "string"
20440
+ },
20441
+ {
20442
+ "type": "null"
20443
+ }
20444
+ ]
20445
+ },
20446
+ "provider": {
20447
+ "anyOf": [
20448
+ {
20449
+ "type": "string"
20450
+ },
20451
+ {
20452
+ "type": "null"
20453
+ }
20454
+ ]
20455
+ },
20456
+ "systemPrompt": {
20457
+ "anyOf": [
20458
+ {
20459
+ "type": "string"
20460
+ },
20461
+ {
20462
+ "type": "null"
20463
+ }
20464
+ ]
20465
+ },
20407
20466
  "status": {
20408
20467
  "type": "string",
20409
20468
  "enum": [
@@ -20417,119 +20476,32 @@
20417
20476
  "updatedAt": {
20418
20477
  "type": "number"
20419
20478
  },
20420
- "lastMessageAt": {
20421
- "type": "number"
20422
- },
20423
20479
  "closedAt": {
20424
- "type": "number"
20425
- },
20426
- "lastActivityAt": {
20427
- "type": "number"
20480
+ "anyOf": [
20481
+ {
20482
+ "type": "number"
20483
+ },
20484
+ {
20485
+ "type": "null"
20486
+ }
20487
+ ]
20428
20488
  },
20429
20489
  "messageCount": {
20430
20490
  "type": "number"
20431
- },
20432
- "pendingInputCount": {
20433
- "type": "number"
20434
- },
20435
- "routeIds": {
20436
- "type": "array",
20437
- "items": {
20438
- "type": "string"
20439
- }
20440
- },
20441
- "surfaceKinds": {
20442
- "type": "array",
20443
- "items": {
20444
- "type": "string"
20445
- }
20446
- },
20447
- "participants": {
20448
- "type": "array",
20449
- "items": {
20450
- "type": "object",
20451
- "properties": {
20452
- "surfaceKind": {
20453
- "type": "string"
20454
- },
20455
- "surfaceId": {
20456
- "type": "string"
20457
- },
20458
- "externalId": {
20459
- "type": "string"
20460
- },
20461
- "userId": {
20462
- "type": "string"
20463
- },
20464
- "displayName": {
20465
- "type": "string"
20466
- },
20467
- "routeId": {
20468
- "type": "string"
20469
- },
20470
- "lastSeenAt": {
20471
- "type": "number"
20472
- }
20473
- },
20474
- "required": [
20475
- "surfaceKind",
20476
- "surfaceId",
20477
- "lastSeenAt"
20478
- ],
20479
- "additionalProperties": false
20480
- }
20481
- },
20482
- "activeAgentId": {
20483
- "type": "string"
20484
- },
20485
- "lastAgentId": {
20486
- "type": "string"
20487
- },
20488
- "lastError": {
20489
- "type": "string"
20490
- },
20491
- "metadata": {
20492
- "type": "object",
20493
- "additionalProperties": {
20494
- "anyOf": [
20495
- {
20496
- "type": "string"
20497
- },
20498
- {
20499
- "type": "number"
20500
- },
20501
- {
20502
- "type": "boolean"
20503
- },
20504
- {
20505
- "type": "null"
20506
- },
20507
- {
20508
- "type": "object",
20509
- "additionalProperties": {}
20510
- },
20511
- {
20512
- "type": "array",
20513
- "items": {}
20514
- }
20515
- ]
20516
- }
20517
20491
  }
20518
20492
  },
20519
20493
  "required": [
20520
20494
  "id",
20521
20495
  "kind",
20522
20496
  "title",
20497
+ "model",
20498
+ "provider",
20499
+ "systemPrompt",
20523
20500
  "status",
20524
20501
  "createdAt",
20525
20502
  "updatedAt",
20526
- "lastActivityAt",
20527
- "messageCount",
20528
- "pendingInputCount",
20529
- "routeIds",
20530
- "surfaceKinds",
20531
- "participants",
20532
- "metadata"
20503
+ "closedAt",
20504
+ "messageCount"
20533
20505
  ],
20534
20506
  "additionalProperties": false
20535
20507
  },
@@ -20537,7 +20509,34 @@
20537
20509
  "type": "array",
20538
20510
  "items": {
20539
20511
  "type": "object",
20540
- "properties": {},
20512
+ "properties": {
20513
+ "id": {
20514
+ "type": "string"
20515
+ },
20516
+ "sessionId": {
20517
+ "type": "string"
20518
+ },
20519
+ "role": {
20520
+ "type": "string",
20521
+ "enum": [
20522
+ "user",
20523
+ "assistant"
20524
+ ]
20525
+ },
20526
+ "content": {
20527
+ "type": "string"
20528
+ },
20529
+ "createdAt": {
20530
+ "type": "number"
20531
+ }
20532
+ },
20533
+ "required": [
20534
+ "id",
20535
+ "sessionId",
20536
+ "role",
20537
+ "content",
20538
+ "createdAt"
20539
+ ],
20541
20540
  "additionalProperties": false
20542
20541
  }
20543
20542
  }
@@ -20598,14 +20597,42 @@
20598
20597
  "kind": {
20599
20598
  "type": "string",
20600
20599
  "enum": [
20601
- "tui",
20602
- "companion-task",
20603
20600
  "companion-chat"
20604
20601
  ]
20605
20602
  },
20606
20603
  "title": {
20607
20604
  "type": "string"
20608
20605
  },
20606
+ "model": {
20607
+ "anyOf": [
20608
+ {
20609
+ "type": "string"
20610
+ },
20611
+ {
20612
+ "type": "null"
20613
+ }
20614
+ ]
20615
+ },
20616
+ "provider": {
20617
+ "anyOf": [
20618
+ {
20619
+ "type": "string"
20620
+ },
20621
+ {
20622
+ "type": "null"
20623
+ }
20624
+ ]
20625
+ },
20626
+ "systemPrompt": {
20627
+ "anyOf": [
20628
+ {
20629
+ "type": "string"
20630
+ },
20631
+ {
20632
+ "type": "null"
20633
+ }
20634
+ ]
20635
+ },
20609
20636
  "status": {
20610
20637
  "type": "string",
20611
20638
  "enum": [
@@ -20619,119 +20646,32 @@
20619
20646
  "updatedAt": {
20620
20647
  "type": "number"
20621
20648
  },
20622
- "lastMessageAt": {
20623
- "type": "number"
20624
- },
20625
20649
  "closedAt": {
20626
- "type": "number"
20627
- },
20628
- "lastActivityAt": {
20629
- "type": "number"
20650
+ "anyOf": [
20651
+ {
20652
+ "type": "number"
20653
+ },
20654
+ {
20655
+ "type": "null"
20656
+ }
20657
+ ]
20630
20658
  },
20631
20659
  "messageCount": {
20632
20660
  "type": "number"
20633
- },
20634
- "pendingInputCount": {
20635
- "type": "number"
20636
- },
20637
- "routeIds": {
20638
- "type": "array",
20639
- "items": {
20640
- "type": "string"
20641
- }
20642
- },
20643
- "surfaceKinds": {
20644
- "type": "array",
20645
- "items": {
20646
- "type": "string"
20647
- }
20648
- },
20649
- "participants": {
20650
- "type": "array",
20651
- "items": {
20652
- "type": "object",
20653
- "properties": {
20654
- "surfaceKind": {
20655
- "type": "string"
20656
- },
20657
- "surfaceId": {
20658
- "type": "string"
20659
- },
20660
- "externalId": {
20661
- "type": "string"
20662
- },
20663
- "userId": {
20664
- "type": "string"
20665
- },
20666
- "displayName": {
20667
- "type": "string"
20668
- },
20669
- "routeId": {
20670
- "type": "string"
20671
- },
20672
- "lastSeenAt": {
20673
- "type": "number"
20674
- }
20675
- },
20676
- "required": [
20677
- "surfaceKind",
20678
- "surfaceId",
20679
- "lastSeenAt"
20680
- ],
20681
- "additionalProperties": false
20682
- }
20683
- },
20684
- "activeAgentId": {
20685
- "type": "string"
20686
- },
20687
- "lastAgentId": {
20688
- "type": "string"
20689
- },
20690
- "lastError": {
20691
- "type": "string"
20692
- },
20693
- "metadata": {
20694
- "type": "object",
20695
- "additionalProperties": {
20696
- "anyOf": [
20697
- {
20698
- "type": "string"
20699
- },
20700
- {
20701
- "type": "number"
20702
- },
20703
- {
20704
- "type": "boolean"
20705
- },
20706
- {
20707
- "type": "null"
20708
- },
20709
- {
20710
- "type": "object",
20711
- "additionalProperties": {}
20712
- },
20713
- {
20714
- "type": "array",
20715
- "items": {}
20716
- }
20717
- ]
20718
- }
20719
20661
  }
20720
20662
  },
20721
20663
  "required": [
20722
20664
  "id",
20723
20665
  "kind",
20724
20666
  "title",
20667
+ "model",
20668
+ "provider",
20669
+ "systemPrompt",
20725
20670
  "status",
20726
20671
  "createdAt",
20727
20672
  "updatedAt",
20728
- "lastActivityAt",
20729
- "messageCount",
20730
- "pendingInputCount",
20731
- "routeIds",
20732
- "surfaceKinds",
20733
- "participants",
20734
- "metadata"
20673
+ "closedAt",
20674
+ "messageCount"
20735
20675
  ],
20736
20676
  "additionalProperties": false
20737
20677
  }
@@ -9,6 +9,28 @@ export type SharedSessionConversationRouteOutput = {
9
9
  routedTo: "conversation";
10
10
  sessionId: string;
11
11
  };
12
+ export type CompanionChatSessionStatus = "active" | "closed";
13
+ export type CompanionChatMessageRole = "assistant" | "user";
14
+ export type CompanionChatSession = {
15
+ id: string;
16
+ kind: "companion-chat";
17
+ title: string;
18
+ model: null | string;
19
+ provider: null | string;
20
+ systemPrompt: null | string;
21
+ status: CompanionChatSessionStatus;
22
+ createdAt: number;
23
+ updatedAt: number;
24
+ closedAt: null | number;
25
+ messageCount: number;
26
+ };
27
+ export type CompanionChatMessage = {
28
+ id: string;
29
+ sessionId: string;
30
+ role: CompanionChatMessageRole;
31
+ content: string;
32
+ createdAt: number;
33
+ };
12
34
  export interface OperatorMethodInputMap {
13
35
  "accounts.snapshot": {};
14
36
  "approvals.approve": {
@@ -464,6 +486,47 @@ export interface OperatorMethodInputMap {
464
486
  "channels.tools.surface.list": {
465
487
  surface: string;
466
488
  };
489
+ "companion.chat.events.stream": {
490
+ sessionId: string;
491
+ };
492
+ "companion.chat.messages.create": ({
493
+ sessionId: string;
494
+ body?: string;
495
+ content?: string;
496
+ metadata?: ({} & {
497
+ readonly [key: string]: ({} & {
498
+ readonly [key: string]: JsonValue;
499
+ }) | boolean | null | number | readonly JsonValue[] | string;
500
+ });
501
+ } & {
502
+ readonly [key: string]: unknown;
503
+ });
504
+ "companion.chat.messages.list": {
505
+ sessionId: string;
506
+ };
507
+ "companion.chat.sessions.create": ({
508
+ title?: string;
509
+ provider?: string;
510
+ model?: string;
511
+ systemPrompt?: string;
512
+ } & {
513
+ readonly [key: string]: unknown;
514
+ });
515
+ "companion.chat.sessions.delete": {
516
+ sessionId: string;
517
+ };
518
+ "companion.chat.sessions.get": {
519
+ sessionId: string;
520
+ };
521
+ "companion.chat.sessions.update": ({
522
+ sessionId: string;
523
+ title?: string;
524
+ provider?: string;
525
+ model?: string;
526
+ systemPrompt?: null | string;
527
+ } & {
528
+ readonly [key: string]: unknown;
529
+ });
467
530
  "config.get": {};
468
531
  "config.set": ({
469
532
  key: string;
@@ -4371,6 +4434,28 @@ export interface OperatorMethodOutputMap {
4371
4434
  });
4372
4435
  })[];
4373
4436
  };
4437
+ "companion.chat.events.stream": {};
4438
+ "companion.chat.messages.create": {
4439
+ messageId: string;
4440
+ };
4441
+ "companion.chat.messages.list": {
4442
+ messages: readonly CompanionChatMessage[];
4443
+ };
4444
+ "companion.chat.sessions.create": {
4445
+ sessionId: string;
4446
+ createdAt: number;
4447
+ };
4448
+ "companion.chat.sessions.delete": {
4449
+ sessionId: string;
4450
+ status: CompanionChatSessionStatus;
4451
+ };
4452
+ "companion.chat.sessions.get": {
4453
+ session: CompanionChatSession;
4454
+ messages: readonly CompanionChatMessage[];
4455
+ };
4456
+ "companion.chat.sessions.update": {
4457
+ session: CompanionChatSession;
4458
+ };
4374
4459
  "config.get": ({
4375
4460
  danger?: ({} & {
4376
4461
  readonly [key: string]: ({} & {
@@ -11260,7 +11345,7 @@ export type OperatorMethodInput<TMethodId extends OperatorTypedMethodId> = TMeth
11260
11345
  export type OperatorMethodOutput<TMethodId extends OperatorTypedMethodId> = TMethodId extends keyof OperatorMethodOutputMap ? OperatorMethodOutputMap[TMethodId] : unknown;
11261
11346
  export type OperatorTypedEventId = keyof OperatorEventPayloadMap & string;
11262
11347
  export type OperatorEventPayload<TEventId extends OperatorTypedEventId> = OperatorEventPayloadMap[TEventId];
11263
- export type OperatorStreamMethodId = Extract<OperatorTypedMethodId, 'control.events.stream' | 'telemetry.stream'>;
11348
+ export type OperatorStreamMethodId = Extract<OperatorTypedMethodId, 'companion.chat.events.stream' | 'control.events.stream' | 'telemetry.stream'>;
11264
11349
  export type PeerTypedEndpointId = PeerEndpointId;
11265
11350
  export type PeerEndpointInput<TEndpointId extends PeerTypedEndpointId> = TEndpointId extends keyof PeerEndpointInputMap ? PeerEndpointInputMap[TEndpointId] : {
11266
11351
  readonly [key: string]: unknown;