@misterscan/sesi 1.2.2 → 1.3.0
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/README.md +138 -34
- package/bin/sesi.js +163 -38
- package/dist/ai-runtime.d.ts.map +1 -1
- package/dist/ai-runtime.js +22 -4
- package/dist/ai-runtime.js.map +1 -1
- package/dist/builtins.d.ts +1 -0
- package/dist/builtins.d.ts.map +1 -1
- package/dist/builtins.js +257 -17
- package/dist/builtins.js.map +1 -1
- package/dist/index.d.ts +7 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +30 -5
- package/dist/index.js.map +1 -1
- package/dist/interpreter.d.ts +17 -1
- package/dist/interpreter.d.ts.map +1 -1
- package/dist/interpreter.js +256 -98
- package/dist/interpreter.js.map +1 -1
- package/dist/lexer.d.ts.map +1 -1
- package/dist/lexer.js +8 -4
- package/dist/lexer.js.map +1 -1
- package/dist/parser.d.ts +2 -0
- package/dist/parser.d.ts.map +1 -1
- package/dist/parser.js +76 -32
- package/dist/parser.js.map +1 -1
- package/dist/sesi.bundled.js +87 -20
- package/dist/types.d.ts +14 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +33 -1
- package/dist/types.js.map +1 -1
- package/docs/ARCHITECTURE.md +26 -9
- package/docs/BUILTINS.md +111 -13
- package/docs/COMPARISON.md +7 -9
- package/docs/{DISTRIBUTED_SYSTEMS.md → CONCURRENCY.md} +11 -11
- package/docs/IMAGE_GENERATION.md +13 -14
- package/docs/IMPLEMENTATION_SUMMARY.md +141 -84
- package/docs/QUICKSTART.md +81 -28
- package/docs/README.md +140 -34
- package/docs/{SYSTEMS_REASONING.md → REASONING.md} +107 -109
- package/docs/ROADMAP.md +44 -44
- package/docs/SKILLS.md +56 -28
- package/docs/SPECIFICATION.md +25 -18
- package/docs/sesi_ai_chronicles.md +96 -209
- package/examples/07_prompts.sesi +1 -1
- package/examples/08_model_call.sesi +1 -1
- package/examples/09_structured_output.sesi +1 -1
- package/examples/10_code_generation.sesi +1 -1
- package/examples/13_data_pipeline.sesi +1 -1
- package/examples/14_folder_explainer.sesi +2 -2
- package/examples/15_image_generation.sesi +1 -1
- package/examples/16_modules.sesi +27 -27
- package/examples/19_search_web.sesi +4 -0
- package/examples/20_model_aliases.sesi +22 -0
- package/examples/21_custom_tools.sesi +27 -0
- package/examples/22_reasoning_plus_custom_tools.sesi +19 -0
- package/main/orchestrator.sesi +2 -2
- package/main/sesi_db_chatbot.sesi +7 -3
- package/main/tests/test_grounding.sesi +2 -0
- package/package.json +6 -6
package/dist/sesi.bundled.js
CHANGED
|
@@ -12419,11 +12419,15 @@ var require_parser = __commonJS({
|
|
|
12419
12419
|
arrayLiteral() {
|
|
12420
12420
|
const line = this.previous().line;
|
|
12421
12421
|
const elements = [];
|
|
12422
|
+
this.skipNewlines();
|
|
12422
12423
|
if (!this.check("RIGHT_BRACKET")) {
|
|
12423
12424
|
do {
|
|
12425
|
+
this.skipNewlines();
|
|
12424
12426
|
elements.push(this.assignment());
|
|
12427
|
+
this.skipNewlines();
|
|
12425
12428
|
} while (this.match("COMMA"));
|
|
12426
12429
|
}
|
|
12430
|
+
this.skipNewlines();
|
|
12427
12431
|
this.consume("RIGHT_BRACKET", "Expected ] after array elements");
|
|
12428
12432
|
return {
|
|
12429
12433
|
type: "ArrayLiteral",
|
|
@@ -12434,14 +12438,18 @@ var require_parser = __commonJS({
|
|
|
12434
12438
|
objectLiteral() {
|
|
12435
12439
|
const line = this.previous().line;
|
|
12436
12440
|
const properties = [];
|
|
12441
|
+
this.skipNewlines();
|
|
12437
12442
|
if (!this.check("RIGHT_BRACE")) {
|
|
12438
12443
|
do {
|
|
12444
|
+
this.skipNewlines();
|
|
12439
12445
|
const key = this.consume("STRING", "Expected string key").literal;
|
|
12440
12446
|
this.consume("COLON", "Expected : after object key");
|
|
12441
12447
|
const value = this.assignment();
|
|
12442
12448
|
properties.push({ key, value });
|
|
12449
|
+
this.skipNewlines();
|
|
12443
12450
|
} while (this.match("COMMA"));
|
|
12444
12451
|
}
|
|
12452
|
+
this.skipNewlines();
|
|
12445
12453
|
this.consume("RIGHT_BRACE", "Expected } after object properties");
|
|
12446
12454
|
return {
|
|
12447
12455
|
type: "ObjectLiteral",
|
|
@@ -13381,7 +13389,11 @@ var require_builtins = __commonJS({
|
|
|
13381
13389
|
if (typeof fn !== "object" || fn === null || fn.type !== "function") {
|
|
13382
13390
|
throw new Error("multi_req elements must be functions");
|
|
13383
13391
|
}
|
|
13384
|
-
|
|
13392
|
+
const InterpreterClass = interpreter.constructor;
|
|
13393
|
+
const subInterpreter = new InterpreterClass();
|
|
13394
|
+
subInterpreter.prompts = interpreter.prompts;
|
|
13395
|
+
subInterpreter.memory = interpreter.memory;
|
|
13396
|
+
return await subInterpreter.callSesiFunction(fn, []);
|
|
13385
13397
|
});
|
|
13386
13398
|
return await Promise.all(promises);
|
|
13387
13399
|
}
|
|
@@ -46472,7 +46484,7 @@ var require_node4 = __commonJS({
|
|
|
46472
46484
|
var SERVER_TIMEOUT_HEADER = "X-Server-Timeout";
|
|
46473
46485
|
var USER_AGENT_HEADER = "User-Agent";
|
|
46474
46486
|
var GOOGLE_API_CLIENT_HEADER = "x-goog-api-client";
|
|
46475
|
-
var SDK_VERSION = "2.
|
|
46487
|
+
var SDK_VERSION = "2.5.0";
|
|
46476
46488
|
var LIBRARY_LABEL = `google-genai-sdk/${SDK_VERSION}`;
|
|
46477
46489
|
var VERTEX_AI_API_DEFAULT_VERSION = "v1beta1";
|
|
46478
46490
|
var GOOGLE_AI_API_DEFAULT_VERSION = "v1beta";
|
|
@@ -54083,13 +54095,20 @@ var require_ai_runtime = __commonJS({
|
|
|
54083
54095
|
const fullPrompt = timeContext + request.prompt;
|
|
54084
54096
|
let thinkingConfig = void 0;
|
|
54085
54097
|
if (request.thinkingLevel) {
|
|
54086
|
-
|
|
54087
|
-
|
|
54098
|
+
let level = "low";
|
|
54099
|
+
let thinking = true;
|
|
54100
|
+
if (typeof request.thinkingLevel === "object" && request.thinkingLevel !== null) {
|
|
54101
|
+
thinking = request.thinkingLevel.thinking !== "no";
|
|
54102
|
+
level = request.thinkingLevel.level || "low";
|
|
54103
|
+
} else if (typeof request.thinkingLevel === "string") {
|
|
54104
|
+
level = request.thinkingLevel;
|
|
54105
|
+
thinking = level.toLowerCase() !== "no";
|
|
54106
|
+
}
|
|
54088
54107
|
const isGemini3 = request.model.includes("gemini-3");
|
|
54089
54108
|
if (isGemini3) {
|
|
54090
54109
|
const isPro = request.model.includes("pro");
|
|
54091
54110
|
thinkingConfig = {
|
|
54092
|
-
thinkingLevel: thinking ? level : isPro ? "low" : "minimal"
|
|
54111
|
+
thinkingLevel: thinking ? level.toLowerCase() : isPro ? "low" : "minimal"
|
|
54093
54112
|
};
|
|
54094
54113
|
} else {
|
|
54095
54114
|
thinkingConfig = {
|
|
@@ -54311,17 +54330,49 @@ var require_interpreter = __commonJS({
|
|
|
54311
54330
|
var builtins_1 = require_builtins();
|
|
54312
54331
|
var ai_runtime_1 = require_ai_runtime();
|
|
54313
54332
|
var Interpreter = class _Interpreter {
|
|
54314
|
-
constructor() {
|
|
54333
|
+
constructor(scriptDir) {
|
|
54315
54334
|
this.prompts = /* @__PURE__ */ new Map();
|
|
54316
54335
|
this.memory = /* @__PURE__ */ new Map();
|
|
54317
54336
|
this.exports = /* @__PURE__ */ new Map();
|
|
54318
54337
|
this.globalEnv = new types_1.Environment();
|
|
54319
54338
|
this.currentEnv = this.globalEnv;
|
|
54339
|
+
this.scriptDir = scriptDir;
|
|
54320
54340
|
const builtins = (0, builtins_1.getBuiltins)(this);
|
|
54321
54341
|
for (const [name, fn] of builtins) {
|
|
54322
54342
|
this.globalEnv.define(name, fn);
|
|
54323
54343
|
}
|
|
54324
54344
|
}
|
|
54345
|
+
/**
|
|
54346
|
+
* Resolves a local module path by searching in priority order:
|
|
54347
|
+
* 1. Relative to the script's own directory (if known)
|
|
54348
|
+
* 2. Relative to the current working directory
|
|
54349
|
+
* 3. Each directory listed in the SESI_PATH environment variable (colon/semicolon separated)
|
|
54350
|
+
* 4. The global Sesi library directory: ~/.sesi/lib
|
|
54351
|
+
*/
|
|
54352
|
+
resolveModulePath(source) {
|
|
54353
|
+
const fs3 = require("fs");
|
|
54354
|
+
const path2 = require("path");
|
|
54355
|
+
const os = require("os");
|
|
54356
|
+
let filePath = source;
|
|
54357
|
+
if (!filePath.endsWith(".sesi"))
|
|
54358
|
+
filePath += ".sesi";
|
|
54359
|
+
const searchDirs = [];
|
|
54360
|
+
if (this.scriptDir)
|
|
54361
|
+
searchDirs.push(this.scriptDir);
|
|
54362
|
+
searchDirs.push(process.cwd());
|
|
54363
|
+
const sesiPath = process.env.SESI_PATH || "";
|
|
54364
|
+
if (sesiPath) {
|
|
54365
|
+
const sep = process.platform === "win32" ? ";" : ":";
|
|
54366
|
+
sesiPath.split(sep).filter(Boolean).forEach((p) => searchDirs.push(p));
|
|
54367
|
+
}
|
|
54368
|
+
searchDirs.push(path2.join(os.homedir(), ".sesi", "lib"));
|
|
54369
|
+
for (const dir of searchDirs) {
|
|
54370
|
+
const resolved = path2.resolve(dir, filePath);
|
|
54371
|
+
if (fs3.existsSync(resolved))
|
|
54372
|
+
return resolved;
|
|
54373
|
+
}
|
|
54374
|
+
return null;
|
|
54375
|
+
}
|
|
54325
54376
|
async interpret(program) {
|
|
54326
54377
|
for (const statement of program.statements) {
|
|
54327
54378
|
await this.executeStatement(statement);
|
|
@@ -54699,6 +54750,8 @@ var require_interpreter = __commonJS({
|
|
|
54699
54750
|
const raw = await this.evaluateExpression(expr.config.thinkingLevel);
|
|
54700
54751
|
if (typeof raw === "object" && raw !== null) {
|
|
54701
54752
|
thinkingLevel = raw;
|
|
54753
|
+
} else if (typeof raw === "string") {
|
|
54754
|
+
thinkingLevel = raw;
|
|
54702
54755
|
}
|
|
54703
54756
|
}
|
|
54704
54757
|
let cache;
|
|
@@ -54742,6 +54795,8 @@ var require_interpreter = __commonJS({
|
|
|
54742
54795
|
const raw = await this.evaluateExpression(expr.config.thinkingLevel);
|
|
54743
54796
|
if (typeof raw === "object" && raw !== null) {
|
|
54744
54797
|
thinkingLevel = raw;
|
|
54798
|
+
} else if (typeof raw === "string") {
|
|
54799
|
+
thinkingLevel = raw;
|
|
54745
54800
|
}
|
|
54746
54801
|
}
|
|
54747
54802
|
let cache;
|
|
@@ -54819,22 +54874,33 @@ var require_interpreter = __commonJS({
|
|
|
54819
54874
|
moduleExports = this.loadStdModule(source);
|
|
54820
54875
|
} else {
|
|
54821
54876
|
const fs3 = require("fs");
|
|
54822
|
-
const
|
|
54823
|
-
|
|
54824
|
-
|
|
54825
|
-
|
|
54826
|
-
|
|
54827
|
-
|
|
54828
|
-
|
|
54829
|
-
|
|
54877
|
+
const resolvedPath = this.resolveModulePath(source);
|
|
54878
|
+
if (!resolvedPath) {
|
|
54879
|
+
const searchedDirs = [];
|
|
54880
|
+
const os = require("os");
|
|
54881
|
+
const path3 = require("path");
|
|
54882
|
+
if (this.scriptDir)
|
|
54883
|
+
searchedDirs.push(this.scriptDir);
|
|
54884
|
+
searchedDirs.push(process.cwd());
|
|
54885
|
+
const sesiPath = process.env.SESI_PATH || "";
|
|
54886
|
+
if (sesiPath) {
|
|
54887
|
+
const sep = process.platform === "win32" ? ";" : ":";
|
|
54888
|
+
sesiPath.split(sep).filter(Boolean).forEach((p) => searchedDirs.push(p));
|
|
54889
|
+
}
|
|
54890
|
+
searchedDirs.push(path3.join(os.homedir(), ".sesi", "lib"));
|
|
54891
|
+
throw new Error(`Module not found: "${source}"
|
|
54892
|
+
Searched in:
|
|
54893
|
+
${searchedDirs.join("\n ")}
|
|
54894
|
+
Tip: add a folder to SESI_PATH, or place shared modules in ~/.sesi/lib`);
|
|
54830
54895
|
}
|
|
54831
54896
|
const content = fs3.readFileSync(resolvedPath, "utf-8");
|
|
54897
|
+
const path2 = require("path");
|
|
54832
54898
|
const { Lexer } = require_lexer();
|
|
54833
54899
|
const { Parser } = require_parser();
|
|
54834
54900
|
const lexer = new Lexer(content);
|
|
54835
54901
|
const parser = new Parser(lexer.scanTokens());
|
|
54836
54902
|
const program = parser.parse();
|
|
54837
|
-
const subInterpreter = new _Interpreter();
|
|
54903
|
+
const subInterpreter = new _Interpreter(path2.dirname(resolvedPath));
|
|
54838
54904
|
await subInterpreter.interpret(program);
|
|
54839
54905
|
moduleExports = subInterpreter.exports;
|
|
54840
54906
|
}
|
|
@@ -54995,13 +55061,13 @@ var require_dist5 = __commonJS({
|
|
|
54995
55061
|
var interpreter_1 = require_interpreter();
|
|
54996
55062
|
var fs3 = __importStar(require("fs"));
|
|
54997
55063
|
var path2 = __importStar(require("path"));
|
|
54998
|
-
async function runSesi(source) {
|
|
55064
|
+
async function runSesi(source, scriptDir) {
|
|
54999
55065
|
try {
|
|
55000
55066
|
const lexer = new lexer_1.Lexer(source);
|
|
55001
55067
|
const tokens = lexer.scanTokens();
|
|
55002
55068
|
const parser = new parser_1.Parser(tokens);
|
|
55003
55069
|
const program = parser.parse();
|
|
55004
|
-
const interpreter = new interpreter_1.Interpreter();
|
|
55070
|
+
const interpreter = new interpreter_1.Interpreter(scriptDir);
|
|
55005
55071
|
await interpreter.interpret(program);
|
|
55006
55072
|
} catch (error) {
|
|
55007
55073
|
console.error("Error:", error.message);
|
|
@@ -55011,8 +55077,9 @@ var require_dist5 = __commonJS({
|
|
|
55011
55077
|
async function runSesiFile2(filePath) {
|
|
55012
55078
|
try {
|
|
55013
55079
|
const filepath = path2.resolve(filePath);
|
|
55080
|
+
const scriptDir = path2.dirname(filepath);
|
|
55014
55081
|
const source = fs3.readFileSync(filepath, "utf-8");
|
|
55015
|
-
await runSesi(source);
|
|
55082
|
+
await runSesi(source, scriptDir);
|
|
55016
55083
|
} catch (error) {
|
|
55017
55084
|
console.error(`Error reading file ${filePath}:`, error.message);
|
|
55018
55085
|
process.exit(1);
|
|
@@ -55029,7 +55096,7 @@ var path = require("path");
|
|
|
55029
55096
|
var args = process.argv.slice(2);
|
|
55030
55097
|
if (args.length === 0) {
|
|
55031
55098
|
console.log(`
|
|
55032
|
-
Sesi Programming Language v1.2.
|
|
55099
|
+
Sesi Programming Language v1.2.2
|
|
55033
55100
|
|
|
55034
55101
|
Usage:
|
|
55035
55102
|
sesi <file> Run a Sesi program
|
|
@@ -55059,7 +55126,7 @@ if (args[0] === "--help" || args[0] === "-help" || args[0] === "-h") {
|
|
|
55059
55126
|
process.exit(1);
|
|
55060
55127
|
});
|
|
55061
55128
|
} else if (args[0] === "--version") {
|
|
55062
|
-
console.log("Sesi v1.2.
|
|
55129
|
+
console.log("Sesi v1.2.2");
|
|
55063
55130
|
process.exit(0);
|
|
55064
55131
|
} else {
|
|
55065
55132
|
const filePath = args[0];
|
package/dist/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type TokenType = 'NUMBER' | 'STRING' | 'IDENTIFIER' | 'LET' | 'CONST' | 'FN' | 'IF' | 'ELSE' | 'WHILE' | 'FOR' | 'IN' | 'RETURN' | 'BREAK' | 'CONTINUE' | 'TRY' | 'CATCH' | 'TRUE' | 'FALSE' | 'NULL' | 'PRINT' | 'PROMPT' | 'MODEL' | 'IMAGE' | 'STRUCTURED_OUTPUT' | 'TOOL_CALL' | 'MEMORY' | 'IMPORT' | 'FROM' | 'EXPORT' | 'TO' | 'PLUS' | 'MINUS' | 'STAR' | 'SLASH' | 'PERCENT' | 'EQUAL' | 'EQUAL_EQUAL' | 'BANG' | 'BANG_EQUAL' | 'LESS' | 'LESS_EQUAL' | 'GREATER' | 'GREATER_EQUAL' | 'AMPERSAND_AMPERSAND' | 'PIPE_PIPE' | 'PIPE' | 'DOT' | 'COMMA' | 'SEMICOLON' | 'COLON' | 'ARROW' | 'QUESTION' | 'LEFT_PAREN' | 'RIGHT_PAREN' | 'LEFT_BRACE' | 'RIGHT_BRACE' | 'LEFT_BRACKET' | 'RIGHT_BRACKET' | 'LESS_GREATER' | 'EOF' | 'NEWLINE';
|
|
1
|
+
export type TokenType = 'NUMBER' | 'STRING' | 'IDENTIFIER' | 'LET' | 'CONST' | 'FN' | 'IF' | 'ELSE' | 'WHILE' | 'FOR' | 'IN' | 'RETURN' | 'BREAK' | 'CONTINUE' | 'TRY' | 'CATCH' | 'FINALLY' | 'TRUE' | 'FALSE' | 'NULL' | 'PRINT' | 'PROMPT' | 'MODEL' | 'IMAGE' | 'STRUCTURED_OUTPUT' | 'TOOL_CALL' | 'MEMORY' | 'IMPORT' | 'FROM' | 'EXPORT' | 'TO' | 'PLUS' | 'MINUS' | 'STAR' | 'SLASH' | 'PERCENT' | 'EQUAL' | 'EQUAL_EQUAL' | 'BANG' | 'BANG_EQUAL' | 'LESS' | 'LESS_EQUAL' | 'GREATER' | 'GREATER_EQUAL' | 'AMPERSAND_AMPERSAND' | 'PIPE_PIPE' | 'PIPE' | 'DOT' | 'COMMA' | 'SEMICOLON' | 'COLON' | 'ARROW' | 'QUESTION' | 'LEFT_PAREN' | 'RIGHT_PAREN' | 'LEFT_BRACE' | 'RIGHT_BRACE' | 'LEFT_BRACKET' | 'RIGHT_BRACKET' | 'LESS_GREATER' | 'EOF' | 'NEWLINE';
|
|
2
2
|
export interface Token {
|
|
3
3
|
type: TokenType;
|
|
4
4
|
lexeme: string;
|
|
@@ -89,6 +89,7 @@ export interface TryStatement {
|
|
|
89
89
|
tryBlock: BlockStatement;
|
|
90
90
|
catchParameter: string;
|
|
91
91
|
catchBlock: BlockStatement;
|
|
92
|
+
finallyBlock?: BlockStatement;
|
|
92
93
|
line: number;
|
|
93
94
|
}
|
|
94
95
|
export interface ImportStatement {
|
|
@@ -283,6 +284,7 @@ export interface AIRequest {
|
|
|
283
284
|
level?: string;
|
|
284
285
|
};
|
|
285
286
|
cache?: boolean;
|
|
287
|
+
search?: boolean;
|
|
286
288
|
}
|
|
287
289
|
export interface AIResponse {
|
|
288
290
|
text: string;
|
|
@@ -305,8 +307,19 @@ export declare class BreakException extends Error {
|
|
|
305
307
|
export declare class ContinueException extends Error {
|
|
306
308
|
constructor();
|
|
307
309
|
}
|
|
310
|
+
export declare class SesiRuntimeError extends Error {
|
|
311
|
+
errorType: string;
|
|
312
|
+
data: RuntimeValue;
|
|
313
|
+
line?: number;
|
|
314
|
+
column?: number;
|
|
315
|
+
output?: string;
|
|
316
|
+
stackTrace: string[];
|
|
317
|
+
constructor(errorType: string, message: string, data?: RuntimeValue, line?: number, column?: number, output?: string, stackTrace?: string[]);
|
|
318
|
+
toRuntimeObject(): RuntimeObject;
|
|
319
|
+
}
|
|
308
320
|
export type InterpreterError = {
|
|
309
321
|
message: string;
|
|
310
322
|
line?: number;
|
|
323
|
+
column?: number;
|
|
311
324
|
};
|
|
312
325
|
//# sourceMappingURL=types.d.ts.map
|
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,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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
{"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,EAAE,SAAS,CAAC;IAChB,UAAU,EAAE,SAAS,EAAE,CAAC;CACzB;AAED,MAAM,MAAM,SAAS,GACjB,YAAY,GACZ,cAAc,GACd,iBAAiB,G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qBAAa,iBAAkB,SAAQ,KAAK;;CAI3C;AAED,qBAAa,gBAAiB,SAAQ,KAAK;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,YAAY,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,EAAE,CAAC;gBAG1B,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,EACf,IAAI,GAAE,YAAmB,EACzB,IAAI,CAAC,EAAE,MAAM,EACb,MAAM,CAAC,EAAE,MAAM,EACf,MAAM,CAAC,EAAE,MAAM,EACf,UAAU,GAAE,MAAM,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/dist/types.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// Core type definitions and AST nodes for Sesi
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.ContinueException = exports.BreakException = exports.ReturnValue = exports.Environment = void 0;
|
|
4
|
+
exports.SesiRuntimeError = exports.ContinueException = exports.BreakException = exports.ReturnValue = exports.Environment = void 0;
|
|
5
5
|
// Environment for variable scoping
|
|
6
6
|
class Environment {
|
|
7
7
|
constructor(parent = null) {
|
|
@@ -60,4 +60,36 @@ class ContinueException extends Error {
|
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
exports.ContinueException = ContinueException;
|
|
63
|
+
class SesiRuntimeError extends Error {
|
|
64
|
+
constructor(errorType, message, data = null, line, column, output, stackTrace = []) {
|
|
65
|
+
super(message);
|
|
66
|
+
this.name = 'SesiRuntimeError';
|
|
67
|
+
this.errorType = errorType;
|
|
68
|
+
this.data = data;
|
|
69
|
+
this.line = line;
|
|
70
|
+
this.column = column;
|
|
71
|
+
this.output = output;
|
|
72
|
+
this.stackTrace = stackTrace;
|
|
73
|
+
}
|
|
74
|
+
toRuntimeObject() {
|
|
75
|
+
const obj = Object.create(null);
|
|
76
|
+
obj.type = this.errorType;
|
|
77
|
+
obj.message = this.message;
|
|
78
|
+
obj.data = this.data;
|
|
79
|
+
if (this.line !== undefined) {
|
|
80
|
+
obj.line = this.line;
|
|
81
|
+
}
|
|
82
|
+
if (this.column !== undefined) {
|
|
83
|
+
obj.column = this.column;
|
|
84
|
+
}
|
|
85
|
+
if (this.output !== undefined) {
|
|
86
|
+
obj.output = this.output;
|
|
87
|
+
}
|
|
88
|
+
if (this.stackTrace.length > 0) {
|
|
89
|
+
obj.stack_trace = this.stackTrace;
|
|
90
|
+
}
|
|
91
|
+
return obj;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
exports.SesiRuntimeError = SesiRuntimeError;
|
|
63
95
|
//# sourceMappingURL=types.js.map
|
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";AAAA,+CAA+C;;;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";AAAA,+CAA+C;;;AA0a/C,mCAAmC;AACnC,MAAa,WAAW;IAItB,YAAY,SAA6B,IAAI;QAHrC,SAAI,GAA8B,IAAI,GAAG,EAAE,CAAC;QAIlD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED,MAAM,CAAC,IAAY,EAAE,KAAmB;QACtC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC7B,CAAC;IAED,GAAG,CAAC,IAAY;QACd,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,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,GAAG,CAAC,WAAW,GAAG,IAAI,CAAC,UAAU,CAAC;QACpC,CAAC;QACD,OAAO,GAAG,CAAC;IACb,CAAC;CACF;AA9CD,4CA8CC"}
|
package/docs/ARCHITECTURE.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## Overview
|
|
4
4
|
|
|
5
|
-
**Sesi** is a
|
|
5
|
+
**Sesi** is a concise and highly legible programming language. It uses a clean tree-walking interpreter model built in TypeScript. The architecture is optimized for simplicity and eliminating the need for `async/await` syntax or heavy module imports. By acting as a minimal orchestration layer, Sesi allows developers to write clean, straightforward logic that natively handles background processes and API or Reasoning calls without SDK overhead.
|
|
6
6
|
|
|
7
7
|
## Component Stack
|
|
8
8
|
|
|
@@ -198,7 +198,7 @@ false → false
|
|
|
198
198
|
- Construct prompt from string concatenation
|
|
199
199
|
- Make async API call to Gemini
|
|
200
200
|
|
|
201
|
-
- Wait for response (blocking in v1)
|
|
201
|
+
- Wait for response (blocking in v1.x)
|
|
202
202
|
- Validate finish reason and non-empty text
|
|
203
203
|
- Return text response to program or throw
|
|
204
204
|
|
|
@@ -213,7 +213,7 @@ false → false
|
|
|
213
213
|
ModelCallExpression (AST)
|
|
214
214
|
│
|
|
215
215
|
├─ Evaluate prompt expression
|
|
216
|
-
├─ Extract configuration (
|
|
216
|
+
├─ Extract configuration (`thinkingLevel`, `max_tokens`, `cache`, etc.)
|
|
217
217
|
├─ Call AIRuntime.callModel()
|
|
218
218
|
│ │
|
|
219
219
|
│ ├─ Create Gemini interaction request
|
|
@@ -303,6 +303,7 @@ eslint.config.mjs # ESLint configuration
|
|
|
303
303
|
dist/ # Compiled TypeScript output
|
|
304
304
|
example.js # Helper script to run basic examples
|
|
305
305
|
example-ai.js # Helper script to run Reasoning examples
|
|
306
|
+
examples.sesi # Central execution suite for examples
|
|
306
307
|
package.json # Dependencies & scripts
|
|
307
308
|
tsconfig.json # TypeScript configuration
|
|
308
309
|
QUICKSTART.md # Quick start guide
|
|
@@ -342,7 +343,14 @@ examples/
|
|
|
342
343
|
├── 12_classification.sesi # Classification
|
|
343
344
|
├── 13_data_pipeline.sesi # Pipeline demo
|
|
344
345
|
├── 14_folder_explainer.sesi # Directory parsing & reasoning
|
|
345
|
-
|
|
346
|
+
├── 15_image_generation.sesi # Image generation API test
|
|
347
|
+
├── 16_modules.sesi # Modules & std library namespaces
|
|
348
|
+
├── 17_http_client.sesi # HTTP GET/POST client
|
|
349
|
+
├── 18_parallel_requests.sesi # Parallel requests concurrency
|
|
350
|
+
├── 19_search_web.sesi # Web search
|
|
351
|
+
├── 20_model_aliases.sesi # Custom model naming via aliases
|
|
352
|
+
├── 21_custom_tools.sesi # Runtime custom tool definitions
|
|
353
|
+
└── 22_reasoning_plus_custom_tools.sesi # Compose reasoning with custom tools
|
|
346
354
|
|
|
347
355
|
docs/
|
|
348
356
|
├── SPECIFICATION.md # Language spec
|
|
@@ -350,12 +358,21 @@ docs/
|
|
|
350
358
|
├── BUILTINS.md # Built-in reference
|
|
351
359
|
├── IMAGE_GENERATION.md # Image generation guide
|
|
352
360
|
├── COMPARISON.md # Language comparison showcase
|
|
353
|
-
├──
|
|
354
|
-
├──
|
|
355
|
-
|
|
361
|
+
├── CONCURRENCY.md # Concurrency & coordination guide
|
|
362
|
+
├── REASONING.md # Reasoning and simple logic guide
|
|
363
|
+
├── ROADMAP.md # Future plans
|
|
364
|
+
└── sesi_ai_chronicles.md # AI project history & notes
|
|
356
365
|
|
|
357
366
|
tests/
|
|
358
|
-
|
|
367
|
+
├── basic.test.ts # Core parsing & evaluation tests
|
|
368
|
+
├── cache.test.ts # Execution caching tests
|
|
369
|
+
├── http.test.ts # Web request builtins testing
|
|
370
|
+
├── module.test.ts # Imports & module loading tests
|
|
371
|
+
├── parallel.test.ts # Concurrent execution tests
|
|
372
|
+
├── security.test.ts # Sandbox & guardrail tests
|
|
373
|
+
├── test-gemini.ts # Base model integration test
|
|
374
|
+
├── test-gemini2.ts # Extended model integration test
|
|
375
|
+
└── workflow.test.ts # Complex sequence workflows tests
|
|
359
376
|
```
|
|
360
377
|
|
|
361
378
|
## Workspace Context File
|
|
@@ -425,6 +442,6 @@ Sesi's architecture prioritizes **clarity and simplicity** over performance. The
|
|
|
425
442
|
- Easy debugging
|
|
426
443
|
- Simple extensions
|
|
427
444
|
- Clear control flow
|
|
428
|
-
- Smooth Reasoning
|
|
445
|
+
- Smooth Reasoning integration
|
|
429
446
|
|
|
430
447
|
As the language matures, optimizations can be added without changing the API.
|
package/docs/BUILTINS.md
CHANGED
|
@@ -383,14 +383,12 @@ print "Elapsed time:" time() - start "ms"
|
|
|
383
383
|
Concurrently execute multiple Sesi function closures or builtins in parallel and return their results as an array.
|
|
384
384
|
|
|
385
385
|
```sesi
|
|
386
|
-
fn job1()
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
return "b"
|
|
393
|
-
}
|
|
386
|
+
fn job1()
|
|
387
|
+
{sleep(100)
|
|
388
|
+
return "a"}
|
|
389
|
+
fn job2()
|
|
390
|
+
{sleep(100)
|
|
391
|
+
return "b"}
|
|
394
392
|
let results = multi_req([job1, job2])
|
|
395
393
|
print results // ["a", "b"]
|
|
396
394
|
```
|
|
@@ -399,6 +397,106 @@ print results // ["a", "b"]
|
|
|
399
397
|
|
|
400
398
|
---
|
|
401
399
|
|
|
400
|
+
### workflow(steps, input = "") -> object
|
|
401
|
+
|
|
402
|
+
Run a multi-step reasoning workflow where each step can reference prior outputs.
|
|
403
|
+
|
|
404
|
+
Default behavior is automatic and requires no special syntax:
|
|
405
|
+
|
|
406
|
+
- Step 1 gets the workflow input appended to its prompt
|
|
407
|
+
- Step 2+ gets the previous step output appended to its prompt
|
|
408
|
+
|
|
409
|
+
Each step is an object with at minimum a `"prompt"` string. Optional keys include:
|
|
410
|
+
|
|
411
|
+
- `"model"` (default: `"gemini-3.1-flash-lite"`)
|
|
412
|
+
- `"temperature"`, `"max_tokens"`, `"top_k"`, `"top_p"`
|
|
413
|
+
- `"thinkingLevel"`, `"cache"`, `"search"`
|
|
414
|
+
|
|
415
|
+
```sesi
|
|
416
|
+
let steps = [{"prompt": "Summarize:"}, {"prompt": "Critique:"}, {"prompt": "Finalize:"}]
|
|
417
|
+
let result = workflow(steps, "Design a landing page brief")
|
|
418
|
+
print result["final"]
|
|
419
|
+
```
|
|
420
|
+
|
|
421
|
+
**Returns**: `object` with keys `"input"`, `"steps"` (array of step outputs), and `"final"`.
|
|
422
|
+
|
|
423
|
+
---
|
|
424
|
+
|
|
425
|
+
### set_alias(alias, model) -> bool
|
|
426
|
+
|
|
427
|
+
Register a custom local name for a model string. Aliases are resolved automatically by `model()`, `image()`, and `workflow()`.
|
|
428
|
+
|
|
429
|
+
```sesi
|
|
430
|
+
set_alias("fast", "gemini-3.1-flash-lite")
|
|
431
|
+
let answer = model("fast") {"Summarize this paragraph."}
|
|
432
|
+
```
|
|
433
|
+
|
|
434
|
+
**Returns**: `bool` (`true` when the alias is registered)
|
|
435
|
+
|
|
436
|
+
---
|
|
437
|
+
|
|
438
|
+
### define_tool(name, fn, description = "") -> bool
|
|
439
|
+
|
|
440
|
+
Register a custom tool name that can be called through `tool_call(name)(...)`.
|
|
441
|
+
|
|
442
|
+
```sesi
|
|
443
|
+
fn summarize(text)
|
|
444
|
+
{return "Summary: " + text}
|
|
445
|
+
|
|
446
|
+
define_tool("summarizer", summarize, "Summarizes text")
|
|
447
|
+
let result = tool_call(summarizer)("Hello")
|
|
448
|
+
```
|
|
449
|
+
|
|
450
|
+
**Returns**: `bool` (`true` when the tool is registered)
|
|
451
|
+
|
|
452
|
+
---
|
|
453
|
+
|
|
454
|
+
### list_tools() -> array
|
|
455
|
+
|
|
456
|
+
List custom tool names registered by `define_tool`.
|
|
457
|
+
|
|
458
|
+
```sesi
|
|
459
|
+
let tools = list_tools()
|
|
460
|
+
print tools
|
|
461
|
+
```
|
|
462
|
+
|
|
463
|
+
**Returns**: `array<string>`
|
|
464
|
+
|
|
465
|
+
---
|
|
466
|
+
|
|
467
|
+
### error_type(type, message, data = null) -> object
|
|
468
|
+
|
|
469
|
+
Create a custom typed error object you can throw with `raise_error`.
|
|
470
|
+
|
|
471
|
+
```sesi
|
|
472
|
+
let err = error_type("ValidationError", "Missing email", {"field": "email"})
|
|
473
|
+
```
|
|
474
|
+
|
|
475
|
+
**Returns**: `object` with keys `"type"`, `"message"`, and `"data"`.
|
|
476
|
+
|
|
477
|
+
---
|
|
478
|
+
|
|
479
|
+
### raise_error(type_or_error, message = "", data = null) -> never
|
|
480
|
+
|
|
481
|
+
Throw a custom typed error that can be handled in `try/catch`.
|
|
482
|
+
|
|
483
|
+
```sesi
|
|
484
|
+
try {
|
|
485
|
+
raise_error("RateLimit", "Too many requests", {"retryIn": 30})
|
|
486
|
+
} catch (e) {print "type:" e["type"] "message:" e["message"]}
|
|
487
|
+
```
|
|
488
|
+
|
|
489
|
+
You can also pass an `error_type(...)` object directly:
|
|
490
|
+
|
|
491
|
+
```sesi
|
|
492
|
+
let err = error_type("ValidationError", "Invalid payload", {"field": "email"})
|
|
493
|
+
raise_error(err)
|
|
494
|
+
```
|
|
495
|
+
|
|
496
|
+
**Returns**: never (always throws)
|
|
497
|
+
|
|
498
|
+
---
|
|
499
|
+
|
|
402
500
|
### random() -> number
|
|
403
501
|
|
|
404
502
|
Returns a random floating-point number between 0 (inclusive) and 1 (exclusive).
|
|
@@ -431,7 +529,7 @@ print sigmoid // 0.6224593312018546
|
|
|
431
529
|
|
|
432
530
|
## Math-like Functions (v2 planned)
|
|
433
531
|
|
|
434
|
-
These are not yet implemented in v1
|
|
532
|
+
These are not yet implemented in v1+ but will be added:
|
|
435
533
|
|
|
436
534
|
```sesi
|
|
437
535
|
// Planned for v2:
|
|
@@ -593,7 +691,7 @@ keys(obj) contains "a" // Future: not yet supported
|
|
|
593
691
|
|
|
594
692
|
---
|
|
595
693
|
|
|
596
|
-
## Standard Library Modules (Supported natively in v1.
|
|
694
|
+
## Standard Library Modules (Supported natively in v1.3+)
|
|
597
695
|
|
|
598
696
|
### std/math
|
|
599
697
|
|
|
@@ -621,7 +719,7 @@ import { parse, stringify } from "std/json"
|
|
|
621
719
|
|
|
622
720
|
---
|
|
623
721
|
|
|
624
|
-
## Module Resolution (v1.
|
|
722
|
+
## Module Resolution (v1.3+)
|
|
625
723
|
|
|
626
724
|
Sesi resolves local module imports by searching directories in priority order:
|
|
627
725
|
|
|
@@ -710,8 +808,8 @@ Tip: add a folder to SESI_PATH, or place shared modules in ~/.sesi/lib
|
|
|
710
808
|
- [Quick Start](QUICKSTART.md)
|
|
711
809
|
- [Compare to other languages](COMPARISON.md)
|
|
712
810
|
- [Specification](SPECIFICATION.md)
|
|
713
|
-
- [
|
|
811
|
+
- [Reasoning Guide](REASONING.md)
|
|
714
812
|
- [Image Generation](IMAGE_GENERATION.md)
|
|
715
813
|
- [Roadmap](ROADMAP.md)
|
|
716
|
-
- [
|
|
814
|
+
- [Concurrency Systems](CONCURRENCY.md)
|
|
717
815
|
- [Examples](../examples/)
|