@omercnet/paseo-shared-browser 4.1.12-next.516.1 → 4.1.12-next.517.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 +2 -2
- package/package.json +1 -1
- package/server/supervisor.ts +1 -0
- package/shared/agent-access.ts +1 -0
package/README.md
CHANGED
|
@@ -174,7 +174,7 @@ differently from the other lists: a server returned from that hook lasts for tha
|
|
|
174
174
|
added in `agent.create` is stored on the agent. So an agent with a matching label gets the adapter in
|
|
175
175
|
every interactive session it opens (a new agent, a resume, a refresh, an import), each time with a fresh
|
|
176
176
|
ticket bound to that agent and its workspace; the tickets are revoked together when the agent is
|
|
177
|
-
archived, and an agent keeps at most eight bound tickets (the oldest is dropped first). Helper (background) agents, history sessions and sessions without a workspace are skipped. If
|
|
177
|
+
archived, and an agent keeps at most eight bound tickets (the oldest is dropped first, its viewer is detached, and the log gets one line). A bind for a ticket that was issued before the agent was revoked is refused, however late it arrives; a ticket issued after the revocation, for example by a restored agent, binds normally. Helper (background) agents, history sessions and sessions without a workspace are skipped. If
|
|
178
178
|
the ticket cannot be issued or bound the session opens without the tool and the log gets one line. In
|
|
179
179
|
"Every new agent" mode this does nothing, because every new agent already has the tool; an agent that
|
|
180
180
|
the create hook already gave a ticket is not given a second one.
|
|
@@ -188,7 +188,7 @@ workspace or project is matched by directory: the workspace whose directory is t
|
|
|
188
188
|
the deepest one containing it. Both directories are normalized first (separators, `.` and `..` segments),
|
|
189
189
|
so a path that climbs out of a workspace does not match it. The lookup includes background workspaces. If
|
|
190
190
|
the list is longer than 20 pages of 200, or the lookup fails, those lists match nothing. Workspaces that
|
|
191
|
-
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
|
|
191
|
+
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 (`\\server\share` reads as `/server/share`, and a bare `C:` reads as `C:/`) 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
|
|
192
192
|
an agent that is not allowed costs nothing. It applies to agents created after the setting is saved. A
|
|
193
193
|
setting that cannot be read or is invalid falls back to every new agent, and the plugin log gets one line
|
|
194
194
|
saying so. The settings screen reports an entry over 256 characters or a list over 200 entries instead of
|
package/package.json
CHANGED
package/server/supervisor.ts
CHANGED
|
@@ -661,6 +661,7 @@ export class RuntimeSupervisor<Runtime extends RuntimeInstance = RuntimeInstance
|
|
|
661
661
|
tickets.delete(oldest);
|
|
662
662
|
const dropped = this.agentBindings.get(oldest);
|
|
663
663
|
this.agentBindings.delete(oldest);
|
|
664
|
+
console.warn("[shared-browser] agent ticket cap reached; dropped the oldest bound ticket");
|
|
664
665
|
if (dropped?.viewerToken) void this.browserPolicy.detach(dropped.viewerToken).catch(() => {});
|
|
665
666
|
}
|
|
666
667
|
return { bound: true };
|
package/shared/agent-access.ts
CHANGED
|
@@ -104,6 +104,7 @@ export function workspacesForDirectory(
|
|
|
104
104
|
workspaces: readonly WorkspaceRef[],
|
|
105
105
|
): WorkspaceRef[] {
|
|
106
106
|
const target = normalizeDirectory(cwd);
|
|
107
|
+
// Early exit only: a relative target can never equal or sit under an absolute workspace directory, so the loop below would find nothing.
|
|
107
108
|
if (!isAbsoluteDirectory(target)) return [];
|
|
108
109
|
let depth = -1;
|
|
109
110
|
let found: WorkspaceRef[] = [];
|