sam-coder-cli 1.0.20 → 1.0.21

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.
@@ -650,6 +650,41 @@ class MultiplayerClient extends EventEmitter {
650
650
  const client = this.clients.find(c => c.clientId === clientId || c.id === clientId);
651
651
  return client ? (client.name || client.clientInfo?.name || 'Unknown') : 'Unknown';
652
652
  }
653
+
654
+ createSession() {
655
+ if (!this.ws || this.ws.readyState !== WebSocket.OPEN) {
656
+ throw new Error('Not connected to server');
657
+ }
658
+ this.sessionId = uuidv4();
659
+ this.isHost = true;
660
+ this.send({
661
+ type: 'create_session',
662
+ sessionId: this.sessionId,
663
+ clientInfo: {
664
+ name: this.name,
665
+ role: this.role,
666
+ model: this.model
667
+ }
668
+ });
669
+ return this.sessionId;
670
+ }
671
+
672
+ joinSession(sessionId) {
673
+ if (!this.ws || this.ws.readyState !== WebSocket.OPEN) {
674
+ throw new Error('Not connected to server');
675
+ }
676
+ this.sessionId = sessionId;
677
+ this.isHost = false;
678
+ this.send({
679
+ type: 'join_session',
680
+ sessionId: this.sessionId,
681
+ clientInfo: {
682
+ name: this.name,
683
+ role: this.role,
684
+ model: this.model
685
+ }
686
+ });
687
+ }
653
688
  }
654
689
 
655
690
  module.exports = MultiplayerClient;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sam-coder-cli",
3
- "version": "1.0.20",
3
+ "version": "1.0.21",
4
4
  "description": "SAM-CODER: An animated command-line AI assistant with agency capabilities.",
5
5
  "main": "bin/agi-cli.js",
6
6
  "bin": {