dirac-lang 0.1.104 → 0.1.105

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.
@@ -2,8 +2,8 @@ import {
2
2
  SessionServer,
3
3
  getSocketPath,
4
4
  isSessionRunning
5
- } from "./chunk-4RNEDDMF.js";
6
- import "./chunk-WMNKUJXR.js";
5
+ } from "./chunk-Y4F6HI7M.js";
6
+ import "./chunk-6PC6JD6D.js";
7
7
  import "./chunk-53QJQ2CC.js";
8
8
  import "./chunk-HRHAMPOB.js";
9
9
  import "./chunk-EAM7IZWA.js";
@@ -493,12 +493,12 @@ async function executeIf(session, element) {
493
493
  const condition = await evaluatePredicate(session, conditionElement);
494
494
  if (condition) {
495
495
  if (thenElement) {
496
- const { integrateChildren: integrateChildren2 } = await import("./interpreter-PQRJL5V7.js");
496
+ const { integrateChildren: integrateChildren2 } = await import("./interpreter-KWWALPPP.js");
497
497
  await integrateChildren2(session, thenElement);
498
498
  }
499
499
  } else {
500
500
  if (elseElement) {
501
- const { integrateChildren: integrateChildren2 } = await import("./interpreter-PQRJL5V7.js");
501
+ const { integrateChildren: integrateChildren2 } = await import("./interpreter-KWWALPPP.js");
502
502
  await integrateChildren2(session, elseElement);
503
503
  }
504
504
  }
@@ -511,7 +511,7 @@ async function evaluatePredicate(session, predicateElement) {
511
511
  return await evaluateCondition(session, predicateElement);
512
512
  }
513
513
  const outputLengthBefore = session.output.length;
514
- const { integrate: integrate2 } = await import("./interpreter-PQRJL5V7.js");
514
+ const { integrate: integrate2 } = await import("./interpreter-KWWALPPP.js");
515
515
  await integrate2(session, predicateElement);
516
516
  const newOutputChunks = session.output.slice(outputLengthBefore);
517
517
  const result = newOutputChunks.join("").trim();
@@ -534,11 +534,11 @@ async function evaluateCondition(session, condElement) {
534
534
  }
535
535
  const outputLengthBefore = session.output.length;
536
536
  const args = [];
537
- const { integrate: integrate2 } = await import("./interpreter-PQRJL5V7.js");
537
+ const { integrate: integrate2 } = await import("./interpreter-KWWALPPP.js");
538
538
  for (const child of condElement.children) {
539
539
  if (child.tag.toLowerCase() === "arg") {
540
540
  const argOutputStart = session.output.length;
541
- const { integrateChildren: integrateChildren2 } = await import("./interpreter-PQRJL5V7.js");
541
+ const { integrateChildren: integrateChildren2 } = await import("./interpreter-KWWALPPP.js");
542
542
  await integrateChildren2(session, child);
543
543
  const newChunks = session.output.slice(argOutputStart);
544
544
  const argValue = newChunks.join("");
@@ -1101,6 +1101,14 @@ ${result}
1101
1101
  }
1102
1102
  }
1103
1103
  const outputBefore = session.output.length;
1104
+ const trimmedCode = diracCode.trim();
1105
+ if (trimmedCode === "<DONE />" || trimmedCode === "<DONE/>") {
1106
+ if (session.debug) {
1107
+ console.error(`[LLM] Feedback loop terminating - LLM indicated completion with <DONE /> (before parsing)
1108
+ `);
1109
+ }
1110
+ break;
1111
+ }
1104
1112
  try {
1105
1113
  console.error(`[LLM] Iteration ${iteration}: Parsing LLM response`);
1106
1114
  const parser = new DiracParser();
@@ -2109,7 +2117,7 @@ async function executeTagCheck(session, element) {
2109
2117
  const executeTag = correctedTag || tagName;
2110
2118
  console.error(`[tag-check] Executing <${executeTag}/> as all checks passed and execute=true.`);
2111
2119
  const elementToExecute = correctedTag ? { ...child, tag: correctedTag } : child;
2112
- const { integrate: integrate2 } = await import("./interpreter-PQRJL5V7.js");
2120
+ const { integrate: integrate2 } = await import("./interpreter-KWWALPPP.js");
2113
2121
  await integrate2(session, elementToExecute);
2114
2122
  }
2115
2123
  }
@@ -2118,7 +2126,7 @@ async function executeTagCheck(session, element) {
2118
2126
  // src/tags/throw.ts
2119
2127
  async function executeThrow(session, element) {
2120
2128
  const exceptionName = element.attributes?.name || "exception";
2121
- const { integrateChildren: integrateChildren2 } = await import("./interpreter-PQRJL5V7.js");
2129
+ const { integrateChildren: integrateChildren2 } = await import("./interpreter-KWWALPPP.js");
2122
2130
  const exceptionDom = {
2123
2131
  tag: "exception-content",
2124
2132
  attributes: { name: exceptionName },
@@ -2131,7 +2139,7 @@ async function executeThrow(session, element) {
2131
2139
  // src/tags/try.ts
2132
2140
  async function executeTry(session, element) {
2133
2141
  setExceptionBoundary(session);
2134
- const { integrateChildren: integrateChildren2 } = await import("./interpreter-PQRJL5V7.js");
2142
+ const { integrateChildren: integrateChildren2 } = await import("./interpreter-KWWALPPP.js");
2135
2143
  await integrateChildren2(session, element);
2136
2144
  unsetExceptionBoundary(session);
2137
2145
  }
@@ -2141,7 +2149,7 @@ async function executeCatch(session, element) {
2141
2149
  const exceptionName = element.attributes?.name || "exception";
2142
2150
  const caughtCount = lookupException(session, exceptionName);
2143
2151
  if (caughtCount > 0) {
2144
- const { integrateChildren: integrateChildren2 } = await import("./interpreter-PQRJL5V7.js");
2152
+ const { integrateChildren: integrateChildren2 } = await import("./interpreter-KWWALPPP.js");
2145
2153
  await integrateChildren2(session, element);
2146
2154
  }
2147
2155
  flushCurrentException(session);
@@ -2150,7 +2158,7 @@ async function executeCatch(session, element) {
2150
2158
  // src/tags/exception.ts
2151
2159
  async function executeException(session, element) {
2152
2160
  const exceptions = getCurrentExceptions(session);
2153
- const { integrateChildren: integrateChildren2 } = await import("./interpreter-PQRJL5V7.js");
2161
+ const { integrateChildren: integrateChildren2 } = await import("./interpreter-KWWALPPP.js");
2154
2162
  for (const exceptionDom of exceptions) {
2155
2163
  await integrateChildren2(session, exceptionDom);
2156
2164
  }
@@ -2351,7 +2359,7 @@ async function executeLoadContext(session, element) {
2351
2359
  query = element.text.trim();
2352
2360
  }
2353
2361
  if (!query && element.children.length > 0) {
2354
- const { integrate: integrate2 } = await import("./interpreter-PQRJL5V7.js");
2362
+ const { integrate: integrate2 } = await import("./interpreter-KWWALPPP.js");
2355
2363
  const beforeOutput = session.output.length;
2356
2364
  for (const child of element.children) {
2357
2365
  await integrate2(session, child);
@@ -3236,7 +3244,7 @@ async function executeForeach(session, element) {
3236
3244
  const parser2 = new DiracParser2();
3237
3245
  try {
3238
3246
  const fromElement = parser2.parse(fromAttr);
3239
- const { integrate: integrate2 } = await import("./interpreter-PQRJL5V7.js");
3247
+ const { integrate: integrate2 } = await import("./interpreter-KWWALPPP.js");
3240
3248
  await integrate2(session, fromElement);
3241
3249
  } catch (e) {
3242
3250
  session.output = savedOutput;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  integrate
3
- } from "./chunk-WMNKUJXR.js";
3
+ } from "./chunk-6PC6JD6D.js";
4
4
  import {
5
5
  DiracParser
6
6
  } from "./chunk-HRHAMPOB.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  integrate
3
- } from "./chunk-WMNKUJXR.js";
3
+ } from "./chunk-6PC6JD6D.js";
4
4
  import {
5
5
  DiracParser
6
6
  } from "./chunk-HRHAMPOB.js";
package/dist/cli.js CHANGED
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  execute
4
- } from "./chunk-IWHU4S7Q.js";
4
+ } from "./chunk-ZAOLZKL4.js";
5
5
  import {
6
6
  BraKetParser
7
- } from "./chunk-WMNKUJXR.js";
7
+ } from "./chunk-6PC6JD6D.js";
8
8
  import "./chunk-53QJQ2CC.js";
9
9
  import "./chunk-HRHAMPOB.js";
10
10
  import "./chunk-EAM7IZWA.js";
@@ -16,7 +16,7 @@ import "dotenv/config";
16
16
  // package.json
17
17
  var package_default = {
18
18
  name: "dirac-lang",
19
- version: "0.1.103",
19
+ version: "0.1.104",
20
20
  description: "LLM-Augmented Declarative Execution",
21
21
  type: "module",
22
22
  main: "dist/index.js",
@@ -150,7 +150,7 @@ async function main() {
150
150
  const args = process.argv.slice(2);
151
151
  const calledAs = process.argv[1];
152
152
  if (calledAs && calledAs.endsWith("/dish")) {
153
- const { DiracShell } = await import("./shell-PVJ255M7.js");
153
+ const { DiracShell } = await import("./shell-7P6GR7L4.js");
154
154
  const shellConfig = loadShellConfig(args);
155
155
  const shell = new DiracShell(shellConfig);
156
156
  await shell.start();
@@ -199,11 +199,11 @@ async function main() {
199
199
  if (args[0] === "agent") {
200
200
  const subcommand = args[1];
201
201
  if (subcommand === "daemon") {
202
- const { runAgentDaemon } = await import("./agent-MA26RVA7.js");
202
+ const { runAgentDaemon } = await import("./agent-CRG4AE5I.js");
203
203
  await runAgentDaemon();
204
204
  return;
205
205
  }
206
- const { AgentCLI } = await import("./agent-MA26RVA7.js");
206
+ const { AgentCLI } = await import("./agent-CRG4AE5I.js");
207
207
  const agent = new AgentCLI();
208
208
  switch (subcommand) {
209
209
  case "start":
@@ -230,8 +230,8 @@ async function main() {
230
230
  return;
231
231
  }
232
232
  if (args[0] === "shell") {
233
- const { DiracShell } = await import("./shell-PVJ255M7.js");
234
- const { SessionServer, isSessionRunning, getSocketPath } = await import("./session-server-J73NWCB4.js");
233
+ const { DiracShell } = await import("./shell-7P6GR7L4.js");
234
+ const { SessionServer, isSessionRunning, getSocketPath } = await import("./session-server-ZGMU2ZRH.js");
235
235
  const { SessionClient } = await import("./session-client-3VTC5MLO.js");
236
236
  const daemonMode = args.includes("--daemon") || args.includes("-d");
237
237
  const agentMode = args.includes("--agent") || args.includes("-a");
@@ -277,7 +277,7 @@ async function main() {
277
277
  return;
278
278
  }
279
279
  if (args[0] === "daemon") {
280
- const { SessionServer } = await import("./session-server-J73NWCB4.js");
280
+ const { SessionServer } = await import("./session-server-ZGMU2ZRH.js");
281
281
  const server = new SessionServer();
282
282
  await server.start();
283
283
  console.log("Session daemon started");
@@ -3,7 +3,7 @@ import {
3
3
  listCronJobs,
4
4
  stopAllCronJobs,
5
5
  stopCronJob
6
- } from "./chunk-WMNKUJXR.js";
6
+ } from "./chunk-6PC6JD6D.js";
7
7
  import "./chunk-53QJQ2CC.js";
8
8
  import "./chunk-HRHAMPOB.js";
9
9
  import "./chunk-EAM7IZWA.js";
package/dist/index.js CHANGED
@@ -2,10 +2,10 @@ import {
2
2
  createLLMAdapter,
3
3
  execute,
4
4
  executeUserCommand
5
- } from "./chunk-IWHU4S7Q.js";
5
+ } from "./chunk-ZAOLZKL4.js";
6
6
  import {
7
7
  integrate
8
- } from "./chunk-WMNKUJXR.js";
8
+ } from "./chunk-6PC6JD6D.js";
9
9
  import "./chunk-53QJQ2CC.js";
10
10
  import {
11
11
  DiracParser
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  integrate,
3
3
  integrateChildren
4
- } from "./chunk-WMNKUJXR.js";
4
+ } from "./chunk-6PC6JD6D.js";
5
5
  import "./chunk-53QJQ2CC.js";
6
6
  import "./chunk-HRHAMPOB.js";
7
7
  import "./chunk-EAM7IZWA.js";
@@ -3,7 +3,7 @@ import {
3
3
  cancelScheduledRun,
4
4
  executeRunAt,
5
5
  listScheduledRuns
6
- } from "./chunk-WMNKUJXR.js";
6
+ } from "./chunk-6PC6JD6D.js";
7
7
  import "./chunk-53QJQ2CC.js";
8
8
  import "./chunk-HRHAMPOB.js";
9
9
  import "./chunk-EAM7IZWA.js";
@@ -3,7 +3,7 @@ import {
3
3
  listScheduledTasks,
4
4
  stopAllScheduledTasks,
5
5
  stopScheduledTask
6
- } from "./chunk-WMNKUJXR.js";
6
+ } from "./chunk-6PC6JD6D.js";
7
7
  import "./chunk-53QJQ2CC.js";
8
8
  import "./chunk-HRHAMPOB.js";
9
9
  import "./chunk-EAM7IZWA.js";
@@ -2,8 +2,8 @@ import {
2
2
  SessionServer,
3
3
  getSocketPath,
4
4
  isSessionRunning
5
- } from "./chunk-4RNEDDMF.js";
6
- import "./chunk-WMNKUJXR.js";
5
+ } from "./chunk-Y4F6HI7M.js";
6
+ import "./chunk-6PC6JD6D.js";
7
7
  import "./chunk-53QJQ2CC.js";
8
8
  import "./chunk-HRHAMPOB.js";
9
9
  import "./chunk-EAM7IZWA.js";
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  BraKetParser,
4
4
  integrate
5
- } from "./chunk-WMNKUJXR.js";
5
+ } from "./chunk-6PC6JD6D.js";
6
6
  import "./chunk-53QJQ2CC.js";
7
7
  import {
8
8
  DiracParser
@@ -358,7 +358,7 @@ var DiracShell = class {
358
358
  if (this.client) {
359
359
  this.client.disconnect();
360
360
  }
361
- import("./schedule-TN3RL2J6.js").then(({ stopAllScheduledTasks }) => {
361
+ import("./schedule-HIXYRCLR.js").then(({ stopAllScheduledTasks }) => {
362
362
  stopAllScheduledTasks();
363
363
  console.log("\nGoodbye!");
364
364
  process.exit(0);
@@ -828,7 +828,7 @@ Examples:
828
828
  break;
829
829
  case "tasks":
830
830
  try {
831
- const { listScheduledTasks } = await import("./schedule-TN3RL2J6.js");
831
+ const { listScheduledTasks } = await import("./schedule-HIXYRCLR.js");
832
832
  const tasks = listScheduledTasks();
833
833
  if (tasks.length === 0) {
834
834
  console.log("No scheduled tasks running.");
@@ -847,7 +847,7 @@ Examples:
847
847
  console.log("Usage: :stop <task-name>");
848
848
  } else {
849
849
  try {
850
- const { stopScheduledTask } = await import("./schedule-TN3RL2J6.js");
850
+ const { stopScheduledTask } = await import("./schedule-HIXYRCLR.js");
851
851
  const taskName = args[0];
852
852
  const stopped = stopScheduledTask(taskName);
853
853
  if (stopped) {
@@ -862,7 +862,7 @@ Examples:
862
862
  break;
863
863
  case "stopall":
864
864
  try {
865
- const { stopAllScheduledTasks } = await import("./schedule-TN3RL2J6.js");
865
+ const { stopAllScheduledTasks } = await import("./schedule-HIXYRCLR.js");
866
866
  stopAllScheduledTasks();
867
867
  console.log("All scheduled tasks stopped.");
868
868
  } catch (error) {
@@ -871,7 +871,7 @@ Examples:
871
871
  break;
872
872
  case "crons":
873
873
  try {
874
- const { listCronJobs } = await import("./cron-7LOKNMSU.js");
874
+ const { listCronJobs } = await import("./cron-2PRCNASR.js");
875
875
  const jobs = listCronJobs();
876
876
  if (jobs.length === 0) {
877
877
  console.log("No cron jobs running.");
@@ -891,7 +891,7 @@ Examples:
891
891
  console.log("Usage: :stopcron <job-name>");
892
892
  } else {
893
893
  try {
894
- const { stopCronJob } = await import("./cron-7LOKNMSU.js");
894
+ const { stopCronJob } = await import("./cron-2PRCNASR.js");
895
895
  const jobName = args[0];
896
896
  const stopped = stopCronJob(jobName);
897
897
  if (stopped) {
@@ -906,7 +906,7 @@ Examples:
906
906
  break;
907
907
  case "stopallcrons":
908
908
  try {
909
- const { stopAllCronJobs } = await import("./cron-7LOKNMSU.js");
909
+ const { stopAllCronJobs } = await import("./cron-2PRCNASR.js");
910
910
  stopAllCronJobs();
911
911
  console.log("All cron jobs stopped.");
912
912
  } catch (error) {
@@ -915,7 +915,7 @@ Examples:
915
915
  break;
916
916
  case "scheduled":
917
917
  try {
918
- const { listScheduledRuns } = await import("./run-at-OM2MZ64K.js");
918
+ const { listScheduledRuns } = await import("./run-at-N4SHOJKI.js");
919
919
  const runs = listScheduledRuns();
920
920
  if (runs.length === 0) {
921
921
  console.log("No scheduled runs pending.");
@@ -935,7 +935,7 @@ Examples:
935
935
  console.log("Usage: :cancel <run-name>");
936
936
  } else {
937
937
  try {
938
- const { cancelScheduledRun } = await import("./run-at-OM2MZ64K.js");
938
+ const { cancelScheduledRun } = await import("./run-at-N4SHOJKI.js");
939
939
  const runName = args[0];
940
940
  const cancelled = cancelScheduledRun(runName);
941
941
  if (cancelled) {
@@ -950,7 +950,7 @@ Examples:
950
950
  break;
951
951
  case "cancelall":
952
952
  try {
953
- const { cancelAllScheduledRuns } = await import("./run-at-OM2MZ64K.js");
953
+ const { cancelAllScheduledRuns } = await import("./run-at-N4SHOJKI.js");
954
954
  cancelAllScheduledRuns();
955
955
  console.log("All scheduled runs cancelled.");
956
956
  } catch (error) {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  integrate
3
- } from "./chunk-WMNKUJXR.js";
3
+ } from "./chunk-6PC6JD6D.js";
4
4
  import "./chunk-53QJQ2CC.js";
5
5
  import {
6
6
  DiracParser
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dirac-lang",
3
- "version": "0.1.104",
3
+ "version": "0.1.105",
4
4
  "description": "LLM-Augmented Declarative Execution",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",