notoken-core 1.0.0

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 (118) hide show
  1. package/config/file-hints.json +255 -0
  2. package/config/hosts.json +14 -0
  3. package/config/intents.json +3920 -0
  4. package/config/playbooks.json +112 -0
  5. package/config/rules.json +100 -0
  6. package/dist/agents/agentSpawner.d.ts +56 -0
  7. package/dist/agents/agentSpawner.js +180 -0
  8. package/dist/agents/planner.d.ts +40 -0
  9. package/dist/agents/planner.js +175 -0
  10. package/dist/agents/playbookRunner.d.ts +45 -0
  11. package/dist/agents/playbookRunner.js +120 -0
  12. package/dist/agents/taskRunner.d.ts +61 -0
  13. package/dist/agents/taskRunner.js +142 -0
  14. package/dist/context/history.d.ts +36 -0
  15. package/dist/context/history.js +115 -0
  16. package/dist/conversation/coreference.d.ts +27 -0
  17. package/dist/conversation/coreference.js +147 -0
  18. package/dist/conversation/secrets.d.ts +43 -0
  19. package/dist/conversation/secrets.js +129 -0
  20. package/dist/conversation/store.d.ts +94 -0
  21. package/dist/conversation/store.js +184 -0
  22. package/dist/execution/git.d.ts +11 -0
  23. package/dist/execution/git.js +146 -0
  24. package/dist/execution/ssh.d.ts +2 -0
  25. package/dist/execution/ssh.js +17 -0
  26. package/dist/handlers/executor.d.ts +8 -0
  27. package/dist/handlers/executor.js +216 -0
  28. package/dist/healing/claudeHealer.d.ts +17 -0
  29. package/dist/healing/claudeHealer.js +300 -0
  30. package/dist/healing/patchPromoter.d.ts +25 -0
  31. package/dist/healing/patchPromoter.js +118 -0
  32. package/dist/healing/ruleBuilder.d.ts +5 -0
  33. package/dist/healing/ruleBuilder.js +111 -0
  34. package/dist/healing/ruleRepairer.d.ts +8 -0
  35. package/dist/healing/ruleRepairer.js +29 -0
  36. package/dist/healing/ruleValidator.d.ts +22 -0
  37. package/dist/healing/ruleValidator.js +145 -0
  38. package/dist/healing/runHealer.d.ts +11 -0
  39. package/dist/healing/runHealer.js +74 -0
  40. package/dist/index.d.ts +51 -0
  41. package/dist/index.js +62 -0
  42. package/dist/intents/catalog.d.ts +4 -0
  43. package/dist/intents/catalog.js +7 -0
  44. package/dist/nlp/disambiguate.d.ts +2 -0
  45. package/dist/nlp/disambiguate.js +46 -0
  46. package/dist/nlp/fuzzyResolver.d.ts +14 -0
  47. package/dist/nlp/fuzzyResolver.js +108 -0
  48. package/dist/nlp/llmFallback.d.ts +63 -0
  49. package/dist/nlp/llmFallback.js +338 -0
  50. package/dist/nlp/llmParser.d.ts +8 -0
  51. package/dist/nlp/llmParser.js +118 -0
  52. package/dist/nlp/multiClassifier.d.ts +39 -0
  53. package/dist/nlp/multiClassifier.js +181 -0
  54. package/dist/nlp/parseIntent.d.ts +2 -0
  55. package/dist/nlp/parseIntent.js +34 -0
  56. package/dist/nlp/ruleParser.d.ts +2 -0
  57. package/dist/nlp/ruleParser.js +234 -0
  58. package/dist/nlp/semantic.d.ts +104 -0
  59. package/dist/nlp/semantic.js +419 -0
  60. package/dist/nlp/uncertainty.d.ts +42 -0
  61. package/dist/nlp/uncertainty.js +103 -0
  62. package/dist/parsers/apacheParser.d.ts +50 -0
  63. package/dist/parsers/apacheParser.js +152 -0
  64. package/dist/parsers/bindParser.d.ts +40 -0
  65. package/dist/parsers/bindParser.js +189 -0
  66. package/dist/parsers/envFile.d.ts +39 -0
  67. package/dist/parsers/envFile.js +128 -0
  68. package/dist/parsers/fileFinder.d.ts +30 -0
  69. package/dist/parsers/fileFinder.js +226 -0
  70. package/dist/parsers/index.d.ts +27 -0
  71. package/dist/parsers/index.js +193 -0
  72. package/dist/parsers/jsonParser.d.ts +16 -0
  73. package/dist/parsers/jsonParser.js +57 -0
  74. package/dist/parsers/nginxParser.d.ts +47 -0
  75. package/dist/parsers/nginxParser.js +161 -0
  76. package/dist/parsers/passwd.d.ts +25 -0
  77. package/dist/parsers/passwd.js +41 -0
  78. package/dist/parsers/shadow.d.ts +23 -0
  79. package/dist/parsers/shadow.js +50 -0
  80. package/dist/parsers/yamlParser.d.ts +13 -0
  81. package/dist/parsers/yamlParser.js +54 -0
  82. package/dist/policy/confirm.d.ts +2 -0
  83. package/dist/policy/confirm.js +29 -0
  84. package/dist/policy/safety.d.ts +4 -0
  85. package/dist/policy/safety.js +32 -0
  86. package/dist/types/intent.d.ts +205 -0
  87. package/dist/types/intent.js +32 -0
  88. package/dist/types/rules.d.ts +237 -0
  89. package/dist/types/rules.js +50 -0
  90. package/dist/utils/analysis.d.ts +25 -0
  91. package/dist/utils/analysis.js +307 -0
  92. package/dist/utils/autoBackup.d.ts +43 -0
  93. package/dist/utils/autoBackup.js +144 -0
  94. package/dist/utils/config.d.ts +11 -0
  95. package/dist/utils/config.js +32 -0
  96. package/dist/utils/dirAnalysis.d.ts +23 -0
  97. package/dist/utils/dirAnalysis.js +192 -0
  98. package/dist/utils/explain.d.ts +8 -0
  99. package/dist/utils/explain.js +145 -0
  100. package/dist/utils/logger.d.ts +5 -0
  101. package/dist/utils/logger.js +29 -0
  102. package/dist/utils/output.d.ts +2 -0
  103. package/dist/utils/output.js +26 -0
  104. package/dist/utils/paths.d.ts +26 -0
  105. package/dist/utils/paths.js +47 -0
  106. package/dist/utils/permissions.d.ts +64 -0
  107. package/dist/utils/permissions.js +298 -0
  108. package/dist/utils/platform.d.ts +53 -0
  109. package/dist/utils/platform.js +253 -0
  110. package/dist/utils/smartFile.d.ts +29 -0
  111. package/dist/utils/smartFile.js +188 -0
  112. package/dist/utils/spinner.d.ts +53 -0
  113. package/dist/utils/spinner.js +140 -0
  114. package/dist/utils/verbose.d.ts +27 -0
  115. package/dist/utils/verbose.js +131 -0
  116. package/dist/utils/wslPaths.d.ts +31 -0
  117. package/dist/utils/wslPaths.js +145 -0
  118. package/package.json +39 -0
@@ -0,0 +1,255 @@
1
+ {
2
+ "_description": "Known file locations by service/category. Add your own paths here.",
3
+ "nginx": {
4
+ "aliases": ["nginx", "web", "webserver", "proxy", "reverse-proxy"],
5
+ "configs": [
6
+ { "path": "/etc/nginx/nginx.conf", "description": "Main config" },
7
+ { "path": "/etc/nginx/conf.d/", "description": "Config directory" },
8
+ { "path": "/etc/nginx/sites-available/", "description": "Sites available" },
9
+ { "path": "/etc/nginx/sites-enabled/", "description": "Sites enabled" },
10
+ { "path": "/etc/nginx/mime.types", "description": "MIME types" }
11
+ ],
12
+ "logs": [
13
+ { "path": "/var/log/nginx/access.log", "description": "Access log" },
14
+ { "path": "/var/log/nginx/error.log", "description": "Error log" }
15
+ ],
16
+ "data": [
17
+ { "path": "/usr/share/nginx/html/", "description": "Default webroot" },
18
+ { "path": "/var/www/html/", "description": "Common webroot" }
19
+ ],
20
+ "service": "nginx",
21
+ "parser": "nginx"
22
+ },
23
+ "apache": {
24
+ "aliases": ["apache", "apache2", "httpd", "http"],
25
+ "configs": [
26
+ { "path": "/etc/apache2/apache2.conf", "description": "Main config (Debian)" },
27
+ { "path": "/etc/httpd/conf/httpd.conf", "description": "Main config (RHEL)" },
28
+ { "path": "/etc/apache2/sites-available/", "description": "Sites available" },
29
+ { "path": "/etc/apache2/sites-enabled/", "description": "Sites enabled" },
30
+ { "path": "/etc/httpd/conf.d/", "description": "Config directory (RHEL)" },
31
+ { "path": "/etc/apache2/mods-enabled/", "description": "Enabled modules" }
32
+ ],
33
+ "logs": [
34
+ { "path": "/var/log/apache2/access.log", "description": "Access log (Debian)" },
35
+ { "path": "/var/log/apache2/error.log", "description": "Error log (Debian)" },
36
+ { "path": "/var/log/httpd/access_log", "description": "Access log (RHEL)" },
37
+ { "path": "/var/log/httpd/error_log", "description": "Error log (RHEL)" }
38
+ ],
39
+ "data": [
40
+ { "path": "/var/www/html/", "description": "Default webroot" }
41
+ ],
42
+ "service": "apache2",
43
+ "parser": "apache"
44
+ },
45
+ "postgres": {
46
+ "aliases": ["postgres", "postgresql", "pg", "database", "db"],
47
+ "configs": [
48
+ { "path": "/etc/postgresql/", "description": "Config directory" },
49
+ { "path": "/etc/postgresql/*/main/postgresql.conf", "description": "Main config" },
50
+ { "path": "/etc/postgresql/*/main/pg_hba.conf", "description": "Client auth config" }
51
+ ],
52
+ "logs": [
53
+ { "path": "/var/log/postgresql/", "description": "Log directory" }
54
+ ],
55
+ "data": [
56
+ { "path": "/var/lib/postgresql/", "description": "Data directory" }
57
+ ],
58
+ "service": "postgresql",
59
+ "parser": "text"
60
+ },
61
+ "mysql": {
62
+ "aliases": ["mysql", "mariadb", "maria"],
63
+ "configs": [
64
+ { "path": "/etc/mysql/my.cnf", "description": "Main config" },
65
+ { "path": "/etc/mysql/mysql.conf.d/", "description": "Config directory" },
66
+ { "path": "/etc/mysql/mariadb.conf.d/", "description": "MariaDB config" }
67
+ ],
68
+ "logs": [
69
+ { "path": "/var/log/mysql/", "description": "Log directory" }
70
+ ],
71
+ "data": [
72
+ { "path": "/var/lib/mysql/", "description": "Data directory" }
73
+ ],
74
+ "service": "mysql",
75
+ "parser": "text"
76
+ },
77
+ "redis": {
78
+ "aliases": ["redis", "cache"],
79
+ "configs": [
80
+ { "path": "/etc/redis/redis.conf", "description": "Main config" },
81
+ { "path": "/etc/redis/sentinel.conf", "description": "Sentinel config" }
82
+ ],
83
+ "logs": [
84
+ { "path": "/var/log/redis/redis-server.log", "description": "Server log" }
85
+ ],
86
+ "data": [
87
+ { "path": "/var/lib/redis/", "description": "Data directory" }
88
+ ],
89
+ "service": "redis-server",
90
+ "parser": "text"
91
+ },
92
+ "ssh": {
93
+ "aliases": ["ssh", "sshd", "openssh"],
94
+ "configs": [
95
+ { "path": "/etc/ssh/sshd_config", "description": "SSH daemon config" },
96
+ { "path": "/etc/ssh/ssh_config", "description": "SSH client config" },
97
+ { "path": "~/.ssh/config", "description": "User SSH config" },
98
+ { "path": "~/.ssh/authorized_keys", "description": "Authorized keys" },
99
+ { "path": "~/.ssh/known_hosts", "description": "Known hosts" }
100
+ ],
101
+ "logs": [
102
+ { "path": "/var/log/auth.log", "description": "Auth log (Debian)" },
103
+ { "path": "/var/log/secure", "description": "Auth log (RHEL)" }
104
+ ],
105
+ "service": "sshd",
106
+ "parser": "text"
107
+ },
108
+ "system": {
109
+ "aliases": ["system", "os", "linux", "server"],
110
+ "configs": [
111
+ { "path": "/etc/hostname", "description": "Hostname" },
112
+ { "path": "/etc/hosts", "description": "Hosts file" },
113
+ { "path": "/etc/resolv.conf", "description": "DNS resolver" },
114
+ { "path": "/etc/fstab", "description": "Filesystem mounts" },
115
+ { "path": "/etc/crontab", "description": "System crontab" },
116
+ { "path": "/etc/environment", "description": "System environment" },
117
+ { "path": "/etc/sysctl.conf", "description": "Kernel parameters" },
118
+ { "path": "/etc/passwd", "description": "User accounts" },
119
+ { "path": "/etc/shadow", "description": "Password hashes" },
120
+ { "path": "/etc/group", "description": "Group definitions" },
121
+ { "path": "/etc/sudoers", "description": "Sudo rules" }
122
+ ],
123
+ "logs": [
124
+ { "path": "/var/log/syslog", "description": "System log (Debian)" },
125
+ { "path": "/var/log/messages", "description": "System log (RHEL)" },
126
+ { "path": "/var/log/kern.log", "description": "Kernel log" },
127
+ { "path": "/var/log/dmesg", "description": "Boot messages" }
128
+ ],
129
+ "parser": "text"
130
+ },
131
+ "ssl": {
132
+ "aliases": ["ssl", "tls", "certs", "certificates", "letsencrypt", "lets-encrypt"],
133
+ "configs": [
134
+ { "path": "/etc/ssl/certs/", "description": "System certificates" },
135
+ { "path": "/etc/ssl/private/", "description": "Private keys" },
136
+ { "path": "/etc/letsencrypt/live/", "description": "Let's Encrypt certs" },
137
+ { "path": "/etc/pki/tls/certs/", "description": "PKI certificates (RHEL)" }
138
+ ],
139
+ "parser": "text"
140
+ },
141
+ "docker": {
142
+ "aliases": ["docker", "container", "compose"],
143
+ "configs": [
144
+ { "path": "/etc/docker/daemon.json", "description": "Docker daemon config" },
145
+ { "path": "docker-compose.yml", "description": "Docker Compose" },
146
+ { "path": "docker-compose.yaml", "description": "Docker Compose" },
147
+ { "path": "Dockerfile", "description": "Dockerfile" }
148
+ ],
149
+ "logs": [
150
+ { "path": "/var/log/docker.log", "description": "Docker log" }
151
+ ],
152
+ "service": "docker",
153
+ "parser": "yaml"
154
+ },
155
+ "systemd": {
156
+ "aliases": ["systemd", "services", "units", "systemctl"],
157
+ "configs": [
158
+ { "path": "/etc/systemd/system/", "description": "Custom unit files" },
159
+ { "path": "/usr/lib/systemd/system/", "description": "System unit files" }
160
+ ],
161
+ "logs": [
162
+ { "path": "/var/log/journal/", "description": "Journal logs" }
163
+ ],
164
+ "parser": "text"
165
+ },
166
+ "network": {
167
+ "aliases": ["network", "firewall", "iptables", "netplan", "interfaces"],
168
+ "configs": [
169
+ { "path": "/etc/network/interfaces", "description": "Interfaces (Debian)" },
170
+ { "path": "/etc/netplan/", "description": "Netplan config (Ubuntu)" },
171
+ { "path": "/etc/sysconfig/network-scripts/", "description": "Network (RHEL)" },
172
+ { "path": "/etc/iptables/rules.v4", "description": "iptables rules" },
173
+ { "path": "/etc/firewalld/", "description": "Firewalld config" },
174
+ { "path": "/etc/resolv.conf", "description": "DNS resolver" }
175
+ ],
176
+ "parser": "text"
177
+ },
178
+ "env": {
179
+ "aliases": ["env", "dotenv", "environment", ".env"],
180
+ "configs": [
181
+ { "path": ".env", "description": "Local .env" },
182
+ { "path": ".env.local", "description": "Local overrides" },
183
+ { "path": ".env.production", "description": "Production env" },
184
+ { "path": ".env.staging", "description": "Staging env" },
185
+ { "path": ".env.development", "description": "Development env" },
186
+ { "path": ".env.test", "description": "Test env" }
187
+ ],
188
+ "parser": "env"
189
+ },
190
+ "node": {
191
+ "aliases": ["node", "nodejs", "npm", "yarn", "pnpm"],
192
+ "configs": [
193
+ { "path": "package.json", "description": "Package manifest" },
194
+ { "path": "tsconfig.json", "description": "TypeScript config" },
195
+ { "path": ".eslintrc.json", "description": "ESLint config" },
196
+ { "path": ".prettierrc", "description": "Prettier config" },
197
+ { "path": "vite.config.ts", "description": "Vite config" },
198
+ { "path": "next.config.js", "description": "Next.js config" }
199
+ ],
200
+ "parser": "json"
201
+ },
202
+ "python": {
203
+ "aliases": ["python", "pip", "django", "flask", "fastapi"],
204
+ "configs": [
205
+ { "path": "requirements.txt", "description": "Python requirements" },
206
+ { "path": "pyproject.toml", "description": "Project config" },
207
+ { "path": "setup.py", "description": "Setup script" },
208
+ { "path": ".python-version", "description": "Python version" }
209
+ ],
210
+ "parser": "text"
211
+ },
212
+ "bind": {
213
+ "aliases": ["bind", "bind9", "named", "dns server", "zone file", "dns zone"],
214
+ "configs": [
215
+ { "path": "/etc/bind/named.conf", "description": "BIND main config" },
216
+ { "path": "/etc/bind/named.conf.local", "description": "BIND local zones" },
217
+ { "path": "/etc/bind/named.conf.options", "description": "BIND options" },
218
+ { "path": "/etc/bind/named.conf.default-zones", "description": "Default zones" },
219
+ { "path": "/etc/bind/zones/", "description": "Zone files directory" },
220
+ { "path": "/var/cache/bind/", "description": "BIND cache" },
221
+ { "path": "/etc/named.conf", "description": "BIND config (RHEL)" },
222
+ { "path": "/var/named/", "description": "Zone files (RHEL)" }
223
+ ],
224
+ "logs": [
225
+ { "path": "/var/log/named/", "description": "BIND logs" },
226
+ { "path": "/var/log/syslog", "description": "System log (BIND logs here too)" }
227
+ ],
228
+ "service": "named",
229
+ "parser": "text"
230
+ },
231
+ "letsencrypt": {
232
+ "aliases": ["letsencrypt", "lets-encrypt", "certbot", "acme", "ssl cert"],
233
+ "configs": [
234
+ { "path": "/etc/letsencrypt/", "description": "Let's Encrypt root" },
235
+ { "path": "/etc/letsencrypt/live/", "description": "Active certificates" },
236
+ { "path": "/etc/letsencrypt/renewal/", "description": "Renewal configs" },
237
+ { "path": "/etc/letsencrypt/accounts/", "description": "Account keys" },
238
+ { "path": "/etc/letsencrypt/cli.ini", "description": "Certbot defaults" }
239
+ ],
240
+ "logs": [
241
+ { "path": "/var/log/letsencrypt/", "description": "Certbot logs" }
242
+ ],
243
+ "service": "certbot",
244
+ "parser": "text"
245
+ },
246
+ "swap": {
247
+ "aliases": ["swap", "swapfile", "virtual memory"],
248
+ "configs": [
249
+ { "path": "/etc/fstab", "description": "Swap mount (look for swap entries)" },
250
+ { "path": "/swapfile", "description": "Common swap file location" },
251
+ { "path": "/swap", "description": "Alternative swap location" }
252
+ ],
253
+ "parser": "text"
254
+ }
255
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "dev": {
3
+ "host": "user@dev-server",
4
+ "description": "Development server"
5
+ },
6
+ "staging": {
7
+ "host": "user@staging-server",
8
+ "description": "Staging server"
9
+ },
10
+ "prod": {
11
+ "host": "user@prod-server",
12
+ "description": "Production server"
13
+ }
14
+ }