@thinremote/thinr-cli 1.3.4 → 1.3.5

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/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.3.5] - 2026-09-24
4
+
5
+ ### Fixed
6
+
7
+ - `thinr_ls` describes what "/" actually resolves to: the agent process's
8
+ working directory, which is normally the filesystem root. 1.3.4 said it was
9
+ a base directory "usually /var/log", which was a stale service definition on
10
+ one device rather than how installs behave.
11
+
3
12
  ## [1.3.4] - 2026-09-24
4
13
 
5
14
  ### Fixed
@@ -27,16 +27,17 @@ async function toolLs(args) {
27
27
  const requested = args.path || '/';
28
28
  const entries = await api.listDir(requested, args.include_hidden || false);
29
29
 
30
- // "/" is the agent's base directory, not the filesystem root, while every
31
- // other absolute path is literal. Listing "/" on an agent based in
32
- // /var/log and reading it as the root is an easy and wrong conclusion to
33
- // draw, so say which directory these entries actually came from.
30
+ // "/" resolves through the agent process's working directory, normally
31
+ // the filesystem root, while every other absolute path is literal. An
32
+ // agent started elsewhere answers "/" with that directory instead, which
33
+ // reads as the device's root and is not, so name the directory these
34
+ // entries actually came from.
34
35
  let header = '';
35
36
  if (requested === '/') {
36
37
  try {
37
38
  const root = await api.info('/');
38
39
  if (root?.path && root.path !== '/') {
39
- header = `listing ${root.path} (the agent's base directory, which "/" resolves to)\n`;
40
+ header = `listing ${root.path} (the agent's working directory, which "/" resolves to)\n`;
40
41
  }
41
42
  } catch {
42
43
  // Labelling is a convenience; a listing without it still stands.
@@ -163,14 +164,14 @@ export const tools = [
163
164
  },
164
165
  {
165
166
  name: 'thinr_ls',
166
- description: `List directory contents on a remote device. Paths are absolute on the device filesystem (e.g., "/etc", "/var/log"), with one exception: "/" on its own resolves to the agent's base directory (\`fs_base_path\` in thinr_device_info), which for a system install is usually /var/log. The listing says which directory it came from when the two differ. Nothing is confined to that directory — "/etc" reads the real /etc — so do not read a "/" listing as the root filesystem. Subject to the OS user the agent runs as; check whoami (or thinr_device_info) before assuming write access to system paths. Use include_hidden to see dotfiles.`,
167
+ description: `List directory contents on a remote device. Paths are absolute on the device filesystem (e.g., "/etc", "/var/log"), with one exception: "/" on its own resolves to the agent process's working directory, normally the filesystem root, reported as \`fs_base_path\` by thinr_device_info. When it is not the root — an agent started from elsewhere — the listing says which directory it came from. Nothing is confined to it: "/etc" reads the real /etc. Subject to the OS user the agent runs as; check whoami (or thinr_device_info) before assuming write access to system paths. Use include_hidden to see dotfiles.`,
167
168
  inputSchema: {
168
169
  type: 'object',
169
170
  properties: {
170
171
  path: {
171
172
  type: 'string',
172
173
  description:
173
- 'Directory path. Absolute and literal, except "/", which means the agent\'s base directory (default: "/").',
174
+ 'Directory path. Absolute and literal, except "/", which means the agent\'s working directory, normally the filesystem root (default: "/").',
174
175
  },
175
176
  include_hidden: {
176
177
  type: 'boolean',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thinremote/thinr-cli",
3
- "version": "1.3.4",
3
+ "version": "1.3.5",
4
4
  "description": "CLI for ThinRemote — remote management for IoT devices, with an MCP server for AI clients",
5
5
  "main": "bin/thinr.js",
6
6
  "bin": {