@commonlyai/cli 0.1.236 → 0.1.238
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/package.json
CHANGED
|
@@ -422,7 +422,8 @@ const accessOnlyLogin = (text, { source, mustOutlastMs, apiKeyHint = true }) =>
|
|
|
422
422
|
if (typeof oauth.expiresAt === 'number' && oauth.expiresAt - Date.now() < mustOutlastMs) {
|
|
423
423
|
const minutes = Math.max(0, Math.floor((oauth.expiresAt - Date.now()) / 60000));
|
|
424
424
|
throw new Error(`the Claude login on this machine expires in ${minutes} min, before this turn could end. `
|
|
425
|
-
+
|
|
425
|
+
+ 'Sign in again in your own terminal on this machine, outside the agent: run `claude`, then /login'
|
|
426
|
+
+ `${apiKeyHint ? '. Or set ANTHROPIC_API_KEY for the agent' : ''}.`);
|
|
426
427
|
}
|
|
427
428
|
// An allowlist, not "everything but refreshToken": a field the host record
|
|
428
429
|
// gains later, secret or not, never reaches the seat's writable HOME.
|
|
@@ -244,9 +244,18 @@ export const withholdGrantBroker = (environment, adapter, {
|
|
|
244
244
|
const reason = confinementReason(environment, adapter, platform);
|
|
245
245
|
if (!reason) return environment;
|
|
246
246
|
|
|
247
|
-
|
|
247
|
+
// F94: the server flags a broker whose grant names this seat (the granter's
|
|
248
|
+
// own agent, with consent) so it rides a seat no sandbox confines. Delivery
|
|
249
|
+
// only; the broker checks the naming on every call. Never on native Windows,
|
|
250
|
+
// and never for an adapter not approved for the broker.
|
|
251
|
+
const rides = (server) => server?.byoNamed === true
|
|
252
|
+
&& reason !== 'adapter_cannot_confine' && platform !== 'win32';
|
|
253
|
+
const isWithheld = (server) => isOurGrantBroker(server, { instanceUrl }) && !rides(server);
|
|
254
|
+
if (!environment.mcp.some(isWithheld)) return environment;
|
|
255
|
+
|
|
256
|
+
const kept = environment.mcp.filter((server) => !isWithheld(server));
|
|
248
257
|
const withheld = environment.mcp
|
|
249
|
-
.filter(
|
|
258
|
+
.filter(isWithheld)
|
|
250
259
|
.map((server) => (typeof server?.name === 'string' && server.name ? server.name : '(unnamed)'));
|
|
251
260
|
if (typeof onRefuse === 'function') {
|
|
252
261
|
onRefuse({
|