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.
- package/README.md +222 -6
- package/dist/cli.js +465 -4
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -1
- package/dist/resources/mind-topics.d.ts +11 -0
- package/dist/resources/mind-topics.d.ts.map +1 -0
- package/dist/resources/mind-topics.js +18 -0
- package/dist/resources/mind-topics.js.map +1 -0
- package/dist/resources/snapshots.d.ts +29 -1
- package/dist/resources/snapshots.d.ts.map +1 -1
- package/dist/resources/snapshots.js +30 -0
- package/dist/resources/snapshots.js.map +1 -1
- package/dist/resources/usage.d.ts +14 -0
- package/dist/resources/usage.d.ts.map +1 -0
- package/dist/resources/usage.js +20 -0
- package/dist/resources/usage.js.map +1 -0
- package/dist/resources/users.d.ts +14 -0
- package/dist/resources/users.d.ts.map +1 -0
- package/dist/resources/users.js +20 -0
- package/dist/resources/users.js.map +1 -0
- package/dist/types.d.ts +51 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +3 -3
- package/dist/version.js.map +1 -1
- package/package.json +2 -2
- package/src/cli.ts +474 -5
- package/src/index.ts +9 -0
- package/src/resources/mind-topics.ts +16 -0
- package/src/resources/snapshots.ts +60 -0
- package/src/resources/usage.ts +16 -0
- package/src/resources/users.ts +16 -0
- package/src/types.ts +61 -0
- package/src/version.ts +3 -5
- package/tests/resources/mind-topics.test.ts +69 -0
- package/tests/resources/snapshots.test.ts +46 -0
- package/tests/resources/usage.test.ts +34 -0
- package/tests/resources/users.test.ts +54 -0
- 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
|
-
|
|
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
|
|
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 "
|
|
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 "
|
|
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
|
-
<
|
|
960
|
+
<a href="https://mindsim.com/">
|
|
961
|
+
<img style="display: block; margin: auto;" src="assets/mindsim-logo.svg"/>
|
|
962
|
+
</a>
|
|
748
963
|
</div>
|
|
964
|
+
|