dirac-lang 0.1.86 → 0.1.87

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/cli.js CHANGED
@@ -151,7 +151,7 @@ async function main() {
151
151
  const args = process.argv.slice(2);
152
152
  const calledAs = process.argv[1];
153
153
  if (calledAs && calledAs.endsWith("/dish")) {
154
- const { DiracShell } = await import("./shell-HINR647H.js");
154
+ const { DiracShell } = await import("./shell-I6DVYUOR.js");
155
155
  const shellConfig = loadShellConfig(args);
156
156
  const shell = new DiracShell(shellConfig);
157
157
  await shell.start();
@@ -231,7 +231,7 @@ async function main() {
231
231
  return;
232
232
  }
233
233
  if (args[0] === "shell") {
234
- const { DiracShell } = await import("./shell-HINR647H.js");
234
+ const { DiracShell } = await import("./shell-I6DVYUOR.js");
235
235
  const { SessionServer, isSessionRunning, getSocketPath } = await import("./session-server-I3XM7YYC.js");
236
236
  const { SessionClient } = await import("./session-client-3VTC5MLO.js");
237
237
  const daemonMode = args.includes("--daemon") || args.includes("-d");
@@ -921,9 +921,19 @@ Examples:
921
921
  }
922
922
  return false;
923
923
  }
924
+ /**
925
+ * Check if command likely represents natural language based on first word
926
+ */
927
+ isLikelyNaturalLanguage(command) {
928
+ const trimmed = command.trim().toLowerCase();
929
+ if (trimmed.endsWith("?")) return true;
930
+ const nlStarters = /^(what|why|how|where|when|which|who|can|could|would|should|please|may|might|do|does|did|is|are|was|were|will|shall)\s/i;
931
+ return nlStarters.test(trimmed);
932
+ }
924
933
  /**
925
934
  * Execute a Unix shell command
926
935
  * If command is not found, fallback to treating it as an AI query
936
+ * Also fallback if command fails and looks like natural language
927
937
  */
928
938
  async executeShellCommand(command) {
929
939
  const trimmed = command.trim();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dirac-lang",
3
- "version": "0.1.86",
3
+ "version": "0.1.87",
4
4
  "description": "LLM-Augmented Declarative Execution",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",