open-agents-ai 0.187.543 → 0.187.544

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/index.js CHANGED
@@ -601589,42 +601589,46 @@ async function handlePutConfigEndpoint(req2, res) {
601589
601589
  function handleGetCommands(res) {
601590
601590
  const commands = SLASH_COMMANDS.map(([cmd, desc]) => ({
601591
601591
  command: cmd,
601592
- description: desc
601592
+ description: desc,
601593
+ kind: "command"
601593
601594
  }));
601594
- jsonResponse(res, 200, { commands });
601595
+ try {
601596
+ const { discoverSkills: discoverSkills2 } = require3("@open-agents/execution");
601597
+ const skills = discoverSkills2(process.cwd()) || [];
601598
+ for (const s2 of skills) {
601599
+ const name10 = s2?.name;
601600
+ if (typeof name10 !== "string" || !name10) continue;
601601
+ commands.push({
601602
+ command: `/${name10}`,
601603
+ description: s2.description || "(skill)",
601604
+ kind: "skill"
601605
+ });
601606
+ }
601607
+ } catch {
601608
+ }
601609
+ jsonResponse(res, 200, { commands, count: commands.length });
601595
601610
  }
601596
601611
  async function handlePostCommand(res, cmd) {
601597
- const oaBin = process.argv[1] || "oa";
601598
- const blocked = /* @__PURE__ */ new Set(["quit", "exit", "destroy", "full-send-bless", "bless", "call", "hangup", "listen", "neovim", "dream"]);
601612
+ const blocked = /* @__PURE__ */ new Set(["quit", "exit", "destroy", "full-send-bless", "bless"]);
601599
601613
  const cmdBase = cmd.split(" ")[0]?.replace(/^\//, "") ?? "";
601600
601614
  if (blocked.has(cmdBase)) {
601601
601615
  jsonResponse(res, 403, {
601602
601616
  error: "Blocked command",
601603
- message: `Command "/${cmdBase}" is not available via the API (interactive or destructive)`
601617
+ message: `Command "/${cmdBase}" is not available via the API (would terminate or escalate the session host).`
601604
601618
  });
601605
601619
  return;
601606
601620
  }
601607
601621
  try {
601608
- const child = spawn26("node", [oaBin, "run", `/${cmd}`, "--json"], {
601609
- env: { ...process.env, __OPEN_AGENTS_NO_AUTO_RUN: "" },
601610
- stdio: ["ignore", "pipe", "pipe"],
601611
- timeout: 3e4
601612
- });
601613
- let stdout = "";
601614
- let stderr = "";
601615
- child.stdout?.on("data", (chunk) => {
601616
- stdout += chunk.toString();
601617
- });
601618
- child.stderr?.on("data", (chunk) => {
601619
- stderr += chunk.toString();
601620
- });
601621
- await new Promise((resolve43) => {
601622
- onChildExit(child, () => resolve43());
601623
- onChildError(child, () => resolve43());
601624
- });
601622
+ const { runCommand: runCommand3 } = await Promise.resolve().then(() => (init_command_passthrough(), command_passthrough_exports));
601623
+ const result = await runCommand3(`/${cmd}`);
601625
601624
  jsonResponse(res, 200, {
601626
- command: cmd,
601627
- output: stdout.trim() || stderr.trim() || "(no output)"
601625
+ command: result.command,
601626
+ args: result.args,
601627
+ kind: result.kind,
601628
+ output: result.output || "(no output)",
601629
+ ansi: result.ansi,
601630
+ durationMs: result.durationMs,
601631
+ error: result.error
601628
601632
  });
601629
601633
  } catch (err) {
601630
601634
  jsonResponse(res, 500, {
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.187.543",
3
+ "version": "0.187.544",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "open-agents-ai",
9
- "version": "0.187.543",
9
+ "version": "0.187.544",
10
10
  "hasInstallScript": true,
11
11
  "license": "CC-BY-NC-4.0",
12
12
  "dependencies": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.187.543",
3
+ "version": "0.187.544",
4
4
  "description": "AI coding agent powered by open-source models (Ollama/vLLM) — interactive TUI with agentic tool-calling loop",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",