neuralos 3.9.4 → 3.9.6

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 (68) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +48 -347
  3. package/cli.js +78 -0
  4. package/engine.js +124 -0
  5. package/index.js +160 -0
  6. package/package.json +37 -43
  7. package/test.js +20 -0
  8. package/tools.js +47 -0
  9. package/bin/gybackend.cjs +0 -398530
  10. package/plugins/agentspan-bridge/agentspan-bridge.extreme.spec.ts +0 -328
  11. package/plugins/agentspan-bridge/agentspan-bridge.phase2.extreme.spec.ts +0 -282
  12. package/plugins/agentspan-bridge/conductorClient.mjs +0 -182
  13. package/plugins/agentspan-bridge/index.mjs +0 -389
  14. package/plugins/agentspan-bridge/playbookToWorkflowDef.mjs +0 -209
  15. package/plugins/agentspan-bridge/plugin.json +0 -27
  16. package/plugins/fraudops/index.d.mts +0 -9
  17. package/plugins/fraudops/index.mjs +0 -185
  18. package/plugins/fraudops/plugin.json +0 -10
  19. package/plugins/iam-connector/index.d.mts +0 -10
  20. package/plugins/iam-connector/index.mjs +0 -229
  21. package/plugins/iam-connector/plugin.json +0 -10
  22. package/plugins/mitmproxy-bridge/index.d.mts +0 -20
  23. package/plugins/mitmproxy-bridge/index.mjs +0 -256
  24. package/plugins/mitmproxy-bridge/plugin.json +0 -17
  25. package/plugins/monid-bridge/index.mjs +0 -228
  26. package/plugins/monid-bridge/monid-bridge.extreme.spec.mjs +0 -75
  27. package/plugins/monid-bridge/plugin.json +0 -15
  28. package/plugins/netdata-rterm/index.mjs +0 -229
  29. package/plugins/netdata-rterm/netdata-rterm.extreme.spec.ts +0 -252
  30. package/plugins/netdata-rterm/plugin.json +0 -22
  31. package/plugins/netexec-bridge/index.d.mts +0 -28
  32. package/plugins/netexec-bridge/index.mjs +0 -325
  33. package/plugins/netexec-bridge/plugin.json +0 -20
  34. package/plugins/neuralos/index.mjs +0 -137
  35. package/plugins/neuralos/neuralos.extreme.spec.mts +0 -386
  36. package/plugins/neuralos/neuralosEngine.mjs +0 -369
  37. package/plugins/neuralos/plugin.json +0 -15
  38. package/plugins/numbat-bridge/index.mjs +0 -229
  39. package/plugins/numbat-bridge/numbat-bridge.extreme.spec.mjs +0 -148
  40. package/plugins/numbat-bridge/plugin.json +0 -21
  41. package/plugins/patch-manager/index.d.mts +0 -10
  42. package/plugins/patch-manager/index.mjs +0 -288
  43. package/plugins/patch-manager/plugin.json +0 -10
  44. package/plugins/promptfoo-redteam/index.d.mts +0 -15
  45. package/plugins/promptfoo-redteam/index.mjs +0 -277
  46. package/plugins/promptfoo-redteam/plugin.json +0 -16
  47. package/plugins/reactorpro-bridge/index.mjs +0 -499
  48. package/plugins/reactorpro-bridge/plugin.json +0 -26
  49. package/plugins/reactorpro-bridge/reactorpro-bridge.extreme.spec.mts +0 -409
  50. package/plugins/reactorpro-bridge/reactorproAgent.mjs +0 -399
  51. package/plugins/request-router/index.d.mts +0 -9
  52. package/plugins/request-router/index.mjs +0 -239
  53. package/plugins/request-router/plugin.json +0 -10
  54. package/plugins/sample-k8s-slo/index.ts +0 -58
  55. package/plugins/sample-k8s-slo/plugin.json +0 -11
  56. package/plugins/sop-assistant/index.d.mts +0 -9
  57. package/plugins/sop-assistant/index.mjs +0 -325
  58. package/plugins/sop-assistant/plugin.json +0 -10
  59. package/plugins/synapse-bridge/index.mjs +0 -484
  60. package/plugins/synapse-bridge/plugin.json +0 -29
  61. package/plugins/synapse-bridge/synapse-bridge.extreme.spec.mjs +0 -204
  62. package/plugins/synapse-bridge/synapseAgent.extreme.spec.mjs +0 -236
  63. package/plugins/synapse-bridge/synapseAgent.mjs +0 -254
  64. package/plugins/web-intel/index.mjs +0 -381
  65. package/plugins/web-intel/plugin.json +0 -28
  66. package/plugins/web-intel/sidecar.mjs +0 -134
  67. package/plugins/web-intel/web-intel.extreme.spec.ts +0 -263
  68. package/plugins/web-intel/wigoloClient.mjs +0 -145
package/LICENSE ADDED
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
package/README.md CHANGED
@@ -1,366 +1,67 @@
1
- # <img src="./demo_imgs/icon.png" width="40" height="40" align="center" style="margin-right: 10px;"> RTerm
1
+ # neuralOS for Node.js
2
2
 
3
- > **The AI-Native Terminal that thinks, executes, and collaborates with you.**
4
- > **Built for Forward Deployed Engineers (FDEs), SREs, and platform teams** who live inside customer estates: reach any host (SSH / WinRM / serial), execute across fleets, change production safely, and leave behind automation — from one window, under your control.
5
- > **AIOps · AI SRE · Agentic AI for operations**: closed-loop remediation, self-healing infrastructure, runbook automation, and ChatOps — with an AI agent that executes under policy and leaves tamper-evident evidence.
6
-
7
- [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0)
8
- [![Platform](https://img.shields.io/badge/Platform-Windows%20%7C%20macOS%20%7C%20Linux-blue)](#platforms)
9
- [![Shell](https://img.shields.io/badge/Shell-Zsh%20%7C%20Bash%20%7C%20PowerShell-orange)](#key-capabilities)
10
-
11
- English README | [中文 README](./README.zh-CN.md)
12
- Latest release notes: [`changelogs/v1.6.0.md`](./changelogs/v1.6.0.md)
13
-
14
- If you have any suggestions or questions, please feel free to submit them in [GitHub Discussions](https://github.com/MrOrangeJJ/RTerm/discussions).
15
-
16
- Usage guides:
17
- [`docs/fde.md` — RTerm for Forward Deployed Engineers](./docs/fde.md) ·
18
- [`docs/mobile-web-usage.md`](./docs/mobile-web-usage.md) ·
19
- [`docs/tui-usage.md`](./docs/tui-usage.md) ·
20
- [`docs/gybackend-usage.md`](./docs/gybackend-usage.md)
21
-
22
- > [!WARNING]
23
- > **Active Development**: RTerm evolves quickly. If a version introduces history compatibility breaks, it will be called out explicitly in release notes.
24
-
25
- > [!NOTE]
26
- > **v1.4.0 upgrade note**: the first launch after upgrading from a pre-1.4.0 version may briefly block while RTerm migrates legacy JSON history into SQLite and writes timestamped backup files. v1.4.3 has no additional migration step.
27
-
28
- <p align="center">
29
- <img src="./demo_imgs/v1.6.0_dark.png" width="100%" alt="GyShell dark theme demo">
30
- </p>
31
- <p align="center">
32
- <img src="./demo_imgs/v1.6.0_light.png" width="100%" alt="GyShell light theme demo">
33
- </p>
34
- <p align="center">
35
- <video controls width="100%" src="https://github.com/user-attachments/assets/f9daf884-bda0-4a58-8a6d-934db0eddeb5"></video>
36
- </p>
37
-
38
- ---
39
-
40
- ## Why RTerm Is Different
41
-
42
- Most AI terminal tools either generate one-shot scripts, or run in isolated sandboxes detached from real shell workflows.
43
-
44
- RTerm is built for **persistent execution in your real terminal runtime**:
45
-
46
- - **Persistent execution loop**: observe output -> reason -> continue.
47
- - **Human-in-the-loop by design**: intervene anytime without breaking flow.
48
- - **Multi-tab orchestration**: compile, inspect logs, and run fixes in parallel tabs.
49
- - **Global tab inventory**: scan, reopen, drag, close, and create terminal/chat tabs from a dedicated list panel.
50
- - **Workspace persistence**: terminal tabs, panel layout, and saved layout slots can survive restarts and restore quickly.
51
- - **Detachable multi-window workspace**: peel panels into sub-windows and move tabs or whole panels across windows.
52
- - **Adaptive panel tab display**: keep full tab strips or switch to a compact selector for narrow panel headers.
53
- - **Reusable Agent setting profiles**: save and reapply complete operating profiles for models, tools, policies, memory, and workflow flags.
54
- - **Cross-chat context handoff**: reference previous conversations from the composer with `Pass Chat` mentions instead of manually copying history.
55
- - **Integrated file management**: browse, edit, copy, and transfer files across local and SSH sessions without leaving the workspace.
56
- - **Live resource visibility**: inspect CPU, memory, disks, network, processes, sockets, and GPU from local or SSH sessions.
57
- - **OpenClawd-style remote conversation control**: keep the runtime core on your own computer and steer it from anywhere through chat.
58
- - **Built-in mobile-web delivery**: desktop can publish the mobile-web companion directly over your LAN with copyable access links.
59
- - **Cross-surface runtime model**: desktop, TUI, and mobile-web share one gateway semantics.
60
- - **Profile lock safety**: busy sessions pin active model profile for consistency.
61
- - **Long-horizon context quality**: memory.md + compaction summaries + visible boundaries + deterministic fallback recovery keep long sessions understandable.
62
- - **Tooling-native workflow**: skills, MCP servers, and built-in tools are runtime primitives.
63
- - **Plugin system**: anyone can develop a custom plugin (agent tools, event triggers, dashboard panels) and have it auto-integrate on startup — 6 official plugins ship out of the box.
64
- - **SRE observability pillar**: metrics ledger, golden signals, SLO/error budgets, uptime watchdogs, incident ledger with RCA + postmortems, anomaly detection, capacity forecasting, and a unified live dashboard.
65
- - **APM + DEM + k8s/cloud infra**: OTLP distributed-trace store, Core Web Vitals (RUM), cluster health, and Windows ETW diagnostics.
66
- - **Governance & audit**: hash-chained tamper-evident audit ledger with Merkle-tree evidence sealing, an AGT-style YAML policy engine (allow/deny/escalate), and a maker/checker review model that independently verifies the agent's output for correctness, completeness, safety, compliance, and accuracy.
67
-
68
- ### At a Glance
69
-
70
- - **For Forward Deployed Engineers (FDEs)**: reach any customer estate (SSH / WinRM / serial / Cisco), execute across fleets, land production changes under MOP approval with automatic rollback, and leave behind playbooks, triggers, and audit evidence — see [`docs/fde.md`](./docs/fde.md).
71
- - **For shipping work**: not just planning, but iterative execution and correction.
72
- - **For long-running tasks**: preserves session continuity and state across steps.
73
- - **For real infrastructure**: shell, SSH, forwarding, file management, and multi-tab interactive terminal control.
74
- - **For multi-device flow**: desktop + TUI + mobile-web with shared gateway semantics.
75
- - **For multimodal workflows**: text and image inputs can be combined in one execution turn.
76
-
77
- ## Where RTerm Fits — AIOps, AI SRE & Agentic Ops
78
-
79
- Depending on your lens, RTerm is an **AIOps platform**, an **AI SRE teammate**, an **agentic-AI operations runtime**, a **runbook automation engine**, or **ChatOps for production** — all running on your own machine, against your real estate, under your policy.
80
-
81
- | If you're looking for… | RTerm delivers |
82
- |---|---|
83
- | **AIOps / closed-loop remediation** | Detect (metrics, anomaly detection, early-warning forecasts, triggers) → Decide (AI agent under AGT policy) → Act (playbooks, MOP-gated changes) → Prove (hash-chained audit ledger + Merkle evidence sealing) |
84
- | **AI SRE / SRE agents** | Golden signals, SLOs with error budgets + burn-rate alerting, uptime watchdogs, incident ledger with AI RCA + postmortems, capacity forecasting, on-call paging — executed by an agent with guardrails, not another dashboard you stare at |
85
- | **Agentic AI for infrastructure** | The missing execution layer: a persistent observe→reason→act loop over SSH/WinRM/serial fleets, 100+ built-in tools, MCP support, skills, plugins, and a maker/checker review model that double-checks every consequential action |
86
- | **Runbook automation** | Orchestrated DAG playbooks (incl. dagu YAML), validation steps with automatic rollback, Jinja templates, cron scheduling, GitOps drift detection |
87
- | **Self-healing infrastructure** | Event-driven triggers (terminal pattern / metric threshold / webhook / schedule) fire playbooks or propose approved changes — auto-remediation with cooldowns and concurrency caps |
88
- | **ChatOps for prod** | Steer operations conversationally from the desktop app or your phone's browser (mobile-web companion); approve blocked commands from anywhere; alerts fan out to Slack/Teams/Telegram/SMTP |
89
- | **Copilot for ops/on-call** | Ask "why is db-02 slow?" — the agent pulls facts across hosts, correlates metrics + traces + logs, proposes a fix under approval, writes the postmortem |
90
-
91
- The common thread: **RTerm doesn't just watch or suggest — it executes, safely, and leaves evidence.**
92
-
93
- ## Latest Highlights
94
-
95
- **v2.7.x — Governance, plugins & the maker/checker model:**
96
- - **Review model (maker/checker)** with a visible Settings UI — a second model independently verifies the action model's output (correctness, completeness, safety, compliance, accuracy); skipped when not configured for fast output.
97
- - **AGT policy engine** — YAML policies (allow/deny/escalate) evaluated before every consequential action, with a built-in safe default policy.
98
- - **Hash-chained audit ledger + Merkle evidence sealing** for tamper-evident, independently-verifiable audit trails.
99
- - **Monitor diagnostics** — one-call answer to "why aren't stats displaying?" per terminal.
100
-
101
- **v2.5–v2.6 — Plugin system + official plugin suite + APerf:**
102
- - **Plugin system** — custom plugins (agent tools, triggers, dashboard panels) auto-integrate on startup; 6 official plugins ship out of the box (patch-manager, request-router, sop-assistant, iam-connector, fraudops, netdata-rterm).
103
- - **AWS APerf deep-dive** — deploy aperf to any Linux host for deep performance profiling with agent RCA on the findings.
104
-
105
- **v2.0–v2.4 — The SRE pillar + advanced automation:**
106
- - **Full observability** — metrics ledger, golden signals, SLO/error budgets, uptime watchdogs, incident ledger (RCA + postmortems), anomaly detection, capacity forecasting, unified live dashboard.
107
- - **APM/DEM/infra/ETW** — OTLP traces, Core Web Vitals, k8s/cloud health, Windows ETW diagnostics.
108
- - **Advanced automation** — event-driven triggers (NATS mesh), DAG playbooks, parameterized runbooks, dagu workflows, MOP change management with automatic rollback.
109
-
110
- **v1.6.0 — Workspace foundation:**
111
-
112
- - **Global Tab List panel**
113
- - a new `TAB LIST` panel shows terminal and chat tabs as a vertical workspace inventory, with counts, status dots, latest-first ordering, drag/drop support, close actions, and quick creation for chat, local terminal, and saved-SSH terminal tabs
114
- - **Default workspace refresh**
115
- - new main layouts start with the list panel on the left, chat in the center, and terminal on the right, making tab-heavy sessions easier to scan immediately
116
- - **More predictable background terminal tabs**
117
- - local and SSH tabs created from the list panel can start in the background, stay visible in the global terminal inventory, bind to terminal panels when appropriate, and no longer unexpectedly take over linked filesystem or monitor panels
118
- - **Visible compaction boundaries**
119
- - long chats now persist and render a `[CTX COMPACTED]` marker at the actual retained-history cutoff across desktop, mobile-web, and TUI clients
120
- - **Deterministic compaction fallback**
121
- - when the compaction model fails or returns an empty summary, GyShell can recover with a local deterministic digest while preserving the protected tail and exporting exact older history for on-demand inspection when available
122
- - **Safer stream recovery**
123
- - empty non-tool provider stream finishes now retry through the normal path instead of silently ending a run with no answer, while valid empty tool-call finishes remain routable
124
- - **Terminal inventory stability**
125
- - terminal titles stay unique and stable across duplicate backend snapshots, concurrent terminal creation, explicit numeric suffixes, and detached-window terminal transfers
126
- - **Mobile-web runtime refresh**
127
- - Electron-packaged mobile-web assets were regenerated so desktop builds serve the updated client without requiring a separate mobile-web development server
128
-
129
- ---
130
-
131
- ## Key Capabilities
132
-
133
- ### AI-Native Runtime
134
-
135
- - Thinking-oriented execution for complex tasks.
136
- - Context-aware responses from terminal state and selected resources.
137
- - Per-profile model routing for `Global`, `Thinking`, `Action`, and `Compaction` roles.
138
- - Reusable Agent Setting profiles for model profile, security policy, tools, skills, memory, recursion, and experimental workflow flags.
139
- - Long-session context quality with dedicated compaction models, dynamic summaries, visible `[CTX COMPACTED]` boundary markers, and deterministic fallback recovery when model compaction is unavailable.
140
- - SQLite-backed conversation history with automatic one-time migration from legacy JSON storage.
141
- - AI-assisted terminal command drafting from recent tab context, with paste-before-run control.
142
- - Background (nowait) commands automatically notify the agent on completion, so the agent can close the loop without polling.
143
- - Terminal-targeting agent tools report runtime status and refuse stale operations on disconnected tabs until reconnect succeeds.
144
- - Reference previous conversations with `Pass Chat` mentions; GyShell exports the selected chat as private local Markdown and tells the agent how to read it only when needed.
145
- - Classic or Seamless chat activity display, depending on how much inline tool detail you want.
146
- - Persistent memory injection via `memory.md`, scoped to the active Agent Setting profile when one is applied.
147
- - Multimodal user input pipeline (text + images) for compatible models.
148
- - OpenAI-compatible model endpoint support, with automatic recovery from malformed empty tool-call stream finishes.
149
- - Optional experimental agent tools, including asynchronous cross-machine file transfer between terminal tabs with progress polling.
150
-
151
- ### Terminal + SSH + File Management
152
-
153
- - Shell support: Zsh, Bash, PowerShell.
154
- - Older Windows PowerShell environments now use more reliable sidecar-based command completion tracking for local and SSH sessions.
155
- - SSH support: password/key auth, proxy chaining, bastion workflows.
156
- - SSH sessions use protocol keepalive to reduce silent idle disconnects.
157
- - Port forwarding: local, remote, and dynamic SOCKS.
158
- - Agent can coordinate **multiple SSH/local terminal tabs** in parallel during one task.
159
- - Control-character operations for interactive terminal apps.
160
- - Draft a command for the current terminal tab from recent visible output, then paste it back without auto-running it.
161
- - Search within the active terminal buffer without leaving the panel.
162
- - Terminal tab restoration after backend restart, plus lossless output catch-up for renderer remount/reconnect within the same backend runtime.
163
- - Local terminal tabs auto-respawn their shell if it exits, so a local tab stays usable instead of going dead.
164
- - Disconnected SSH tabs can be reconnected in place from the tab right-click menu using their saved connection config.
165
- - **Integrated file browser panel**: browse, create, rename, delete, preview, sort, filter, and search files across local and SSH sessions.
166
- - **Cross-session file transfer** (copy/move) with real-time progress, cancellation, and adaptive SFTP tuning.
167
- - **Built-in file editor panel** for editing text files, plus inline preview of images (`png/jpg/gif/webp/bmp/ico/svg/avif`) and PDFs (with page navigation and zoom), all directly in the workspace.
168
- - **File row right-click menu** with Copy / Cut / Paste / Rename / Delete and **Copy Full Path(s)** to the system clipboard.
169
- - **Paste conflict resolution**: choose between **Overwrite** and **Keep Both** (auto-numbered names) when pasting into a folder with same-named items.
170
-
171
- ### Workspace + Monitoring
172
-
173
- - Detach panels into dedicated sub-windows and move tabs or whole panels across windows.
174
- - Use the global Tab List panel to scan terminal/chat inventory, restore unhosted tabs, drag tabs across layout targets, close tabs, and create new chat/local/SSH tabs without forcing a terminal panel to appear.
175
- - Save up to three workspace layout slots and restore them from the rail.
176
- - Optionally keep the computer awake while any chat session is running, with the system-sleep block released automatically when runs finish.
177
- - Chat tabs show a running indicator while a session is busy, mirroring terminal tab runtime-state dots.
178
- - Choose `Auto`, `Expanded`, or `Select` panel tab display modes based on how much header space your workspace has.
179
- - `Ctrl/Cmd+F` opens a panel-local find bar in terminal, current chat, file browser, and file editor.
180
- - Open a resource monitor panel for local and SSH terminals from the workspace rail.
181
- - Monitor panel surfaces CPU, memory, disk, network, process, socket, and GPU telemetry when available.
182
- - Monitor collection is shared across tabs that point at the same local or SSH target, with failover if the original source tab exits.
183
- - Monitor polling can be paused or resumed per local/SSH source, with the preference kept across restarts.
184
- - Compact monitor layouts now give GPU telemetry its own card with clearer VRAM usage details.
185
-
186
- ### Skills + MCP + Tools
187
-
188
- - Folder-based skills workflow compatible with agentskills-style structure.
189
- - Dynamic MCP server integration.
190
- - Precision editing tools for safe, targeted file updates.
191
- - Runtime tool toggles and summaries exposed to clients.
192
-
193
- ### Plugin System (v2.5+)
194
-
195
- - **Custom plugins** auto-integrate on startup: drop a folder with `plugin.json` + `index.mjs` into `~/.gybackend-data/plugins/` — the agent gets your tools, triggers, and dashboard panels immediately.
196
- - **6 official plugins ship out of the box** (21 tools, 10 triggers, 6 panels):
197
- - **patch-manager** — autonomous patch management (discover patches via yum/apt/Windows Update, build deployment plans, execute with MOP approval, fleet-wide compliance dashboard).
198
- - **request-router** — automated request handling (submit/approve/list requests with risk classification → auto-approve/queue/MOP routing).
199
- - **sop-assistant** — SOP retrieval + step-by-step guided execution; 8 built-in SOPs (restart-service, disk-cleanup, database-failover, incident-response, …) + IAM policy lookup.
200
- - **iam-connector** — IAM integration (user/group info, privileged access identification, access reviews, disable users with approval) on Linux + Windows.
201
- - **fraudops** — FraudOps operational layer (Flink/NATS/Kafka pipeline health, STR workflow with deadlines, decision summaries).
202
- - **netdata-rterm** — Netdata Cloud alert webhook ingestion + correlation with RTerm metrics/incidents for RCA and auto-remediation.
203
-
204
- ### SRE Observability (v2.0+)
205
-
206
- - **Metrics ledger** with per-second snapshots per host (cpu/mem/disk/net/load/gpu) and trend forecasting ("disk full in N days").
207
- - **Golden signals** per host (saturation/traffic/latency/errors) + capacity forecast.
208
- - **Uptime watchdogs** (tcp/ssh/http/command liveness), up/degraded/down with alerting.
209
- - **SLO/SLI** with error budget + burn rate + fast-burn alerting.
210
- - **Incident ledger** with timelines, AI root-cause analysis, and postmortems.
211
- - **Anomaly detection** (z-score + robust z-score) + predictive early warnings with optional MOP auto-remediation.
212
- - **APM** — OTLP distributed-trace store (per-service p50/95/99, error rate, bottleneck services).
213
- - **DEM/RUM** — Core Web Vitals (LCP/INP/CLS/TTFB) per page + error rate.
214
- - **k8s/cloud infra** — cluster health (pods, restarts, node readiness, cpu/mem % of limit).
215
- - **Windows ETW diagnostics** — built-in ETW providers (network/file/registry/process), agentless.
216
- - **UEBA behavior ledger** — agent run baselines + deviations (run-spike, token-blowout, error-spike, unusual-model).
217
- - **Embedded eval harness** — measures the agent's accuracy, tool selection, safety/policy compliance, and determinism.
218
- - **Unified live dashboard** + browser-renderable HTML dashboard.
219
- - **AWS APerf deep-dive** (v2.6+) — deploy aperf to any Linux host for deep CPU/PMU/process profiling with parsed findings feeding the agent's RCA.
220
-
221
- ### Governance, Audit & the Maker/Checker Model (v2.7+)
222
-
223
- - **Hash-chained audit ledger** — every agent action, command evaluation, approval, MOP change, and playbook step is recorded with the SHA-256 hash of the previous record (tamper-evident), plus **Merkle-tree evidence sealing** for independently-verifiable audit bundles.
224
- - **AGT policy engine** — YAML policies evaluated before every consequential action (allow/deny/escalate); glob action patterns, target wildcards (`prod-*`), agent identity + sponsoring principal for zero-trust.
225
- - **Review model (maker/checker)** — a second model independently verifies the action model's output on 5 dimensions: correctness, completeness, safety, compliance, and accuracy. Three modes (strict/advisory/auto-approve); skipped entirely when no review model is configured (fast output mode).
226
- - **Monitor diagnostics** — one-call answer to "why aren't stats displaying?" per terminal (publisher wired? session exists? collection stuck? connected? last-collect time?).
227
-
228
- ### Automation & Change Management
229
-
230
- - **Playbooks** with validation + automatic rollback; **DAG/orchestrated playbooks** with parallel waves.
231
- - **Event-driven triggers** (pattern/threshold/webhook/schedule) firing playbooks or proposing MOP changes, with cooldown + concurrency caps.
232
- - **MOP change management** — plan → approve → run → status with a durable change ledger and automatic rollback on validation failure.
233
- - **Scheduled tasks** (5-field cron) running headless inside the daemon.
234
- - **dagu workflows** — run declarative dagu YAML DAGs natively on the orchestrated playbook engine, no dagu server required.
235
- - **Parameterized runbooks** with `{{param}}` substitution + secret masking; idempotent `desiredState` steps; cross-host `captureVar`.
236
- - **NATS event mesh** — fleet-wide trigger fan-out across multiple RTerm backends.
237
-
238
- ### Mobile-Web Companion
239
-
240
- - Mobile-first remote client for active session tracking and steering.
241
- - Desktop can serve the mobile-web companion directly and expose copyable access links from settings.
242
- - OpenClawd-style conversational control from anywhere while your core runtime stays on your own machine.
243
- - Session list with search and status hints.
244
- - Pending approval badge with jump-to-blocked-session behavior, plus task-completion toasts.
245
- - Conversation rollback and branch-from-message controls from mobile.
246
- - Swipe-to-delete session flow for faster mobile cleanup.
247
- - Read-only terminal output tails with unread indicators, local/saved-SSH terminal creation, and SSH reconnect.
248
- - Detailed turn event inspection from phone browser.
249
- - Tool, skill, Agent Setting profile, terminal, and settings access through gateway RPC.
250
- - Long chat timelines avoid full-list rerenders during composer input, keeping history-heavy mobile sessions responsive.
251
- - Gateway exposure can now be limited to localhost, LAN-only, custom CIDR ranges, or all interfaces.
252
-
253
- ---
254
-
255
- ## Platforms
256
-
257
- 1. **Electron desktop app** (`apps/electron`)
258
- 2. **Standalone backend runtime** (`apps/gybackend`)
259
- 3. **Deprecated TUI runtime** (`apps/tui` wrapper + `packages/tui` core)
260
- 4. **Mobile-web runtime** (`apps/mobile-web` wrapper + `packages/mobile-web` core)
261
-
262
- ### Which Surface Should You Use?
263
-
264
- - **Desktop app**: primary full-featured experience for daily development.
265
- - **TUI (`gyll`)**: deprecated and unsupported. Desktop packages no longer bundle or install `gyll`.
266
- - **Mobile-web**: OpenClawd-style remote conversational control from phone/browser.
267
-
268
- ---
269
-
270
- ## Quick Start
271
-
272
- ### Prerequisites
273
-
274
- - Node.js 18+
275
- - npm
276
-
277
- ### Development
3
+ The automation foundation model for tiny devices — **offline tool-calling,
4
+ structured extraction and embeddings** for Node.js. Each platform package
5
+ bundles the native engine (`libneedle3`) **and** the base weights
6
+ (`needle3.cact`, ~35 MB), so after `npm install` nothing ever touches the
7
+ network.
278
8
 
279
9
  ```bash
280
- git clone https://github.com/MrOrangeJJ/RTerm.git
281
- cd RTerm
282
- npm install
283
- npm run dev
10
+ npm install neuralos
284
11
  ```
285
12
 
286
- ### One-line Mental Model
13
+ ```js
14
+ const { Needle, tool } = require('neuralos');
287
15
 
288
- `RTerm = persistent AI runtime + real terminal control + human override at any time.`
16
+ const getWeather = tool({
17
+ name: 'get_weather',
18
+ description: 'Get the current weather for a city.',
19
+ parameters: {
20
+ type: 'object',
21
+ properties: { city: { type: 'string' } },
22
+ required: ['city'],
23
+ },
24
+ }, (args) => ({ city: args.city, temp_c: 27, sky: 'clear' }));
289
25
 
290
- ### Mobile-web development
26
+ const agent = new Needle({ tools: [getWeather] });
27
+ console.log(agent.run("What's the weather in Lagos?"));
28
+ // -> { type: 'respond', confidence: 0.73, results: [{ city: 'Lagos', ... }], ... }
291
29
 
292
- ```bash
293
- npm run dev:mobile-web
30
+ console.log(agent.embed('hello world')); // float vector
294
31
  ```
295
32
 
296
- ---
297
-
298
- ## Deprecated CLI (`gyll`)
33
+ ## CLI
299
34
 
300
- After installing and launching RTerm desktop once, `gyll` is available from the desktop runtime setup.
301
-
302
- When an existing user updates from a version that installed desktop-managed `gyll` launchers, the updated app removes those legacy launchers on startup while leaving any shell profile PATH block untouched.
303
-
304
- ---
305
-
306
- ## Architecture Notes
307
-
308
- RTerm follows strict layering:
309
-
310
- - `packages/*`: implementation logic.
311
- - `apps/*`: composition/bootstrap/build wrappers.
312
- - Frontend logic does not belong in `packages/backend`.
313
-
314
- Core runtime chain (simplified):
315
-
316
- 1. `startElectronMain` (desktop composition root)
317
- 2. `GatewayService` (session runtime + transport-agnostic orchestration)
318
- 3. `WebSocketGatewayControlService` (policy-based ws gateway control)
319
- 4. `WebSocketGatewayAdapter` / `ElectronWindowTransport` (transport implementations)
320
- 5. Client controllers in TUI and mobile-web
321
-
322
- See:
323
-
324
- - `docs/monorepo-architecture.md`
325
- - `docs/build-commands.md`
326
-
327
- ## Privacy and Update Policy
328
-
329
- - Version checks query only this repository's GitHub `version.json`.
330
- - No third-party auto-update endpoint is used.
331
- - Version check is the only automatic background network request.
332
-
333
- ## Read More
334
-
335
- - Release notes: `changelogs/v1.6.0.md`
336
- - Build matrix and packaging: `docs/build-commands.md`
337
- - Monorepo boundaries and runtime flow: `docs/monorepo-architecture.md`
35
+ ```bash
36
+ neuralos run --tools tools.json [--impl impl.js] --query "text"
37
+ neuralos embed --text "text"
38
+ neuralos info
39
+ ```
338
40
 
339
- ---
41
+ ## API
340
42
 
341
- ## Build and Packaging
43
+ - **`new Needle({ tools, system, autoDate, stateless, bufferSize })`**
44
+ - `tools`: schema objects `{ name, description, parameters, implementation? }`
45
+ or functions with a `.needleSchema` property (use the `tool()` helper).
46
+ Implementations receive one argument: the arguments object from the model.
47
+ - `autoDate` (default true): injects a local `date:` fact into the system text.
48
+ - `stateless` (default false): `reset()` before every query.
49
+ - **`agent.run(query, { maxSteps, maxNewTokens })`** — tool-call loop;
50
+ returns the response envelope with a `results` array.
51
+ - **`agent.complete(text, maxNewTokens)`** — single completion, no execution.
52
+ - **`agent.embed(text)`** — embedding vector.
53
+ - **`agent.reset()`** — clear the engine-side conversation state.
342
54
 
343
- - `npm run build`
344
- - `npm run build:backend`
345
- - `npm run build:tui`
346
- - `npm run build:mobile-web`
347
- - `npm run dist`
348
- - `npm run dist:mac`
349
- - `npm run dist:win`
350
- - `npm run dist:linux`
351
- - `npm run dist:linux-arm64`
352
- - `./build.sh --help`
55
+ ## Platforms
353
56
 
354
- For the full command matrix and packaging notes, see `docs/build-commands.md`.
57
+ Bundled engines: macOS arm64/x64, Linux x64/arm64 (glibc), Windows x64.
58
+ Other platforms are not packaged — the Python distribution
59
+ (`pip install neuralos`) carries a broader engine matrix.
355
60
 
356
- ---
61
+ > Note: this package is the **foundation-model runtime**. The headless RTerm
62
+ > backend daemon lives in the separate [`rterm-backend`](https://www.npmjs.com/package/rterm-backend)
63
+ > package (previously also published here as neuralos 2.x–3.9.x).
357
64
 
358
65
  ## License
359
66
 
360
- This project is licensed under the **Apache License, Version 2.0** ([LICENSE](./LICENSE)).
361
-
362
- Special acknowledgment: inspirations and references from [Tabby](https://github.com/Eugeny/tabby) (MIT).
363
-
364
- ---
365
-
366
- **RTerm** - _The shell that thinks with you._
67
+ Apache-2.0