@misterscan/sesi 1.1.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 (82) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +191 -0
  3. package/bin/sesi.js +56 -0
  4. package/dist/ai-runtime.d.ts +15 -0
  5. package/dist/ai-runtime.d.ts.map +1 -0
  6. package/dist/ai-runtime.js +214 -0
  7. package/dist/ai-runtime.js.map +1 -0
  8. package/dist/builtins.d.ts +7 -0
  9. package/dist/builtins.d.ts.map +1 -0
  10. package/dist/builtins.js +473 -0
  11. package/dist/builtins.js.map +1 -0
  12. package/dist/index.d.ts +3 -0
  13. package/dist/index.d.ts.map +1 -0
  14. package/dist/index.js +72 -0
  15. package/dist/index.js.map +1 -0
  16. package/dist/interpreter.d.ts +36 -0
  17. package/dist/interpreter.d.ts.map +1 -0
  18. package/dist/interpreter.js +495 -0
  19. package/dist/interpreter.js.map +1 -0
  20. package/dist/lexer.d.ts +26 -0
  21. package/dist/lexer.d.ts.map +1 -0
  22. package/dist/lexer.js +340 -0
  23. package/dist/lexer.js.map +1 -0
  24. package/dist/parser.d.ts +55 -0
  25. package/dist/parser.d.ts.map +1 -0
  26. package/dist/parser.js +1022 -0
  27. package/dist/parser.js.map +1 -0
  28. package/dist/types.d.ts +304 -0
  29. package/dist/types.d.ts.map +1 -0
  30. package/dist/types.js +63 -0
  31. package/dist/types.js.map +1 -0
  32. package/docs/ARCHITECTURE.md +430 -0
  33. package/docs/BUILTINS.md +577 -0
  34. package/docs/COMPARISON.md +334 -0
  35. package/docs/DISTRIBUTED_SYSTEMS.md +71 -0
  36. package/docs/IMAGE_GENERATION.md +76 -0
  37. package/docs/IMPLEMENTATION_SUMMARY.md +533 -0
  38. package/docs/QUICKSTART.md +351 -0
  39. package/docs/README.md +191 -0
  40. package/docs/ROADMAP.md +408 -0
  41. package/docs/SPECIFICATION.md +462 -0
  42. package/docs/SYSTEMS_REASONING.md +522 -0
  43. package/examples/01_hello.sesi +2 -0
  44. package/examples/02_variables.sesi +11 -0
  45. package/examples/03_functions.sesi +6 -0
  46. package/examples/04_conditionals.sesi +6 -0
  47. package/examples/05_loops.sesi +12 -0
  48. package/examples/06_arrays_objects.sesi +18 -0
  49. package/examples/07_prompts.sesi +10 -0
  50. package/examples/08_model_call.sesi +5 -0
  51. package/examples/09_structured_output.sesi +7 -0
  52. package/examples/10_code_generation.sesi +5 -0
  53. package/examples/11_memory_conversation.sesi +16 -0
  54. package/examples/12_classification.sesi +8 -0
  55. package/examples/13_data_pipeline.sesi +35 -0
  56. package/examples/14_folder_explainer.sesi +58 -0
  57. package/examples/15_image_generation.sesi +17 -0
  58. package/main/atm_deposit.sesi +37 -0
  59. package/main/atm_withdraw.sesi +37 -0
  60. package/main/data.txt +1 -0
  61. package/main/math_aggregator.sesi +15 -0
  62. package/main/math_generator.sesi +7 -0
  63. package/main/math_processor.sesi +23 -0
  64. package/main/orchestrator.sesi +15 -0
  65. package/main/playground.sesi +1 -0
  66. package/main/setup_swarm.sesi +5 -0
  67. package/main/start.sesi +13 -0
  68. package/main/tax_calculator.sesi +15 -0
  69. package/main/tests/compare.sesi +23 -0
  70. package/main/tests/compare.ts +104 -0
  71. package/main/tests/debug.sesi +1 -0
  72. package/main/tests/demo.sesi +24 -0
  73. package/main/tests/primitive_validation.sesi +18 -0
  74. package/main/tests/test_connection.sesi +4 -0
  75. package/main/tests/test_failure_debug.sesi +2 -0
  76. package/main/tests/test_image.sesi +3 -0
  77. package/main/tests/test_parser_config.sesi +2 -0
  78. package/main/tests/test_syntax.sesi +3 -0
  79. package/main/tests/test_tool_call.sesi +14 -0
  80. package/main/tests/try.sesi +7 -0
  81. package/main/vault.sesi +15 -0
  82. package/package.json +50 -0
@@ -0,0 +1,408 @@
1
+ # Sesi Systems Language Roadmap
2
+
3
+ ## Version 1.0 - Foundation (Complete)
4
+
5
+ **Status**: Complete V1.0 implementation
6
+ **Ready for**: Exploration, learning, building prototypes
7
+ **Not ready for**: Production systems (until v2.0 with error handling)
8
+ **Next milestone**: V1.1
9
+
10
+ ### Core Language Features โœ…
11
+
12
+ - [x] Variables and bindings (let) (const is deprecated)
13
+ - [x] Functions with parameters and types
14
+ - [x] Control flow (if/else, while, for, try/catch)
15
+ - [x] Operators (arithmetic, logical, comparison)
16
+ - [x] Arrays and objects
17
+ - [x] Type system with inference
18
+ - [x] Comments (// and /\* \*/)
19
+ - [x] String concatenation
20
+ - [x] Error handling (try/catch blocks)
21
+
22
+ ### Integrated Reasoning Features โœ…
23
+
24
+ - [x] Prompt blocks
25
+ - [x] Reasoning model calls (model())
26
+ - [x] Structured output (structured_output())
27
+ - [x] Tool calling (tool_call())
28
+ - [x] Stateful context management (memory)
29
+
30
+ ### Built-in Functions โœ…
31
+
32
+ - [x] print, type, str, num, bool
33
+ - [x] len, push, pop, join, split
34
+ - [x] range, keys, values
35
+ - [x] read_file, write_file
36
+ - [x] spawn, exec (Concurrency & Systems)
37
+ - [x] time, random (Utilities)
38
+ - [x] Array and object operations
39
+
40
+ ### Tooling โœ…
41
+
42
+ - [x] Lexer and parser
43
+ - [x] Tree-walking interpreter
44
+ - [x] CLI executable (sesi)
45
+ - [x] Examples (13 programs)
46
+ - [x] Documentation
47
+
48
+ ### Limitations
49
+
50
+ - Interpreter is Single-threaded (use `spawn()` for concurrency)
51
+ - No async/await
52
+ - Blocking Reasoning calls
53
+ - Limited error messages
54
+ - No module system (imports/exports planned)
55
+ - No pattern matching
56
+ - No generics or custom types
57
+
58
+ ---
59
+
60
+ ## Version 1.1 - Stability & Systems Logic (Complete)
61
+
62
+ **Status**: Complete V1.1 implementation
63
+ **Ready for**: Distributed systems orchestration and prototypes
64
+ **Not ready for**: Massive-scale production (until v2.0 bytecode)
65
+ **Next milestone**: V2.0 (Async & advanced reasoning)
66
+
67
+ ### Improvements & Features โœ…
68
+
69
+ - [x] Systems Builtins: `spawn`, `exec`, `time`, `random`
70
+ - [x] Concurrency: Async polling via file locks for completion and MAX_TOKENS
71
+ - [x] Image Generation primitive (`image`) and Config blocks (`ratio`, `size`)
72
+ - [x] File Management Builtins: `list_dir`, `write_image`
73
+ - [x] Documentation improvements (Extensive Markdown guides)
74
+ - [x] Bug fixes (tool_call argument passing resolved)
75
+ - [x] Simple error recovery (Parser synchronization)
76
+ - [x] Implicit statement termination for blocks ending in `}`
77
+ - [x] Temporal Context Injection for reasoning calls
78
+ - [x] Distributed Systems capabilities (Double-Check Write lock pattern)
79
+ - [x] API reference (`BUILTINS.md`)
80
+ - [x] Tutorial: Getting started (`QUICKSTART.md`)
81
+ - [x] Cookbook: Common patterns (`SYSTEMS_REASONING.md`)
82
+
83
+ ### Deferred to V2.0 โณ
84
+
85
+ - [ ] Better error messages with line numbers and stack traces
86
+ - [ ] REPL (Read-Eval-Print Loop)
87
+ - [ ] String escape sequences & Multiline strings
88
+ - [ ] Comments preservation (for docs)
89
+ - [ ] Type hints in function signatures
90
+ - [ ] Performance optimizations
91
+ - [ ] Tutorial: Writing systems logic
92
+
93
+ ---
94
+
95
+ ## Version 2.0 - Advanced Concurrency & Logic (Q3-Q4 2026)
96
+
97
+ **Focus**: Advanced reasoning features and native concurrency
98
+
99
+ ### Async/Await Support
100
+
101
+ - [ ] async/await syntax (language level)
102
+ - [ ] Parallel reasoning calls (native)
103
+ - [ ] Promise-like operations
104
+ - [x] Concurrent execution (Multi-process via `spawn`)
105
+
106
+ ### Advanced Reasoning Features
107
+
108
+ - [ ] Streaming responses
109
+ - [ ] Extended thinking/reasoning budget
110
+ - [ ] Multi-step reasoning workflows
111
+ - [ ] Tool composition and piping
112
+ - [ ] Custom tool definitions
113
+ - [ ] Function calling with automatic orchestration
114
+
115
+ ### Memory System
116
+
117
+ - [ ] Long-term memory with embeddings
118
+ - [ ] Memory search by similarity
119
+ - [ ] Context window management
120
+ - [ ] Automatic summarization
121
+ - [ ] Persistent storage (file-based)
122
+
123
+ ### Error Handling
124
+
125
+ - [ ] finally blocks (try/catch completed in V1)
126
+ - [ ] Custom error types
127
+ - [ ] Error recovery strategies
128
+ - [ ] Retry logic with exponential backoff
129
+ - [ ] Timeout handling
130
+
131
+ ### Performance
132
+
133
+ - [ ] Bytecode compilation
134
+ - [ ] Logic caching
135
+ - [ ] Token counting and cost estimation
136
+ - [ ] Lazy evaluation
137
+
138
+ ### New Built-ins
139
+
140
+ - [ ] String functions (upper, lower, trim, slice, etc.)
141
+ - [ ] Array functions (map, filter, reduce, find, etc.)
142
+ - [ ] Math functions (sqrt, sin, cos, floor, ceil, etc.)
143
+ - [ ] Date/time functions
144
+ - [ ] JSON parsing and serialization
145
+ - [ ] HTTP client (get, post)
146
+
147
+ ### Module System
148
+
149
+ - [ ] import/export statements
150
+ - [ ] Standard library modules (std/math, std/time, etc.)
151
+ - [ ] Third-party package management
152
+ - [ ] Namespace support
153
+
154
+ ### Tooling
155
+
156
+ - [ ] Debugger with breakpoints
157
+ - [ ] Profiler for performance analysis
158
+ - [ ] AST visualization
159
+ - [ ] Type checking tool
160
+ - [x] Linter and formatter (ESLint integrated)
161
+
162
+ ### Examples
163
+
164
+ - [ ] Web scraper with reasoning analysis
165
+ - [ ] Document processor (PDF, DOCX)
166
+ - [ ] Chatbot with memory
167
+ - [ ] Data pipeline with reasoning
168
+ - [ ] API server (with async)
169
+
170
+ ---
171
+
172
+ ## Version 3.0 - Autonomous Systems Framework (2027)
173
+
174
+ **Focus**: Full autonomous systems support
175
+
176
+ ### Autonomous Framework
177
+
178
+ - [ ] Framework definitions with state machines
179
+ - [ ] Logic composition and chaining
180
+ - [ ] Multi-process collaboration
181
+ - [ ] Communication protocol
182
+ - [ ] Persistence layer
183
+
184
+ ### Knowledge Base
185
+
186
+ - [ ] Vector database integration
187
+ - [ ] Semantic search
188
+ - [ ] Knowledge graph support
189
+ - [ ] RAG (Retrieval-Augmented Generation)
190
+ - [ ] Document indexing
191
+
192
+ ### Advanced Patterns
193
+
194
+ - [ ] Plan-and-execute workflows
195
+ - [ ] Hierarchical task decomposition
196
+ - [ ] Autonomous loop with safety checks
197
+ - [ ] Reflection and self-improvement
198
+ - [ ] Human-in-the-loop approval
199
+
200
+ ### Ecosystem
201
+
202
+ - [ ] Package registry
203
+ - [ ] Community extensions
204
+ - [ ] Plugin system
205
+ - [ ] API server template
206
+ - [ ] Dashboard/UI toolkit
207
+
208
+ ### Examples
209
+
210
+ - [ ] Autonomous research process
211
+ - [ ] Customer support automation
212
+ - [ ] Code generation and testing
213
+ - [ ] Data analysis pipeline
214
+ - [ ] Multi-process reasoning debate
215
+
216
+ ---
217
+
218
+ ## Version 4.0+ - Vision (2027+)
219
+
220
+ **Focus**: Maturity, optimization, and specialization
221
+
222
+ ### Potential Features
223
+
224
+ - [ ] Compilation to JavaScript/WASM
225
+ - [ ] JIT compilation for hot paths
226
+ - [ ] Distributed execution
227
+ - [ ] Cross-model orchestration (Gemini, Claude, etc.)
228
+ - [ ] Vision model integration
229
+ - [ ] Audio processing
230
+ - [ ] Real-time streaming
231
+ - [ ] Genetic programming / AutoML
232
+ - [ ] Formal verification
233
+ - [ ] Type refinement system
234
+
235
+ ### New Language Constructs
236
+
237
+ - [ ] Pattern matching
238
+ - [ ] Generics and templates
239
+ - [ ] Traits/interfaces
240
+ - [ ] Macros
241
+ - [ ] DSL support
242
+ - [ ] Concurrent primitives (channels, mutexes)
243
+
244
+ ### Performance
245
+
246
+ - [ ] LLVM backend option
247
+ - [ ] WebAssembly compilation
248
+ - [ ] GPU acceleration
249
+ - [ ] Distributed computing
250
+
251
+ ---
252
+
253
+ ## Feature Priority Matrix
254
+
255
+ | Feature | Priority | V1 | V2 | V3 | V4+ |
256
+ | --------------- | --------- | --- | --- | --- | --- |
257
+ | Basic syntax | ๐Ÿ”ด High | โœ… | | | |
258
+ | Functions | ๐Ÿ”ด High | โœ… | | | |
259
+ | Reasoning calls | ๐Ÿ”ด High | โœ… | | | |
260
+ | Error handling | ๐Ÿ”ด High | โœ… | โณ | | |
261
+ | Async/await | ๐Ÿ”ด High | | โณ | | |
262
+ | Streaming | ๐ŸŸก Medium | | โณ | | |
263
+ | Systems Logic | ๐ŸŸก Medium | | | โณ | |
264
+ | Knowledge base | ๐ŸŸก Medium | | | โณ | |
265
+ | Module system | ๐ŸŸก Medium | | โณ | | |
266
+ | Debugger | ๐ŸŸข Low | | โณ | | |
267
+ | Compilation | ๐ŸŸข Low | | | | โณ |
268
+ | GPU support | ๐ŸŸข Low | | | | โณ |
269
+
270
+ ---
271
+
272
+ ## Release Timeline
273
+
274
+ ```
275
+ 2026 Q2
276
+ โ””โ”€ v1.1 - Polish & stabilize
277
+
278
+ 2026 Q3-Q4
279
+ โ””โ”€ v2.0 - Advanced Reasoning & async
280
+
281
+ 2027 Q1-Q2
282
+ โ””โ”€ v3.0 - Autonomous Framework
283
+
284
+ 2027 Q3+
285
+ โ””โ”€ v4.0+ - Mature ecosystem
286
+ ```
287
+
288
+ ---
289
+
290
+ ## Community & Contribution
291
+
292
+ ### Planned Community Activities
293
+
294
+ - [ ] Public GitHub repository
295
+ - [ ] Discord/Slack community
296
+ - [ ] Monthly community calls
297
+ - [ ] RFCs (Request for Comments) for major features
298
+ - [ ] Contribution guidelines
299
+ - [ ] Code of conduct
300
+
301
+ ### How to Help (When Open Source)
302
+
303
+ - [ ] Test programs and report bugs
304
+ - [ ] Contribute documentation
305
+ - [ ] Submit examples
306
+ - [ ] Propose language features
307
+ - [ ] Implement built-in functions
308
+ - [ ] Build tools and extensions
309
+
310
+ ---
311
+
312
+ ## Backwards Compatibility
313
+
314
+ ### Stability Guarantee
315
+
316
+ - **v1.x โ†’ v1.y**: Full backwards compatibility
317
+ - **v1.x โ†’ v2.0**: Mostly compatible, deprecation warnings for breaking changes
318
+ - **v2.x โ†’ v3.0**: New features, old syntax still works
319
+
320
+ ### Deprecation Policy
321
+
322
+ 1. Announce deprecation (1 version ahead)
323
+ 2. Show warnings in compiler
324
+ 3. Provide migration guide
325
+ 4. Remove in next major version
326
+
327
+ ---
328
+
329
+ ## Open Questions & Design Discussions
330
+
331
+ ### For the Community
332
+
333
+ 1. Should we support object-oriented programming (classes, inheritance)?
334
+ 2. Should we add pattern matching or keep it simple?
335
+ 3. Should memory be file-based by default or in-memory?
336
+ 4. How should we handle multi-model orchestration?
337
+ 5. Should processes be stateful or functional?
338
+
339
+ ### Technical Decisions
340
+
341
+ - Type system: Gradual or strict?
342
+ - Concurrency: Async/await or coroutines?
343
+ - Module system: Centralized registry or decentralized?
344
+ - Error handling: Exceptions or Result types?
345
+
346
+ ---
347
+
348
+ ## Performance Goals
349
+
350
+ | Metric | V1 | V2 | V3 |
351
+ | ---------------------- | ---------- | ------ | ------ |
352
+ | Startup time | <100ms | <100ms | <50ms |
353
+ | Simple expression eval | <1ยตs | <100ns | <10ns |
354
+ | Function call overhead | <10ยตs | <1ยตs | <100ns |
355
+ | Reasoning call latency | 2-5s (API) | 2-5s | 2-5s |
356
+ | Memory usage | <50MB | <50MB | <100MB |
357
+
358
+ ---
359
+
360
+ ## Inspiration & References
361
+
362
+ ### Language Design
363
+
364
+ - **Python**: Simplicity, readability
365
+ - **Lua**: Lightweight, embeddable
366
+ - **JavaScript**: Functions as first-class values
367
+ - **Go**: Clear error handling
368
+ - **Rust**: Type safety, memory safety
369
+
370
+ ### Systems Reasoning
371
+
372
+ - **LangChain**: Composable AI workflows
373
+ - **AutoGPT**: Logic autonomy
374
+ - **Semantic Kernel**: Model abstraction
375
+ - **LLM frameworks**: Best practices
376
+
377
+ ### Community
378
+
379
+ - **Rust community**: Welcoming, inclusive
380
+ - **Python community**: Documentation focus
381
+ - **Go community**: Simplicity first
382
+
383
+ ---
384
+
385
+ ## Conclusion
386
+
387
+ Sesi is designed to evolve with reasoning needs. The roadmap balances:
388
+
389
+ - **Simplicity** (v1: core features only)
390
+ - **Power** (v2: advanced reasoning patterns)
391
+ - **Autonomy** (v3: autonomous framework)
392
+ - **Scale** (v4+: production readiness)
393
+
394
+ The journey from v1 (interpreter) to v4+ (distributed compiler) maintains backward compatibility while adding power where needed.
395
+
396
+ **Current focus**: Ship v2.0 with native async/await and advanced reasoning patterns.
397
+
398
+ ---
399
+
400
+ ## See Also
401
+
402
+ - [Specification](SPECIFICATION.md)
403
+ - [Architecture](ARCHITECTURE.md)
404
+ - [Built-ins](BUILTINS.md)
405
+ - [Systems Reasoning](SYSTEMS_REASONING.md)
406
+ - [Image Generation](IMAGE_GENERATION.md)
407
+ - [Compare to other languages](COMPARISON.md)
408
+ - [Examples](../examples)