mindsim 0.1.0 → 0.1.2

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 (42) hide show
  1. package/README.md +222 -6
  2. package/dist/cli.js +465 -4
  3. package/dist/cli.js.map +1 -1
  4. package/dist/index.d.ts +6 -0
  5. package/dist/index.d.ts.map +1 -1
  6. package/dist/index.js +9 -0
  7. package/dist/index.js.map +1 -1
  8. package/dist/resources/mind-topics.d.ts +11 -0
  9. package/dist/resources/mind-topics.d.ts.map +1 -0
  10. package/dist/resources/mind-topics.js +18 -0
  11. package/dist/resources/mind-topics.js.map +1 -0
  12. package/dist/resources/snapshots.d.ts +29 -1
  13. package/dist/resources/snapshots.d.ts.map +1 -1
  14. package/dist/resources/snapshots.js +30 -0
  15. package/dist/resources/snapshots.js.map +1 -1
  16. package/dist/resources/usage.d.ts +14 -0
  17. package/dist/resources/usage.d.ts.map +1 -0
  18. package/dist/resources/usage.js +20 -0
  19. package/dist/resources/usage.js.map +1 -0
  20. package/dist/resources/users.d.ts +14 -0
  21. package/dist/resources/users.d.ts.map +1 -0
  22. package/dist/resources/users.js +20 -0
  23. package/dist/resources/users.js.map +1 -0
  24. package/dist/types.d.ts +51 -0
  25. package/dist/types.d.ts.map +1 -1
  26. package/dist/version.d.ts.map +1 -1
  27. package/dist/version.js +3 -3
  28. package/dist/version.js.map +1 -1
  29. package/package.json +2 -2
  30. package/src/cli.ts +474 -5
  31. package/src/index.ts +9 -0
  32. package/src/resources/mind-topics.ts +16 -0
  33. package/src/resources/snapshots.ts +60 -0
  34. package/src/resources/usage.ts +16 -0
  35. package/src/resources/users.ts +16 -0
  36. package/src/types.ts +61 -0
  37. package/src/version.ts +3 -5
  38. package/tests/resources/mind-topics.test.ts +69 -0
  39. package/tests/resources/snapshots.test.ts +46 -0
  40. package/tests/resources/usage.test.ts +34 -0
  41. package/tests/resources/users.test.ts +54 -0
  42. package/tests/version.test.ts +1 -3
package/README.md CHANGED
@@ -1,7 +1,9 @@
1
1
  <br/>
2
2
  <br/>
3
3
  <div align="center">
4
- <img style="display: block; width: 250px;" src="assets/mindsim-logo.svg"/>
4
+ <a href="https://mindsim.com/">
5
+ <img style="display: block; width: 250px;" src="assets/mindsim-logo.svg"/>
6
+ </a>
5
7
  </div>
6
8
  <br/>
7
9
  <br/>
@@ -21,7 +23,7 @@ Pre-requisites before installation
21
23
 
22
24
  ### Install with NPM
23
25
  ```
24
- npm install -g @mindsim/mindsim-sdk-typescript
26
+ npm install -g mindsim
25
27
  ```
26
28
 
27
29
 
@@ -66,7 +68,7 @@ const mindsim = MindSim(apiKey);
66
68
  The following example shows how you can use the mindsim SDK to create a mind:
67
69
 
68
70
  ```typescript
69
- import { MindSim } from "@mindsim/mindsim-sdk-typescript";
71
+ import { MindSim } from "mindsim";
70
72
  import fs from "node:fs";
71
73
  import path from "node:path";
72
74
 
@@ -128,7 +130,7 @@ main();
128
130
  When MindSim has finished building your mind, you can run simulations on your mind:
129
131
 
130
132
  ```typescript
131
- import { MindSim } from "@mindsim/mindsim-sdk-typescript";
133
+ import { MindSim } from "mindsim";
132
134
 
133
135
  const main = async () => {
134
136
  const mindsim = new MindSim(process.env.MINDSIM_API_KEY);
@@ -404,7 +406,6 @@ Response:
404
406
  ```
405
407
 
406
408
 
407
-
408
409
  ### Upload Snapshots
409
410
  A snapshot is a trained AI model built from conversation transcripts. It captures how someone thinks and communicates at a specific point in time.
410
411
 
@@ -469,6 +470,84 @@ Response:
469
470
  ```
470
471
  ---
471
472
 
473
+ **Get Snapshot Details**
474
+
475
+ Retrieve metadata about a snapshot. You can optionally include the full transcript or psychometric analysis in the response.
476
+
477
+ ```typescript
478
+ const mindId = "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d";
479
+ const snapshotId = "a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11";
480
+
481
+ const details = await mindsim.snapshots.getDetail(mindId, snapshotId, {
482
+ includeTranscript: true,
483
+ includePsychometrics: false
484
+ });
485
+
486
+ console.log(`Findings count: ${details.findingCount}`);
487
+ ```
488
+
489
+ Response:
490
+ ```json
491
+ {
492
+ "id": "a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11",
493
+ "mindId": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
494
+ "artifactId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
495
+ "status": "completed",
496
+ "psychometricCount": 12,
497
+ "keyTopicCount": 5,
498
+ "findingCount": 8,
499
+ "transcripts": [
500
+ {
501
+ "text": "Speaker 1: Let's discuss the contract.",
502
+ "startTime": "00:00:01"
503
+ }
504
+ ]
505
+ }
506
+ ```
507
+ ---
508
+
509
+ **Link Snapshot to Digital Twin**
510
+
511
+ Links a specific snapshot to the mind's active "Digital Twin". This designates which snapshot version is used during simulations.
512
+
513
+ ```typescript
514
+ const result = await mindsim.snapshots.link(mindId, snapshotId);
515
+ console.log(result.message);
516
+ ```
517
+
518
+ Response:
519
+ ```json
520
+ {
521
+ "message": "Snapshot linked successfully",
522
+ "snapshot": {
523
+ "id": "123e4567-e89b-12d3-a456-426614174002",
524
+ "digitalTwinId": "123e4567-e89b-12d3-a456-426614174000",
525
+ "mindAssessmentId": "a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11",
526
+ "createdAt": "2024-01-01T00:00:00.000Z",
527
+ "updatedAt": "2024-01-01T00:00:00.000Z"
528
+ }
529
+ }
530
+ ```
531
+ ---
532
+
533
+ **Delete a Snapshot**
534
+
535
+ Soft-deletes a snapshot record.
536
+
537
+ ```typescript
538
+ const result = await mindsim.snapshots.delete(mindId, snapshotId);
539
+ console.log(`Deleted snapshot: ${result.snapshotId}`);
540
+ ```
541
+
542
+ Response:
543
+ ```json
544
+ {
545
+ "message": "Snapshot deleted successfully",
546
+ "snapshotId": "a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11"
547
+ }
548
+ ```
549
+ ---
550
+
472
551
  Snapshot Status
473
552
 
474
553
  Snapshots process asynchronously. You use the mindAssessmentId (returned from the create calls) as the snapshotId to check progress.
@@ -548,6 +627,7 @@ Response:
548
627
  }
549
628
  ```
550
629
 
630
+
551
631
  #### Data Requirements
552
632
 
553
633
  For the most accurate results, ensure that snapshots conform to the following guidelines.
@@ -742,7 +822,143 @@ To get the best simulation results, the following best practices are recommended
742
822
  - Business constraints
743
823
  - Historical context
744
824
 
825
+
826
+ ## 💻 CLI Usage
827
+
828
+ The MindSim CLI allows you to manage resources directly from your terminal without writing code. This is useful for administrative tasks, testing, and quick lookups.
829
+
830
+ Ensure you are authenticated via `mindsim auth` or have `MINDSIM_API_KEY` set in your environment before running these commands.
831
+
832
+ ### Minds
833
+
834
+ Manage the digital minds (profiles).
835
+
836
+ **List Minds**
837
+ ```bash
838
+ # List all minds
839
+ mindsim minds list
840
+
841
+ # List minds filtered by tags
842
+ mindsim minds list --tags developer,leader
843
+ ```
844
+
845
+ **Create a Mind**
846
+ ```bash
847
+ mindsim minds create -n "Bobby Tables" -e "bobby@example.com" --tags developer
848
+ ```
849
+
850
+ **Get Mind Details**
851
+ ```bash
852
+ mindsim minds get <mind-id>
853
+ ```
854
+
855
+ **Search Minds**
856
+ ```bash
857
+ mindsim minds search "bobby@example.com"
858
+ ```
859
+
860
+ **Update a Mind**
861
+ ```bash
862
+ mindsim minds update <mind-id> --name "Robert Tables" --tags senior-dev
863
+ ```
864
+
865
+ **Set Tags (Replace)**
866
+ ```bash
867
+ # Replaces all existing tags with the new list
868
+ mindsim minds set-tags <mind-id> --tags hero,survivor
869
+ ```
870
+
871
+ **Delete a Mind**
872
+ ```bash
873
+ mindsim minds delete <mind-id>
874
+ ```
875
+
876
+ ### Snapshots
877
+
878
+ Upload training data and check processing status.
879
+
880
+ **List Snapshots**
881
+ ```bash
882
+ mindsim snapshots list <mind-id>
883
+ ```
884
+
885
+ **Create Snapshot (Upload File)**
886
+ ```bash
887
+ # Upload a transcript or document
888
+ mindsim snapshots create <mind-id> --file ./data/transcript.vtt --date 2023-11-01
889
+ ```
890
+
891
+ **Check Status**
892
+ ```bash
893
+ mindsim snapshots status <mind-id> <snapshot-id>
894
+ ```
895
+
896
+ ### Simulations
897
+
898
+ Run simulations and view history.
899
+
900
+ **Run Simulation**
901
+ ```bash
902
+ # Run and wait for response
903
+ mindsim simulations run <mind-id> --message "How would you handle a production outage?"
904
+
905
+ # Run in background (returns immediately)
906
+ mindsim simulations run <mind-id> --message "Analyze this text" --background
907
+ ```
908
+
909
+ **List History**
910
+ ```bash
911
+ mindsim simulations list --limit 10 --offset 0
912
+ ```
913
+
914
+ **Get Simulation Details**
915
+ ```bash
916
+ mindsim simulations get <simulation-id>
917
+ ```
918
+
919
+ **Delete Simulation**
920
+ ```bash
921
+ mindsim simulations delete <simulation-id>
922
+ ```
923
+
924
+ ### Tags
925
+
926
+ Manage categorization tags used to organize minds.
927
+
928
+ **List Tags**
929
+ ```bash
930
+ mindsim tags list
931
+ ```
932
+
933
+ **Update a Tag**
934
+ ```bash
935
+ mindsim tags update <tag-id> --name "new-tag-name"
936
+ ```
937
+
938
+ **Delete a Tag**
939
+ ```bash
940
+ mindsim tags delete <tag-id>
941
+ ```
942
+
943
+ ### Psychometrics
944
+
945
+ Retrieve personality analysis and dimensional data derived from a specific snapshot.
946
+
947
+ **Get Psychometrics**
948
+ ```bash
949
+ mindsim psychometrics get <snapshot-id>
950
+ ```
951
+
952
+ **Get Topic Sentiment Analysis**
953
+ ```bash
954
+ mindsim psychometrics topics <snapshot-id>
955
+ ```
956
+
957
+
745
958
  <br>
746
959
  <div align="center">
747
- <img style="display: block; margin: auto;" src="assets/mindsim-logo.svg"/>
960
+ <a href="https://mindsim.com/">
961
+ <img style="display: block; margin: auto;" src="assets/mindsim-logo.svg"/>
962
+ </a>
748
963
  </div>
964
+