dirac-lang 0.1.56 → 0.1.57

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.
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  integrate
3
- } from "./chunk-M43Y5X5P.js";
3
+ } from "./chunk-WQ2KRQAR.js";
4
4
  import {
5
5
  DiracParser
6
6
  } from "./chunk-HRHAMPOB.js";
@@ -474,12 +474,12 @@ async function executeIf(session, element) {
474
474
  const condition = await evaluatePredicate(session, conditionElement);
475
475
  if (condition) {
476
476
  if (thenElement) {
477
- const { integrateChildren: integrateChildren2 } = await import("./interpreter-RV7UVTYE.js");
477
+ const { integrateChildren: integrateChildren2 } = await import("./interpreter-WVPCPGVL.js");
478
478
  await integrateChildren2(session, thenElement);
479
479
  }
480
480
  } else {
481
481
  if (elseElement) {
482
- const { integrateChildren: integrateChildren2 } = await import("./interpreter-RV7UVTYE.js");
482
+ const { integrateChildren: integrateChildren2 } = await import("./interpreter-WVPCPGVL.js");
483
483
  await integrateChildren2(session, elseElement);
484
484
  }
485
485
  }
@@ -492,7 +492,7 @@ async function evaluatePredicate(session, predicateElement) {
492
492
  return await evaluateCondition(session, predicateElement);
493
493
  }
494
494
  const outputLengthBefore = session.output.length;
495
- const { integrate: integrate2 } = await import("./interpreter-RV7UVTYE.js");
495
+ const { integrate: integrate2 } = await import("./interpreter-WVPCPGVL.js");
496
496
  await integrate2(session, predicateElement);
497
497
  const newOutputChunks = session.output.slice(outputLengthBefore);
498
498
  const result = newOutputChunks.join("").trim();
@@ -515,11 +515,11 @@ async function evaluateCondition(session, condElement) {
515
515
  }
516
516
  const outputLengthBefore = session.output.length;
517
517
  const args = [];
518
- const { integrate: integrate2 } = await import("./interpreter-RV7UVTYE.js");
518
+ const { integrate: integrate2 } = await import("./interpreter-WVPCPGVL.js");
519
519
  for (const child of condElement.children) {
520
520
  if (child.tag.toLowerCase() === "arg") {
521
521
  const argOutputStart = session.output.length;
522
- const { integrateChildren: integrateChildren2 } = await import("./interpreter-RV7UVTYE.js");
522
+ const { integrateChildren: integrateChildren2 } = await import("./interpreter-WVPCPGVL.js");
523
523
  await integrateChildren2(session, child);
524
524
  const newChunks = session.output.slice(argOutputStart);
525
525
  const argValue = newChunks.join("");
@@ -785,12 +785,19 @@ async function executeLLM(session, element) {
785
785
  let currentUserPrompt = userPrompt;
786
786
  if (!noExtra) {
787
787
  const { getAvailableSubroutines: getAvailableSubroutines2 } = await import("./session-MRU57VMJ.js");
788
- const subroutines = getAvailableSubroutines2(session);
788
+ const allSubroutines = getAvailableSubroutines2(session);
789
+ const subroutines = allSubroutines.filter((sub) => {
790
+ const hideMeta = sub.meta?.["hide-from-llm"];
791
+ return hideMeta !== "true" && hideMeta !== true;
792
+ });
789
793
  if (session.debug) {
790
794
  console.error(
791
795
  "[LLM] Subroutines available at prompt composition:",
792
796
  subroutines.map((s) => ({ name: s.name, description: s.description, parameters: s.parameters }))
793
797
  );
798
+ if (allSubroutines.length !== subroutines.length) {
799
+ console.error(`[LLM] Filtered out ${allSubroutines.length - subroutines.length} subroutine(s) with hide-from-llm metadata`);
800
+ }
794
801
  }
795
802
  if (hasExistingDialog && (contextVar || saveDialog)) {
796
803
  systemPrompt = "Updated available Dirac XML tags:";
@@ -1660,7 +1667,7 @@ async function executeTagCheck(session, element) {
1660
1667
  const executeTag = correctedTag || tagName;
1661
1668
  console.error(`[tag-check] Executing <${executeTag}/> as all checks passed and execute=true.`);
1662
1669
  const elementToExecute = correctedTag ? { ...child, tag: correctedTag } : child;
1663
- const { integrate: integrate2 } = await import("./interpreter-RV7UVTYE.js");
1670
+ const { integrate: integrate2 } = await import("./interpreter-WVPCPGVL.js");
1664
1671
  await integrate2(session, elementToExecute);
1665
1672
  }
1666
1673
  }
@@ -1669,7 +1676,7 @@ async function executeTagCheck(session, element) {
1669
1676
  // src/tags/throw.ts
1670
1677
  async function executeThrow(session, element) {
1671
1678
  const exceptionName = element.attributes?.name || "exception";
1672
- const { integrateChildren: integrateChildren2 } = await import("./interpreter-RV7UVTYE.js");
1679
+ const { integrateChildren: integrateChildren2 } = await import("./interpreter-WVPCPGVL.js");
1673
1680
  const exceptionDom = {
1674
1681
  tag: "exception-content",
1675
1682
  attributes: { name: exceptionName },
@@ -1682,7 +1689,7 @@ async function executeThrow(session, element) {
1682
1689
  // src/tags/try.ts
1683
1690
  async function executeTry(session, element) {
1684
1691
  setExceptionBoundary(session);
1685
- const { integrateChildren: integrateChildren2 } = await import("./interpreter-RV7UVTYE.js");
1692
+ const { integrateChildren: integrateChildren2 } = await import("./interpreter-WVPCPGVL.js");
1686
1693
  await integrateChildren2(session, element);
1687
1694
  unsetExceptionBoundary(session);
1688
1695
  }
@@ -1692,7 +1699,7 @@ async function executeCatch(session, element) {
1692
1699
  const exceptionName = element.attributes?.name || "exception";
1693
1700
  const caughtCount = lookupException(session, exceptionName);
1694
1701
  if (caughtCount > 0) {
1695
- const { integrateChildren: integrateChildren2 } = await import("./interpreter-RV7UVTYE.js");
1702
+ const { integrateChildren: integrateChildren2 } = await import("./interpreter-WVPCPGVL.js");
1696
1703
  await integrateChildren2(session, element);
1697
1704
  }
1698
1705
  flushCurrentException(session);
@@ -1701,7 +1708,7 @@ async function executeCatch(session, element) {
1701
1708
  // src/tags/exception.ts
1702
1709
  async function executeException(session, element) {
1703
1710
  const exceptions = getCurrentExceptions(session);
1704
- const { integrateChildren: integrateChildren2 } = await import("./interpreter-RV7UVTYE.js");
1711
+ const { integrateChildren: integrateChildren2 } = await import("./interpreter-WVPCPGVL.js");
1705
1712
  for (const exceptionDom of exceptions) {
1706
1713
  await integrateChildren2(session, exceptionDom);
1707
1714
  }
@@ -2169,7 +2176,7 @@ async function executeLoadContext(session, element) {
2169
2176
  query = element.text.trim();
2170
2177
  }
2171
2178
  if (!query && element.children.length > 0) {
2172
- const { integrate: integrate2 } = await import("./interpreter-RV7UVTYE.js");
2179
+ const { integrate: integrate2 } = await import("./interpreter-WVPCPGVL.js");
2173
2180
  const beforeOutput = session.output.length;
2174
2181
  for (const child of element.children) {
2175
2182
  await integrate2(session, child);
@@ -2422,7 +2429,7 @@ async function executeForeach(session, element) {
2422
2429
  const parser2 = new DiracParser2();
2423
2430
  try {
2424
2431
  const fromElement = parser2.parse(fromAttr);
2425
- const { integrate: integrate2 } = await import("./interpreter-RV7UVTYE.js");
2432
+ const { integrate: integrate2 } = await import("./interpreter-WVPCPGVL.js");
2426
2433
  await integrate2(session, fromElement);
2427
2434
  } catch (e) {
2428
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-NK2ZTQGT.js";
8
- import "./chunk-M43Y5X5P.js";
7
+ } from "./chunk-5FKZ3N7C.js";
8
+ import "./chunk-WQ2KRQAR.js";
9
9
  import "./chunk-HRHAMPOB.js";
10
10
  import "./chunk-WX7VHQYL.js";
11
11
  import "./chunk-IN55WRFB.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.56",
19
+ version: "0.1.57",
20
20
  description: "LLM-Augmented Declarative Execution",
21
21
  type: "module",
22
22
  main: "dist/index.js",
@@ -96,7 +96,7 @@ async function main() {
96
96
  process.exit(0);
97
97
  }
98
98
  if (args[0] === "shell") {
99
- const { DiracShell } = await import("./shell-WMXFN2EX.js");
99
+ const { DiracShell } = await import("./shell-QA7NY73L.js");
100
100
  const shellConfig = { debug: false };
101
101
  for (let i = 1; i < args.length; i++) {
102
102
  const arg = args[i];
package/dist/index.js CHANGED
@@ -2,10 +2,10 @@ import {
2
2
  createLLMAdapter,
3
3
  execute,
4
4
  executeUserCommand
5
- } from "./chunk-NK2ZTQGT.js";
5
+ } from "./chunk-5FKZ3N7C.js";
6
6
  import {
7
7
  integrate
8
- } from "./chunk-M43Y5X5P.js";
8
+ } from "./chunk-WQ2KRQAR.js";
9
9
  import {
10
10
  DiracParser
11
11
  } from "./chunk-HRHAMPOB.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  integrate,
3
3
  integrateChildren
4
- } from "./chunk-M43Y5X5P.js";
4
+ } from "./chunk-WQ2KRQAR.js";
5
5
  import "./chunk-HRHAMPOB.js";
6
6
  import "./chunk-WX7VHQYL.js";
7
7
  import "./chunk-IN55WRFB.js";
@@ -3,7 +3,7 @@ import {
3
3
  listScheduledTasks,
4
4
  stopAllScheduledTasks,
5
5
  stopScheduledTask
6
- } from "./chunk-M43Y5X5P.js";
6
+ } from "./chunk-WQ2KRQAR.js";
7
7
  import "./chunk-HRHAMPOB.js";
8
8
  import "./chunk-WX7VHQYL.js";
9
9
  import "./chunk-IN55WRFB.js";
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-AJSYOXXZ.js";
5
5
  import {
6
6
  integrate
7
- } from "./chunk-M43Y5X5P.js";
7
+ } from "./chunk-WQ2KRQAR.js";
8
8
  import {
9
9
  DiracParser
10
10
  } from "./chunk-HRHAMPOB.js";
@@ -150,7 +150,7 @@ var DiracShell = class {
150
150
  });
151
151
  this.rl.on("close", () => {
152
152
  this.saveHistory();
153
- import("./schedule-2LAUKHZX.js").then(({ stopAllScheduledTasks }) => {
153
+ import("./schedule-VYFEIUQE.js").then(({ stopAllScheduledTasks }) => {
154
154
  stopAllScheduledTasks();
155
155
  console.log("\nGoodbye!");
156
156
  process.exit(0);
@@ -471,7 +471,7 @@ Examples:
471
471
  break;
472
472
  case "tasks":
473
473
  try {
474
- const { listScheduledTasks } = await import("./schedule-2LAUKHZX.js");
474
+ const { listScheduledTasks } = await import("./schedule-VYFEIUQE.js");
475
475
  const tasks = listScheduledTasks();
476
476
  if (tasks.length === 0) {
477
477
  console.log("No scheduled tasks running.");
@@ -490,7 +490,7 @@ Examples:
490
490
  console.log("Usage: :stop <task-name>");
491
491
  } else {
492
492
  try {
493
- const { stopScheduledTask } = await import("./schedule-2LAUKHZX.js");
493
+ const { stopScheduledTask } = await import("./schedule-VYFEIUQE.js");
494
494
  const taskName = args[0];
495
495
  const stopped = stopScheduledTask(taskName);
496
496
  if (stopped) {
@@ -505,7 +505,7 @@ Examples:
505
505
  break;
506
506
  case "stopall":
507
507
  try {
508
- const { stopAllScheduledTasks } = await import("./schedule-2LAUKHZX.js");
508
+ const { stopAllScheduledTasks } = await import("./schedule-VYFEIUQE.js");
509
509
  stopAllScheduledTasks();
510
510
  console.log("All scheduled tasks stopped.");
511
511
  } catch (error) {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  integrate
3
- } from "./chunk-M43Y5X5P.js";
3
+ } from "./chunk-WQ2KRQAR.js";
4
4
  import {
5
5
  DiracParser
6
6
  } from "./chunk-HRHAMPOB.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dirac-lang",
3
- "version": "0.1.56",
3
+ "version": "0.1.57",
4
4
  "description": "LLM-Augmented Declarative Execution",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",