@omercnet/paseo-shared-browser 4.1.12-next.513.1 → 4.1.12-next.514.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.
package/README.md CHANGED
@@ -171,11 +171,12 @@ workspace or project is matched by directory: the workspace whose directory is t
171
171
  the deepest one containing it. Both directories are normalized first (separators, `.` and `..` segments),
172
172
  so a path that climbs out of a workspace does not match it. The lookup includes background workspaces. If
173
173
  the list is longer than 20 pages of 200, or the lookup fails, those lists match nothing. Workspaces that
174
- share a directory cannot be told apart, so listing any of them matches them all. Matching is lexical: nothing on disk is consulted, so symlinks are not resolved and letter case is not folded. The settings read has a 2 second deadline, and a read that is too slow is treated like an unreadable setting, so every new agent gets the tool. The workspace lookup has its own 2 second deadline, and a timeout there counts as no match. Either timeout logs one line, and a slow lookup never holds up agent creation. The check runs before the adapter, its credential or the supervisor are set up, so
174
+ share a directory cannot be told apart, so listing any of them matches them all. Matching is lexical: nothing on disk is consulted, so symlinks are not resolved and letter case is not folded. A path is only compared when it starts at a root (`/` or a drive such as `C:`); a relative workspace or agent directory never matches. Backslashes are read as separators and only drive paths are modelled, so a UNC path is not recognized and a literal backslash in a POSIX file name counts as a separator. The settings read has a 2 second deadline, and a read that is too slow is treated like an unreadable setting, so every new agent gets the tool. The workspace lookup has its own 2 second deadline, and a timeout there counts as no match. Either timeout logs one line, and a slow lookup never holds up agent creation. The check runs before the adapter, its credential or the supervisor are set up, so
175
175
  an agent that is not allowed costs nothing. It applies to agents created after the setting is saved. A
176
176
  setting that cannot be read or is invalid falls back to every new agent, and the plugin log gets one line
177
177
  saying so. The settings screen reports an entry over 256 characters or a list over 200 entries instead of
178
- cutting it off.
178
+ cutting it off. Changing the mode in the settings screen also saves the list text as typed, and shows
179
+ the error instead of saving when a list does not parse.
179
180
 
180
181
  ## Runtime environment overrides
181
182
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@omercnet/paseo-shared-browser",
3
- "version": "4.1.12-next.513.1",
3
+ "version": "4.1.12-next.514.1",
4
4
  "description": "One real Chromium session per Paseo workspace, shared live across every connected client.",
5
5
  "keywords": [
6
6
  "browser",
@@ -87,6 +87,11 @@ export function normalizeDirectory(path: string): string {
87
87
  return absolute ? `${drive}/${joined}` : joined;
88
88
  }
89
89
 
90
+ /** True for a normalized path that starts at a root (`/` or a drive such as `C:/`). A relative path never matches a workspace. */
91
+ export function isAbsoluteDirectory(normalized: string): boolean {
92
+ return normalized.startsWith("/") || /^[A-Za-z]:\//.test(normalized);
93
+ }
94
+
90
95
  /**
91
96
  * The workspaces whose directory is the agent's directory, or the deepest directory that contains it.
92
97
  * Several workspaces can share one directory, so this returns all of them.
@@ -96,11 +101,13 @@ export function workspacesForDirectory(
96
101
  workspaces: readonly WorkspaceRef[],
97
102
  ): WorkspaceRef[] {
98
103
  const target = normalizeDirectory(cwd);
104
+ if (!isAbsoluteDirectory(target)) return [];
99
105
  let depth = -1;
100
106
  let found: WorkspaceRef[] = [];
101
107
  for (const workspace of workspaces) {
102
108
  if (!workspace.workspaceDirectory) continue;
103
109
  const directory = normalizeDirectory(workspace.workspaceDirectory);
110
+ if (!isAbsoluteDirectory(directory)) continue;
104
111
  const prefix = directory.endsWith("/") ? directory : `${directory}/`;
105
112
  if (target !== directory && !target.startsWith(prefix)) continue;
106
113
  if (directory.length > depth) {