@misterscan/sesi 1.1.2 → 1.2.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 +29 -8
- package/bin/sesi.js +35 -34
- package/dist/ai-runtime.d.ts +5 -0
- package/dist/ai-runtime.d.ts.map +1 -1
- package/dist/ai-runtime.js +157 -7
- package/dist/ai-runtime.js.map +1 -1
- package/dist/builtins.d.ts +1 -1
- package/dist/builtins.d.ts.map +1 -1
- package/dist/builtins.js +114 -1
- package/dist/builtins.js.map +1 -1
- package/dist/interpreter.d.ts +6 -1
- package/dist/interpreter.d.ts.map +1 -1
- package/dist/interpreter.js +210 -36
- package/dist/interpreter.js.map +1 -1
- package/dist/parser.d.ts.map +1 -1
- package/dist/parser.js +2 -0
- package/dist/parser.js.map +1 -1
- package/dist/sesi.bundled.js +534 -107
- package/dist/types.d.ts +9 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/docs/ARCHITECTURE.md +9 -9
- package/docs/BUILTINS.md +87 -8
- package/docs/DISTRIBUTED_SYSTEMS.md +1 -1
- package/docs/IMAGE_GENERATION.md +82 -1
- package/docs/IMPLEMENTATION_SUMMARY.md +544 -533
- package/docs/QUICKSTART.md +41 -1
- package/docs/README.md +19 -13
- package/docs/ROADMAP.md +10 -11
- package/docs/SPECIFICATION.md +37 -14
- package/docs/SYSTEMS_REASONING.md +35 -11
- package/docs/bakery_logo.png +0 -0
- package/docs/coffee_mug.png +0 -0
- package/docs/desk_lamp.png +0 -0
- package/docs/logo.png +0 -0
- package/docs/notebook.png +0 -0
- package/docs/sesi_ai_chronicles.md +209 -0
- package/examples/16_modules.sesi +28 -0
- package/examples/17_http_client.sesi +29 -0
- package/examples/18_parallel_requests.sesi +37 -0
- package/main/chatbot.sesi +36 -0
- package/main/conversational_classifier_weights.json +45 -0
- package/main/conversational_sentences.json +304 -0
- package/main/epochs.sesi +94 -0
- package/main/gpu_orchestrator.sesi +36 -0
- package/main/hardware_diagnostics.sesi +118 -0
- package/main/inference.sesi +54 -0
- package/main/native_chatbot.sesi +180 -0
- package/main/native_synthesizer.sesi +83 -0
- package/main/nn_personas_trainer.sesi +302 -0
- package/main/nn_responses_trainer.sesi +269 -0
- package/main/nn_sentences_trainer.sesi +330 -0
- package/main/personas.json +124 -0
- package/main/personas_classifier_weights.json +45 -0
- package/main/playground.sesi +3 -1
- package/main/predictive_typing.sesi +127 -0
- package/main/query_brain.sesi +45 -0
- package/main/response_classifier_weights.json +45 -0
- package/main/retro_chat.html +239 -0
- package/main/retro_chat_generator.sesi +745 -0
- package/main/sesi_ai.sesi +158 -0
- package/main/sesi_db_chatbot.sesi +261 -0
- package/main/terminal_chat.py +385 -0
- package/main/tests/temp_math_mod.sesi +3 -0
- package/main/tests/test_image_input.sesi +40 -0
- package/main/tests/test_v2_features.sesi +48 -0
- package/main/unified_sesi_ai.sesi +334 -0
- package/main/varied_responses.json +304 -0
- package/package.json +11 -5
- package/main/atm_deposit.sesi +0 -37
- package/main/atm_withdraw.sesi +0 -37
- package/main/data.txt +0 -1
- package/main/math_aggregator.sesi +0 -15
- package/main/math_generator.sesi +0 -7
- package/main/math_processor.sesi +0 -23
- package/main/tax_calculator.sesi +0 -15
- package/main/vault.sesi +0 -15
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@misterscan/sesi",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Sesi: A High-Performance Systems Language",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -17,13 +17,19 @@
|
|
|
17
17
|
"lint": "npx eslint --fix",
|
|
18
18
|
"build": "tsc",
|
|
19
19
|
"dev": "npm run lint &&dotenvx run -- npm run build --watch",
|
|
20
|
-
"test": "npx ts-node tests/basic.test.ts",
|
|
20
|
+
"test": "npx ts-node tests/basic.test.ts && npx ts-node tests/module.test.ts && npx ts-node tests/cache.test.ts && npx ts-node tests/http.test.ts",
|
|
21
21
|
"test:watch": "npm run lint && npx ts-node tests/basic.test.ts --watch",
|
|
22
|
-
"build:exe": "
|
|
22
|
+
"build:exe": "node ./scripts/build-binaries.mjs",
|
|
23
|
+
"msi:eula": "powershell -NoProfile -ExecutionPolicy Bypass -Command \"& 'C:\\Program Files\\WiX Toolset v7.0\\bin\\wix.exe' eula accept wix7\"",
|
|
24
|
+
"build:msi": "powershell -NoProfile -ExecutionPolicy Bypass -Command \"& 'C:\\Program Files\\WiX Toolset v7.0\\bin\\wix.exe' build .\\SesiInstaller.wxs -o .\\SesiInstaller.msi\"",
|
|
25
|
+
"build:installer": "npm run build:exe && npm run msi:eula && npm run build:msi",
|
|
26
|
+
"build:mac:pkg": "node ./scripts/build-macos-pkg.mjs",
|
|
27
|
+
"build:mac:installer": "npm run build:exe && npm run build:mac:pkg",
|
|
23
28
|
"repl": "node dist/repl.js",
|
|
24
29
|
"example": "node --no-deprecation example.js",
|
|
25
30
|
"example:ai": "node --no-deprecation example-ai.js",
|
|
26
|
-
"example:all": "bin/sesi.js examples.sesi"
|
|
31
|
+
"example:all": "bin/sesi.js examples.sesi",
|
|
32
|
+
"upload": "npm login && npm run build && npm publish --access public"
|
|
27
33
|
},
|
|
28
34
|
"keywords": [
|
|
29
35
|
"ai",
|
|
@@ -48,4 +54,4 @@
|
|
|
48
54
|
"typescript": "6.0.3",
|
|
49
55
|
"typescript-eslint": "^8.59.3"
|
|
50
56
|
}
|
|
51
|
-
}
|
|
57
|
+
}
|
package/main/atm_deposit.sesi
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
let id = "Dep_" + str(time()) + "_" + str(random())
|
|
2
|
-
let locked = true
|
|
3
|
-
while locked {
|
|
4
|
-
let status = "error"
|
|
5
|
-
try {
|
|
6
|
-
status = read_file("bank/lock.txt")
|
|
7
|
-
} catch (e) {
|
|
8
|
-
status = "error"
|
|
9
|
-
}
|
|
10
|
-
if status == "unlocked" {
|
|
11
|
-
try {
|
|
12
|
-
write_file("bank/lock.txt", id)
|
|
13
|
-
let i = 0
|
|
14
|
-
while i < 500 {
|
|
15
|
-
i = i + 1
|
|
16
|
-
}
|
|
17
|
-
if read_file("bank/lock.txt") == id {
|
|
18
|
-
locked = false
|
|
19
|
-
}
|
|
20
|
-
} catch (e) {
|
|
21
|
-
status = "error"
|
|
22
|
-
}
|
|
23
|
-
} else {
|
|
24
|
-
let j = 0
|
|
25
|
-
while j < 1000 {
|
|
26
|
-
j = j + 1
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
try {
|
|
31
|
-
write_file("bank/balance.txt", str(num(read_file("bank/balance.txt")) + 100))
|
|
32
|
-
write_file("bank/done_count.txt", str(num(read_file("bank/done_count.txt")) + 1))
|
|
33
|
-
write_file("bank/lock.txt", "unlocked")
|
|
34
|
-
print id + ": Success"
|
|
35
|
-
} catch (e) {
|
|
36
|
-
write_file("bank/lock.txt", "unlocked")
|
|
37
|
-
}
|
package/main/atm_withdraw.sesi
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
let id = "With_" + str(time()) + "_" + str(random())
|
|
2
|
-
let locked = true
|
|
3
|
-
while locked {
|
|
4
|
-
let status = "error"
|
|
5
|
-
try {
|
|
6
|
-
status = read_file("bank/lock.txt")
|
|
7
|
-
} catch (e) {
|
|
8
|
-
status = "error"
|
|
9
|
-
}
|
|
10
|
-
if status == "unlocked" {
|
|
11
|
-
try {
|
|
12
|
-
write_file("bank/lock.txt", id)
|
|
13
|
-
let i = 0
|
|
14
|
-
while i < 500 {
|
|
15
|
-
i = i + 1
|
|
16
|
-
}
|
|
17
|
-
if read_file("bank/lock.txt") == id {
|
|
18
|
-
locked = false
|
|
19
|
-
}
|
|
20
|
-
} catch (e) {
|
|
21
|
-
status = "error"
|
|
22
|
-
}
|
|
23
|
-
} else {
|
|
24
|
-
let j = 0
|
|
25
|
-
while j < 1000 {
|
|
26
|
-
j = j + 1
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
try {
|
|
31
|
-
write_file("bank/balance.txt", str(num(read_file("bank/balance.txt")) - 50))
|
|
32
|
-
write_file("bank/done_count.txt", str(num(read_file("bank/done_count.txt")) + 1))
|
|
33
|
-
write_file("bank/lock.txt", "unlocked")
|
|
34
|
-
print id + ": Success"
|
|
35
|
-
} catch (e) {
|
|
36
|
-
write_file("bank/lock.txt", "unlocked")
|
|
37
|
-
}
|
package/main/data.txt
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
Project X Status: Delayed. Reason: Scope creep. Priority: High.
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
// Math Swarm: Aggregator
|
|
2
|
-
print "📊 Aggregator: Waiting for primes..."
|
|
3
|
-
let input = ""
|
|
4
|
-
while input == "" {input = read_file("swarm/primes.txt")}
|
|
5
|
-
let primes = split(input, ",")
|
|
6
|
-
let sum = 0
|
|
7
|
-
for pStr in primes {
|
|
8
|
-
if pStr != "" {
|
|
9
|
-
sum = sum + num(pStr)
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
print "📊 Aggregator Result: "
|
|
13
|
-
print "Count: " + str(len(primes))
|
|
14
|
-
print "Sum: " + str(sum)
|
|
15
|
-
write_file("swarm/final.txt", "Count:" + str(len(primes)) + " Sum:" + str(sum))
|
package/main/math_generator.sesi
DELETED
package/main/math_processor.sesi
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
// Math Swarm: Prime Processor
|
|
2
|
-
fn isPrime(n: number) -> bool {
|
|
3
|
-
if n <= 1 {return false}
|
|
4
|
-
let i = 2
|
|
5
|
-
while i * i <= n {
|
|
6
|
-
if n % i == 0 {return false}
|
|
7
|
-
i = i + 1
|
|
8
|
-
}
|
|
9
|
-
return true
|
|
10
|
-
}
|
|
11
|
-
print "🧬 Processor: Waiting for input..."
|
|
12
|
-
let input = ""
|
|
13
|
-
while input == "" {input = read_file("swarm/input.txt")}
|
|
14
|
-
let numbers = split(input, ",")
|
|
15
|
-
let primes = []
|
|
16
|
-
for nStr in numbers {
|
|
17
|
-
if nStr != "" {
|
|
18
|
-
let n = num(nStr)
|
|
19
|
-
if isPrime(n) {push(primes, nStr)}
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
write_file("swarm/primes.txt", join(primes, ","))
|
|
23
|
-
print "Processor: Filtered " + str(len(primes)) + " primes."
|
package/main/tax_calculator.sesi
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
// Complex Tax Calculator in Sesi
|
|
2
|
-
fn calculate_income_tax(income: number, dependents: number) -> number
|
|
3
|
-
{let standard_deduction = 14600
|
|
4
|
-
let dependent_deduction = dependents * 2000
|
|
5
|
-
let taxable_income = income - standard_deduction - dependent_deduction
|
|
6
|
-
if taxable_income <= 0 {return 0}
|
|
7
|
-
let tax = 0
|
|
8
|
-
if taxable_income <= 11600 {tax = taxable_income * 0.10} else if taxable_income <= 47150 {tax = (11600 * 0.10) + ((taxable_income - 11600) * 0.12)} else if taxable_income <= 100525 {tax = (11600 * 0.10) + ((47150 - 11600) * 0.12) + ((taxable_income - 47150) * 0.22)} else {tax = (11600 * 0.10) + ((47150 - 11600) * 0.12) + ((100525 - 47150) * 0.22) + ((taxable_income - 100525) * 0.24)}
|
|
9
|
-
let self_employment_tax = income * 0.153
|
|
10
|
-
return tax + self_employment_tax}
|
|
11
|
-
let income = 85000
|
|
12
|
-
let dependents = 2
|
|
13
|
-
let total_tax = calculate_income_tax(income, dependents)
|
|
14
|
-
print "Total calculated tax for income" income
|
|
15
|
-
print "Tax liability is:" total_tax
|
package/main/vault.sesi
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
// Sesi Bank: Vault & Audit
|
|
2
|
-
// This script initializes the balance and lock state.
|
|
3
|
-
|
|
4
|
-
fn init() {
|
|
5
|
-
print "🏦 Vault: Initializing bank database..."
|
|
6
|
-
write_file("bank/balance.txt", "1000")
|
|
7
|
-
write_file("bank/lock.txt", "unlocked")
|
|
8
|
-
print "Vault: System Ready. Initial Balance: 1000"
|
|
9
|
-
}
|
|
10
|
-
fn audit() {
|
|
11
|
-
let balance = read_file("bank/balance.txt")
|
|
12
|
-
print "🏦 Vault Audit: Final Balance is: " + balance
|
|
13
|
-
}
|
|
14
|
-
make_dir("bank")
|
|
15
|
-
init()
|