rterm-backend 3.0.0 → 3.0.1

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.
Files changed (2) hide show
  1. package/bin/gybackend.cjs +16 -1
  2. package/package.json +5 -4
package/bin/gybackend.cjs CHANGED
@@ -345393,6 +345393,18 @@ function classifyTarget(tab, defaultClass) {
345393
345393
  if (tab.remoteOs === "unix") return "linux";
345394
345394
  return defaultClass ?? "linux";
345395
345395
  }
345396
+ function isCmdShellTarget(tab) {
345397
+ const t = (tab.type ?? "").toLowerCase();
345398
+ return t === "winrm";
345399
+ }
345400
+ function wrapWindowsFactForCmdShell(cmd) {
345401
+ const c = cmd.trim();
345402
+ if (/^hostname$/i.test(c)) return c;
345403
+ const isPowerShell = c.startsWith("$") || c.startsWith("[") || c.startsWith("(") || /^(Get|Set|New|Invoke|Measure|Select|Where|ForEach|Write|Read|Test|Convert|Out|Start|Stop)-/i.test(c) || /::/.test(c);
345404
+ if (!isPowerShell) return c;
345405
+ const escaped = c.replace(/"/g, '\\"');
345406
+ return `powershell -NoProfile -Command "${escaped}"`;
345407
+ }
345396
345408
  async function collectFacts(args, context2) {
345397
345409
  const { sessionId, messageId, sendEvent, terminalService } = context2;
345398
345410
  let targetTabs;
@@ -345429,7 +345441,10 @@ async function collectFacts(args, context2) {
345429
345441
  const perTarget = await Promise.allSettled(
345430
345442
  targetTabs.map(async (tab) => {
345431
345443
  const klass = classifyTarget(tab, args.defaultClass);
345432
- const commands = FACT_TEMPLATES[klass] ?? FACT_TEMPLATES.linux;
345444
+ let commands = FACT_TEMPLATES[klass] ?? FACT_TEMPLATES.linux;
345445
+ if (klass === "windows" && isCmdShellTarget(tab)) {
345446
+ commands = commands.map(wrapWindowsFactForCmdShell);
345447
+ }
345433
345448
  const facts = {};
345434
345449
  for (let i = 0; i < commands.length; i++) {
345435
345450
  const cmd = commands[i];
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "rterm-backend",
3
- "version": "3.0.0",
4
- "description": "rterm-backend \u2014 the headless AI-native backend for RTerm (dual-published as neuralOS). run RTerm-as-a-service (AI agent, SSH/WinRM/Serial/local terminals, fleet orchestration, advanced automation, SRE observability, Netdata, AWS APerf, plugin system, governance/audit, Prometheus/OTel metrics export, secrets vault, on-call paging, AI cost budgets, GitOps, cloud inventory, APM/DEM/Infra/ETW ingestion). The RTerm desktop app stays RTerm; neuralOS is the standalone backend daemon. Dual-published as rterm-backend. v3.0.0: API self-discovery \u2014 gateway:describe + a single-source method registry (123 methods) + list_gateway_methods agent tool.",
3
+ "version": "3.0.1",
4
+ "description": "rterm-backend \u2014 the headless AI-native backend for RTerm (dual-published as neuralOS). run RTerm-as-a-service (AI agent, SSH/WinRM/Serial/local terminals, fleet orchestration, advanced automation, SRE observability, Netdata, AWS APerf, plugin system, governance/audit, Prometheus/OTel metrics export, secrets vault, on-call paging, AI cost budgets, GitOps, cloud inventory, APM/DEM/Infra/ETW ingestion, AgentSpan/Conductor durable agents, gateway:describe API self-discovery). The RTerm desktop app stays RTerm; neuralOS is the standalone backend daemon. Dual-published as rterm-backend. v3.0.1: collect_facts WinRM/cmd-shell fix.",
5
5
  "main": "bin/gybackend.cjs",
6
6
  "bin": {
7
7
  "gybackend": "bin/gybackend.cjs",
@@ -53,8 +53,6 @@
53
53
  "daemon",
54
54
  "websocket",
55
55
  "rpc",
56
- "api-discovery",
57
- "introspection",
58
56
  "sre",
59
57
  "observability",
60
58
  "prometheus",
@@ -66,6 +64,9 @@
66
64
  "apm",
67
65
  "dem",
68
66
  "etw",
67
+ "agentspan",
68
+ "conductor",
69
+ "self-discovery",
69
70
  "monitoring"
70
71
  ]
71
72
  }