dirac-lang 0.1.83 → 0.1.85
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/dist/{agent-VAFUNYDM.js → agent-GEKJQGEE.js} +2 -2
- package/dist/{chunk-TYIDNAZ7.js → chunk-5ZWDEJPQ.js} +13 -13
- package/dist/{chunk-VUMS53GF.js → chunk-CAPEXLIN.js} +1 -1
- package/dist/{chunk-CLGQYGHT.js → chunk-XM5V6O2F.js} +1 -1
- package/dist/cli.js +19 -13
- package/dist/{cron-RWSM6IBB.js → cron-PSKTXN2J.js} +1 -1
- package/dist/index.js +2 -2
- package/dist/{interpreter-X5V2FFGI.js → interpreter-UEVX5OAP.js} +1 -1
- package/dist/{run-at-3QL4C4UD.js → run-at-HH4TEYG7.js} +1 -1
- package/dist/{schedule-4B3KUC7T.js → schedule-IXCATP3Q.js} +1 -1
- package/dist/{session-server-IDEV4CXY.js → session-server-H5NGDYLR.js} +2 -2
- package/dist/{shell-QEN2FMAY.js → shell-I4GW5MNZ.js} +21 -15
- package/dist/test-runner.js +1 -1
- package/package.json +1 -1
|
@@ -2,8 +2,8 @@ import {
|
|
|
2
2
|
SessionServer,
|
|
3
3
|
getSocketPath,
|
|
4
4
|
isSessionRunning
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-XM5V6O2F.js";
|
|
6
|
+
import "./chunk-5ZWDEJPQ.js";
|
|
7
7
|
import "./chunk-VC23AJJJ.js";
|
|
8
8
|
import "./chunk-FPDW535D.js";
|
|
9
9
|
import "./chunk-HRHAMPOB.js";
|
|
@@ -487,12 +487,12 @@ async function executeIf(session, element) {
|
|
|
487
487
|
const condition = await evaluatePredicate(session, conditionElement);
|
|
488
488
|
if (condition) {
|
|
489
489
|
if (thenElement) {
|
|
490
|
-
const { integrateChildren: integrateChildren2 } = await import("./interpreter-
|
|
490
|
+
const { integrateChildren: integrateChildren2 } = await import("./interpreter-UEVX5OAP.js");
|
|
491
491
|
await integrateChildren2(session, thenElement);
|
|
492
492
|
}
|
|
493
493
|
} else {
|
|
494
494
|
if (elseElement) {
|
|
495
|
-
const { integrateChildren: integrateChildren2 } = await import("./interpreter-
|
|
495
|
+
const { integrateChildren: integrateChildren2 } = await import("./interpreter-UEVX5OAP.js");
|
|
496
496
|
await integrateChildren2(session, elseElement);
|
|
497
497
|
}
|
|
498
498
|
}
|
|
@@ -505,7 +505,7 @@ async function evaluatePredicate(session, predicateElement) {
|
|
|
505
505
|
return await evaluateCondition(session, predicateElement);
|
|
506
506
|
}
|
|
507
507
|
const outputLengthBefore = session.output.length;
|
|
508
|
-
const { integrate: integrate2 } = await import("./interpreter-
|
|
508
|
+
const { integrate: integrate2 } = await import("./interpreter-UEVX5OAP.js");
|
|
509
509
|
await integrate2(session, predicateElement);
|
|
510
510
|
const newOutputChunks = session.output.slice(outputLengthBefore);
|
|
511
511
|
const result = newOutputChunks.join("").trim();
|
|
@@ -528,11 +528,11 @@ async function evaluateCondition(session, condElement) {
|
|
|
528
528
|
}
|
|
529
529
|
const outputLengthBefore = session.output.length;
|
|
530
530
|
const args = [];
|
|
531
|
-
const { integrate: integrate2 } = await import("./interpreter-
|
|
531
|
+
const { integrate: integrate2 } = await import("./interpreter-UEVX5OAP.js");
|
|
532
532
|
for (const child of condElement.children) {
|
|
533
533
|
if (child.tag.toLowerCase() === "arg") {
|
|
534
534
|
const argOutputStart = session.output.length;
|
|
535
|
-
const { integrateChildren: integrateChildren2 } = await import("./interpreter-
|
|
535
|
+
const { integrateChildren: integrateChildren2 } = await import("./interpreter-UEVX5OAP.js");
|
|
536
536
|
await integrateChildren2(session, child);
|
|
537
537
|
const newChunks = session.output.slice(argOutputStart);
|
|
538
538
|
const argValue = newChunks.join("");
|
|
@@ -763,7 +763,7 @@ async function executeLLM(session, element) {
|
|
|
763
763
|
const isOpenAI = providerName === "OpenAI";
|
|
764
764
|
const isOllama = providerName === "OllamaProvider";
|
|
765
765
|
const isCustom = providerName === "CustomLLMProvider";
|
|
766
|
-
const defaultModel = isOpenAI ? "gpt-4.1-2025-04-14" : isOllama ? "llama2" : isCustom ? "custom-model" : "claude-sonnet-4-
|
|
766
|
+
const defaultModel = isOpenAI ? "gpt-4.1-2025-04-14" : isOllama ? "llama2" : isCustom ? "custom-model" : "claude-sonnet-4-5-20250929";
|
|
767
767
|
const model = element.attributes.model || process.env.DEFAULT_MODEL || defaultModel;
|
|
768
768
|
const outputVar = element.attributes.output;
|
|
769
769
|
const contextVar = element.attributes.context;
|
|
@@ -1756,7 +1756,7 @@ async function executeTagCheck(session, element) {
|
|
|
1756
1756
|
const executeTag = correctedTag || tagName;
|
|
1757
1757
|
console.error(`[tag-check] Executing <${executeTag}/> as all checks passed and execute=true.`);
|
|
1758
1758
|
const elementToExecute = correctedTag ? { ...child, tag: correctedTag } : child;
|
|
1759
|
-
const { integrate: integrate2 } = await import("./interpreter-
|
|
1759
|
+
const { integrate: integrate2 } = await import("./interpreter-UEVX5OAP.js");
|
|
1760
1760
|
await integrate2(session, elementToExecute);
|
|
1761
1761
|
}
|
|
1762
1762
|
}
|
|
@@ -1765,7 +1765,7 @@ async function executeTagCheck(session, element) {
|
|
|
1765
1765
|
// src/tags/throw.ts
|
|
1766
1766
|
async function executeThrow(session, element) {
|
|
1767
1767
|
const exceptionName = element.attributes?.name || "exception";
|
|
1768
|
-
const { integrateChildren: integrateChildren2 } = await import("./interpreter-
|
|
1768
|
+
const { integrateChildren: integrateChildren2 } = await import("./interpreter-UEVX5OAP.js");
|
|
1769
1769
|
const exceptionDom = {
|
|
1770
1770
|
tag: "exception-content",
|
|
1771
1771
|
attributes: { name: exceptionName },
|
|
@@ -1778,7 +1778,7 @@ async function executeThrow(session, element) {
|
|
|
1778
1778
|
// src/tags/try.ts
|
|
1779
1779
|
async function executeTry(session, element) {
|
|
1780
1780
|
setExceptionBoundary(session);
|
|
1781
|
-
const { integrateChildren: integrateChildren2 } = await import("./interpreter-
|
|
1781
|
+
const { integrateChildren: integrateChildren2 } = await import("./interpreter-UEVX5OAP.js");
|
|
1782
1782
|
await integrateChildren2(session, element);
|
|
1783
1783
|
unsetExceptionBoundary(session);
|
|
1784
1784
|
}
|
|
@@ -1788,7 +1788,7 @@ async function executeCatch(session, element) {
|
|
|
1788
1788
|
const exceptionName = element.attributes?.name || "exception";
|
|
1789
1789
|
const caughtCount = lookupException(session, exceptionName);
|
|
1790
1790
|
if (caughtCount > 0) {
|
|
1791
|
-
const { integrateChildren: integrateChildren2 } = await import("./interpreter-
|
|
1791
|
+
const { integrateChildren: integrateChildren2 } = await import("./interpreter-UEVX5OAP.js");
|
|
1792
1792
|
await integrateChildren2(session, element);
|
|
1793
1793
|
}
|
|
1794
1794
|
flushCurrentException(session);
|
|
@@ -1797,7 +1797,7 @@ async function executeCatch(session, element) {
|
|
|
1797
1797
|
// src/tags/exception.ts
|
|
1798
1798
|
async function executeException(session, element) {
|
|
1799
1799
|
const exceptions = getCurrentExceptions(session);
|
|
1800
|
-
const { integrateChildren: integrateChildren2 } = await import("./interpreter-
|
|
1800
|
+
const { integrateChildren: integrateChildren2 } = await import("./interpreter-UEVX5OAP.js");
|
|
1801
1801
|
for (const exceptionDom of exceptions) {
|
|
1802
1802
|
await integrateChildren2(session, exceptionDom);
|
|
1803
1803
|
}
|
|
@@ -1998,7 +1998,7 @@ async function executeLoadContext(session, element) {
|
|
|
1998
1998
|
query = element.text.trim();
|
|
1999
1999
|
}
|
|
2000
2000
|
if (!query && element.children.length > 0) {
|
|
2001
|
-
const { integrate: integrate2 } = await import("./interpreter-
|
|
2001
|
+
const { integrate: integrate2 } = await import("./interpreter-UEVX5OAP.js");
|
|
2002
2002
|
const beforeOutput = session.output.length;
|
|
2003
2003
|
for (const child of element.children) {
|
|
2004
2004
|
await integrate2(session, child);
|
|
@@ -2429,7 +2429,7 @@ async function executeForeach(session, element) {
|
|
|
2429
2429
|
const parser2 = new DiracParser2();
|
|
2430
2430
|
try {
|
|
2431
2431
|
const fromElement = parser2.parse(fromAttr);
|
|
2432
|
-
const { integrate: integrate2 } = await import("./interpreter-
|
|
2432
|
+
const { integrate: integrate2 } = await import("./interpreter-UEVX5OAP.js");
|
|
2433
2433
|
await integrate2(session, fromElement);
|
|
2434
2434
|
} catch (e) {
|
|
2435
2435
|
session.output = savedOutput;
|
package/dist/cli.js
CHANGED
|
@@ -4,8 +4,8 @@ import {
|
|
|
4
4
|
} from "./chunk-AJSYOXXZ.js";
|
|
5
5
|
import {
|
|
6
6
|
execute
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-CAPEXLIN.js";
|
|
8
|
+
import "./chunk-5ZWDEJPQ.js";
|
|
9
9
|
import "./chunk-VC23AJJJ.js";
|
|
10
10
|
import "./chunk-FPDW535D.js";
|
|
11
11
|
import "./chunk-HRHAMPOB.js";
|
|
@@ -17,7 +17,7 @@ import "dotenv/config";
|
|
|
17
17
|
// package.json
|
|
18
18
|
var package_default = {
|
|
19
19
|
name: "dirac-lang",
|
|
20
|
-
version: "0.1.
|
|
20
|
+
version: "0.1.84",
|
|
21
21
|
description: "LLM-Augmented Declarative Execution",
|
|
22
22
|
type: "module",
|
|
23
23
|
main: "dist/index.js",
|
|
@@ -115,13 +115,19 @@ function loadShellConfig(args = []) {
|
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
117
|
if (!shellConfig.llmProvider) {
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
118
|
+
if (process.env.LLM_PROVIDER) {
|
|
119
|
+
shellConfig.llmProvider = process.env.LLM_PROVIDER;
|
|
120
|
+
}
|
|
121
|
+
if (process.env.LLM_MODEL) {
|
|
122
|
+
shellConfig.llmModel = process.env.LLM_MODEL;
|
|
123
|
+
}
|
|
124
|
+
if (process.env.CUSTOM_LLM_URL) {
|
|
125
|
+
shellConfig.customLLMUrl = process.env.CUSTOM_LLM_URL;
|
|
126
|
+
}
|
|
121
127
|
if (!shellConfig.llmProvider) {
|
|
122
128
|
if (process.env.ANTHROPIC_API_KEY) {
|
|
123
129
|
shellConfig.llmProvider = "anthropic";
|
|
124
|
-
shellConfig.llmModel = shellConfig.llmModel || "claude-sonnet-4-
|
|
130
|
+
shellConfig.llmModel = shellConfig.llmModel || "claude-sonnet-4-5-20250929";
|
|
125
131
|
} else if (process.env.OPENAI_API_KEY) {
|
|
126
132
|
shellConfig.llmProvider = "openai";
|
|
127
133
|
shellConfig.llmModel = shellConfig.llmModel || "gpt-4o";
|
|
@@ -145,7 +151,7 @@ async function main() {
|
|
|
145
151
|
const args = process.argv.slice(2);
|
|
146
152
|
const calledAs = process.argv[1];
|
|
147
153
|
if (calledAs && calledAs.endsWith("/dish")) {
|
|
148
|
-
const { DiracShell } = await import("./shell-
|
|
154
|
+
const { DiracShell } = await import("./shell-I4GW5MNZ.js");
|
|
149
155
|
const shellConfig = loadShellConfig(args);
|
|
150
156
|
const shell = new DiracShell(shellConfig);
|
|
151
157
|
await shell.start();
|
|
@@ -194,11 +200,11 @@ async function main() {
|
|
|
194
200
|
if (args[0] === "agent") {
|
|
195
201
|
const subcommand = args[1];
|
|
196
202
|
if (subcommand === "daemon") {
|
|
197
|
-
const { runAgentDaemon } = await import("./agent-
|
|
203
|
+
const { runAgentDaemon } = await import("./agent-GEKJQGEE.js");
|
|
198
204
|
await runAgentDaemon();
|
|
199
205
|
return;
|
|
200
206
|
}
|
|
201
|
-
const { AgentCLI } = await import("./agent-
|
|
207
|
+
const { AgentCLI } = await import("./agent-GEKJQGEE.js");
|
|
202
208
|
const agent = new AgentCLI();
|
|
203
209
|
switch (subcommand) {
|
|
204
210
|
case "start":
|
|
@@ -225,8 +231,8 @@ async function main() {
|
|
|
225
231
|
return;
|
|
226
232
|
}
|
|
227
233
|
if (args[0] === "shell") {
|
|
228
|
-
const { DiracShell } = await import("./shell-
|
|
229
|
-
const { SessionServer, isSessionRunning, getSocketPath } = await import("./session-server-
|
|
234
|
+
const { DiracShell } = await import("./shell-I4GW5MNZ.js");
|
|
235
|
+
const { SessionServer, isSessionRunning, getSocketPath } = await import("./session-server-H5NGDYLR.js");
|
|
230
236
|
const { SessionClient } = await import("./session-client-3VTC5MLO.js");
|
|
231
237
|
const daemonMode = args.includes("--daemon") || args.includes("-d");
|
|
232
238
|
const agentMode = args.includes("--agent") || args.includes("-a");
|
|
@@ -272,7 +278,7 @@ async function main() {
|
|
|
272
278
|
return;
|
|
273
279
|
}
|
|
274
280
|
if (args[0] === "daemon") {
|
|
275
|
-
const { SessionServer } = await import("./session-server-
|
|
281
|
+
const { SessionServer } = await import("./session-server-H5NGDYLR.js");
|
|
276
282
|
const server = new SessionServer();
|
|
277
283
|
await server.start();
|
|
278
284
|
console.log("Session daemon started");
|
package/dist/index.js
CHANGED
|
@@ -2,10 +2,10 @@ import {
|
|
|
2
2
|
createLLMAdapter,
|
|
3
3
|
execute,
|
|
4
4
|
executeUserCommand
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-CAPEXLIN.js";
|
|
6
6
|
import {
|
|
7
7
|
integrate
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-5ZWDEJPQ.js";
|
|
9
9
|
import "./chunk-VC23AJJJ.js";
|
|
10
10
|
import "./chunk-FPDW535D.js";
|
|
11
11
|
import {
|
|
@@ -2,8 +2,8 @@ import {
|
|
|
2
2
|
SessionServer,
|
|
3
3
|
getSocketPath,
|
|
4
4
|
isSessionRunning
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-XM5V6O2F.js";
|
|
6
|
+
import "./chunk-5ZWDEJPQ.js";
|
|
7
7
|
import "./chunk-VC23AJJJ.js";
|
|
8
8
|
import "./chunk-FPDW535D.js";
|
|
9
9
|
import "./chunk-HRHAMPOB.js";
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./chunk-AJSYOXXZ.js";
|
|
5
5
|
import {
|
|
6
6
|
integrate
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-5ZWDEJPQ.js";
|
|
8
8
|
import "./chunk-VC23AJJJ.js";
|
|
9
9
|
import "./chunk-FPDW535D.js";
|
|
10
10
|
import {
|
|
@@ -360,7 +360,7 @@ var DiracShell = class {
|
|
|
360
360
|
if (this.client) {
|
|
361
361
|
this.client.disconnect();
|
|
362
362
|
}
|
|
363
|
-
import("./schedule-
|
|
363
|
+
import("./schedule-IXCATP3Q.js").then(({ stopAllScheduledTasks }) => {
|
|
364
364
|
stopAllScheduledTasks();
|
|
365
365
|
console.log("\nGoodbye!");
|
|
366
366
|
process.exit(0);
|
|
@@ -753,7 +753,7 @@ Examples:
|
|
|
753
753
|
break;
|
|
754
754
|
case "tasks":
|
|
755
755
|
try {
|
|
756
|
-
const { listScheduledTasks } = await import("./schedule-
|
|
756
|
+
const { listScheduledTasks } = await import("./schedule-IXCATP3Q.js");
|
|
757
757
|
const tasks = listScheduledTasks();
|
|
758
758
|
if (tasks.length === 0) {
|
|
759
759
|
console.log("No scheduled tasks running.");
|
|
@@ -772,7 +772,7 @@ Examples:
|
|
|
772
772
|
console.log("Usage: :stop <task-name>");
|
|
773
773
|
} else {
|
|
774
774
|
try {
|
|
775
|
-
const { stopScheduledTask } = await import("./schedule-
|
|
775
|
+
const { stopScheduledTask } = await import("./schedule-IXCATP3Q.js");
|
|
776
776
|
const taskName = args[0];
|
|
777
777
|
const stopped = stopScheduledTask(taskName);
|
|
778
778
|
if (stopped) {
|
|
@@ -787,7 +787,7 @@ Examples:
|
|
|
787
787
|
break;
|
|
788
788
|
case "stopall":
|
|
789
789
|
try {
|
|
790
|
-
const { stopAllScheduledTasks } = await import("./schedule-
|
|
790
|
+
const { stopAllScheduledTasks } = await import("./schedule-IXCATP3Q.js");
|
|
791
791
|
stopAllScheduledTasks();
|
|
792
792
|
console.log("All scheduled tasks stopped.");
|
|
793
793
|
} catch (error) {
|
|
@@ -796,7 +796,7 @@ Examples:
|
|
|
796
796
|
break;
|
|
797
797
|
case "crons":
|
|
798
798
|
try {
|
|
799
|
-
const { listCronJobs } = await import("./cron-
|
|
799
|
+
const { listCronJobs } = await import("./cron-PSKTXN2J.js");
|
|
800
800
|
const jobs = listCronJobs();
|
|
801
801
|
if (jobs.length === 0) {
|
|
802
802
|
console.log("No cron jobs running.");
|
|
@@ -816,7 +816,7 @@ Examples:
|
|
|
816
816
|
console.log("Usage: :stopcron <job-name>");
|
|
817
817
|
} else {
|
|
818
818
|
try {
|
|
819
|
-
const { stopCronJob } = await import("./cron-
|
|
819
|
+
const { stopCronJob } = await import("./cron-PSKTXN2J.js");
|
|
820
820
|
const jobName = args[0];
|
|
821
821
|
const stopped = stopCronJob(jobName);
|
|
822
822
|
if (stopped) {
|
|
@@ -831,7 +831,7 @@ Examples:
|
|
|
831
831
|
break;
|
|
832
832
|
case "stopallcrons":
|
|
833
833
|
try {
|
|
834
|
-
const { stopAllCronJobs } = await import("./cron-
|
|
834
|
+
const { stopAllCronJobs } = await import("./cron-PSKTXN2J.js");
|
|
835
835
|
stopAllCronJobs();
|
|
836
836
|
console.log("All cron jobs stopped.");
|
|
837
837
|
} catch (error) {
|
|
@@ -840,7 +840,7 @@ Examples:
|
|
|
840
840
|
break;
|
|
841
841
|
case "scheduled":
|
|
842
842
|
try {
|
|
843
|
-
const { listScheduledRuns } = await import("./run-at-
|
|
843
|
+
const { listScheduledRuns } = await import("./run-at-HH4TEYG7.js");
|
|
844
844
|
const runs = listScheduledRuns();
|
|
845
845
|
if (runs.length === 0) {
|
|
846
846
|
console.log("No scheduled runs pending.");
|
|
@@ -860,7 +860,7 @@ Examples:
|
|
|
860
860
|
console.log("Usage: :cancel <run-name>");
|
|
861
861
|
} else {
|
|
862
862
|
try {
|
|
863
|
-
const { cancelScheduledRun } = await import("./run-at-
|
|
863
|
+
const { cancelScheduledRun } = await import("./run-at-HH4TEYG7.js");
|
|
864
864
|
const runName = args[0];
|
|
865
865
|
const cancelled = cancelScheduledRun(runName);
|
|
866
866
|
if (cancelled) {
|
|
@@ -875,7 +875,7 @@ Examples:
|
|
|
875
875
|
break;
|
|
876
876
|
case "cancelall":
|
|
877
877
|
try {
|
|
878
|
-
const { cancelAllScheduledRuns } = await import("./run-at-
|
|
878
|
+
const { cancelAllScheduledRuns } = await import("./run-at-HH4TEYG7.js");
|
|
879
879
|
cancelAllScheduledRuns();
|
|
880
880
|
console.log("All scheduled runs cancelled.");
|
|
881
881
|
} catch (error) {
|
|
@@ -1103,13 +1103,19 @@ async function main() {
|
|
|
1103
1103
|
}
|
|
1104
1104
|
}
|
|
1105
1105
|
if (!configLoaded) {
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1106
|
+
if (process.env.LLM_PROVIDER) {
|
|
1107
|
+
config.llmProvider = process.env.LLM_PROVIDER;
|
|
1108
|
+
}
|
|
1109
|
+
if (process.env.LLM_MODEL) {
|
|
1110
|
+
config.llmModel = process.env.LLM_MODEL;
|
|
1111
|
+
}
|
|
1112
|
+
if (process.env.CUSTOM_LLM_URL) {
|
|
1113
|
+
config.customLLMUrl = process.env.CUSTOM_LLM_URL;
|
|
1114
|
+
}
|
|
1109
1115
|
if (!config.llmProvider) {
|
|
1110
1116
|
if (process.env.ANTHROPIC_API_KEY) {
|
|
1111
1117
|
config.llmProvider = "anthropic";
|
|
1112
|
-
config.llmModel = config.llmModel || "claude-sonnet-4-
|
|
1118
|
+
config.llmModel = config.llmModel || "claude-sonnet-4-5-20250929";
|
|
1113
1119
|
} else if (process.env.OPENAI_API_KEY) {
|
|
1114
1120
|
config.llmProvider = "openai";
|
|
1115
1121
|
config.llmModel = config.llmModel || "gpt-4o";
|
package/dist/test-runner.js
CHANGED