@misterscan/sesi 1.3.0 → 1.3.3
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/.agents/rules/sesi-must-read.md +116 -0
- package/.agents/workflows/create-sesi-script.md +44 -0
- package/.agents/workflows/fix-sesi-script.md +14 -0
- package/.github/prompts/MakeInSesi.prompt.md +79 -0
- package/README.md +74 -33
- package/bin/sesi.js +56 -23
- package/chatbot/chatbot.html +488 -0
- package/{main → chatbot}/chatbot.sesi +1 -2
- package/chatbot/chatbot_server.py +105 -0
- package/chatbot/sesi_db_chatbot.sesi +278 -0
- package/dist/ai-runtime.js +2 -2
- package/dist/builtins.d.ts.map +1 -1
- package/dist/builtins.js +3 -1
- package/dist/builtins.js.map +1 -1
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +61 -2
- package/dist/index.js.map +1 -1
- package/dist/interpreter.d.ts +10 -0
- package/dist/interpreter.d.ts.map +1 -1
- package/dist/interpreter.js +20 -4
- package/dist/interpreter.js.map +1 -1
- package/dist/parser.d.ts.map +1 -1
- package/dist/parser.js +3 -4
- package/dist/parser.js.map +1 -1
- package/dist/sesi.bundled.js +2526 -1487
- package/dist/types.d.ts +1 -1
- package/dist/types.d.ts.map +1 -1
- package/docs/ARCHITECTURE.md +2 -7
- package/docs/BUILTINS.md +27 -8
- package/docs/CLI.md +200 -0
- package/docs/COMPARISON.md +11 -6
- package/docs/IMPLEMENTATION_SUMMARY.md +57 -50
- package/docs/QUICKSTART.md +104 -23
- package/docs/README.md +84 -42
- package/docs/REASONING.md +21 -16
- package/docs/ROADMAP.md +10 -5
- package/docs/SKILLS.md +63 -116
- package/docs/SPECIFICATION.md +35 -23
- package/examples/03_functions.sesi +30 -1
- package/examples/07_prompts.sesi +26 -2
- package/examples/08_model_call.sesi +6 -4
- package/examples/09_structured_output.sesi +18 -2
- package/examples/10_code_generation.sesi +6 -4
- package/examples/11_memory_conversation.sesi +47 -15
- package/examples/12_classification.sesi +62 -7
- package/examples/13_data_pipeline.sesi +55 -28
- package/examples/14_folder_explainer.sesi +52 -51
- package/examples/15_image_generation.sesi +15 -14
- package/examples/16_modules.sesi +1 -1
- package/examples/19_search_web.sesi +18 -2
- package/examples/20_model_aliases.sesi +6 -6
- package/main/tests/test-args.sesi +7 -0
- package/main/tests/test_args.sesi +7 -0
- package/main/tests/test_general_modules.sesi +127 -0
- package/package.json +25 -21
- package/docs/CONCURRENCY.md +0 -71
- package/docs/sesi_ai_chronicles.md +0 -96
- package/main/conversational_classifier_weights.json +0 -45
- package/main/conversational_sentences.json +0 -304
- package/main/epochs.sesi +0 -94
- package/main/gpu_orchestrator.sesi +0 -36
- package/main/hardware_diagnostics.sesi +0 -118
- package/main/inference.sesi +0 -54
- package/main/native_chatbot.sesi +0 -180
- package/main/native_synthesizer.sesi +0 -83
- package/main/nn_personas_trainer.sesi +0 -302
- package/main/nn_responses_trainer.sesi +0 -269
- package/main/nn_sentences_trainer.sesi +0 -330
- package/main/orchestrator.sesi +0 -15
- package/main/personas.json +0 -124
- package/main/personas_classifier_weights.json +0 -45
- package/main/playground.sesi +0 -3
- package/main/predictive_typing.sesi +0 -127
- package/main/query_brain.sesi +0 -45
- package/main/response_classifier_weights.json +0 -45
- package/main/retro_chat.html +0 -239
- package/main/retro_chat_generator.sesi +0 -745
- package/main/sesi_ai.sesi +0 -158
- package/main/sesi_db_chatbot.sesi +0 -284
- package/main/setup_swarm.sesi +0 -5
- package/main/start.sesi +0 -13
- package/main/terminal.log +0 -56
- package/main/terminal_chat.py +0 -385
- package/main/unified_sesi_ai.sesi +0 -334
- package/main/varied_responses.json +0 -304
package/dist/types.d.ts
CHANGED
|
@@ -203,7 +203,7 @@ export interface ImageCallExpression {
|
|
|
203
203
|
export interface StructuredOutputExpression {
|
|
204
204
|
type: 'StructuredOutputExpression';
|
|
205
205
|
schema: Record<string, TypeAnnotation>;
|
|
206
|
-
modelCall:
|
|
206
|
+
modelCall: Expression;
|
|
207
207
|
line: number;
|
|
208
208
|
}
|
|
209
209
|
export interface ToolCallExpression {
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,SAAS,GAEjB,QAAQ,GACR,QAAQ,GACR,YAAY,GAEZ,KAAK,GACL,OAAO,GACP,IAAI,GACJ,IAAI,GACJ,MAAM,GACN,OAAO,GACP,KAAK,GACL,IAAI,GACJ,QAAQ,GACR,OAAO,GACP,UAAU,GACV,KAAK,GACL,OAAO,GACP,SAAS,GACT,MAAM,GACN,OAAO,GACP,MAAM,GACN,OAAO,GACP,QAAQ,GACR,OAAO,GACP,OAAO,GACP,mBAAmB,GACnB,WAAW,GACX,QAAQ,GACR,QAAQ,GACR,MAAM,GACN,QAAQ,GACR,IAAI,GAEJ,MAAM,GACN,OAAO,GACP,MAAM,GACN,OAAO,GACP,SAAS,GACT,OAAO,GACP,aAAa,GACb,MAAM,GACN,YAAY,GACZ,MAAM,GACN,YAAY,GACZ,SAAS,GACT,eAAe,GACf,qBAAqB,GACrB,WAAW,GACX,MAAM,GACN,KAAK,GACL,OAAO,GACP,WAAW,GACX,OAAO,GACP,OAAO,GACP,UAAU,GAEV,YAAY,GACZ,aAAa,GACb,YAAY,GACZ,aAAa,GACb,cAAc,GACd,eAAe,GACf,cAAc,GAEd,KAAK,GACL,SAAS,CAAC;AAEd,MAAM,WAAW,KAAK;IACpB,IAAI,EAAE,SAAS,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAAC;IAC1C,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB;AAGD,MAAM,MAAM,OAAO,GACf,OAAO,GACP,SAAS,GACT,UAAU,CAAC;AAEf,MAAM,WAAW,OAAO;IACtB,IAAI,E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AM,EAAO;IAY3B,eAAe,IAAI,aAAa;CAmBjC;AAED,MAAM,MAAM,gBAAgB,GAAG;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC"}
|
package/docs/ARCHITECTURE.md
CHANGED
|
@@ -298,7 +298,6 @@ Sesi now has basic exception-style error handling in v1:
|
|
|
298
298
|
|
|
299
299
|
```
|
|
300
300
|
SKILLS.md # AI-agent workspace context and repo guardrails
|
|
301
|
-
index.html # Sesi-generated landing page
|
|
302
301
|
eslint.config.mjs # ESLint configuration
|
|
303
302
|
dist/ # Compiled TypeScript output
|
|
304
303
|
example.js # Helper script to run basic examples
|
|
@@ -323,8 +322,6 @@ bin/
|
|
|
323
322
|
└── sesi.js # CLI executable
|
|
324
323
|
|
|
325
324
|
main/ # Main user scripts and debugging
|
|
326
|
-
├── playground.sesi # Main playground script
|
|
327
|
-
├── start.sesi # Beginner script
|
|
328
325
|
├── build_website.sesi # Sesi-generated landing page builder
|
|
329
326
|
└── tests/ # Additional syntax validation scripts
|
|
330
327
|
|
|
@@ -356,12 +353,12 @@ docs/
|
|
|
356
353
|
├── SPECIFICATION.md # Language spec
|
|
357
354
|
├── ARCHITECTURE.md # This file
|
|
358
355
|
├── BUILTINS.md # Built-in reference
|
|
356
|
+
├── CLI.md # Comprehensive CLI & Parametric Eval guide
|
|
359
357
|
├── IMAGE_GENERATION.md # Image generation guide
|
|
360
358
|
├── COMPARISON.md # Language comparison showcase
|
|
361
359
|
├── CONCURRENCY.md # Concurrency & coordination guide
|
|
362
360
|
├── REASONING.md # Reasoning and simple logic guide
|
|
363
|
-
|
|
364
|
-
└── sesi_ai_chronicles.md # AI project history & notes
|
|
361
|
+
└── ROADMAP.md # Future plans
|
|
365
362
|
|
|
366
363
|
tests/
|
|
367
364
|
├── basic.test.ts # Core parsing & evaluation tests
|
|
@@ -379,8 +376,6 @@ tests/
|
|
|
379
376
|
|
|
380
377
|
The root-level `SKILLS.md` file is part of the practical repo architecture. It is not consumed by the Sesi runtime, but it is intended to guide AI-assisted development in this workspace.
|
|
381
378
|
|
|
382
|
-
It defines repo-specific operating rules such as valid Sesi assumptions, normal execution via the global `sesi` command, and the fact that `main/` and `main/tests/` are intentional user workspace areas rather than anomalies.
|
|
383
|
-
|
|
384
379
|
## Testing Strategy
|
|
385
380
|
|
|
386
381
|
**Unit Tests** (per component):
|
package/docs/BUILTINS.md
CHANGED
|
@@ -506,7 +506,22 @@ let rand = random()
|
|
|
506
506
|
if rand > 0.5 {print "Heads"} else {print "Tails"}
|
|
507
507
|
```
|
|
508
508
|
|
|
509
|
-
|
|
509
|
+
---
|
|
510
|
+
|
|
511
|
+
## Global Variables
|
|
512
|
+
|
|
513
|
+
### args
|
|
514
|
+
|
|
515
|
+
An array of strings containing the command-line arguments passed to the Sesi script. This excludes any Sesi interpreter options (e.g. `-l`) and the script filename itself.
|
|
516
|
+
|
|
517
|
+
```sesi
|
|
518
|
+
print "Number of script args:" len(args)
|
|
519
|
+
if len(args) > 0 {
|
|
520
|
+
print "First script argument:" args[0]
|
|
521
|
+
}
|
|
522
|
+
```
|
|
523
|
+
|
|
524
|
+
**Type**: `array<string>`
|
|
510
525
|
|
|
511
526
|
---
|
|
512
527
|
|
|
@@ -805,11 +820,15 @@ Tip: add a folder to SESI_PATH, or place shared modules in ~/.sesi/lib
|
|
|
805
820
|
|
|
806
821
|
## See Also
|
|
807
822
|
|
|
808
|
-
- [Quick Start](QUICKSTART.md)
|
|
823
|
+
- [Quick Start Guide](../QUICKSTART.md)
|
|
824
|
+
- [Language Specification](SPECIFICATION.md)
|
|
825
|
+
- [Runtime Architecture](ARCHITECTURE.md)
|
|
826
|
+
- [Built-in Functions Reference](BUILTINS.md)
|
|
827
|
+
- [Command Line Interface (CLI) Reference](CLI.md)
|
|
828
|
+
- [Image Generation & Input](IMAGE_GENERATION.md)
|
|
809
829
|
- [Compare to other languages](COMPARISON.md)
|
|
810
|
-
- [
|
|
811
|
-
- [Reasoning
|
|
812
|
-
- [
|
|
813
|
-
- [
|
|
814
|
-
- [
|
|
815
|
-
- [Examples](../examples/)
|
|
830
|
+
- [Concurrency & Coordination](CONCURRENCY.md)
|
|
831
|
+
- [Reasoning & Simple Logic](REASONING.md)
|
|
832
|
+
- [Agent-Native Programming Paradigm](agent_native_programming.md)
|
|
833
|
+
- [Historical Stress Test Chronicles](sesi_ai_chronicles.md)
|
|
834
|
+
- [Examples](../examples)
|
package/docs/CLI.md
ADDED
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
# ⚡ Sesi Command Line Interface Reference
|
|
2
|
+
|
|
3
|
+
Sesi’s CLI is a powerful, zero-footprint environment orchestrator. It allows you to run robust scripts, evaluate inline code filelessly, query the RAG-powered interactive Co-Pilot, encrypt files, and manage sandboxing controls directly from your shell.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 🗺️ CLI Command Reference Matrix
|
|
8
|
+
|
|
9
|
+
| Command Syntax | Execution Mode | File Dependency | Description |
|
|
10
|
+
| :--------------------------- | :-------------------- | :-------------------------------- | :---------------------------------------------------------------------------------- |
|
|
11
|
+
| `sesi <file>` | Standard | Yes | Runs the Sesi script file sequentially. |
|
|
12
|
+
| `sesi <file> <args...>` | **Parametric Script** | Yes | Runs the script and exposes trailing parameters in `args`. |
|
|
13
|
+
| `sesi -e "<code>"` | Inline Eval | **No (Fileless)** | Evaluates the string of Sesi code directly in-memory. |
|
|
14
|
+
| `sesi -e "<code>" <args...>` | **Parametric Eval** | **No (Fileless)** | Evaluates inline code and populates `args` array with inputs. |
|
|
15
|
+
| `sesi -h "<query>"` | Co-Pilot Help | **Yes (Internal chatbot script)** | Converses with Sesi's internal Vector-RAG chatbot (`chatbot/sesi_db_chatbot.sesi`). |
|
|
16
|
+
| `sesi <file> -h "<query>"` | Grounded Help | **Yes (Chatbot + context file)** | Converses with the Co-Pilot using both the vector DB and the user's file. |
|
|
17
|
+
| `sesi -r <file>` | AST Inspector | Yes | Dumps raw syntax tokens and AST nodes without running code. |
|
|
18
|
+
| `sesi -enc <file> -p <pass>` | Encryption | Yes | Secures a script file using AES-256 password protection. |
|
|
19
|
+
| `sesi -dec <file> -p <pass>` | Decryption | Yes | Decrypts an encrypted script file back to cleartext `.sesi`. |
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## 🚀 1. Parametric Script Execution
|
|
24
|
+
|
|
25
|
+
You can feed command-line arguments to Sesi scripts on launch. Sesi parses these inputs and binds them as standard string values in a globally accessible array called `args`.
|
|
26
|
+
|
|
27
|
+
### Usage
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
sesi main/test_args.sesi "hello" "world"
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### Accessing Arguments in Sesi Scripts
|
|
34
|
+
|
|
35
|
+
```sesi
|
|
36
|
+
// Get the number of inputs
|
|
37
|
+
let total = len(args)
|
|
38
|
+
|
|
39
|
+
// Access indices
|
|
40
|
+
if total > 0 {
|
|
41
|
+
print "First argument:" args[0]
|
|
42
|
+
}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## 🔮 2. Fileless Inline Execution (`-e` / `--eval`)
|
|
48
|
+
|
|
49
|
+
You do not need to create or save `.sesi` files on your disk to use Sesi. Using the `-e` flag, you can execute logic on the fly.
|
|
50
|
+
|
|
51
|
+
### A. Statement Termination Rules
|
|
52
|
+
|
|
53
|
+
Sesi requires statements to be terminated by either a **newline** or a **semicolon (`;`)**.
|
|
54
|
+
|
|
55
|
+
#### Single-line Semicolon Pattern
|
|
56
|
+
|
|
57
|
+
If writing on a single terminal line, separate statements manually with `;`:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
sesi -e "let x = 10; let y = 20; print x + y"
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
#### Multiline Shell Pattern
|
|
64
|
+
|
|
65
|
+
If writing a multiline string in your shell, omit semicolons completely:
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
sesi -e "
|
|
69
|
+
let x = 10
|
|
70
|
+
let y = 20
|
|
71
|
+
print x + y
|
|
72
|
+
"
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### B. Parametric Fileless Execution
|
|
76
|
+
|
|
77
|
+
You can pass CLI arguments to fileless inline scripts too! Any positional arguments coming after the inline code string are loaded into the global `args` array.
|
|
78
|
+
|
|
79
|
+
#### Example: Dynamic File Character Counter
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
sesi -e "let path = args[0]; let content = read_file(path); print 'Character count:' len(content)" "package.json"
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## 🎓 3. Interactive Co-Pilot Help (`-h` / `--help`)
|
|
88
|
+
|
|
89
|
+
Sesi’s CLI features an inline, dynamic RAG (Retrieval-Augmented Generation) co-pilot trained directly on Sesi's grammar rules, standard library, and architecture documentation.
|
|
90
|
+
|
|
91
|
+
### A. General Knowledge Queries (Fileless)
|
|
92
|
+
|
|
93
|
+
Ask Sesi how to write loops, parse JSON, what functions are available, what are the best practices in Sesi, etc:
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
sesi -h "how do I use standard json module?"
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### B. Context-Grounded Code Debugging
|
|
100
|
+
|
|
101
|
+
Pass a script file along with `-h` to chat with the co-pilot about your code. The co-pilot will automatically ingest the file contents as grounding context:
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
sesi examples/01_hello.sesi -h "how can i improve this script?"
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
## ⚙️ 4. Security & Sandbox Overrides
|
|
110
|
+
|
|
111
|
+
Sesi runs in a safe-by-default, zero-trust sandbox. System shell commands (`exec`, `spawn`) are blocked by default. Use these CLI flags to configure safety parameters:
|
|
112
|
+
|
|
113
|
+
### A. Disable Sandboxing (`-l` / `--local`)
|
|
114
|
+
|
|
115
|
+
Unlocks the execution of raw system commands and allows directory whitelist escapes:
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
sesi main/script.sesi --local
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### B. Directory Whitelisting (`-a` / `--allowed-paths`)
|
|
122
|
+
|
|
123
|
+
Adds custom directories to the safe path whitelist (Current Working Directory and Script Directory are whitelisted by default):
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
sesi main/script.sesi -a "./data,./logs"
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
## 📦 5. Systems Utilities
|
|
132
|
+
|
|
133
|
+
### A. AST Raw Parser Dumps (`-r` / `--raw`)
|
|
134
|
+
|
|
135
|
+
Inspect exactly how Sesi's lexer tokenizes and parses code before execution:
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
sesi -r examples/01_hello.sesi
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
### B. AES-256 Script Encryption (`-enc` & `-dec`)
|
|
142
|
+
|
|
143
|
+
Secure your proprietary reasoning instructions or pipelines using password-based encryption:
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
# Encrypt manually with password parameter
|
|
147
|
+
sesi -enc my_private_script.sesi -p "my-super-secret-password"
|
|
148
|
+
|
|
149
|
+
# Decrypt manually with password parameter
|
|
150
|
+
sesi -dec my_private_script.sesi -p "my-super-secret-password"
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
#### 🔒 Zero-Configuration Environment Fallback (`SESI_PASSWORD`)
|
|
154
|
+
|
|
155
|
+
To avoid exposing passwords in your shell's history, you can set the `SESI_PASSWORD` environment variable in your `.env` file (or your system's shell environment).
|
|
156
|
+
|
|
157
|
+
When Sesi detects `SESI_PASSWORD`, you can omit the `-p` parameter entirely:
|
|
158
|
+
|
|
159
|
+
```bash
|
|
160
|
+
# Encrypt automatically using SESI_PASSWORD from env
|
|
161
|
+
sesi -enc my_private_script.sesi
|
|
162
|
+
|
|
163
|
+
# Decrypt automatically using SESI_PASSWORD from env
|
|
164
|
+
sesi -dec my_private_script.sesi
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
## 🛠️ 6. Package.json Script Shortcuts
|
|
170
|
+
|
|
171
|
+
If you are working inside the Sesi repository, you can leverage native package manager shortcuts defined in `package.json` to execute, parse, or encrypt scripts:
|
|
172
|
+
|
|
173
|
+
| Package Script | CLI Equivalence | Description |
|
|
174
|
+
| :---------------------------------- | :------------------------ | :---------------------------------------------------- |
|
|
175
|
+
| `npm run lint` | `sesi lint.sesi` | Audits the entire workspace for errors/warnings. |
|
|
176
|
+
| `npm run lint <file>` | `sesi lint.sesi <file>` | Audits a single file and prints directly to terminal. |
|
|
177
|
+
| `npm run sesi <file>` | `sesi <file>` | Runs the Sesi script. |
|
|
178
|
+
| `npm run sesi:local <file>` | `sesi -l <file>` | Runs a script with safe-mode disabled. |
|
|
179
|
+
| `npm run sesi:eval "<code_to_run>"` | `sesi -e "<code_to_run>"` | Evaluates Sesi code in-memory. |
|
|
180
|
+
| `npm run sesi:parse <file>` | `sesi -r <file>` | Dumps the raw AST representation. |
|
|
181
|
+
| `npm run sesi:encrypt <file>` | `sesi -enc <file>` | Encrypts a file (using env password fallback). |
|
|
182
|
+
| `npm run sesi:decrypt <file>` | `sesi -dec <file>` | Decrypts a file (using env password fallback). |
|
|
183
|
+
| `npm run copilot "<query>"` | `sesi -h "<query>"` | Consults the RAG-trained Sesi Co-Pilot. |
|
|
184
|
+
| `npm run example:all` | `sesi examples.sesi` | Runs all examples in the examples/ directory. |
|
|
185
|
+
|
|
186
|
+
### Usage Example
|
|
187
|
+
|
|
188
|
+
```bash
|
|
189
|
+
# Audit the entire workspace and save report to lint_report.md
|
|
190
|
+
npm run lint
|
|
191
|
+
|
|
192
|
+
# Audit a single file and print Errors & Warnings directly to stdout
|
|
193
|
+
npm run lint bad-syntax-file.sesi
|
|
194
|
+
|
|
195
|
+
# Evaluate inline code
|
|
196
|
+
npm run sesi:eval "print 'Sesi running via npm!'"
|
|
197
|
+
|
|
198
|
+
# Encrypt a private script using the .env password
|
|
199
|
+
npm run sesi:encrypt "my-pipeline.sesi"
|
|
200
|
+
```
|
package/docs/COMPARISON.md
CHANGED
|
@@ -323,10 +323,15 @@ Sesi isn't just syntactic sugar. By embedding the AI runtime directly into the p
|
|
|
323
323
|
|
|
324
324
|
## See Also
|
|
325
325
|
|
|
326
|
-
- [
|
|
326
|
+
- [Quick Start Guide](../QUICKSTART.md)
|
|
327
327
|
- [Language Specification](SPECIFICATION.md)
|
|
328
|
-
- [
|
|
329
|
-
- [Built-in Functions](BUILTINS.md)
|
|
330
|
-
- [
|
|
331
|
-
- [
|
|
332
|
-
- [
|
|
328
|
+
- [Runtime Architecture](ARCHITECTURE.md)
|
|
329
|
+
- [Built-in Functions Reference](BUILTINS.md)
|
|
330
|
+
- [Command Line Interface (CLI) Reference](CLI.md)
|
|
331
|
+
- [Image Generation & Input](IMAGE_GENERATION.md)
|
|
332
|
+
- [Compare to other languages](COMPARISON.md)
|
|
333
|
+
- [Concurrency & Coordination](CONCURRENCY.md)
|
|
334
|
+
- [Reasoning & Simple Logic](REASONING.md)
|
|
335
|
+
- [Agent-Native Programming Paradigm](agent_native_programming.md)
|
|
336
|
+
- [Historical Stress Test Chronicles](sesi_ai_chronicles.md)
|
|
337
|
+
- [Examples](../examples)
|
|
@@ -19,7 +19,6 @@ Sesi follows these core principles:
|
|
|
19
19
|
```
|
|
20
20
|
Sesi/
|
|
21
21
|
├── SKILLS.md # Workspace context and repo guardrails
|
|
22
|
-
├── index.html # Sesi-generated systems landing page
|
|
23
22
|
├── eslint.config.mjs # ESLint configuration
|
|
24
23
|
├── example.js # Helper script to run basic examples
|
|
25
24
|
├── example-ai.js # Helper script to run reasoning examples
|
|
@@ -43,8 +42,6 @@ Sesi/
|
|
|
43
42
|
│ └── sesi.js # CLI executable
|
|
44
43
|
│
|
|
45
44
|
├── main/ # Playgrounds & debugging
|
|
46
|
-
│ ├── playground.sesi # Main playground script
|
|
47
|
-
│ ├── start.sesi # Beginner script
|
|
48
45
|
│ ├── build_website.sesi # Sesi-powered systems site generator
|
|
49
46
|
│ └── tests/ # Additional syntax validation scripts
|
|
50
47
|
│
|
|
@@ -52,11 +49,13 @@ Sesi/
|
|
|
52
49
|
│ ├── SPECIFICATION.md # Complete language spec (600+ lines)
|
|
53
50
|
│ ├── ARCHITECTURE.md # Runtime & system design (400+ lines)
|
|
54
51
|
│ ├── BUILTINS.md # Built-in functions reference (450+ lines)
|
|
52
|
+
│ ├── CLI.md # Comprehensive CLI & Parametric Eval guide
|
|
55
53
|
│ ├── COMPARISON.md # Language comparison showcase
|
|
56
54
|
│ ├── CONCURRENCY.md # Concurrency & coordination guide (>100 lines)
|
|
57
55
|
│ ├── IMAGE_GENERATION.md # Image generation guide (>100 lines)
|
|
58
56
|
│ ├── REASONING.md # Reasoning and simple logic guide (>500 lines)
|
|
59
57
|
│ ├── ROADMAP.md # V2-V4+ development plan (400+ lines)
|
|
58
|
+
│ ├── agent_native_programming.md # Sesi as an Agent-Native Programming paradigm
|
|
60
59
|
│ └── sesi_ai_chronicles.md # AI project history & notes
|
|
61
60
|
│
|
|
62
61
|
├── examples/
|
|
@@ -165,30 +164,31 @@ try { ... } catch (e) { ... }
|
|
|
165
164
|
- Block scope for loops/conditionals
|
|
166
165
|
- Closure support
|
|
167
166
|
|
|
168
|
-
### Integrated Reasoning Features ✅
|
|
169
|
-
|
|
170
167
|
**Prompt Blocks**
|
|
171
168
|
|
|
172
169
|
```sesi
|
|
173
170
|
prompt greeting {"Hello, " name "!"}
|
|
174
171
|
```
|
|
175
172
|
|
|
176
|
-
**
|
|
173
|
+
**Structured Output**
|
|
177
174
|
|
|
178
175
|
```sesi
|
|
179
|
-
let
|
|
176
|
+
let rawJson = "{\"projectName\": \"Sesi\", \"version\": \"1.3.0\", \"status\": \"active\"}"
|
|
177
|
+
let parsedRegistry = structured_output({projectName: string, version: string, status: string})(rawJson)
|
|
180
178
|
```
|
|
181
179
|
|
|
182
|
-
|
|
180
|
+
### Integrated Reasoning Features ✅
|
|
181
|
+
|
|
182
|
+
**Reasoning Calls**
|
|
183
183
|
|
|
184
184
|
```sesi
|
|
185
|
-
let response = model("gemini-3
|
|
185
|
+
let response = model("gemini-3-flash-preview") {temperature: 0.7, max_tokens: 1000} {"Your prompt here"}
|
|
186
186
|
```
|
|
187
187
|
|
|
188
|
-
**
|
|
188
|
+
**Web Search Grounding**
|
|
189
189
|
|
|
190
190
|
```sesi
|
|
191
|
-
let
|
|
191
|
+
let response = model("gemini-3.1-flash-lite") {search, max_tokens: 1000} {"What is the weather in Tokyo?"}
|
|
192
192
|
```
|
|
193
193
|
|
|
194
194
|
**Image Generation**
|
|
@@ -230,6 +230,10 @@ let response = model("gemini-3-flash-preview") {conversation}
|
|
|
230
230
|
print("Reasoning Response:", response)
|
|
231
231
|
```
|
|
232
232
|
|
|
233
|
+
## 🌍 Built-in Global Variables
|
|
234
|
+
|
|
235
|
+
- `args` (`array<string>`): Contains the command-line arguments passed to the script, excluding Sesi runtime options and the script path.
|
|
236
|
+
|
|
233
237
|
## 🛠️ Built-in Functions
|
|
234
238
|
|
|
235
239
|
### I/O
|
|
@@ -419,30 +423,30 @@ npm test
|
|
|
419
423
|
|
|
420
424
|
## 🎓 Example Programs
|
|
421
425
|
|
|
422
|
-
| File
|
|
423
|
-
|
|
|
424
|
-
| 01_hello.sesi
|
|
425
|
-
| 02_variables.sesi
|
|
426
|
-
| 03_functions.sesi
|
|
427
|
-
| 04_conditionals.sesi
|
|
428
|
-
| 05_loops.sesi
|
|
429
|
-
| 06_arrays_objects.sesi
|
|
430
|
-
| 07_prompts.sesi
|
|
431
|
-
| 08_model_call.sesi
|
|
432
|
-
| 09_structured_output.sesi
|
|
433
|
-
| 10_code_generation.sesi
|
|
434
|
-
| 11_memory_conversation.sesi
|
|
435
|
-
| 12_classification.sesi
|
|
436
|
-
| 13_data_pipeline.sesi
|
|
437
|
-
| 14_folder_explainer.sesi
|
|
438
|
-
| 15_image_generation.sesi
|
|
439
|
-
| 16_modules.sesi
|
|
440
|
-
| 17_http_client.sesi
|
|
441
|
-
| 18_parallel_requests.sesi
|
|
442
|
-
| 19_search_web.sesi
|
|
443
|
-
| 20_model_aliases.sesi
|
|
444
|
-
| 21_custom_tools.sesi
|
|
445
|
-
| 22_reasoning_plus_custom_tools.sesi | Compose reasoning & tools
|
|
426
|
+
| File | Demonstrates |
|
|
427
|
+
| ----------------------------------- | -------------------------------- |
|
|
428
|
+
| 01_hello.sesi | Basic print |
|
|
429
|
+
| 02_variables.sesi | Variables and operations |
|
|
430
|
+
| 03_functions.sesi | Functions, parameters, defaults |
|
|
431
|
+
| 04_conditionals.sesi | If/else logic |
|
|
432
|
+
| 05_loops.sesi | While, for, for-in |
|
|
433
|
+
| 06_arrays_objects.sesi | Collections and indexing |
|
|
434
|
+
| 07_prompts.sesi | Reasoning blocks |
|
|
435
|
+
| 08_model_call.sesi | Basic reasoning calls |
|
|
436
|
+
| 09_structured_output.sesi | Schema-guided output |
|
|
437
|
+
| 10_code_generation.sesi | Reasoning code generation |
|
|
438
|
+
| 11_memory_conversation.sesi | Multi-turn with memory |
|
|
439
|
+
| 12_classification.sesi | Reasoning classification loop |
|
|
440
|
+
| 13_data_pipeline.sesi | Complete pipeline |
|
|
441
|
+
| 14_folder_explainer.sesi | Directory parsing & reasoning |
|
|
442
|
+
| 15_image_generation.sesi | Image generation API test |
|
|
443
|
+
| 16_modules.sesi | Imports/exports & std namespaces |
|
|
444
|
+
| 17_http_client.sesi | HTTP GET and POST operations |
|
|
445
|
+
| 18_parallel_requests.sesi | Parallel request concurrency |
|
|
446
|
+
| 19_search_web.sesi | Web search integration |
|
|
447
|
+
| 20_model_aliases.sesi | Custom model naming aliases |
|
|
448
|
+
| 21_custom_tools.sesi | Custom runtime tool definitions |
|
|
449
|
+
| 22_reasoning_plus_custom_tools.sesi | Compose reasoning & tools |
|
|
446
450
|
|
|
447
451
|
## ✨ Unique Features
|
|
448
452
|
|
|
@@ -505,7 +509,7 @@ npm test
|
|
|
505
509
|
- **Simplicity**: Easy to understand, modify, extend
|
|
506
510
|
- **Debugging**: Can print AST and execution steps
|
|
507
511
|
- **Iteration**: No compilation overhead, fast development
|
|
508
|
-
- **Good enough**: Performance is adequate for v1
|
|
512
|
+
- **Good enough**: Performance is adequate for v1+
|
|
509
513
|
|
|
510
514
|
### Why recursive descent parser?
|
|
511
515
|
|
|
@@ -534,20 +538,23 @@ npm test
|
|
|
534
538
|
|
|
535
539
|
1. **Start**: [QUICKSTART.md](QUICKSTART.md) - Get running in 5 minutes
|
|
536
540
|
2. **Builtins**: [BUILTINS.md](docs/BUILTINS.md) - Built-in functions
|
|
537
|
-
3. **
|
|
538
|
-
4. **
|
|
539
|
-
5. **
|
|
540
|
-
6. **
|
|
541
|
-
7. **
|
|
542
|
-
8. **
|
|
543
|
-
9. **
|
|
544
|
-
10. **
|
|
545
|
-
11. **
|
|
546
|
-
12. **
|
|
547
|
-
13. **
|
|
548
|
-
14. **
|
|
549
|
-
15. **
|
|
550
|
-
16. **
|
|
541
|
+
3. **CLI**: [CLI.md](docs/CLI.md) - Complete CLI flags & parametric execution guide
|
|
542
|
+
4. **Basics**: examples/01-06 - Core language features
|
|
543
|
+
5. **Prompts**: examples/07 - Prompt blocks
|
|
544
|
+
6. **Reasoning**: examples/08-12 - Reasoning feature exploration
|
|
545
|
+
7. **Advanced**: [REASONING.md](docs/REASONING.md) - Patterns and best practices
|
|
546
|
+
8. **Systems**: examples/13-14 - Systems reasoning and data pipelines
|
|
547
|
+
9. **Modules**: examples/16 - Modules & std library namespaces
|
|
548
|
+
10. **Image Generation**: [IMAGE_GENERATION.md](docs/IMAGE_GENERATION.md) examples/15 - Generating images natively
|
|
549
|
+
11. **Concurrency**: examples/17-18 - Concurrency & coordination
|
|
550
|
+
12. **Web Search**: examples/19 - Web search integration
|
|
551
|
+
13. **Model Aliases**: examples/20 - Custom model naming aliases
|
|
552
|
+
14. **Custom Tools**: examples/21-22 - Custom runtime tool definitions and compose reasoning with custom tools
|
|
553
|
+
15. **Agent-Native Paradigm**: [agent_native_programming.md](docs/agent_native_programming.md) - Paradigms of LLM-native coding
|
|
554
|
+
16. **AI History**: [sesi_ai_chronicles.md](docs/sesi_ai_chronicles.md) - Sesi's historical development and stress tests
|
|
555
|
+
17. **Specification**: [SPECIFICATION.md](docs/SPECIFICATION.md) - Complete grammar
|
|
556
|
+
18. **Architecture**: [ARCHITECTURE.md](docs/ARCHITECTURE.md) - How it works
|
|
557
|
+
19. **Roadmap**: [ROADMAP.md](docs/ROADMAP.md) - Future vision
|
|
551
558
|
|
|
552
559
|
## 🤝 Contributing Path
|
|
553
560
|
|