@misterscan/sesi 1.1.2 → 1.2.1

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 (79) hide show
  1. package/README.md +29 -8
  2. package/bin/sesi.js +35 -34
  3. package/dist/ai-runtime.d.ts +5 -0
  4. package/dist/ai-runtime.d.ts.map +1 -1
  5. package/dist/ai-runtime.js +157 -7
  6. package/dist/ai-runtime.js.map +1 -1
  7. package/dist/builtins.d.ts +1 -1
  8. package/dist/builtins.d.ts.map +1 -1
  9. package/dist/builtins.js +114 -1
  10. package/dist/builtins.js.map +1 -1
  11. package/dist/interpreter.d.ts +6 -1
  12. package/dist/interpreter.d.ts.map +1 -1
  13. package/dist/interpreter.js +210 -36
  14. package/dist/interpreter.js.map +1 -1
  15. package/dist/parser.d.ts.map +1 -1
  16. package/dist/parser.js +2 -0
  17. package/dist/parser.js.map +1 -1
  18. package/dist/sesi.bundled.js +1029 -489
  19. package/dist/types.d.ts +9 -1
  20. package/dist/types.d.ts.map +1 -1
  21. package/dist/types.js.map +1 -1
  22. package/docs/ARCHITECTURE.md +9 -9
  23. package/docs/BUILTINS.md +87 -8
  24. package/docs/DISTRIBUTED_SYSTEMS.md +1 -1
  25. package/docs/IMAGE_GENERATION.md +82 -1
  26. package/docs/IMPLEMENTATION_SUMMARY.md +544 -533
  27. package/docs/QUICKSTART.md +41 -1
  28. package/docs/README.md +20 -14
  29. package/docs/ROADMAP.md +10 -11
  30. package/docs/SPECIFICATION.md +37 -14
  31. package/docs/SYSTEMS_REASONING.md +35 -11
  32. package/docs/bakery_logo.png +0 -0
  33. package/docs/coffee_mug.png +0 -0
  34. package/docs/desk_lamp.png +0 -0
  35. package/docs/favicon.ico +0 -0
  36. package/docs/logo.png +0 -0
  37. package/docs/notebook.png +0 -0
  38. package/docs/sesi_ai_chronicles.md +209 -0
  39. package/examples/16_modules.sesi +28 -0
  40. package/examples/17_http_client.sesi +29 -0
  41. package/examples/18_parallel_requests.sesi +37 -0
  42. package/main/chatbot.sesi +36 -0
  43. package/main/conversational_classifier_weights.json +45 -0
  44. package/main/conversational_sentences.json +304 -0
  45. package/main/epochs.sesi +94 -0
  46. package/main/gpu_orchestrator.sesi +36 -0
  47. package/main/hardware_diagnostics.sesi +118 -0
  48. package/main/inference.sesi +54 -0
  49. package/main/native_chatbot.sesi +180 -0
  50. package/main/native_synthesizer.sesi +83 -0
  51. package/main/nn_personas_trainer.sesi +302 -0
  52. package/main/nn_responses_trainer.sesi +269 -0
  53. package/main/nn_sentences_trainer.sesi +330 -0
  54. package/main/personas.json +124 -0
  55. package/main/personas_classifier_weights.json +45 -0
  56. package/main/playground.sesi +3 -1
  57. package/main/predictive_typing.sesi +127 -0
  58. package/main/query_brain.sesi +45 -0
  59. package/main/response_classifier_weights.json +45 -0
  60. package/main/retro_chat.html +239 -0
  61. package/main/retro_chat_generator.sesi +745 -0
  62. package/main/sesi_ai.sesi +158 -0
  63. package/main/sesi_db_chatbot.sesi +252 -0
  64. package/main/terminal.log +56 -0
  65. package/main/terminal_chat.py +385 -0
  66. package/main/tests/temp_math_mod.sesi +3 -0
  67. package/main/tests/test_image_input.sesi +40 -0
  68. package/main/tests/test_v2_features.sesi +48 -0
  69. package/main/unified_sesi_ai.sesi +334 -0
  70. package/main/varied_responses.json +304 -0
  71. package/package.json +27 -15
  72. package/main/atm_deposit.sesi +0 -37
  73. package/main/atm_withdraw.sesi +0 -37
  74. package/main/data.txt +0 -1
  75. package/main/math_aggregator.sesi +0 -15
  76. package/main/math_generator.sesi +0 -7
  77. package/main/math_processor.sesi +0 -23
  78. package/main/tax_calculator.sesi +0 -15
  79. package/main/vault.sesi +0 -15
@@ -163,9 +163,14 @@ print "Both workers are now running concurrently."
163
163
  ```sesi
164
164
  print value // Print to stdout
165
165
  read_file(path) // Read a file as text
166
+ from_json(path) // Read a JSON file
166
167
  write_file(path, content) // Write text to a file
167
168
  write_image(path, content) // Write base64 encoded image to a file
168
169
  list_dir(path) // List directory contents
170
+ spawn(path) // Launch concurrent background process
171
+ exec(command) // Synchronous shell execution
172
+ time() // Unix timestamp (ms)
173
+ random() // Random number (0-1)
169
174
  ```
170
175
 
171
176
  ### Type Checking
@@ -191,6 +196,24 @@ values(object) // Get object values
191
196
  range(n) // Create [0, 1, ..., n-1]
192
197
  ```
193
198
 
199
+ ### Network & Concurrency
200
+
201
+ ```sesi
202
+ web_get(url, headers = {}) // Natively fetch from URL via HTTP GET
203
+ web_send(url, body, headers = {}) // Natively post body to URL via HTTP POST
204
+ multi_req(array<function>) // Run multiple tasks/requests physically in parallel
205
+ ```
206
+
207
+ ### Standard Library Modules
208
+
209
+ Standard library features are available natively in **v1.2.0** using imports:
210
+
211
+ ```sesi
212
+ import { PI, sqrt } from "std/math"
213
+ import { sleep, now } from "std/time"
214
+ import { stringify, parse } from "std/json"
215
+ ```
216
+
194
217
  ## Running Examples
195
218
 
196
219
  Try the included examples:
@@ -214,7 +237,12 @@ sesi examples/13_data_pipeline.sesi
214
237
  sesi examples/14_folder_explainer.sesi
215
238
 
216
239
  # Image generation example
217
- sesi example/15_image_generation.sesi
240
+ sesi examples/15_image_generation.sesi
241
+
242
+ # Advanced Version 1.2 features
243
+ sesi examples/16_modules.sesi
244
+ sesi examples/17_http_client.sesi
245
+ sesi examples/18_parallel_requests.sesi
218
246
  ```
219
247
 
220
248
  ## Common Patterns
@@ -311,6 +339,18 @@ else {print "Response: " response}
311
339
 
312
340
  ## Getting Help
313
341
 
342
+ Sesi comes with an advanced, built-in **Interactive RAG Co-Pilot** right in your command line! Instead of static help messages, you can query Sesi directly about how to use any statement, standard library, or architectural pattern:
343
+
344
+ ```bash
345
+ # Ask the Sesi Co-Pilot for help directly
346
+ sesi -help "how do I parse a JSON string?"
347
+ sesi --help "explain structured_output and give an example"
348
+ sesi -h "how to spawn background processes?"
349
+ ```
350
+
351
+ The co-pilot will dynamically index and train on Sesi's native repository database and retrieve full RAG context from our standard specification docs to generate a syntactically correct, 100% accurate, conversational answer in real-time!
352
+
353
+ You can also:
314
354
  - Check documentation in [docs/](docs/)
315
355
  - Review examples in [examples/](/examples/)
316
356
  - Read error messages carefully
package/docs/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  <p align="center">
2
- <img src="./sesi-logo.svg" alt="Sesi Logo" width="250" />
2
+ <img src="favicon.ico" alt="Sesi Logo" height="100" />
3
3
  </p>
4
4
 
5
5
  <h1 align="center">Sesi: A High-Performance Systems Language</h1>
@@ -69,14 +69,14 @@ print code
69
69
 
70
70
  ## Documentation
71
71
 
72
- - [Getting Started](QUICKSTART.md)
72
+ - [Getting Started](https://github.com/Misterscan/Sesi/blob/main/QUICKSTART.md)
73
73
  - [Examples](./examples/)
74
- - [Language Specification](SPECIFICATION.md)
75
- - [Language Comparison Showcase](COMPARISON.md)
76
- - [Built-in Functions](BUILTINS.md)
77
- - [Reasoning Guide](.SYSTEMS_REASONING.md)
78
- - [Distributed Systems](DISTRIBUTED_SYSTEMS.md)
79
- - [Runtime Architecture](ARCHITECTURE.md)
74
+ - [Language Specification](https://github.com/Misterscan/Sesi/blob/main/docs/SPECIFICATION.md)
75
+ - [Language Comparison Showcase](https://github.com/Misterscan/Sesi/blob/main/docs/COMPARISON.md)
76
+ - [Built-in Functions](https://github.com/Misterscan/Sesi/blob/main/docs/BUILTINS.md)
77
+ - [Reasoning Guide](https://github.com/Misterscan/Sesi/blob/main/docs/SYSTEMS_REASONING.md)
78
+ - [Distributed Systems](https://github.com/Misterscan/Sesi/blob/main/docs/DISTRIBUTED_SYSTEMS.md)
79
+ - [Runtime Architecture](https://github.com/Misterscan/Sesi/blob/main/docs/ARCHITECTURE.md)
80
80
 
81
81
  ## AI Agent Context
82
82
 
@@ -85,7 +85,7 @@ The root-level `SKILLS.md` file is a workspace context file for AI agents. It re
85
85
  ## Project Structure
86
86
 
87
87
  ```
88
- sesi-programming-lang/
88
+ Sesi/
89
89
  ├── SKILLS.md # AI-agent workspace context and repo guardrails
90
90
  ├── index.html # Sesi-generated landing page
91
91
  ├── eslint.config.mjs # ESLint configuration
@@ -106,7 +106,7 @@ sesi-programming-lang/
106
106
  │ └── index.ts # Main entry point
107
107
  ├── bin/
108
108
  │ └── sesi.js # CLI executable
109
- ├── examples/ # 15 sample programs demonstrating all features
109
+ ├── examples/ # 18 sample programs demonstrating all features
110
110
  ├── main/ # Main entry and specialized tests
111
111
  │ ├── playground.sesi # Main playground script
112
112
  │ ├── start.sesi # Beginner script
@@ -116,7 +116,7 @@ sesi-programming-lang/
116
116
  └── docs/ # Documentation (ARCHITECTURE, BUILTINS, SPECIFICATION, etc.)
117
117
  ```
118
118
 
119
- ## Version 1.1 Features (Complete)
119
+ ## Version 1.2 Features (In Progress)
120
120
 
121
121
  ### Core Language ✅
122
122
 
@@ -125,6 +125,11 @@ sesi-programming-lang/
125
125
  - **Control Flow**: `if/else`, `while`, `for`, and `try/catch`.
126
126
  - **Collections**: Robust Arrays and Objects.
127
127
  - **Error Handling**: Structured `try/catch` for both runtime and Reasoning-level errors.
128
+ - **Local Module Imports/Exports**: Import custom local `.sesi` modules cleanly using relative import/export syntax!
129
+ - **Standard Library Modules**: Native support for imported standard libraries, including:
130
+ - `std/math` (providing `PI`, `E`, `sqrt`, `pow`, `sin`, `cos`, etc.)
131
+ - `std/time` (providing `sleep` and `now`)
132
+ - `std/json` (providing JSON serialization/deserialization)
128
133
 
129
134
  ### Reasoning-Native Features ✅
130
135
 
@@ -135,7 +140,10 @@ sesi-programming-lang/
135
140
  - `tool_call()` for function calling
136
141
  - Basic memory for multi-turn reasoning
137
142
  - `read_file()`, `write_file()`, `to_json()`, `write_image()`, and `list_dir()` for local file I/O
138
- - **Native Orchestration**: `spawn()` and `exec()` for concurrent process management
143
+ - **Native Concurrency**: `spawn()` and `exec()` for concurrent process management, and `multi_req(array<function>)` for physical parallel request execution.
144
+ - **Logic Caching**: High-efficiency Sesi Logic Caching (`.sesi_cache.json`) for local call caching.
145
+ - **Thinking Scale**: Scaled Gemini reasoning configurations using the `thinking` parameters.
146
+ - **HTTP Client**: Built-in, native HTTP client support using `web_get(url)` and `web_send(url, body, headers)` with zero external dependencies.
139
147
  - **Async Polling**: Native looping to auto-resume generation when hitting `MAX_TOKENS` limit
140
148
  - **Utility Builtins**: `time()` and `random()` for robust coordination
141
149
 
@@ -150,8 +158,6 @@ sesi-programming-lang/
150
158
  ### V2: Advanced Reasoning
151
159
 
152
160
  - Long-term memory and context management
153
- - Parallel model calls
154
- - Advanced error handling with Reasoning fallbacks
155
161
  - Custom tool definitions
156
162
  - Streaming responses
157
163
 
package/docs/ROADMAP.md CHANGED
@@ -51,20 +51,19 @@
51
51
  - No async/await
52
52
  - Blocking Reasoning calls
53
53
  - Limited error messages
54
- - No module system (imports/exports planned)
55
54
  - No pattern matching
56
55
  - No generics or custom types
57
56
 
58
57
  ---
59
58
 
60
- ## Version 1.1 - Stability & Systems Logic (Complete)
59
+ ## Version 1.2 - Stability & Systems Logic (In Progress)
61
60
 
62
- **Status**: Complete V1.1 implementation
61
+ **Status**: In Progress V1.2 implementation
63
62
  **Ready for**: Distributed systems orchestration and prototypes
64
63
  **Not ready for**: Massive-scale production (until v2.0 bytecode)
65
64
  **Next milestone**: V2.0 (Async & advanced reasoning)
66
65
 
67
- ### Improvements & Features
66
+ ### Improvements & Features
68
67
 
69
68
  - [x] Systems Builtins: `spawn`, `exec`, `time`, `random`
70
69
  - [x] Concurrency: Async polling via file locks for completion and MAX_TOKENS
@@ -99,14 +98,14 @@
99
98
  ### Async/Await Support
100
99
 
101
100
  - [ ] async/await syntax (language level)
102
- - [ ] Parallel reasoning calls (native)
101
+ - [x] Parallel reasoning calls (native)
103
102
  - [ ] Promise-like operations
104
103
  - [x] Concurrent execution (Multi-process via `spawn`)
105
104
 
106
105
  ### Advanced Reasoning Features
107
106
 
108
107
  - [ ] Streaming responses
109
- - [ ] Extended thinking/reasoning budget
108
+ - [x] Extended thinking/reasoning budget
110
109
  - [ ] Multi-step reasoning workflows
111
110
  - [ ] Tool composition and piping
112
111
  - [ ] Custom tool definitions
@@ -131,7 +130,7 @@
131
130
  ### Performance
132
131
 
133
132
  - [ ] Bytecode compilation
134
- - [ ] Logic caching
133
+ - [x] Logic caching
135
134
  - [ ] Token counting and cost estimation
136
135
  - [ ] Lazy evaluation
137
136
 
@@ -142,12 +141,12 @@
142
141
  - [ ] Math functions (sqrt, sin, cos, floor, ceil, etc.)
143
142
  - [ ] Date/time functions
144
143
  - [ ] JSON parsing and serialization
145
- - [ ] HTTP client (get, post)
144
+ - [x] HTTP client (get, post)
146
145
 
147
146
  ### Module System
148
147
 
149
- - [ ] import/export statements
150
- - [ ] Standard library modules (std/math, std/time, etc.)
148
+ - [x] import/export statements
149
+ - [x] Standard library modules (std/math, std/time, etc.)
151
150
  - [ ] Third-party package management
152
151
  - [ ] Namespace support
153
152
 
@@ -273,7 +272,7 @@
273
272
 
274
273
  ```
275
274
  2026 Q2
276
- └─ v1.1 - Polish & stabilize
275
+ └─ v1.2 - Polish & stabilize
277
276
 
278
277
  2026 Q3-Q4
279
278
  └─ v2.0 - Advanced Reasoning & async
@@ -1,4 +1,4 @@
1
- # Sesi Systems Language Specification (v1.1)
1
+ # Sesi Systems Language Specification (v1.2)
2
2
 
3
3
  ## 1. Philosophy & Design Principles
4
4
 
@@ -27,7 +27,7 @@ Sesi is built on these core principles:
27
27
  - Concurrent process management and distributed locking
28
28
  - Multi-stage reasoning workflows with stateful memory
29
29
 
30
- ## 3. V1.1 Feature Set (Current)
30
+ ## 3. V1.2 Feature Set (Current)
31
31
 
32
32
  ### Core Language Features
33
33
 
@@ -47,6 +47,7 @@ Sesi is built on these core principles:
47
47
  - ✅ `prompt` blocks (composable message templates)
48
48
  - ✅ `model()` calls (native model with configuration)
49
49
  - ✅ `image()` calls (native image generation with configuration)
50
+ - ✅ `images` config key (multimodal vision input for `model()` and `image()`)
50
51
  - ✅ `structured_output()` (schema-guided structured output with JSON recovery and empty-object fallback on failure)
51
52
  - ✅ `tool_call()` (Fully functional function calling via models)
52
53
  - ✅ Simple memory (conversation context)
@@ -222,17 +223,28 @@ prompt codeReview {"Review this code for bugs:" code "Provide specific issues fo
222
223
  #### Model & Image Calls
223
224
 
224
225
  ```
225
- model_call := 'model' '('STRING')' '{'config (optional)'}' '{'prompt'}'
226
- | 'model' '('STRING')' '{'prompt'}'
227
- image_call := 'image' '('STRING')' '{'config (optional)'}' '{'prompt'}'
228
- | 'image' '('STRING')' '{'prompt'}'
229
- config := ((STRING | identifier) ':' expression (',' (STRING | identifier) ':' expression)*)?
226
+ model_call := 'model' '('STRING')' config_block? '{'prompt'}'
227
+ image_call := 'image' '('STRING')' config_block? '{'prompt'}'
228
+ config_block := '{' config_entry (',' config_entry)* '}'
229
+ config_entry := (STRING | identifier) ':' expression
230
230
  ```
231
231
 
232
+ **Config keys:**
233
+
234
+ | Key | Applies to | Type | Description |
235
+ |-----|-----------|------|-------------|
236
+ | `temperature` | `model`, `image` | `number` | Sampling temperature (0.0–1.0) |
237
+ | `max_tokens` | `model` | `number` | Max output token count |
238
+ | `top_k` | `model` | `number` | Top-K diversity |
239
+ | `top_p` | `model` | `number` | Nucleus sampling |
240
+ | `ratio` | `image` | `string` | Aspect ratio e.g. `"16:9"` |
241
+ | `size` | `image` | `string` | `"512"`, `"1K"`, `"2K"`, `"4K"` |
242
+ | `images` | `model`, `image` | `string \| array<string>` | Local file path(s) passed as visual input |
243
+
232
244
  Example:
233
245
 
234
246
  ```sesi
235
- let result = model("gemini-3.1-flash-lite") {codeReview}
247
+ let result = model("gemini-3-flash-preview") {images: "scan.png", temperature: 0} {"Transcribe all visible text."}
236
248
  let output = model("gemini-3.1-flash-lite") {"temperature": 0.4, "max_tokens": 2000} {prompt}
237
249
  ```
238
250
 
@@ -283,7 +295,7 @@ optional_type := type '?'
283
295
 
284
296
  1. **Short-circuit evaluation**: `&&` and `||` short-circuit
285
297
  2. **Type coercion**: Automatic for numeric operations; explicit for string/number
286
- 3. **Null propagation**: Operations on `null` return `null` (no exceptions in v1.1)
298
+ 3. **Null propagation**: Operations on `null` return `null` (no exceptions in v1.2)
287
299
  4. **Model responses**: Always returned as strings initially; structured_output provides type safety
288
300
 
289
301
  ## 6. Scope and Binding
@@ -345,7 +357,7 @@ random() -> number // Random float (0.0 to 1.0)
345
357
 
346
358
  ## 9. Module System
347
359
 
348
- Parser support for `import` / `export` syntax exists in v1.1, but runtime module execution is not implemented yet.
360
+ Runtime module execution and standard namespace modules are fully implemented and natively supported in v1.1.2.
349
361
 
350
362
  ### Defining Modules
351
363
 
@@ -378,15 +390,18 @@ import json from "std/json" // JSON parsing
378
390
  Prompts are composable message templates:
379
391
 
380
392
  ```sesi
381
- prompt translate {"Translate the following to Spanish:" sourceText}
393
+ prompt translate {"translate the following to Spanish:" sourceText}
382
394
  prompt summarize {"Summarize this in 3 sentences:" text}
383
- prompt combined {summarize "Now translate:" translate}
395
+ prompt combined {summarize " Now " translate}
384
396
  ```
385
397
 
386
398
  ### Model & Image Calls
387
399
 
400
+ Model calls can take optional configuration parameters (written on a single line) followed by one or more prompts/strings.
401
+
388
402
  ```sesi
389
- let response = model("gemini-3-flash-preview") {"temperature": 0} {"Say hello"}
403
+ // Model call with temperature and thinking scale configuration
404
+ let response = model("gemini-3.1-pro-preview") {"thinkingLevel": {"thinking": "yes", "level": "low"}, "temperature": 0} {"Say hello"}
390
405
  print response // Returns string
391
406
 
392
407
  let logo = image("gemini-3.1-flash-image-preview") {ratio: "1:1", size: "512"} {"A vector logo"}
@@ -394,6 +409,14 @@ write_image("logo.png", logo)
394
409
  print "Image written to logo.png"
395
410
  ```
396
411
 
412
+ #### Config Block Options:
413
+ - **`temperature`**: `number` (0.0 to 1.0)
414
+ - **`max_tokens`**: `number` (maximum response tokens)
415
+ - **`images`**: `string` or `array<string>` (paths to multimodal vision input files)
416
+ - **`thinkingLevel`**: `object` with keys `"thinking"` (`"yes"` | `"no"`) and `"level"` (`"low"` | `"medium"` | `"high"`) - natively configures and scales Gemini's reasoning budget.
417
+ - **`cache`**: `bool` (set to `false` to explicitly bypass Sesi Logic Caching)
418
+
419
+
397
420
  ### Structured Output
398
421
 
399
422
  ```sesi
@@ -444,7 +467,7 @@ print sentiment.label
444
467
  print sentiment.score
445
468
  ```
446
469
 
447
- ## 12. Undefined Behavior & Limitations (V1.1)
470
+ ## 12. Undefined Behavior & Limitations (V1.2)
448
471
 
449
472
  - **No async/await**: All operations within a script are blocking (including model calls). Concurrency must be achieved via `spawn()`.
450
473
  - **No custom types**: Only built-in types are supported natively.
@@ -86,7 +86,7 @@ print greeting // "Hello, Alice! How are you?"
86
86
 
87
87
  ```sesi
88
88
  prompt part1 {"First part"}
89
- prompt part2 {part1 " " "Second part"}
89
+ prompt part2 {part1 " Second part"}
90
90
  print part2 // "First part Second part"
91
91
  ```
92
92
 
@@ -96,7 +96,7 @@ print part2 // "First part Second part"
96
96
  let text = "Testing"
97
97
  let language = "Spanish"
98
98
  fn translatePrompt(text: string, language: string) -> string
99
- {prompt translate {"Translate the following text to "language": " text} return translate}
99
+ {prompt translate {"Translate " text " to " language ": "} return translate}
100
100
  print translatePrompt(text, language)
101
101
  ```
102
102
 
@@ -129,7 +129,7 @@ print creative
129
129
  ```sesi
130
130
  // Fast model for simple tasks
131
131
  let text = " Coding with Reasoning systems language is fun!"
132
- let quick = model("gemini-3.1-flash-lite") {"Summarize this in one sentence:" text}
132
+ let quick = model("gemini-3-flash-preview") {"Summarize this in one sentence:" text}
133
133
 
134
134
  // Powerful model for complex reasoning
135
135
  let code = "def calculate_sum(n):
@@ -148,16 +148,16 @@ print smart
148
148
  print cheap
149
149
  ```
150
150
 
151
- ### Available Models (v1.1)
151
+ ### Available Models (v1.2)
152
152
 
153
153
  - `gemini-2.5-flash` - Legacy, but supported. 1M tokens.
154
154
  - `gemini-2.5-pro` - Legacy, but supported. 1M tokens.
155
- - `gemini-2.5-flash-image` - Legacy, but reliable.
155
+ - `gemini-2.5-flash-image` - Standard image model. (No `512` image size support for this model. Only `1K` is supported.)
156
156
  - `gemini-3-flash-preview` - Fast, balanced, 1M tokens
157
- - `gemini-3.1-pro-preview` - Most capable, 1M tokens
157
+ - `gemini-3.1-pro-preview` - Most capable, 1M tokens (Doesn't support `minimal` thinking. Only `low`, `medium`, and `high` are supported.)
158
158
  - `gemini-3.1-flash-lite` - Fastest, cost-efficient
159
159
  - `gemini-3.1-flash-image-preview` - Cost efficient while maintaining quality images.
160
- - `gemini-3-pro-image-preview` - High quality image generation.
160
+ - `gemini-3-pro-image-preview` - High quality image generation. (No `512` image size support for this model.)
161
161
 
162
162
  #### Planned for (v2+)
163
163
 
@@ -166,6 +166,29 @@ print cheap
166
166
  - `Midjourney` integration
167
167
  - `Newer Reasoning Models` - Native upgrades
168
168
 
169
+ ### Passing Images as Input
170
+
171
+ Pass one or more local image files to `model()` or `image()` via the `images` config key. The runtime reads each file, base64-encodes it, and injects it as a vision part before the prompt text.
172
+
173
+ ```sesi
174
+ // Single image
175
+ let referenceImage = "stills/frame_03.jpg"
176
+ let caption = model("gemini-3-flash-preview") {images: referenceImage} {"What is the subject of this photograph?"}
177
+ print caption
178
+
179
+ // Multiple images
180
+ let pair = ["ref_a.png", "ref_b.png"]
181
+ let diff = model("gemini-3-flash-preview") {images: pair} {"List every visual difference between these two."}
182
+ print diff
183
+
184
+ // Mixed with other config keys
185
+ let scannedDocument = "doc_scan.jpg"
186
+ let result = model("gemini-3.1-flash-lite") {images: scannedDocument, temperature: 0, max_tokens: 2048} {"Transcribe all text visible in this scan."}
187
+ write_file("transcript.txt", result)
188
+ ```
189
+
190
+ See [Image Generation & Input](IMAGE_GENERATION.md) for the full reference.
191
+
169
192
  ## 3. Structured Output
170
193
 
171
194
  Get typed responses from Reasoning with field validation.
@@ -346,6 +369,8 @@ write_image("logo.png", logo)
346
369
  print "Image generated!"
347
370
  ```
348
371
 
372
+ ![Sesi Logo](logo.png)
373
+
349
374
  ### Code Generation
350
375
 
351
376
  ```sesi
@@ -371,7 +396,7 @@ print analyzeSentiment(text)
371
396
 
372
397
  Reasoning operations can fail. Handle gracefully.
373
398
 
374
- ### Try/Catch (v1.1)
399
+ ### Try/Catch (v1.2)
375
400
 
376
401
  ```sesi
377
402
  try
@@ -492,11 +517,10 @@ let summary = model("gemini-3-flash-preview") {"Summarize with topics " topics "
492
517
  print "Summary:" smartSummarize(text)
493
518
  ```
494
519
 
495
- ### Reasoning Pattern (V2: native support)
520
+ ### Reasoning Pattern
496
521
 
497
522
  ```sesi
498
- // Future: Extended thinking
499
- let analysis = model("gemini-3-flash-preview") {"temperature": 0, "thinking_level": "low"} {"Reason carefully about:" problem}
523
+ let analysis = model("gemini-3-flash-preview") {"thinkingLevel": {"thinking": "yes", "level": "medium"}, "temperature": 0, "max_tokens": 8192} {"Reason carefully about:" problem}
500
524
  print analysis
501
525
  ```
502
526
 
Binary file
Binary file
Binary file
Binary file
package/docs/logo.png ADDED
Binary file
Binary file