Skip to content

Commit 403c3fb

Browse files
Merge pull request #227 from SmythOS/Documentation-updates
doc update
2 parents 7b0f2b7 + ce9ddab commit 403c3fb

File tree

154 files changed

+914
-417
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

154 files changed

+914
-417
lines changed

docs/cli/assets/highlight.css

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
--dark-hl-2: #CE9178;
88
--light-hl-3: #0000FF;
99
--dark-hl-3: #569CD6;
10-
--light-hl-4: #098658;
11-
--dark-hl-4: #B5CEA8;
12-
--light-hl-5: #008000;
13-
--dark-hl-5: #6A9955;
10+
--light-hl-4: #008000;
11+
--dark-hl-4: #6A9955;
12+
--light-hl-5: #098658;
13+
--dark-hl-5: #B5CEA8;
1414
--light-hl-6: #0451A5;
1515
--dark-hl-6: #9CDCFE;
1616
--light-hl-7: #001080;

docs/cli/index.html

Lines changed: 29 additions & 8 deletions
Large diffs are not rendered by default.

docs/core/documents/05-configuration.html

Lines changed: 5 additions & 5 deletions
Large diffs are not rendered by default.

docs/core/documents/connectors_vault.html

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,25 +44,30 @@ <h2 id="available-connectors" class="tsd-anchor-link">Available Connectors<a hre
4444
<td>Path to the vault file</td>
4545
</tr>
4646
<tr>
47-
<td><code>fileKey</code></td>
48-
<td>string</td>
49-
<td>No</td>
50-
<td><code>~/.smyth/vault.key</code></td>
51-
<td>Path to the encryption key file</td>
52-
</tr>
53-
<tr>
5447
<td><code>shared</code></td>
5548
<td>string</td>
5649
<td>No</td>
57-
<td><code>&quot;&quot;</code></td>
50+
<td><code>&quot;default&quot;</code></td>
5851
<td>Shared team name for cross-team secret access</td>
5952
</tr>
6053
</tbody>
6154
</table>
6255
<p><strong>Example Configuration:</strong></p>
63-
<pre><code class="typescript"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">SRE</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">&#39;@smythos/sre&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-6">SRE</span><span class="hl-1">.</span><span class="hl-7">init</span><span class="hl-1">({</span><br/><span class="hl-1"> </span><span class="hl-2">Vault:</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-2">Connector:</span><span class="hl-1"> </span><span class="hl-3">&#39;JSONFileVault&#39;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-2">Settings:</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-2">file:</span><span class="hl-1"> </span><span class="hl-3">&#39;./secrets/vault.json&#39;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-2">fileKey:</span><span class="hl-1"> </span><span class="hl-3">&#39;./secrets/vault.key&#39;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-2">shared:</span><span class="hl-1"> </span><span class="hl-3">&#39;production&#39;</span><span class="hl-1">,</span><br/><span class="hl-1"> },</span><br/><span class="hl-1"> },</span><br/><span class="hl-1">});</span>
56+
<pre><code class="typescript"><span class="hl-0">import</span><span class="hl-1"> { </span><span class="hl-2">SRE</span><span class="hl-1"> } </span><span class="hl-0">from</span><span class="hl-1"> </span><span class="hl-3">&#39;@smythos/sre&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-6">SRE</span><span class="hl-1">.</span><span class="hl-7">init</span><span class="hl-1">({</span><br/><span class="hl-1"> </span><span class="hl-2">Vault:</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-2">Connector:</span><span class="hl-1"> </span><span class="hl-3">&#39;JSONFileVault&#39;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-2">Settings:</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-2">file:</span><span class="hl-1"> </span><span class="hl-3">&#39;./secrets/vault.json&#39;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-2">shared:</span><span class="hl-1"> </span><span class="hl-3">&#39;production&#39;</span><span class="hl-1">,</span><br/><span class="hl-1"> },</span><br/><span class="hl-1"> },</span><br/><span class="hl-1">});</span>
6457
</code><button type="button">Copy</button></pre>
6558

59+
<p><strong>vault.json research path:</strong>
60+
The JSONFileVault connector will search for the vault.json file in the following order:</p>
61+
<ol>
62+
<li>The path specified in the <code>file</code> setting</li>
63+
<li>The <code>.smyth/vault.json</code> file</li>
64+
<li>The <code>.smyth/vault/vault.json</code> file</li>
65+
<li>The <code>.smyth/.sre/vault.json</code> file</li>
66+
<li>The <code>~/.smyth/vault.json</code> file</li>
67+
<li>The <code>~/.smyth/vault/vault.json</code> file</li>
68+
<li>The <code>~/.smyth/.sre/vault.json</code> file</li>
69+
</ol>
70+
<p>The search paths and the used path are visible in SRE logs in case you need to debug the vault file search.</p>
6671
<p><strong>Use Cases:</strong></p>
6772
<ul>
6873
<li>Development and testing environments</li>

docs/core/media/CONTRIBUTING.md

Lines changed: 90 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,96 @@ There are many ways to contribute to the project beyond writing code. This guide
1010

1111
If you have questions about SmythOS:
1212

13-
- Please visit our official documentation: [https://smythos.com/docs](https://smythos.com/docs)
13+
- Please visit our developer documentation: [https://smythos.github.io/sre/](https://smythos.github.io/sre/)
1414
- Join our community on Discord: [https://discord.gg/smythos](https://discord.gg/smythos)
1515

1616
---
1717

18+
## Quick Start
19+
20+
In order to contribute to SmythOS codebase, follow these steps:
21+
22+
1. Fork the repository
23+
24+
```bash
25+
git clone https://github.com/SmythOS/sre.git
26+
cd sre
27+
```
28+
29+
2. Install the dependencies
30+
31+
```bash
32+
pnpm install
33+
```
34+
35+
3. Configure sre environment.
36+
Smyth Runtime Environment (SRE) expects a directory called .smyth to exist in the root of the project or in the user's home directory.
37+
(check [SRE Configuration](https://smythos.github.io/sre/core/documents/05-configuration.html) for more details)
38+
39+
```bash
40+
mkdir -p .smyth
41+
#or
42+
mkdir -p ~/.smyth
43+
```
44+
45+
And by default the SRE expects this folder to contains a vault.json file with this structure:
46+
47+
```bash
48+
touch .smyth/vault.json
49+
#or
50+
touch ~/.smyth/vault.json
51+
```
52+
53+
```json
54+
{
55+
"default": {
56+
"echo": "",
57+
"openai": "<your openai api key>",
58+
"anthropic": "<your anthropic api key>",
59+
"googleai": "<your google ai api key>",
60+
"groq": "<your groq api key>",
61+
"togetherai": "<your together ai api key>",
62+
"xai": "<your xai api key>",
63+
"perplexity": "<your perplexity api key>"
64+
}
65+
}
66+
```
67+
68+
You don't need to provide all the keys, only the ones you need in your tests.
69+
70+
## 3. Build the project
71+
72+
```bash
73+
pnpm build
74+
```
75+
76+
## 4. Run the tests
77+
78+
```bash
79+
pnpm test
80+
```
81+
82+
## 5. Run the examples
83+
84+
The project comes with a set of examples that you can run to see the SRE in action.
85+
86+
for this, go to the examples directory and run the following command:
87+
88+
```bash
89+
pnpm start <path_to_example.ts>
90+
```
91+
92+
The project also comes with a pre-configured vscode debug launch file for the examples.
93+
The debugger will allow you to follow breakpoints in the examples and in SRE and SDK codes.
94+
95+
In order to use the debugger :
96+
97+
- Select "Debug Current Example" from the vscode debug menu.
98+
- Open any example .ts file
99+
- Then hit F5 to start the debugger
100+
101+
---
102+
18103
## 💬 Providing Feedback
19104

20105
We welcome all kinds of feedback! Whether you have suggestions, bug reports, or general thoughts, feel free to share them via:
@@ -70,9 +155,10 @@ We love contributions from the community! Here's how to get started:
70155
SmythOS uses the [Developer Certificate of Origin 1.1](https://developercertificate.org/) to ensure that every
71156
contribution is made with clear provenance and permission.
72157

73-
- **What you do:** add the `-s` flag to each `git commit`
74-
```bash
75-
git commit -s -m "Fix: correct off-by-one in vector index"
158+
- **What you do:** add the `-s` flag to each `git commit`
159+
```bash
160+
git commit -s -m "Fix: correct off-by-one in vector index"
161+
```
76162

77163
---
78164

docs/sdk/assets/hierarchy.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/sdk/assets/navigation.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/sdk/assets/search.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)