Skip to content
This repository was archived by the owner on Oct 22, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
119 commits
Select commit Hold shift + click to select a range
534c240
manifest json install process
jurij-jukic May 17, 2024
df0ed22
wip
jurij-jukic May 17, 2024
462e7f6
monorepo works
jurij-jukic May 20, 2024
db02730
better instructions for adding api keys
jurij-jukic May 20, 2024
d2cb5b0
better instructions
jurij-jukic May 20, 2024
cd67988
polish ui
jurij-jukic May 21, 2024
275b60e
remove prints
jurij-jukic May 21, 2024
0360c14
fix submitKey
jurij-jukic May 21, 2024
f1f0d56
ready to deploy
jurij-jukic May 22, 2024
3dfead1
.
jurij-jukic May 22, 2024
9d6c5dd
update metadata.json
barraguda May 23, 2024
93e77d9
works
jurij-jukic May 24, 2024
ad3624c
cleaned up
jurij-jukic May 24, 2024
63e42d8
ui polish
jurij-jukic May 24, 2024
ae0a742
compile latest tg.wasm
jurij-jukic May 24, 2024
5313516
generalize websocket connection
jurij-jukic May 24, 2024
4af6a1f
update metadata.json
barraguda May 25, 2024
05d4967
ws -> wss
jurij-jukic May 27, 2024
33f7f2d
update metadata
barraguda May 27, 2024
6abc054
Merge branch 'main' into jurij
barraguda May 30, 2024
d20fa28
update metadata, icon update
barraguda May 30, 2024
d67a446
update main icon...
barraguda May 30, 2024
1af75fe
read obsidian vault from vfs; add example flexsearch to UI
jurij-jukic Jun 7, 2024
67e7045
Merge branch 'jurij-tg' into jurij
jurij-jukic Jun 7, 2024
65765a0
Set on_exit:restart for openai
jaxs-ribs Jun 10, 2024
21c4650
load files into the ui
jurij-jukic Jun 10, 2024
e0c457b
hook up search in the frontend
jurij-jukic Jun 10, 2024
259fc1a
wip
jurij-jukic Jun 10, 2024
42252e9
importing from ui works
jurij-jukic Jun 13, 2024
00da8e1
minor cleanup
jurij-jukic Jun 13, 2024
96941d0
can import any amount of folder and all will be searched
jurij-jukic Jun 13, 2024
99fcf6a
importing, backups wip
jurij-jukic Jun 14, 2024
bb763cf
setup initial handshake
jurij-jukic Jun 15, 2024
ed8acba
Latest tg wasm
jaxs-ribs Jun 17, 2024
51800a3
Update to 0.8.1
jaxs-ribs Jun 17, 2024
e8b2b28
Merge pull request #2 from kinode-dao/zen-0.8
jaxs-ribs Jun 17, 2024
f245124
Merge branch 'develop' into jurij
jurij-jukic Jun 17, 2024
9aa4fed
transfer folder of arbitrary depth
jurij-jukic Jun 17, 2024
b06b0e2
refactor github repo to include lib as a separate crate
jurij-jukic Jun 18, 2024
ee3a03c
Merge pull request #3 from kinode-dao/files_lib
jurij-jukic Jun 18, 2024
9a946db
recursive file sending fixed
jurij-jukic Jun 19, 2024
5fe9847
caps bug here. wip.
jurij-jukic Jun 19, 2024
0514ba9
compiles
jurij-jukic Jun 19, 2024
fd1a16a
delete target/ and other stuff which was supposed to be git ignored
jurij-jukic Jun 20, 2024
ed2a46f
fix .gitignore
jurij-jukic Jun 20, 2024
e481109
fix encryption bug. encryption and decryption (backing up and retriev…
jurij-jukic Jun 20, 2024
a6ebe62
encrypt + decrypt bugs fixed
jurij-jukic Jun 21, 2024
ec6bfaa
make it work with create_file, finally. overwrites correctly in both …
jurij-jukic Jun 24, 2024
6f11252
clean up path mess a bit
jurij-jukic Jun 24, 2024
a1853e4
implement password input
jurij-jukic Jun 24, 2024
7611a2d
password input
jurij-jukic Jun 24, 2024
da1bffa
minor cleanup
jurij-jukic Jun 24, 2024
98a68dd
wip segregation of retrieval and decryption
jurij-jukic Jun 25, 2024
68ed262
separate decryption from backup retrieval
jurij-jukic Jun 25, 2024
dd71e2a
better pw handling
jurij-jukic Jun 25, 2024
5d5a4cc
forgot to add files_lib
jurij-jukic Jun 25, 2024
ee930f2
more cleanup
jurij-jukic Jun 25, 2024
30862c2
simplify worker
jurij-jukic Jun 25, 2024
dad5526
add datetime
jurij-jukic Jun 25, 2024
d29719f
remove timeout errors
jurij-jukic Jun 25, 2024
64d564a
minor bug fix
jurij-jukic Jun 26, 2024
a3f87fa
minor cleanup
jurij-jukic Jun 26, 2024
280d675
decrypt to temp folder
jurij-jukic Jun 26, 2024
446505c
handle decryption failure
jurij-jukic Jun 26, 2024
beb7226
edge case: empty file
jurij-jukic Jun 26, 2024
ae44ea0
trying to get ui to work
jurij-jukic Jun 27, 2024
44f792b
works after yarn build + kit bs
jurij-jukic Jun 27, 2024
6cf01b9
wip, but dev server finally works
jurij-jukic Jun 27, 2024
05a492c
wip
jurij-jukic Jun 27, 2024
8772aa4
wip
jurij-jukic Jun 27, 2024
bd95450
wip
jurij-jukic Jun 27, 2024
e121d8a
ws fix
jurij-jukic Jun 27, 2024
8682be5
everything from before works with react except md rendering
jurij-jukic Jun 28, 2024
be0a3d3
gitignore
jurij-jukic Jun 28, 2024
43aa6fd
make tooltip a popup so it can work on phone
jurij-jukic Jun 28, 2024
f890fda
ui good
jurij-jukic Jun 28, 2024
8efabae
wip
jurij-jukic Jun 28, 2024
a2ade6b
tree view wip
jurij-jukic Jun 28, 2024
393ab92
cant get actual notes tree data to render properly, but can get mock …
jurij-jukic Jul 1, 2024
58defc2
render tree finally
jurij-jukic Jul 1, 2024
dc769a0
make hash routing work
jurij-jukic Jul 1, 2024
95f3b46
wip
jurij-jukic Jul 1, 2024
a2ff2e8
pipe note into md editor
jurij-jukic Jul 1, 2024
5b332e6
restructure
jurij-jukic Jul 2, 2024
53bdc25
tabs to separate files
jurij-jukic Jul 2, 2024
7ed68c0
remove redundant func
jurij-jukic Jul 2, 2024
ad5339b
cleanup done
jurij-jukic Jul 2, 2024
9b9297b
cleanup file path/name display
jurij-jukic Jul 2, 2024
c7b8884
make md editable
jurij-jukic Jul 2, 2024
c7798ad
md editor show file name
jurij-jukic Jul 2, 2024
21e5218
wip
jurij-jukic Jul 2, 2024
d065999
fetch backup data
jurij-jukic Jul 2, 2024
bfc3f58
refactor wip
jurij-jukic Jul 3, 2024
d846b7b
large worker cleanup
jurij-jukic Jul 3, 2024
278692a
refactor wip
jurij-jukic Jul 3, 2024
22f1a31
.
jurij-jukic Jul 3, 2024
8ae839d
wip
jurij-jukic Jul 4, 2024
37c7ee5
remove worker from manifest.json
jurij-jukic Jul 4, 2024
a041051
add current worker address to state
jurij-jukic Jul 4, 2024
2ca7c22
.
jurij-jukic Jul 4, 2024
e29fd0e
write readme
jurij-jukic Jul 4, 2024
6b2cb3d
.
jurij-jukic Jul 4, 2024
4de7158
readme update
jurij-jukic Jul 4, 2024
0bf1708
.
jurij-jukic Jul 4, 2024
493fbf1
readme
jurij-jukic Jul 4, 2024
3b5edf9
.
jurij-jukic Jul 4, 2024
50228a4
tree
jurij-jukic Jul 4, 2024
55dcc6e
update readme
jurij-jukic Jul 4, 2024
4bb6839
add diagrams
jurij-jukic Jul 4, 2024
d8eb03b
swimlanes + handle_ui_backup_request comments
jurij-jukic Jul 4, 2024
4b2425e
wip
jurij-jukic Jul 4, 2024
6d9b27c
wip
jurij-jukic Jul 5, 2024
22ceb94
cmd center lib fully commented
jurij-jukic Jul 5, 2024
61c2000
worker comments
jurij-jukic Jul 5, 2024
6937642
commenting the code, done
jurij-jukic Jul 5, 2024
6cd5f4e
ready to pass the torch
jurij-jukic Jul 5, 2024
d4e35f4
backup button from ui
jurij-jukic Jul 8, 2024
76e1298
ws connection: worker status Done update
jurij-jukic Jul 8, 2024
87c9a34
fix read nested dir light bug
jurij-jukic Aug 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified .DS_Store
Binary file not shown.
20 changes: 13 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
*/target/
/target
pkg/*.wasm
!pkg/tg.wasm
!pkg/openai.wasm
!pkg/speech_to_text.wasm
!pkg/command_center.wasm
.DS_Store

**/target/
*.wasm
*.swp
*.swo
*/wasi_snapshot_preview1.wasm
*/wit/
*/process_env

/command_center/!pkg/*.wasm
/command_center/pkg/ui/*
/command_center/pkg/node_modules
/command_center/pkg/dist
/command_center/ui/node_modules
/command_center/ui/package-lock.json
/command_center/ui/yarn.lock

10 changes: 0 additions & 10 deletions Cargo.toml

This file was deleted.

141 changes: 139 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,142 @@
# Command Center

Work in Progress. In the meantime, enjoy an image of a Command Center.
### Directory Structure

![Command Center Image](command_center.jpeg)
```
command_center
│ ├── README.md
│ ├── command_center
│ │ ├── ai_chatbot_demo
│ │ ├── command_center
│ │ ├── pkg
│ │ ├── ui
│ │ └── worker
│ ├── files_lib
```

To disambiguate the 3 levels of `command_center`:
- outermost - `command_center` the git repo
- middle - `command_center` the package
- innermost - `command_center` the process

`files_lib` is a package, used as a shared library by the `command_center` and `worker` processes.

### Quick Start

For the purposes of this tutorial:
- `node.os` is at `home`
- `node2.os` is at `home2`

Boot up 2 real nodes. Real ones are preferable because we are working with file storage which is easier to persist this way.

```bash
./binary/kinode home
./binary/kinode home2
```

```bash
cd command_center/command_center
kit b && kit s && kit s -p 8081
```
- due to a current bug in kit, you can use `kit b <<< y && kit s && kit s -p 8081` instead, if you don't want to manually press 'y' every time

```bash
cd command_center/command_center/ui
npm i
npm run dev
```

### Working Functionality

In the UI you should be able to use the following tabs:
- Config - set up tg bot
- Data Center - see tg chat in real time
- Import Notes - import notes via ui
- Notes - check backup status, search notes, view directory structure, and view notes in markdown
- Provided backups - see backups which you are providing for other nodes

UI functionality related to backups is a work in progress, so it may not work correctly.

### Dev Setup for Backups

`node.os` at `home` folder will be backing up their notes to `node2.os` at `home2` folder.

Import notes via ui on `node.os`, they should show up here:
```bash
cd home/vfs/command_center:appattacc.os/files
ls
```

Throughout the rest of the tutorial, replace `node.os` and `node2.os` with the node ids of your nodes.

#### Backing Up

To back up the notes, in `node.os` terminal, run:
```
m node.os@main:command_center:appattacc.os '{"BackupRequest": {"node_id": "node2.os", "size": 0, "password_hash": "somehash"}}'
```

Wait until in the `node2.os` terminal you see a message like the following:
```
command_center:appattacc.os: command_center worker: done: exiting, took 123.456ms
```

In `node2.os` `home2`, you should find a folder called `node.os`:
``` bash
cd home2/vfs/command_center:appattacc.os/encrypted_storage/
ls
```

Inside that folder should be a bunch of encrypted files
```bash
cd node.os
ls
```

#### Retrieving Backup

To retrieve the backup to `node.os`, in `node.os` terminal, run:
```bash
m node.os@main:command_center:appattacc.os '{"BackupRetrieve": {"node_id": "node2.os"}}'
```

Wait until in the `node1.os` terminal you see a message like the following:
```
command_center:appattacc.os: command_center worker: done: exiting, took 123.456ms
```

In `node.os` `home`, you should find a folder called `retrieved_encrypted_backup` containing the same encrypted files which are backed up to `node2.os`:
```bash
cd home/vfs/command_center:appattacc.os/retrieved_encrypted_backup
ls
```

#### Decrypting Retrieved Backup

Warning: this will overwrite any changes to the notes you made in the `files` directory in the meantime.

To decrypt this data, in `node.os` terminal, run:
```bash
m node.os@main:command_center:appattacc.os '{"Decrypt": {"password_hash": "somehash"}}'
```

In `node.os` `home`, look at `files`, they should contain the decrypted data.
```bash
cd home/vfs/command_center:appattacc.os/files
ls
```

### TODO Functionality
- the commands shown above need to be connected to the ui
- the ui also needs to correctly surface backup status
- for client node: when was the last time data was backed up
- for server node: all nodes which are backing up data to this node, and corresponding statuses
- a setting which allows a node to say: "I provide backups" or "I do not provide backups". Additionally, whitelisting and blacklisting by arbitrary criteria can be done.
- editing notes via markdown and propagating the changes to backend, then to backup
- vector search your notes

### Backup Diagrams

- [ClientRequest::BackupRequest](https://swimlanes.io/#jZFBUsMwDEX3PoUOQDmAFywIG7bJMCyJxxFUE1dObRlmenocp9AWp8DO0vz//fwtJA413Bs7Er/B06SUDwMGDdYRssCHDyOGm6/R7oYXmw/zKmJ4x7C2WkxKVSbY3NU2DX1ThC3uE0bResZJ03HslaosZznLXTnjuRy+Mx6ZhIyjA7ZokbJ0EVyLq1hzZFeELcbJc8QfXKd14/mVwq6/8uCLJn8D7ZCHM8wL3z9e3GwTjz0o9oJzp2WMYAJmZw4SD7JFCKWO+bePyYmFHBjnYDBigGKR364ArHW0QHRiJEWtHzzjqeEK/U/nJw==)

- [ClientRequest::BackupRetrieve](https://swimlanes.io/#jZE9TgQxDIX7nMIHAA6QgoLdhnamoGSizBMbTUiWxFkkTk8m2V8SBJ1t+X16z2bDFpIGcDA4GPdGT0ovaS+EDzOCJG0NHNOnDwvC3anV7/OrzsU6iggHhN6oioRoRHT/eAuWNL2UYsBHQmQpn51ho6z5wgANk3F1YfoF17jIyE1ZPCNrsmNUTCKKRnRF+tvYCDdf2erCGq8ZOJbFAXHvXcRPX6f5hVid/ONmm11yy0TCecYav7SRVEAOlXXsiXegUA66/vpITo6NJWUtzYoVmVjWH86XbgzcxKkmRlacopRb77rWe//pKsU3)
Loading